Error when re-submitting rejected card

Created on 22 May 2023, over 1 year ago
Updated 10 August 2023, over 1 year ago

Problem/Motivation

Re-submitting card details that have been declined, without re-entering them produces a server error:

{"errors": [@"code": "CARD_TOKEN_USED","detail": "Card nonce already used with a different idempotency key; please request new nonce.","category": "INVALID_REQUEST_ERROR"]}

Steps to reproduce

  • Install Commerce Square and set up Square payment gateway,
  • Attempt payment with a card that will be declined.
  • After the card has been declined, resubmit the payment attempt without re-entering the card details.

Proposed resolution

Either create a new nonce when re-submitting, or remove the facility to re-submit card details that have been declined - i.e. force the user to re-enter the card details or use a different card.

Thank you

πŸ› Bug report
Status

Active

Version

1.7

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom GillMead

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

Comments & Activities

Production build 0.71.5 2024