From a0817d8de35c5fee9386c647ea0f90d4441a88fb Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Tue, 19 Jul 2016 20:15:03 +0300 Subject: [PATCH] Check for payment driver --- app/Services/PaymentService.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/app/Services/PaymentService.php b/app/Services/PaymentService.php index b0c5353c2d27..b40e81600cfe 100644 --- a/app/Services/PaymentService.php +++ b/app/Services/PaymentService.php @@ -73,6 +73,11 @@ class PaymentService extends BaseService } $paymentDriver = $account->paymentDriver($invitation, GATEWAY_TYPE_TOKEN); + + if ( ! $paymentDriver) { + return false; + } + $customer = $paymentDriver->customer(); if ( ! $customer) {