interface SupportsStoredPaymentMethodsInterface in Commerce Core 8.2
Defines the interface for gateways which support storing payment methods.
Hierarchy
- interface \Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\SupportsStoredPaymentMethodsInterface
Expanded class hierarchy of SupportsStoredPaymentMethodsInterface
All classes that implement SupportsStoredPaymentMethodsInterface
8 files declare their use of SupportsStoredPaymentMethodsInterface
- commerce_payment.module in modules/
payment/ commerce_payment.module - Provides payment functionality.
- PaymentAddForm.php in modules/
payment/ src/ Form/ PaymentAddForm.php - PaymentGatewayStorage.php in modules/
payment/ src/ PaymentGatewayStorage.php - PaymentInformation.php in modules/
payment/ src/ Plugin/ Commerce/ CheckoutPane/ PaymentInformation.php - PaymentMethodStorage.php in modules/
payment/ src/ PaymentMethodStorage.php
File
- modules/
payment/ src/ Plugin/ Commerce/ PaymentGateway/ SupportsStoredPaymentMethodsInterface.php, line 11
Namespace
Drupal\commerce_payment\Plugin\Commerce\PaymentGatewayView source
interface SupportsStoredPaymentMethodsInterface {
/**
* Creates a payment.
*
* @param \Drupal\commerce_payment\Entity\PaymentInterface $payment
* The payment.
* @param bool $capture
* Whether the created payment should be captured (VS authorized only).
* Allowed to be FALSE only if the plugin supports authorizations.
*
* @throws \InvalidArgumentException
* If $capture is FALSE but the plugin does not support authorizations.
* @throws \Drupal\commerce_payment\Exception\PaymentGatewayException
* Thrown when the transaction fails for any reason.
*/
public function createPayment(PaymentInterface $payment, $capture = TRUE);
/**
* Deletes the given payment method.
*
* Both the entity and the remote record are deleted.
*
* @param \Drupal\commerce_payment\Entity\PaymentMethodInterface $payment_method
* The payment method.
*
* @throws \Drupal\commerce_payment\Exception\PaymentGatewayException
* Thrown when the transaction fails for any reason.
*/
public function deletePaymentMethod(PaymentMethodInterface $payment_method);
}
Members
Name![]() |
Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SupportsStoredPaymentMethodsInterface:: |
public | function | Creates a payment. | 2 |
SupportsStoredPaymentMethodsInterface:: |
public | function | Deletes the given payment method. | 2 |