Don't show expired payment method as an option when checkout

Created on 11 September 2019, about 5 years ago
Updated 2 September 2024, 14 days ago

Problem/Motivation

I 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 15 minutes, so I set payment method expiration after 15 minutes.
If the user didn't complete the checkout process and added more products to the cart (let's say this took more than 15 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.
Also, this issue can happen if the card has a close expire date (next day for example) and the user didn't complete the checkout process and came in the next day. If the session didn't expire he will find his credit card info available, but it's expired.

Proposed resolution

Check if order attached payment method is expired before showing it as an option

Remaining tasks

none

User interface changes

none

API changes

none

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Payment

Created by

🇯🇴Jordan Anas_maw

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

Merge Requests

Comments & Activities

Not all content is available!

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

Production build 0.71.5 2024