diff --git a/src/app/code/Komoju/Payments/Model/WebhookEvent.php b/src/app/code/Komoju/Payments/Model/WebhookEvent.php index c18d28bf0..a99a955c8 100644 --- a/src/app/code/Komoju/Payments/Model/WebhookEvent.php +++ b/src/app/code/Komoju/Payments/Model/WebhookEvent.php @@ -28,7 +28,6 @@ public function __construct($requestBody) if (! empty(json_last_error())) { $errorMsg = (__("KOMOJU Payments JSON Decoding Failure. Error: %1", json_last_error_msg())); - throw new Komoju\Payments\Exception\InvalidJsonException($errorMsg); } } @@ -62,7 +61,8 @@ public function status() */ public function externalOrderNum() { - return $this->data()['external_order_num']; + $data = $this->data(); + return isset($data['external_order_num']) ? $data['external_order_num'] : null; } /**