diff --git a/app/Jobs/Util/WebhookHandler.php b/app/Jobs/Util/WebhookHandler.php index 039e244b83..2b67b5a2a1 100644 --- a/app/Jobs/Util/WebhookHandler.php +++ b/app/Jobs/Util/WebhookHandler.php @@ -29,11 +29,12 @@ class WebhookHandler implements ShouldQueue use Queueable; use SerializesModels; - public $tries = 1; //number of retries + public $timeout = 30; + public $deleteWhenMissingModels = true; - + /** * Create a new job instance. * @@ -66,6 +67,11 @@ class WebhookHandler implements ShouldQueue }); } + public function viaQueue() + { + return \App\Utils\Ninja::isHosted() ? 'webhooks' : 'default'; + } + public function failed($exception = null) { } diff --git a/app/PaymentDrivers/PayPalPPCPPaymentDriver.php b/app/PaymentDrivers/PayPalPPCPPaymentDriver.php index 2468c6ca14..fd86f9f997 100644 --- a/app/PaymentDrivers/PayPalPPCPPaymentDriver.php +++ b/app/PaymentDrivers/PayPalPPCPPaymentDriver.php @@ -167,7 +167,7 @@ class PayPalPPCPPaymentDriver extends PayPalBasePaymentDriver nlog($response); } - if (is_array($response) && isset($response['status']) && $response['status'] == 'COMPLETED' && isset($response['purchase_units'])) { + if (isset($response['status']) && $response['status'] == 'COMPLETED' && isset($response['purchase_units'])) { return $this->createNinjaPayment($request, $response);