Using a stored payment method that no longer exists results in an error

Created on 5 December 2022, almost 2 years ago
Updated 15 August 2023, over 1 year ago

Problem/Motivation

This is probably more likely to happen for testing, but if you try to pay with a stored token that no longer exists or isn't valid, an exception is thrown:

Wallee\Sdk\ApiException: Error 442 connecting to the API (https://app-wallee.com:443/api/transaction/create?spaceId=24423) : {"date":"2022-12-05T07:58:22.471Z","defaultMessage":"The entity with id 1,423,377 is deleted and as such it cannot be modified anymore.","id":"XB2_-oW9M64nhrRnA-fmkjjl66FPIignEcJpQOuUjgM (2022-12-05T07:58:22.471Z)","message":"The entity with id 1,423,377 is deleted and as such it cannot be modified anymore.","type":"END_USER_ERROR"} in Wallee\Sdk\ApiClient->callApi() (Zeile 479 in /app/vendor/wallee/sdk/lib/ApiClient.php).

Steps to reproduce

Proposed resolution

Catch exceptions thrown by that, convert to a payment exception so commerce can handle it.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Fixed

Version

2.0

Component

Code

Created by

🇨🇭Switzerland berdir Switzerland

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.

Production build 0.71.5 2024