Kessai records a claim row for every capture since #3614985: capture() cannot name what a claim is for, and a claim leaves no record of its own, so a capture writes to kessai_claim before it asks the gateway for anything. Eight kernel classes under orchestra_payment install the payment, refund and reversal tables but not that one, so the row cannot be written, the storage failure surfaces as an incident rather than as a settlement, and the payment quietly stays authorized.

What that costs is a test that reads as an assertion about behavior and is really an assertion about a missing table. SettleTaskTest::testCaptureSettlesAndAdvances fails with captured versus authorized, which describes the step declining to settle; the step settled fine, and the row underneath it could not be saved. Same for testCapturesResolvedAmountNotAuthorized. The other six classes capture too and are exposed the same way.

The affected classes are SettleTaskTest, PaymentBridgeTest, PaymentOperationsTest, PaymentRouteOutcomeTest, CheckoutRefusalTest, PaymentIndexTest, StoredCardCleanupTest and CheckoutOrderingTest.

The fix is the schema install beside the reversal one each of them already has, with a line saying why it is there, so the next movement kessai records does not have to be rediscovered the same way. This is the sequel to #3614960: Kernel fixtures and one capture assertion still describe kessai before partial claims, which did the same for partial claims and reversals.

No production code changes: orchestra drives kessai through the payment manager, whose signature took the new argument as optional.

Issue fork orchestra-3615010

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

  • mably committed 5fe23c76 on 1.x
    fix: #3615010 A capture in a payment kernel test is swallowed, because...
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.