Reply
Highlighted
Member
Posts: 1
Registered: ‎04-19-2016

SIM Integration PHP Error (97) This transaction cannot be accepted.

[ Edited ]

I'm trying to Integrate SIM in PHP. I am getting "(97) This transaction cannot be accepted ". I have checked my TransactionKey more than 3 times. Can anyone help me fix this

 

Here is my code..

 

 

<FORM action="https://test.authorize.net/gateway/transact.dll" method="POST">
<?php
$api_login_id = 'MY LOGIN ID';
$x_tran_key = 'MY TRANSACTION ID';
$x_Description = 'Test';
$amount = '10.22';
$utc_str = gmdate("M d Y H:i:s", time());
$fp_timestamp = strtotime($utc_str);

$fp_sequence = rand(1, 1000);

if (function_exists('hash_hmac')) {
    $fp_hash = hash_hmac("md5", $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $x_tran_key . "^"); 
}else{
	$fp_hash = bin2hex(mhash(MHASH_MD5, $api_login_id . "^" . $fp_sequence . "^" . $fp_timestamp . "^" . $amount . "^", $x_tran_key . "^"));
}
?>
<br/>
<input type="text" name="x_description" value="<?=$x_Description;?>"><br/>
<input type="text" name="x_login" value="<?=$api_login_id;?>"><br/>
<input type="text" name="x_amount" value="<?=$amount;?>"><br/>
<INPUT type="text" name="x_show_form" value="PAYMENT_FORM"><br/>
<INPUT type="text" name="x_test_request" value="TRUE"><br/>
<INPUT type="text" name="x_relay_response" value="FALSE"><br/>
<INPUT type="text" name="x_version" value="3.1"><br/>
<INPUT type="text" name="x_delim_char" value=","><br/>
<INPUT type="text" name="x_delim_data" value="TRUE"><br/>
<INPUT type="text" name="x_relay_url" value="http://mukeshsan.in"><br/>
<INPUT type="text" name="x_fp_hash" value="<?=$fp_hash?>"><br/>
<INPUT type="text" name="x_fp_sequence" value="<?=$fp_sequence;?>"><br/>
<INPUT type="text" name="x_fp_timestamp" value="<?=$fp_timestamp;?>"><br/>
<INPUT type="submit" value="Accept Order">
</FORM>

 

Highlighted
Posts: 2,765
Topics: 57
Kudos: 245
Blog Posts: 67
Registered: ‎12-05-2011

Re: SIM Integration PHP Error (97) This transaction cannot be accepted.

Hello @mukeshsan14

 

You may wish to check your timestamp using our Error 97 Tool.

 

http://developer.authorize.net/api/reference/responseCode97.html

 

Richard