Showing Stripe Failed Payment Notices
To display failed payment notices when using Stripe, incorporate the "%%membership_messages%%" tag. This tag reveals specific issues related to payment failures.
Example Usage
Register Module
If the "Redirect Type for Failed Payment" is set to"Redirect to Page" including "%%membership_messages%%" on that page will display error messages.
Sign Up Module
Typically, it's best to integrate the sign-up module into the "Failed Payments Redirection Page." This setup allows you to prompt users for another payment attempt. You have two options with the Sign-Up module: you can set it to display automatically within the module, or, as mentioned previously, you can insert a text module with the code %%membership_messages%% to show the sign-up prompt.
Customizing Error Messages
Modify these error messages via "Membership Settings > Payment Gateways > Stripe Options". Below are the default messages for common payment errors, along with instructions for testing these scenarios in Stripe's test mode.
Declined Card (card_declined):
Default Message: "Sorry, your card is declined."Expired Card (expired_card):
Default Message: "Sorry, your card is expired."Incorrect CVC (incorrect_cvc):
Default Message: "Sorry, the CVC for your card is incorrect."Processing Error (processing_error):
Default Message: "There was an issue with processing your payment, please try again."Incorrect Number (incorrect_number):
Default Message: "Your card number is incorrect."Invalid Expiry Month (invalid_expiry_month):
Default Message: "Expiry month is invalid. Check the expiration date or use a different card."Invalid Expiry Year (invalid_expiry_year):
Default Message: "Expiry year is invalid. Check the expiration date or use a different card."
For testing these error scenarios and ensuring your setup correctly displays these messages, visit Stripe's documentation on testing.