Remember me

Amount integer and Strie payment failure

6 years 5 months ago #1

  • Coughlin Printing's Avatar
  • Coughlin Printing
  • Posts: 79
We are on BA Forms 1.6.5 and use the Stripe payment plugin. We are using the latest Stripe API. Today, we found an issue.

BACKGROUND: the form has a single field for TOTAL, there are no other calculations on the form. The Total input type is set to Calculation. Form is located HERE.

When you enter an Amount that ends in .13, .14, .15 or .16 (eg: 34.15) the following happens:
1. The total on the form correctly shows 1.15
2. The email sent from BAF correctly shows the total of 1.15
3. The Stripe payment box INCORRECTLY shows the total of $1.14 (see attachment)
4. The Stripe payment FAILS.

Upon reviewing the logs from Stripe, the following is the error:

"type": "invalid_request_error",
"message": "Invalid integer: 114.999999999996",
"param": "amount"

For some reason the value is being changed. We did not notice this problem before, and have had this form working properly for months. In addition, if you make the amount 1.12 it works just fine.

6 years 5 months ago #2

  • Artem's Avatar
  • Artem
  • Posts: 11342

Send us please Joomla admin access!

Sorry for the inconvenience!

Powered by Kunena Forum