Problem/motivation

There are times when making a payment (i.e when a payment is created upon custom checkout) where it would be helpful to know whether a payment transaction should be captured vs. authorized. In the PaymentAddForm (admin UI), the user explicitly sets the capture / authorization flag for payments, but for cases like #2820931: Perform payment transaction during checkout, there is no way for the system to know whether a payment should be captured or authorized.

Proposed resolution

Implement a third party setting on checkout flows that payment gateways can use to determine auth v. capture from the checkout flow's configuration.

Remaining tasks

  • Third party setting on checkout flows, checked from e.g. checkout.complete event subscribers who want to make payments
  • Payment example implementation
  • Test

Comments

steveoliver created an issue. See original summary.

steveoliver’s picture

Assigned: steveoliver » Unassigned
Status: Active » Needs review
bojanz’s picture

I think this needs to be configured on checkout, not on the payment gateway level.

steveoliver’s picture

Title: Onsite payment gateway plugins determine payment capture default » Determine if a payment should be captured or authorized
Issue summary: View changes

@bojanz: I'm not totally sure what you mean, but I updated the issue summary with what I think you might have meant by your last comment. Please let me know if that's what you had in mind and/or any other thoughts about this idea of having a way to know if a payment should be authorized or captured.

steveoliver’s picture

@bojanz: In detail: If I understand correctly, the payment module would implement something similar to the last two form_alter and form_builder of core's contact_storage_test.module, applied to checkout flows--adding a third party setting of 'capture payment immediately'.

mglaman’s picture

Status: Needs review » Closed (outdated)

Going to close as outdated, let's make it a configuration option on the payment process pane proposed in [##2820931].