Return early if no hash found

This commit is contained in:
David Bomba 2022-11-27 17:33:43 +11:00
parent 44cd369256
commit 85c40de5de

View File

@ -138,6 +138,9 @@ class PaymentIntentWebhook implements ShouldQueue
$hash = isset($charge['metadata']['payment_hash']) ? $charge['metadata']['payment_hash'] : false; $hash = isset($charge['metadata']['payment_hash']) ? $charge['metadata']['payment_hash'] : false;
if(!$hash)
return;
$payment_hash = PaymentHash::where('hash', $hash)->first(); $payment_hash = PaymentHash::where('hash', $hash)->first();
if(!$payment_hash) if(!$payment_hash)