kessai #3614954: cancel() can only void a whole hold, so a guarantee cannot be partly claimed and partly released gives a payment four amounts instead of one and lets a hold be claimed and released in parts. Two consequences reach yoyaku, neither a defect here.

The kernel fixtures. cancel() now writes a kessai_reversal row, so every class that reaches it through the release-deposit path needs that entity's schema installed: DepositReturnTest and DefaultSettlementSubscriberTest, whose failed-payment path cancels any authorized deposit.

The captured total has to be backfilled on an existing site. refundablePayments() filters on the balance, which is now what was captured less what has been refunded rather than the payment's amount less what has been refunded. A payment captured before the upgrade has a captured total of zero, so it reads as having nothing refundable and the release-deposit step would quietly return nothing. One statement fixes it, setting the captured total from the amount for every captured or refunded payment, and it belongs in the release notes rather than in an update hook, since kessai is pre-1.0 and reinstall-only.

Nothing else changes. CaptureDepositAction calls capture($deposit, $amount), and finality defaults to closing the authorization, so a damage claim still releases whatever it does not take, exactly as today.

The feature this unlocks, deliberately left out of scope here. The example workflow currently charges a no-show fee as a fresh charge against the stored card and then releases the whole hold. Claiming the fee out of the money already held is cheaper and far likelier to succeed, since a charge after the event can be declined for insufficient funds or a cancelled card while the hold is already good. With partial claims that becomes: claim the fee from the guarantee without closing it, then release what is left. It needs its own issue, because it changes what the attendance branches do and it interacts with #3614440: Rename the deposit vocabulary to guarantee, and let one guarantee cover the deposit and the no-show fee, where a guarantee sized as the larger of the deposit and the fee assumes the two are mutually exclusive. On a group booking they are not: some guests can arrive and damage something while others never show.

Ordering: this cannot go green until #3614954: cancel() can only void a whole hold, so a guarantee cannot be partly claimed and partly released reaches drupal/kessai 1.x-dev, since require-dev resolves the packaged dev release, the same way #3614435: A charge-mode security deposit cannot be returned without refunding the whole booking waited on #3614923: refund() can only return a payment whole, and a refund leaves no record of its own.

Issue fork yoyaku-3614961

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 » Closed (duplicate)

Closing as covered: the fixture change went into the merge request for #3614435: A charge-mode security deposit cannot be returned without refunding the whole booking, which is where the test that needs it lives. Adding the kessai_reversal schema in a separate merge request would have meant two of them touching one file, and that merge request was going red without it once kessai #3614954: cancel() can only void a whole hold, so a guarantee cannot be partly claimed and partly released reached the dev release.

The second half of this issue turned out not to belong here at all. DefaultSettlementSubscriberTest needs no change: its fixture payment is captured, and the failure path only cancels an authorized guarantee, so it never reaches a release and never writes a reversal row. Verified against merged kessai rather than assumed.

And the captured-total backfill is a kessai upgrade step rather than a yoyaku one, since kessai is what changed what a balance is measured against. It belongs in kessai's own documentation and release notes, so it is recorded there instead of here.

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.