You are here

public function Basic::doRefundPayment in Payment 8.2

Performs the actual payment refund.

Overrides PaymentMethodBase::doRefundPayment

File

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

Class

Basic
A basic payment method that does not transfer money.

Namespace

Drupal\payment\Plugin\Payment\Method

Code

public function doRefundPayment() {
  $this
    ->getPayment()
    ->setPaymentStatus($this->paymentStatusManager
    ->createInstance($this
    ->getRefundStatusId()));
  $this
    ->getPayment()
    ->save();
}