cancel
Showing results for 
Search instead for 
Did you mean: 

Who Me Too'd this topic

Error. Check your MD5 Setting.

I have a live account in Test mode and when using the instructions from the PHP SDK, I keep getting "Error. Check your MD5 Setting". When I remove 'relay_response_url', it goes through fine.

 

Initially, I had nothing entered for MD5, but when this happened, I entered something simple (abc) and tried again. No luck. As per the PDF insructions, I created these 3 files. Any ideas/thoughts would be appreciated:

 

CHECKOUT_FORM.PHP

<?php
require_once 'anet_php_sdk/AuthorizeNet.php'; // The SDK
$relay_response_url = "http://DOMAIN/relay_reponse.php";
$api_login_id = 'LOGINID';
$transaction_key = 'TRANSKEY';
$amount = "5.99";
$fp_sequence = "123"; // Any sequential number like an invoice number.
echo AuthorizeNetDPM::getCreditCardForm($amount, $fp_sequence, $relay_response_url,$api_login_id, $transaction_key);
?>

 

 

RELAY_RESPONSE.PHP

<?php require_once 'anet_php_sdk/AuthorizeNet.php';
$redirect_url = "http://DOMAIN/order_receipt.php";
$api_login_id = 'LOGINID';
$md5_setting = "abc";
$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.';
}
?>

 

 

ORDER_RECEIPT.PHP

<?php
if ($_GET['response_code'] == 1) {
echo "Thank you for your purchase! Transaction id: "
.htmlentities($_GET['transaction_id']);
}
else {
echo "Sorry, an error occurred: " . htmlentities($_GET['response_reason_text']);
}
?>

 

Thanks you.

spcjcp
Member
Who Me Too'd this topic