Invalid integer error using Stripe custom payment calculation