On the manual-validation path of the booking example workflow, when the operator rejects a booking that already carries a captured payment, the booking is released but the payment is never refunded. The customer is left out of pocket for a booking that never went ahead.

Proposed resolution

Add a refund step on the rejection branch. When the operator rejects the booking, any captured booking payment is refunded before the release notification is sent. The refund is unconditional of the resource refund deadline: a late validation is not the customer's fault, so a rejection always refunds.

The release notification mentions the refund only when an amount was actually returned, so a free or unpaid booking says nothing about a refund.

Cross-project dependency

The refund is issued by a workflow action on a token-pinned payment. That relies on the payment workflow bridge claiming the refund event so the booking release stays driven by the run rather than by the autonomous cancel-on-refund reaction. That fix lives in orchestra: see #3609403. This must land in orchestra 1.x before the functional test here passes in CI.

Tests

A functional end-to-end test drives the manual resource through payment to operator rejection and asserts the payment is refunded, the booking released and the instance completed.

Note

A second commit synchronizes the shipped BPMN diagram with the modeler layout saved on the reference site. It is presentation only: no node, flow or executable config changes.

Issue fork yoyaku-3609409

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

MR !8 opened. The orchestra dependency (#3609403, MR !305) is now merged to 1.x, so the functional test passes once the orchestra 1.x-dev snapshot repackages.

  • mably committed 092097ab on 1.x
    fix: #3609409 Refund a captured booking payment when the operator...
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.