• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar

Payments Plugin for Stripe

Stripe payment plugins for your WordPress site

  • Home
  • Documentation
  • Addons
  • Login
    • Sign In
    • Edit Profile
    • Terms & Conditions
    • My Downloads
    • License Key
  • Support
    • Support Forum
    • Forum Search
    • Forum Login
    • Forum Registration
    • Email Support for Customers
  • Contact Us
  • Show Search
Hide Search
You are here: Home / Topics / dedicated error page?

[Support request] dedicated error page?

· ·

Home › Forums › Stripe Payments Plugin › dedicated error page?

Tagged: error page

  • This topic has 2 replies, 2 voices, and was last updated 6 years, 12 months ago by Admin.
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • June 6, 2018 at 7:36 pm #1025
    Admin
    Keymaster

    Hi,

    My “Thank you!” page (i.e. “stripe-checkout-result”) has a big “Thank you for your payment!” title, and a few extra lines of text with additional information added before and after the [accept_stripe_payment_checkout] shortcode.

    If an error occurs and the payment fails, this looks now real funny under the “Thank you” header and with information about the error nested between text that is now completely out of context… Is there a way to redirect to another, dedicated error page when an error occurs?

    June 6, 2018 at 10:56 pm #1027
    alexanderfoxc
    Participant

    Hi Jorg.

    This can be achieved via a little trick. You can rename your page to “Checkout results”. Then, you can construct your own thank you and error messages using this guide https://s-plugins.com/customize-the-thank-page-message-of-stripe-payments-plugin/

    So, very basic example. Here’s how the content of your page should look like:

    [accept_stripe_payment_checkout]
    
    Thank you for purchasing the following item:
    
    {item_name}
    
    You paid {item_price} {currency_code}
    
    [/accept_stripe_payment_checkout]
    [accept_stripe_payment_checkout_error]
    There was an error with the credit card transaction. Error details below:
    {error_msg}
    [/accept_stripe_payment_checkout_error]

    If there were no error during the checkout, the content of [accept_stripe_payment_checkout_error] won’t be displayed. And vise versa – if there is an error, only its content will be displayed, but content inside [accept_stripe_payment_checkout] won’t be.

    June 7, 2018 at 5:07 pm #1029
    Admin
    Keymaster

    Thanks a lot, this makes sense. I have implemented this as follows:

    [accept_stripe_payment_checkout]
    [accept_stripe_payment_checkout_error]
    There was an error with the payment transaction:
    {error_msg}
    Please try again.
    [/accept_stripe_payment_checkout_error]

    But when I try this with one of Stripe’s test numbers (4000000000000341), the [accept_stripe_payment_checkout] shortcode itself also returns a message, namely

    “System was not able to complete the payment. Your card was declined.”

    This now duplicates the error message that follows just after:

    “There was an error with the payment transaction:
    Your card was declined.
    Please try again.”

    Is there a way to silence the output from [accept_stripe_payment_checkout]?

    Note that I cannot use the enclosing form “[accept_stripe_payment_checkout] … [/accept_stripe_payment_checkout]” because I am using the asp_stripe_payments_checkout_page_result filter hook to generate a custom message (which is only displayed when using the self-closing shortcode).

    Thanks,
    Jorg

  • Author
    Posts
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Log In

Primary Sidebar

Featured Addons and Extensions

  • Subscription Payments Addon
  • Additional Custom Fields
  • Secure Downloads Addon
  • Apple Pay, Google Pay, Afterpay

Addon Bundle

Stripe Payments Addon Bundle

A Simple & Lightweight Plugin

Our Philosophy with the Plugin

Support Links

  • Support Forum
  • Support Contact

Search

Copyright © 2025 | Stripe Plugins | A member of the Tips and Tricks HQ family.