diff --git a/app/PaymentDrivers/Square/CreditCard.php b/app/PaymentDrivers/Square/CreditCard.php index 167744331d76..da53d36a2610 100644 --- a/app/PaymentDrivers/Square/CreditCard.php +++ b/app/PaymentDrivers/Square/CreditCard.php @@ -271,7 +271,7 @@ class CreditCard implements MethodInterface $errors = $api_response->getErrors(); } - if (property_exists($customers, 'customers')) { + if ($customers && property_exists($customers, 'customers')) { return $customers->customers[0]->id; } diff --git a/app/PaymentDrivers/Stripe/Jobs/PaymentIntentWebhook.php b/app/PaymentDrivers/Stripe/Jobs/PaymentIntentWebhook.php index ea757faca88e..6cca5ba8e3a0 100644 --- a/app/PaymentDrivers/Stripe/Jobs/PaymentIntentWebhook.php +++ b/app/PaymentDrivers/Stripe/Jobs/PaymentIntentWebhook.php @@ -89,6 +89,10 @@ class PaymentIntentWebhook implements ShouldQueue } $company_gateway = CompanyGateway::query()->find($this->company_gateway_id); + + if(!$company_gateway) + return; + $stripe_driver = $company_gateway->driver()->init(); $charge_id = false;