interface OnsitePaymentGatewayInterface in Commerce Core 8.2
Defines the base interface for on-site payment gateways.
On-site payment gateways allow the customer to enter credit card details directly on the site. The details might be safely tokenized before they reach the server (Braintree, Stripe, etc) or they might be transmitted directly through the server (PayPal Payments Pro).
On-site payment flow: 1) The customer enters checkout. 2) The PaymentInformation checkout pane shows the "add-payment-method" plugin form, allowing the customer to enter their payment details. 3) On submit, a payment method is created via createPaymentMethod() and attached to the customer and the order. 4) The customer continues checkout, hits the "payment" checkout step. 5) The PaymentProcess checkout pane calls createPayment(), which charges the provided payment method and creates a payment.
If the payment method could not be charged (for example, because the credit card's daily limit was breached), the customer is redirected back to the checkout step that contains the PaymentInformation checkout pane, to provide a different payment method.
Hierarchy
- interface \Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\PaymentGatewayInterface; interface \Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\SupportsStoredPaymentMethodsInterface; interface \Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\SupportsCreatingPaymentMethodsInterface
- interface \Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\OnsitePaymentGatewayInterface
Expanded class hierarchy of OnsitePaymentGatewayInterface
All classes that implement OnsitePaymentGatewayInterface
1 file declares its use of OnsitePaymentGatewayInterface
- OnsiteInterface.php in modules/
payment_example/ src/ Plugin/ Commerce/ PaymentGateway/ OnsiteInterface.php
File
- modules/
payment/ src/ Plugin/ Commerce/ PaymentGateway/ OnsitePaymentGatewayInterface.php, line 28
Namespace
Drupal\commerce_payment\Plugin\Commerce\PaymentGatewayView source
interface OnsitePaymentGatewayInterface extends PaymentGatewayInterface, SupportsStoredPaymentMethodsInterface, SupportsCreatingPaymentMethodsInterface {
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
ConfigurableInterface:: |
public | function | Gets default configuration for this plugin. | 11 |
ConfigurableInterface:: |
public | function | Gets this plugin's configuration. | 12 |
ConfigurableInterface:: |
public | function | Sets the configuration for this plugin instance. | 12 |
DependentPluginInterface:: |
public | function | Calculates dependencies for the configured plugin. | 19 |
DerivativeInspectionInterface:: |
public | function | Gets the base_plugin_id of the plugin instance. | 1 |
DerivativeInspectionInterface:: |
public | function | Gets the derivative_id of the plugin instance. | 1 |
PaymentGatewayInterface:: |
public | function | Builds a label for the given AVS response code and card type. | 1 |
PaymentGatewayInterface:: |
public | function | Builds the available operations for the given payment. | 1 |
PaymentGatewayInterface:: |
public | function | Gets whether the payment gateway collects billing information. | 1 |
PaymentGatewayInterface:: |
public | function | Gets the credit card types handled by the gateway. | 1 |
PaymentGatewayInterface:: |
public | function | Gets the default payment method type. | 1 |
PaymentGatewayInterface:: |
public | function | Gets the payment gateway display label. | 1 |
PaymentGatewayInterface:: |
public | function | Gets the JS library ID. | 1 |
PaymentGatewayInterface:: |
public | function | Gets the payment gateway label. | 1 |
PaymentGatewayInterface:: |
public | function | Gets the mode in which the payment gateway is operating. | 1 |
PaymentGatewayInterface:: |
public | function | Gets the payment method types handled by the payment gateway. | 1 |
PaymentGatewayInterface:: |
public | function | Gets the payment type used by the payment gateway. | 1 |
PaymentGatewayInterface:: |
public | function | Gets the supported modes. | 1 |
PaymentGatewayInterface:: |
public | function | Converts the given amount to its minor units. | 1 |
PluginFormInterface:: |
public | function | Form constructor. | 36 |
PluginFormInterface:: |
public | function | Form submission handler. | 32 |
PluginFormInterface:: |
public | function | Form validation handler. | 18 |
PluginInspectionInterface:: |
public | function | Gets the definition of the plugin implementation. | 4 |
PluginInspectionInterface:: |
public | function | Gets the plugin_id of the plugin instance. | 2 |
PluginWithFormsInterface:: |
public | function | Gets the form class for the given operation. | |
PluginWithFormsInterface:: |
public | function | Gets whether the plugin has a form class for the given operation. | |
SupportsCreatingPaymentMethodsInterface:: |
public | function | Creates a payment method with the given payment details. | 1 |
SupportsStoredPaymentMethodsInterface:: |
public | function | Creates a payment. | 2 |
SupportsStoredPaymentMethodsInterface:: |
public | function | Deletes the given payment method. | 2 |