I'm in the process of integrating the PayPal gateway into my AngularJS application. I have a form with various input fields, and dynamically setting the value of the amount field like this:
For example:
<input type="hidden" name="amount" value="{{paypal_data.reward_amount}}">
However, when I try to submit the form, PayPal is not accepting it and displaying the following error.
The link you used to access the PayPal system contains an improperly formatted item amount.
Although the value is being set successfully, if I use input type = "text"
instead of input type = "hidden"
, then the correct value is displayed in the text box but PayPal still doesn't accept the form. What other method can I use to dynamically set the value for the input so that PayPal will accept the form?