hello,
I'm new to AutNet and working on SIm method with PHP sdk.
when I use the TEST Account I get everything right! and I get the Relay_Response as well, no problem all Fine!
But, When I was trying to impelemt the LIVE section I had all the matters fine except "Error. Check your MD5 Setting". When I drilled down I found that this is a message which is there in my Relay_Response.php page. By the by, I'm using the Sample PHP Files to integrate the LIVE section.
Here is the relayresponse.php code -
===========================================
require_once 'anet_php_sdk/AuthorizeNet.php'; // The SDK
$redirect_url = "https://mysite/Receipt.php"; // Where the user will end up.
$api_login_id = 'my_login_id';
$md5_setting = "my_md5_pass"; // Your MD5 Setting
$response = new AuthorizeNetSIM($api_login_id, $md5_setting);
if ($response->isAuthorizeNet())
{
if ($response->approved)
{
// Do your processing here.
$redirect_url .= '?response_code=1&transaction_id=' .$response->transaction_id;
}
else
{
$redirect_url .= '?response_code='.$response->response_code . '&response_reason_text=' . $response->response_reason_text;
}
// Send the Javascript back to AuthorizeNet, which will redirect user back to your site.
echo AuthorizeNetDPM::getRelayResponseSnippet($redirect_url);
}
else
{
echo "Error. Check your MD5 Setting.";
}
===========================================
please help me what do do...???? I'm going crazy looking for a solution!!!
Solved! Go to Solution.
08-30-2013 10:38 AM
Got it! there was an extra space at the begining of the MD5 value!!! what a mess!!!!
Thanks to everyone.
09-03-2013 09:53 PM
like the error said, check the MD5 setting on the merchant account. And make sure both $api_login_id and $md5_setting is correct.
08-30-2013 11:59 AM
I have checked the $api_login_id and $md5_setting.
The use of $api_login_id is there in almost all the pages but the $md5_setting is being used in only the RelayResponse.php page. Does it have any other use also? Do I have to add it on any other page also?
Do I have to work on the anet_php_sdk/lib, AuthorizeNetSIM.php file? Or just leave it as it is. I have downloaded it from the AuthNet site.
I would really appriciate if I can get some Sample code from anyone who use PHP SDK.
08-31-2013 03:30 AM - edited 08-31-2013 03:31 AM
The only other thing that I remember is that the there is a Max Length on the MD5. maybe your is too long? Other then that you could change it so it doesn't check it.
08-31-2013 10:52 AM
Got it! there was an extra space at the begining of the MD5 value!!! what a mess!!!!
Thanks to everyone.
09-03-2013 09:53 PM