Error! Invalid payment amount!
-
When trying to do Paypal checkout based on a calculation field consisiting of the following:
(({select-1} + {radio-1}) * 1.031) + 0.32
The Total field on the page and the amount passed to Paypal are the same, however after Paypal is submitted (and successfully charged I might add), the webpage throws the error “Error! Invalid payment amount!”.Digging into the code, there is a penny difference between the amount in the Total Field and that Paypal charged vs. the data compared from:
floatval( $charge_amount )
The data for select-1 field is $5, and from radio-1 is $0. The calculated total is $5.475, with the Total Due field cutting at 2 decimals. The amount shown on the page due and the amount Paypal charges is $5.47, but the charge_amount floatval used for comparison ends up being $5.48. It’s like the visible field is truncating at 2 decimals, but the charge_amount is rounding up (like you should with a currency)?
Any suggestions?
- This topic was modified 3 years, 8 months ago by .
- This topic was modified 3 years, 8 months ago by .
The page I need help with: [log in to see the link]
- The topic ‘Error! Invalid payment amount!’ is closed to new replies.