When a Worldline operation fails during settlement (releasing a card-verification hold, capturing an authorized checkout, or deleting an unrequested stored card), WorldlinePaymentFinalizer catches the SDK exception and logs only its generic message, for example "the payment platform returned an incorrect request error response". The SDK structured API errors (an error code, a category and, for a validation error, the offending property) are dropped, so the real cause is invisible.

This appends the structured API errors to the logged message, so a failure names its real cause, for example "[50001127 DIRECT_PLATFORM_ERROR] ACTION_NOT_ALLOWED_ON_TRANSACTION" for a cancel the transaction state does not allow, rather than an unactionable generic category. Applied to the release, capture and token-deletion catch blocks. A kernel test asserts a failed release logs the structured code and message.

Issue fork kessai-3609684

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

mably created an issue. See original summary.

mably changed the visibility of the branch 3609684-log-worldline-structured to hidden.

mably’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

  • mably committed d2012b4e on 1.x
    fix: #3609684 Log Worldline structured API error (code and category) on...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.