cancel
Showing results for 
Search instead for 
Did you mean: 

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
12 REPLIES 12

in your account setting  > click MD5 Hash > 

then enter the Hash you want to use... put that same code in the $md5_setting = "[HERE]";

StaticFX
Member

i have enter the same code in $md_setting still i got the transction id =0 ,Please give me solution for it

Are you getting an error or just getting transactionID = 0? if just the transactionID = 0, turn test mode off.

now test mode is off .Now  i got the error "Error -- not AuthorizeNet. Check your MD5 Setting". i set the $md5_setting ="4Um2hB2qD2"; but still got this error.

"4Um2hB2qD2" It that your loginID? md5 should be blank unless you set it.

hello i have done some changes in my code .I followed instruction "https://developer.authorize.net/integration/fifteenminutes/#directpost"  from this link. 

add_amount.php

 

<form method="post" action="direct_post.php">

<table>
<tr>
<td>Amount : <input type="text" name="amt" id-"amt"/></td>
</tr>
<tr>
<td>  <input type="submit" name="submit_btn" value="submit" /></td>
</tr>

</table>
</form>

direct_post.php

<?php
require_once 'anet_php_sdk/AuthorizeNet.php'; // The SDK
$url = "http:/MY_DOMAIN/direct_post.php";
$api_login_id = 'xxxxx';
$transaction_key = 'xxxxxxxxx';
$md5_setting = " "; // Your MD5 Setting
//$amount = "200";
$amount = '"'.$_POST['amt'].'"';
AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_key, $amount, $md5_setting);
?>

 if i run direct_post.php it will works properly. but when i run add_amount.php then it will give me the message "Error -- not AuthorizeNet. Check your MD5 Setting.". actaully i want  to take amount filed from the form.it is dyanamic not static.

Please help me out.....

The error that you referenced is an error confirming the transaction response. It is not related to how you specify the amount when the transaction is sent, other than using that amount to validate the response. You should make sure that you are using the correct MD5 hash and that the amount you are sending with the transaction is the same amount used when you verify the MD5 hash.

I dont have an answer, but if you figure it out post solution as I'm trying the exact same thing.