Reply
Member
Posts: 1
Registered: ‎08-25-2013

Getting Issues with MD5 hash with AIM

Hello Developers,

 

I have integrated authorize.net AIM for my payments, and I am using opencart as a Ecommerce site, now the issue is I am comparing the MD5 hash that is been received from the server as a response, that is "<.>/?" , while the hash that I have calculated on my system calculated fine i.e. that is working well.

 

Now, I am going to compare the returned HASH("<.>/?") with the calculated HASH that not matched :smileysad:, while, on the server authorized approved this transaction and credited amount from the user account. AS HASH sent by authorized response is not same as calculated by my system,  my system will not going to count this order as completed order and mark this order as a missing order, but customer is charged by server and my system not recieved this order as completed.

 

If I comment out this code and test i.e. if I ignore MD5 HASH comparison then system will works like a Chram , I am not sure why server not response me with the appropriate MD5 hash so that I can compare and make work that.

 

I need to know the way how server calculating the MD5 Hash that is been returned back to the system, why MD5 hash are incorrect in my case. Here is the request array that I am writing as below.

(
[x_login] => myLoginIN
[x_tran_key] => MyTransactionKey
[x_version] => 3.1
[x_delim_data] => true
[x_delim_char] => ,
[x_encap_char] => "
[x_relay_response] => false
[x_first_name] => Tester*
[x_last_name] => Tester,
[x_company] =>
[x_address] => Address1, ~~1`!@#$%^&*()_+,<.>/?
[x_city] => city1, ~~1`!@#$%^&*()_+,<.>/?
[x_state] => Florida
[x_zip] => 765432
[x_country] => United States
[x_phone] => 123,123,456
[x_customer_ip] => 123.237.237.160
[x_email] => testingonnet@tester.com
[x_description] => Description goes here
[x_amount] => 25.00
[x_currency_code] => USD
[x_method] => CC
[x_type] => AUTH_CAPTURE
[x_card_num] => 378282246310005
[x_exp_date] => 012015
[x_card_code] => 989
[x_invoice_num] => 850
[x_ship_to_first_name] => Tester*
[x_ship_to_last_name] => Tester,
[x_ship_to_company] =>
[x_ship_to_address] => Address1, ~~1`!@#$%^&*()_+,<.>/?
[x_ship_to_city] => city1, ~~1`!@#$%^&*()_+,<.>/?
[x_ship_to_state] => Florida
[x_ship_to_zip] => 765432
[x_ship_to_country] => United States
[x_test_request] => true
)

 

Now, I am not sure how to fix this issue, any help from the community will help me to fix this issue.

 

Thanks in advance.

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

Re: Getting Issues with MD5 hash with AIM

1)there is no point of use the MD5 on AIM, since you are calling authorize.net in code.

2)remove the x_currency_code if you do want to use the MD5.