Support » Plugin: Stripe Payments » Use of Custom Field Data

Viewing 10 replies - 1 through 10 (of 10 total)
  • Plugin Contributor Alexander C.

    (@alexanderfoxc)

    Hi.

    Including the data on the email confirmation sent to purchasers

    This can be achieved by adding {custom_field} tag to email template in plugin settings.

    Exporting the data to Stripe so that it shows up in the metadata, or even better in the Description field on the Stripe site

    It will be stored in metadata by default in new version. There will be an option to add custom field in description as well (by ticking a checkbox in settings).

    Showing the data on the Checkout-Result and Payment Confirmation pages

    This will be possible in new the upcoming plugin version using {custom_field} tag in Checkout Result page: https://stripe-plugins.com/customize-the-thank-page-message-of-stripe-payments-plugin/

    Stay tuned for new version which should be released before the end of this week.

    Wow, super helpful, thanks! I’ll keep my eye out for the updated plugin. The list of tags at https://stripe-plugins.com/customize-the-thank-page-message-of-stripe-payments-plugin/ is very useful – is this the complete list of all available tags?

    Plugin Author mra13

    (@mra13)

    The new version has been released.

    Many thanks, I’ve updated the plugin and will try to implement these features on my form.

    The export of the custom field data to Stripe’s metadata works well, thanks. I couldn’t find the checkbox to include the custom field in the description but not a big issue.
    I couldn’t get the custom field tag to work on the checkout-result page. On the page, using the shortcode:
    [accept_stripe_payment_checkout]
    gives me the payment details as expected but not the custom field. Using:
    [accept_stripe_payment_checkout]
    {custom_field}
    [/accept_stripe_payment_checkout]
    I get the custom field but not the payment information – I can’t seem to get both!

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    I couldn’t find the checkbox to include the custom field in the description but not a big issue.

    It has not been implemented in this version. It will probably be available in future versions.

    I couldn’t get the custom field tag to work on the checkout-result page.

    It’s easy. I took this example from documentation page and added {custom_field} tag:

    [accept_stripe_payment_checkout]
    
    Thank you for purchasing the following item:
    
    {item_name}
    
    You paid {item_price} {currency_code}
    
    {custom_field}
    
    [/accept_stripe_payment_checkout]

    Also, keep in mind you would need to add error message shortcode on the same page as well, otherwise no message might be displayed if error occurs:

    [accept_stripe_payment_checkout_error]
    There was an error with the credit card transaction. Error details below:
    {error_msg}
    [/accept_stripe_payment_checkout_error]

    Hmmm, sadly this still isn’t working for me. I pasted your code above directly into the Checkout-result page and got the same result as before: the text and tag values rendered fine but the payment details were missing. Using [accept_stripe_payment_checkout] on its own displays the payment details fine, but as soon as I add the [/accept_stripe_payment_checkout] code the payment details disappear. Am I making some basic error?

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    Ok, let’s try to figure this out 🙂

    I pasted your code above directly into the Checkout-result page and got the same result as before: the text and tag values rendered fine but the payment details were missing.

    You mean there were no item name, item price and currency code displayed? And also not custom field data displayed as well? E.g. your checkout result page looked like this after successful test payment:

    Thank you for purchasing the following item:

    You paid

    Is this correct?

    Thanks for your help, I think I may have worked it out! If I have this shortcode on the Checkout-result page:
    [accept_stripe_payment_checkout]
    Then when I make a payment of $5.00 I get this payment information text on the checkout page, on a light green background:

    Thank you for your payment.
    Here’s what you purchased:
    Product Name: Test Product #1
    Quantity: 1
    Item Price: AU$5.00
    Total Amount: AU$5.00
    Transaction ID: ch_1CAR7QDYdyWVyc0d8ylH0xxH

    If I have this code on the checkout page:

    [accept_stripe_payment_checkout]
    Thank you for purchasing the following item:
    {item_name}
    You paid {item_price} {currency_code}
    {custom_field}
    [/accept_stripe_payment_checkout]

    Then the result on the checkout page is:
    Thank you for purchasing the following item:
    Test Product #1
    You paid 5 AUD
    Description: Text entered by user at checkout

    Ie all the payment information text on the light green background disappears, I can’t get both sets of information on the page. However if I use this code:

    [accept_stripe_payment_checkout]
    [accept_stripe_payment_checkout]
    Thank you for purchasing the following item: {item_name}
    You paid {item_price} {currency_code}
    {custom_field}
    [/accept_stripe_payment_checkout]

    Then I can get both sets of information, yay! It doesn’t feel right, but it does seem to work – is this an acceptable solution?

    Plugin Contributor Alexander C.

    (@alexanderfoxc)

    Oh, I got it now. Looks like I have misunderstood you a bit.

    When you use custom tags inside [accept_stripe_payment_checkout][/accept_stripe_payment_checkout] shortcode, you need to construct the whole message by yourself. E.g., if you want to mimic the default message and also add custom field in it, you should use something like this:

    [accept_stripe_payment_checkout]
    Thank you for your payment.
    Here’s what you purchased:
    Product Name: {item_name}
    Quantity: 1
    Item Price: {currency_code}{item_price}
    Total Amount: {item_price}
    Transaction ID: {transaction_id}
    {custom_field}
    [/accept_stripe_payment_checkout]

    But if the way you decided to use it suits you (e.g. displaying default message using [accept_stripe_payment_checkout] and adding your custom message using [accept_stripe_payment_checkout][/accept_stripe_payment_checkout] ) – then I see no reason why you can’t use it 😉

    Just don’t forget to add error mesage shortcode right below all of it.

Viewing 10 replies - 1 through 10 (of 10 total)
  • The topic ‘Use of Custom Field Data’ is closed to new replies.