You are here

public function PaymentGatewayBase::canVoidPayment in Commerce Core 8.2

1 call to PaymentGatewayBase::canVoidPayment()
PaymentGatewayBase::buildPaymentOperations in modules/payment/src/Plugin/Commerce/PaymentGateway/PaymentGatewayBase.php
Builds the available operations for the given payment.

File

modules/payment/src/Plugin/Commerce/PaymentGateway/PaymentGatewayBase.php, line 452

Class

PaymentGatewayBase
Provides the base class for payment gateways.

Namespace

Drupal\commerce_payment\Plugin\Commerce\PaymentGateway

Code

public function canVoidPayment(PaymentInterface $payment) {
  return $payment
    ->getState()
    ->getId() === 'authorization';
}