Problem/Motivation
yoyaku_payment carries its own copy of a generic payment engine: a payment entity, a gateway plugin type, a payment state machine, payment events, and worldline/simulator/audit/views gateways. That generic engine now lives in its own project, kessai, and the "take a payment as a workflow step" glue lives in orchestra's orchestra_payment submodule. yoyaku should consume those rather than duplicate them.
Proposed resolution
Remove the duplicated generic stack from yoyaku_payment and keep only the booking-specific logic, rewritten to call kessai directly.
- Delete the payment entity, the gateway plugin type and ManualGateway, the payment events, the generic PaymentManager, and the yoyaku_payment_worldline/simulator/audit/views submodules (kessai ships kessai_worldline, kessai_simulator, kessai_audit_trail and kessai_views).
- Keep PaymentPolicy and PaymentPolicyResolver (booking pricing, gaining amountDueForOrder), the order-to-gateway resolver, the deposit/no-show field injection, and DefaultSettlementSubscriber, now reacting to kessai's payment events and resolving the order from the payment subject (the yoyaku_transaction).
- Replace the orchestra glue (BookingPaymentInteraction, PaymentWorkflowBridge, StoredCardCleanup, PaymentOrchestraHooks) with a BookingPayableResolver plugin (payable resolver id yoyaku_booking) feeding orchestra_payment's generic payment interaction, and rebuild the deposit/no-show workflow actions on kessai's PaymentManager.
None of these modules have released users, so there is no upgrade path: config and tests are updated in place.
Remaining tasks
- Implement and review.
Issue fork yoyaku-3609127
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 #2
mably commentedPushed the refit to the issue fork branch
3609127-refit-the-payment-layer.Removed the duplicated generic payment stack (payment entity, gateway plugin type, state machine, events, and the worldline/simulator/audit/views submodules), all now provided by kessai. Kept the booking-specific policy, order-to-gateway resolution, settlement reactions and field injection, rewritten to call kessai directly with the transaction as the payment subject. Replaced the orchestra glue with a BookingPayableResolver feeding orchestra_payment's payment interaction, and rebuilt the deposit and no-show workflow actions on kessai.
Locally: the three adapted kernel tests pass, and phpcs and cspell are clean.
Comment #5
mably commented