cancel
Showing results for 
Search instead for 
Did you mean: 

5 - A valid amount is required.

Hi

we just renwed authorize.net cert and we are getting this error.

 

5 - A valid amount is required.

 

pLaese advice.

 

Thanks,

Mark

mark2012
Member
8 REPLIES 8
3
5
A valid amount is required.
The value submitted in the amount field did not pass validation for a number.
RaynorC1emen7
Expert

Raynor, that isn't a very helpful answer. I have the same problem. I've changed the form field to type="int" and even changed the x_amount field to x_Amount, since I'm using PHP.  These are suggestions I've gotten from responders of the forum. There has to be a more positive, workable, productive answer to this question. We can read that on the response page. Please tell us what we need to do about it. That would be helpful. Thank you.

I thought DPM was a derivitave of the AIM application. Throughout the AuthorizeNetDPM.php file it refers to the $sim versions of $hidden fields, etc. Is that correct or are we supposed to edit those entries? Please help!

Run thru to the DPM page, look at the page source with the web browser. See if x_amount have the correct value.

That turned out to be very interesting. I'd edited my version of /lib/AuthorizeNetDPM.php to exclude the <input="hidden fields" and all their values so I could test with my own entered data on the form. But sure enough, when I look at Page Source, the hidden fields and their values are there. Where are they coming from? I've overwritten the original AuthorizeNetDPM.php file. How can that be??? AND, was I wrong to edit AuthorizeNetDPM. Isn't that were I'm supposed to make edits for the fields I want to appear on the direct_post method? Thanks so much for your help.

Not a php developer myself, but I know the code is in the php. So what ever you did change something, and without knowing what you did is hard to tell why is not working.

 

You don't need to use the SDKs at all, look at the following to see what the min form post fields are.

http://developer.authorize.net/guides/DPM/wwhelp/wwhimpl/js/html/wwhelp.htm#href=integratingJava.htm...

You're killing me. Another setup to try? I've already spent 2 weeks trying to figure out AIM and DPM. I don't work in java so there's no way I can take on another envirornment. I'll look for the required fields in PHP/DPM and see if I can't refine what I've already done. Thanks anyway.

Not another setup to try. Just try to point to where the min fields are without copy and pasting to the post

<form id='secure_redirect_form_id' action='https://test.authorize.net/gateway/transact.dll' method='POST'>
<label for='x_card_num'>Credit Card Number</label>
<input type='text' class='text' id='x_card_num' name='x_card_num' size='20' maxlength='16' />
<br />
<label for='x_exp_date'>Expiration Date</label>
<input type='text' class='text' id='x_exp_date' name='x_exp_date' size='6' maxlength='6'/>
<br />
<label for='x_amount'>Amount</label>
<input type='text' class='text' id='x_amount' name='x_amount' size='10' maxlength='10' readonly='readonly' value='<%=amount%>' />
<br />
<input type='hidden' name='x_invoice_num' value='<%=System.currentTimeMillis()%>' />
<input type='hidden' name='x_relay_url' value='<%=relayResponseUrl%>' />
<input type='hidden' name='x_login' value='<%=apiLoginId%>' />
<input type='hidden' name='x_fp_sequence' value='<%=x_fp_sequence%>' />
<input type='hidden' name='x_fp_timestamp' value='<%=x_fp_timestamp%>' />
<input type='hidden' name='x_fp_hash' value='<%=x_fp_hash%>' />
<input type='hidden' name='x_version' value='3.1' />
<input type='hidden' name='x_method' value='CC' />
<input type='hidden' name='x_type' value='AUTH_CAPTURE' />
<input type='hidden' name='x_amount' value='<%=amount%>' />
<input type='hidden' name='x_test_request' value='FALSE' />
<input type='hidden' name='notes' value='extra hot please' />
<input type='submit' name='buy_button' value='BUY' />
</form>

 Have you look at the SIM PHP sample code? It a lot similar to DPM and simpler to the SDKs too.