You are here

public function PaymentGatewayBase::canCapturePayment in Commerce Core 8.2

1 call to PaymentGatewayBase::canCapturePayment()
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 438

Class

PaymentGatewayBase
Provides the base class for payment gateways.

Namespace

Drupal\commerce_payment\Plugin\Commerce\PaymentGateway

Code

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