Stripe and CiviDiscount, Stripe payment is cancelled if the Discount Code is NOT first applied on the Event Registration form
Stripe and CiviDiscount, Stripe payment is cancelled if the Discount Code is NOT first applied on the Event Registration form.
Workaround is to click the Apply button for the Discount Code before proceeding to the next page.
Steps to reproduce:
- Set up a CiviCRM site with Stripe, Events and CiviDiscount
- Create a paid Event with Stripe for payment
- Create a Discount Code for Events in CiviDiscount
- In live mode, register a user for the event
- Enter the valid Discount Code, but do not click the Apply button (which applies the discount)
- Enter credit card details and click the Review Registration button
- Stripe payment intent will now be created for the full amount, without discount
- Confirmation page will be displayed with the discount applied.
- Click the Confirm button to complete the registration
- Stripe payment for the discounted amount will be attempted and fail as the discounted amount does not match the full amount
- User is returned to the Event registration page, without any error message
CiviCRM logs will show the following error.
Apr 30 13:58:04 [error] Credit Card Payment Error: This PaymentIntent's amount could not be updated because it has a status of requires_capture. You may only update the amount of a PaymentIntent with one of the following statuses: requires_payment_method, requires_confirmation, requires_action.
Stripe event logs will show that the payment intent amount is the non-discounted amount. And the capture amount is the discounted amount. In the screenshot below the full amount is $110 and the discounted amount $55.
Agileware Ref: CIVISTRIPE-4