Commit 37703ba9 authored by Niels de Feyter's avatar Niels de Feyter
Browse files

#2976522 by Stefdewa: The onNotify function does not take into account that the payment was removed

parent 609cbcc9
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -171,8 +171,8 @@ class Mollie extends OffsitePaymentGatewayBase implements HasPaymentInstructions
    /** @var \Drupal\commerce_payment\Entity\Payment $payment */
    $payment = $payment_storage->loadByRemoteId($mollie_payment_remote_id);

    // The payment must be in the 'authorization' state.
    if ($payment->getState()->value !== 'authorization') {
    // Only proceed if payment exist and is in the 'authorization' state.
    if ($payment === NULL || $payment->getState()->value !== 'authorization') {
      return new JsonResponse();
    }