Reply
Contributor
Posts: 12
Registered: ‎03-31-2012
Accepted Solution

Please Help: DPM response does not validate

I've been struggling to get this up and running for several days now. Can anyone help?

 

I'm using ASP.NET MVC and the DPM API. But the response back from the server doesn't validate.

 

Here's some sample code. The hard-coded values are ones returned in the post form data. The first two arguments hold the values I was given when I created my test account. The transaction is approved, but the code below sets ok to false! Can anyone see where I've gone awry?

 

bool ok = Crypto.IsMatch(AuthorizeNetAccount.TransactionKey, AuthorizeNetAccount.LoginId,
    "2170482722", 99.99M, "D49924634EE78B8427CC1C17635917E0");

 Thanks for any suggestions.

 


Accepted Solutions
Solution
Accepted by topic author jonathanwood
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Please Help: DPM response does not validate

The first param is your MD5 setting(set in the merchant account settings), not the transactionKey.

View solution in original post


All Replies
Solution
Accepted by topic author jonathanwood
‎08-21-2015 01:58 AM
Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Please Help: DPM response does not validate

The first param is your MD5 setting(set in the merchant account settings), not the transactionKey.

Contributor
Posts: 12
Registered: ‎03-31-2012

Re: Please Help: DPM response does not validate

Thanks much for the reply. However, I'm still a bit confused. Here's some code from the SDK download I got from the Authorize.NET website.

 

public bool Validate(string merchantHash, string apiLogin)
{
    return Crypto.IsMatch(merchantHash, apiLogin, this.TransactionID,
        this.Amount, this.MD5Hash);
}

 Isn't the last argumet the MD5?

 

 

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Please Help: DPM response does not validate

The first one is your merchant account md5 hash setting. The last one is the relay response MD5 hash.

Contributor
Posts: 12
Registered: ‎03-31-2012

Re: Please Help: DPM response does not validate

This is fantastic if correct! So how do I get my merchant hash?

 

I got several hashes when I signed up but didn't see any labelled "merchant hash".

Expert
Posts: 4,525
Registered: ‎03-08-2010

Re: Please Help: DPM response does not validate

Try blank if it is not set.

Or login to your merchant. Under Account - Settings - Security Settings - MD5 Hash and change it.