01-24-2013 10:27 PM
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.
require_once 'anet_php_sdk/AuthorizeNet.php';// The SDK
$url =" ";
$md5_setting ='YOUR_API_LOGIN_ID';// Your MD5 Setting
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.
01-25-2013 04:42 AM
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?
09-15-2013 01:34 PM
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?