diff --git a/src/QUI/ERP/Payments/Amazon/Events.php b/src/QUI/ERP/Payments/Amazon/Events.php index d22a29534918dc4adfe485d6005c778ae8cf8900..b36046bf8c2a1ca4448f25f3d42525f68e027944 100644 --- a/src/QUI/ERP/Payments/Amazon/Events.php +++ b/src/QUI/ERP/Payments/Amazon/Events.php @@ -90,7 +90,13 @@ class Events */ public static function onQuiqqerOrderSuccessful(QUI\ERP\Order\AbstractOrder $Order) { - if (!($Order->getPayment()->getPaymentType() instanceof AmazonPayment)) { + $OrderPayment = $Order->getPayment(); + + if (is_null($OrderPayment)) { + return; + } + + if (!($OrderPayment->getPaymentType() instanceof AmazonPayment)) { return; }