The payment interaction always offers to pay, even when the resolver reports there is nothing to pay for, or nothing to act on at all. This adds a route outcome to the payable resolver contract so the step can carry the run on, or show a message, instead of always offering payment.

Changes:

  • New PayableResolverInterface::routeOutcome() returns one of pay, no_payment or empty, with a default in PayableResolverBase derived from resolve(): pay when it resolves a Payable, empty otherwise.
  • The payment interaction routes on it. no_payment auto-signals a no_payment outcome with no landing page, so a flow carries the run onward. empty shows a configurable message plus the author-configured outcome buttons, with no amount and no Go to payment button. pay is unchanged.
  • A new translatable empty_message setting, plus its config schema key.

Covered by a new kernel test, PaymentRouteOutcomeTest, with a small test-only resolver.

Issue fork orchestra-3613222

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 committed 26a7a622 on 1.x
    feat: #3613222 Let the payment step route on a resolver outcome (pay,...
mably’s picture

Status: Active » 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.