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
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
Comment #3
mably commentedOpened 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.
Comment #5
mably commented