You are here

public function Basic::doRefundPaymentAccess in Payment 8.2

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

Parameters

\Drupal\Core\Session\AccountInterface $account:

Return value

bool

Overrides PaymentMethodBase::doRefundPaymentAccess

File

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

Class

Basic
A basic payment method that does not transfer money.

Namespace

Drupal\payment\Plugin\Payment\Method

Code

public function doRefundPaymentAccess(AccountInterface $account) {
  return $this
    ->getRefund() && $this
    ->getPayment()
    ->getPaymentStatus()
    ->getPluginId() != $this
    ->getRefundStatusId();
}