Hi, im new here, and im trying to make SIM Integration with Authorize.net, first excuse my bad english!!!
everything is OK in my test using the sample code (php version), but when i try to change the defaul amount via Web, then i get a error, i read the forum about putting trim in the variable but still i getting the error.
Here i put diferent trim:
if ($_REQUEST["amount"])
{ $amount = trim($_REQUEST["amount"]); }
if( phpversion() >= '5.1.2' )
{ $fingerprint = hash_hmac("md5", $loginID . "^" . $sequence . "^" . $timeStamp . "^" . trim($amount) . "^", $transactionKey); }
else
{ $fingerprint = bin2hex(mhash(MHASH_MD5, $loginID . "^" . $sequence . "^" . $timeStamp . "^" . trim($amount) . "^", $transactionKey)); }
and i always get this msg: (99) This transaction cannot be accepted.
To enter a different amount via web i change the input field from hidden to text, like this:
echo " <INPUT type='text' name='x_amount' value='$amount' />";
Solved! Go to Solution.
01-06-2010 10:30 AM
sorry for the delay, the one here worked very well, with just some modificactions for customize purpose, if you need any help just post here
01-22-2010 09:51 AM
Could you provide the code for asp users as well?
03-24-2010 07:24 AM
Authorize.Net has sample code in ASP.
03-24-2010 07:28 AM
I am using the sample code but don't understand how to update the hidden field x_amount after the user clicks on the Submit button.
03-24-2010 07:40 AM
You update this:
$amount = "19.99";
in the parameters area near the top of he sample code.
06-29-2011 08:20 AM
Hi guys,
I know this is an ancient topic.. when I run Dave's code I get this error:
Parse error: syntax error, unexpected T_VARIABLE in sim.php on line 45
Line 45 contains $LiveLoginId = "xxxxxxxxxxx"; where xxxxxxxxxx is my liveloginID
Line 46: $LiveTransactionKey = "xxxxxxxxxx";
Any idea of what may be going on? thanks.
01-04-2012 10:46 AM
There is a semicolon missing at the end of this line:
$ReturnHomePage = "www.someurl.org"
Just add it there and it should work
$ReturnHomePage = "www.someurl.org";
01-04-2012 10:48 AM
Gotcha, now it's throwing an error for simlib.php. What does this file do and where may I acquire it?
Warning: include(simlib.php) [function.include]: failed to open stream: No such file or directory in sim.php on line 81
Warning: include(simlib.php) [function.include]: failed to open stream: No such file or directory in sim.php on line 81
Warning: include() [function.include]: Failed opening 'simlib.php' for inclusion (include_path='.:/usr/lib/php:/usr/local/lib/php') in sim.php on line 81
Thank you for your help.
01-04-2012 10:53 AM - edited 01-04-2012 10:53 AM
simlib.php probably represents the path to the SIM library file in your Authorize.net PHP SDK (at least, I would hope so...) Try changing to that and see if it works.
01-04-2012 11:00 AM
Thank you for your help TJ, looks like I have it sorted out now. You guys are a lifesaver.
01-04-2012 11:32 AM