interface SupportsVoidsInterface in Commerce Core 8.2
Defines the interface for gateways which support voiding payments.
Payments can usually only be voided before they are captured/received.
Hierarchy
- interface \Drupal\commerce_payment\Plugin\Commerce\PaymentGateway\SupportsVoidsInterface
Expanded class hierarchy of SupportsVoidsInterface
All classes that implement SupportsVoidsInterface
File
- modules/
payment/ src/ Plugin/ Commerce/ PaymentGateway/ SupportsVoidsInterface.php, line 12
Namespace
Drupal\commerce_payment\Plugin\Commerce\PaymentGatewayView source
interface SupportsVoidsInterface {
/**
* Checks whether the given payment can be voided.
*
* @param \Drupal\commerce_payment\Entity\PaymentInterface $payment
* The payment to void.
*
* @return bool
* TRUE if the payment can be voided, FALSE otherwise.
*/
public function canVoidPayment(PaymentInterface $payment);
/**
* Voids the given payment.
*
* @param \Drupal\commerce_payment\Entity\PaymentInterface $payment
* The payment to void.
*
* @throws \Drupal\commerce_payment\Exception\PaymentGatewayException
* Thrown when the transaction fails for any reason.
*/
public function voidPayment(PaymentInterface $payment);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
SupportsVoidsInterface:: |
public | function | Checks whether the given payment can be voided. | |
SupportsVoidsInterface:: |
public | function | Voids the given payment. | 2 |