You are here

public function Basic::doCapturePaymentAccess in Payment 8.2

Performs a payment method-specific access check for payment capture.

Parameters

\Drupal\Core\Session\AccountInterface $account:

Return value

bool

Overrides PaymentMethodBase::doCapturePaymentAccess

File

src/Plugin/Payment/Method/Basic.php, line 164

Class

Basic
A basic payment method that does not transfer money.

Namespace

Drupal\payment\Plugin\Payment\Method

Code

public function doCapturePaymentAccess(AccountInterface $account) {
  return $this
    ->getCapture() && $this
    ->getPayment()
    ->getPaymentStatus()
    ->getPluginId() != $this
    ->getCaptureStatusId();
}