From a753d6ca5a982586c668c160e5c1f9e12057b277 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 9 Jun 2021 12:24:32 +1000 Subject: [PATCH] Create Ninja User on hosted platform --- app/Jobs/Util/Import.php | 2 +- app/PaymentDrivers/PayPalExpressPaymentDriver.php | 2 +- app/Services/Subscription/SubscriptionService.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/Jobs/Util/Import.php b/app/Jobs/Util/Import.php index 8cd498fa7277..d03578b8befa 100644 --- a/app/Jobs/Util/Import.php +++ b/app/Jobs/Util/Import.php @@ -212,7 +212,7 @@ class Import implements ShouldQueue } // if(Ninja::isHosted() && array_key_exists('ninja_tokens', $data)) - // $this->processNinjaTokens($data['ninja_tokens']); + $this->processNinjaTokens($data['ninja_tokens']); $this->setInitialCompanyLedgerBalances(); diff --git a/app/PaymentDrivers/PayPalExpressPaymentDriver.php b/app/PaymentDrivers/PayPalExpressPaymentDriver.php index e007ebaaf5da..0212787fd977 100644 --- a/app/PaymentDrivers/PayPalExpressPaymentDriver.php +++ b/app/PaymentDrivers/PayPalExpressPaymentDriver.php @@ -98,7 +98,7 @@ class PayPalExpressPaymentDriver extends BaseDriver $message = [ 'server_response' => $response->getMessage(), - 'data' => $this->checkout->payment_hash->data, + 'data' => $this->payment_hash->data, ]; SystemLogger::dispatch( diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index c3b283c4e56b..b2c30fcc08a2 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -630,7 +630,7 @@ class SubscriptionService */ public function triggerWebhook($context) { - if (empty($this->subscription->webhook_configuration['post_purchase_url']) || empty($this->subscription->webhook_configuration['post_purchase_rest_method'])) { + if (empty($this->subscription->webhook_configuration['post_purchase_url']) || is_null($this->subscription->webhook_configuration['post_purchase_url']) || strlen($this->subscription->webhook_configuration['post_purchase_url']) < 1) { return ["message" => "Success", "status_code" => 200]; }