Hi, I'm having a problem integrating direct post in my codes. I just copied the PHP file which was given in one of your tutorials but of changed some things needed in the said file except for the amount. I wanted to try it first with the constant amount.
<?php
require_once 'anet_php_sdk/AuthorizeNet.php';// The SDK
$url =" ";
$api_login_id ='YOUR_API_LOGIN_ID';
$transaction_key ='YOUR_TRANSACTION_KEY';
$md5_setting ='YOUR_API_LOGIN_ID';// Your MD5 Setting
$amount ="5.99";
AuthorizeNetDPM::directPostDemo($url, $api_login_id, $transaction_key, $amount, $md5_setting);
?>
Everything went smoothly but when I clicked the "Buy" button the direct_post.php, it gives me this error. "Sorry, an error occurred: A valid amount is required.".The response code was 3. I've read some similar problems regarding this but haven't found an answer. What does that mean? I didn't even change the amount in your sample code. Please help.
Thanks
01-24-2013 10:27 PM
what kind of changed did you made?
Also, on the web browser, go thru to the "Buy" button page, and view the browser page source. There should be a "x_amount" hidden field, is it there?
01-25-2013 04:42 AM
I had exactly the same problem. I did what you said, Raynor, and viewed the page source. A hidden field for x_amount was not there, and I don't see where the hidden fields are coming from/can't read php that well. What would be the next step?
09-15-2013 01:34 PM
You could hire a certified developer
http://www.authorize.net/solutions/merchantsolutions/merchantservices/certifieddeveloperdirectory/
09-15-2013 03:21 PM