Okay I have been on the phone with First Data and think I have isolated the problem(s). It turns out to be 2 different issues.
Issue 1
The First Data x_MD5_Hash value has lowercase letters and the Authorize.net plugin x_MD5_Hash has upper case letters. Here is an example email I received from the authorize.net plugin.
Hello,
An Authorize.net notification was refused because the response from the Authorize.net server was invalid. The hash received was bc13982a8f3534f07a1234612b924243 while the calculated hash was BC13982A8F3534F07A1234612B924243. Please cehck that you're set the same md5 hash key in Authorize.net and the plugin
1. Which is the correct standard? uppercase or lowercase? If First Data is not following the Authorize.net standard and using lowercase letters, how do I modify authorize.php to use lowercase letters in the MD5 has for relay response hash?
I think I figured out how to display the hash as lower case
in authorize.php around line 441 there is this line
return strtoupper(md5($md5Hash.$login_id.$trans_id.$amount));
I modified it to
return md5($md5Hash.$login_id.$trans_id.$amount);
Is this the correct way to make the change?
Issue 2
Somewhere the amount is being truncated. When I have total dollar amount that has a non-zero number in the cent place (1.01 or 1.23) the x_MD5_Hash values are the same (except for the upper lowercase issue) When I have a total dollar amount that has a zero in the cents place (1.10 or 1.00) the x_MD5_Hash values between FD and the Authorize.net plugin are not even close.
If I have the total dollar amount as $1.10 this value is displayed in an email I get from first data
x_amount: 1.1
which leads me to believe that somewhere the x_amount is being truncated.
2. I looked at the code sending out the x_amount and noticed a round function based on the number of decimal places for the different currencies. Does the authorize.net plugin truncate the x_amount? Is it possible the round function is not working correctly?
Thanks! -- Steven
I really appreciate all the help.