I am integrating paypal gateway in my angularjs app. In that I am submitting form with various input field. In that form, I am setting up value of amount dynamically
For example: <input type="hidden" name="amount" value="{{paypal_data.reward_amount}}">
But paypal is not accepting form and displaying following error.
The link you have used to enter the PayPal system contains an incorrectly formatted item amount.
The value is setting to amount successfully. When I use input type= "text" instead of "hidden" then its displaying correct value in textbox but paypal is not accepting form. How to set value dynamically to input with another method so that the form will accept by paypal.
I've fixed this by applying some logic. I used below JQuery code setTimeout(function(){},100);
I've submitted the form by applying some delay using function.
I think when I using only $("#paybtn").click(); //Automatic Button Click function
it was submitting form before assigning value to input. Finally I used below code that worked successfully to me
setTimeout(function(){ $("#paybtn").click(); },0);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With