Check property exists in mollie webhook reqeuest

This commit is contained in:
David Bomba 2021-12-05 21:33:48 +11:00
parent 88b41b70d5
commit 5f413172b7

View File

@ -319,7 +319,7 @@ class MolliePaymentDriver extends BaseDriver
// we may not have a payment record - in these cases we need to re-construct the payment
// record from the meta data in the payment hash.
if($payment && $payment->metadata->payment_hash){
if($payment && property_exists($payment->metadata, 'payment_hash') && $payment->metadata->payment_hash){
/* Harvest Payment Hash*/
$payment_hash = PaymentHash::where('hash', $payment->metadata->hash)->first();