From 85c40de5de6eb09fe99f3b5dc7e79db23ccaa8ad Mon Sep 17 00:00:00 2001 From: David Bomba Date: Sun, 27 Nov 2022 17:33:43 +1100 Subject: [PATCH] Return early if no hash found --- app/PaymentDrivers/Stripe/Jobs/PaymentIntentWebhook.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/PaymentDrivers/Stripe/Jobs/PaymentIntentWebhook.php b/app/PaymentDrivers/Stripe/Jobs/PaymentIntentWebhook.php index 6d781670cf0e..d7cab34fab4e 100644 --- a/app/PaymentDrivers/Stripe/Jobs/PaymentIntentWebhook.php +++ b/app/PaymentDrivers/Stripe/Jobs/PaymentIntentWebhook.php @@ -138,6 +138,9 @@ class PaymentIntentWebhook implements ShouldQueue $hash = isset($charge['metadata']['payment_hash']) ? $charge['metadata']['payment_hash'] : false; + if(!$hash) + return; + $payment_hash = PaymentHash::where('hash', $hash)->first(); if(!$payment_hash)