cancel
Showing results for 
Search instead for 
Did you mean: 

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.

 

jonathanwood
Contributor
1 ACCEPTED SOLUTION

Accepted Solutions

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

View solution in original post

RaynorC1emen7
Expert
5 REPLIES 5

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

RaynorC1emen7
Expert

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?

 

 

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

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".

Try blank if it is not set.

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