Handle client token expiration

Created on 20 October 2022, about 2 years ago
Updated 10 April 2024, 7 months ago

Problem/Motivation

we have a case that when the user enters his credit card information, I create a new card request to the payment gateway and I get a token that will expire after 60 minutes, so we need to set payment method expiration after 60 minutes.
If the user didn't complete the checkout process and added more products to the cart (let's say this took more than 60 minutes) when he checkout again he will find that his entered card information is available in the payment methods options, but the token is expired and he can't complete the purchase and user will be in a infinite loop since card information is correct.

Steps to reproduce

1) Add new Card to payment
2) continue to review and leave for an 60 minutes
3) Come back and try to complete payment , you will have error for token expiry

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

💬 Support request
Status

Closed: works as designed

Component

Code

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇵🇪Peru krystalcode

    Just adding some more information here. From the BlueSnap documentation.

    Keep in mind, the Hosted Payment Fields Token can only be used once- either to process a transaction or to save shopper payment info. If you want to use Hosted Payment Fields to vault a shopper and then process a charge, please contact BlueSnap implementation to enable a multi-use token for improved conversions.

    We use the token that is created when collecting the payment details only for saving the credit card in the vaulted shopper. And that happens pretty much immediately as soon as the token is created i.e. it should never expire. We do not use the token to capture the payment; at the end of checkout, we send the last 4 digits and the card type to identify the card that should be charged.

    So, if you have customizations and you want to reuse the token for creating the transaction, you need to renew the token - or to submit the last 4 digits and card type instead like the module does.

Production build 0.71.5 2024