$api_login_id = AUTHORIZENET_API_LOGIN_ID; <-- Authorize.net supplied login
$md5_setting = AUTHORIZENET_MD5_SETTING; <-- Value I set in SandBox Account>MD5-Hash
$response = new AuthorizeNetSIM($api_login_id, $md5_setting); <-- Create the response
$log->LogDebug("RESPONSE.PHP MD5_Hash=".$response->MD5_Hash); <-- Response MD5_Hash
$log->LogDebug("RESPONSE.PHP generateHash=". $response->generateHash()); <--Generated MD5_Hash
================log======================================================================
RESPONSE.PHP MD5_Hash=9E6FC24E4880D966623FB51901AF4587 <-- Response MD5_Hash
RESPONSE.PHP generateHash=0DE5637226CB8FDFE396E27983F83A9D <--Generated MD5_Hash
What am I missing?
Solved! Go to Solution.
โ01-07-2014 06:59 AM
That was it!!!!
I changes
AuthorizeNewSIM.php
function generateHash()
$amount = ($this->amount ? $this->amount : "0.00"); // Added this line
return strtoupper(md5($this->md5_setting . $this->api_login_id . $this->transaction_id . $amount));
}
Maybe I deleted the line early in the process. However it works.
I could never have found this without you.
Thanks.
โ01-08-2014 02:06 PM
$api_login_id = AUTHORIZENET_API_LOGIN_ID; <-- Authorize.net supplied login
$md5_setting = AUTHORIZENET_MD5_SETTING; <-- Value in SandBox Account>MD5-Hash
Verified. and No Spaces.
$response = new AuthorizeNetSIM($api_login_id, $md5_setting); <-- Create the response
$log("MD5_Hash=".$response->MD5_Hash); <-- Response MD5_Hash
$log(" generateHash=". $response->generateHash()); <--Generated MD5_Hash
================log===================================================
MD5_Hash=9E6FC24E4880D966623FB51901AF4587 <-- Response MD5_Hash
generateHash=0DE5637226CB8FDFE396E27983F83A9D <--Generated MD5_Hash
What am I missing?
โ01-07-2014 10:44 AM
The only thing I remember is that the MD5 setting on your account can be too large. And it will get truncate when authorize.net is generating the response->MD5_Hash
โ01-07-2014 12:36 PM
Thanks mine is 12 characters.
The MD5 that is sent in the original post is fine. No errors.
I just can not get the generatehash function to provide the same value returned by AuthenicateSIM.
Any ideas how I can debug or test?
I have copy N pasted my ID and MD5 setting from SandBox Account. What else can I do.
The ResponseCode 99 Tool is not appropriate. I think it is for the sending to Authenticate Hash.
Thanks for your response :-)
โ01-07-2014 12:44 PM
public function generateHash() { $amount = ($this->amount ? $this->amount : "0.00"); return strtoupper(md5($this->md5_setting . $this->api_login_id . $this->transaction_id . $amount)); }
That the source, see if the transaction id and amount look ok.
โ01-07-2014 12:50 PM
That was it!!!!
I changes
AuthorizeNewSIM.php
function generateHash()
$amount = ($this->amount ? $this->amount : "0.00"); // Added this line
return strtoupper(md5($this->md5_setting . $this->api_login_id . $this->transaction_id . $amount));
}
Maybe I deleted the line early in the process. However it works.
I could never have found this without you.
Thanks.
โ01-08-2014 02:06 PM