You are here

public function MolliePayment::updatePaymentStatus in Mollie Payment 8.2

Update payment status,

File

src/Plugin/Payment/Method/MolliePayment.php, line 264

Class

MolliePayment
A payment method using Mollie.

Namespace

Drupal\mollie_payment\Plugin\Payment\Method

Code

public function updatePaymentStatus(Payment $payment, $payment_status) {
  $payment
    ->setPaymentStatus($payment
    ->getPaymentMethod()->paymentStatusManager
    ->createInstance($payment_status));
  $payment
    ->save();
}