Problem/Motivation

kessai_worldline had no test coverage. The webhook controller and the payment finalizer are the two halves of settling a Worldline payment (verify the callback, then settle or reject the pending checkout payment), and neither was covered.

Proposed resolution

Add two kernel tests. WorldlineWebhookTest covers the controller's verification guards (an unconfigured endpoint acknowledges with 200, a bad signature is rejected with 400). WorldlineFinalizerTest covers the finalizer's amount and currency verification (a mismatched amount or currency fails the payment, an exact match settles it), building the provider payment by hand so neither needs a live API.

Remaining tasks

  • Review.

Issue fork kessai-3609199

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’s picture

Status: Active » Needs review

Opened MR !2 with the two kernel tests (webhook verification guards and finalizer amount/currency settlement). These were written against #3609156 but that MR merged with only the README, so they land here.

  • mably committed b578648b on 1.x
    task: #3609199 Add kessai_worldline kernel tests for the webhook and...
mably’s picture

Status: Needs review » 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.

Status: Fixed » Closed (fixed)

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