From a0591930f2d7d95497e82a67114c77efe5603c28 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 2 Apr 2021 16:37:10 +1100 Subject: [PATCH 1/9] 5.1.34 --- VERSION.txt | 2 +- config/ninja.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/VERSION.txt b/VERSION.txt index 09543ba2c390..eeb25c4a8c70 100644 --- a/VERSION.txt +++ b/VERSION.txt @@ -1 +1 @@ -5.1.33 \ No newline at end of file +5.1.34 \ No newline at end of file diff --git a/config/ninja.php b/config/ninja.php index 0b385471f4f6..7f0411c7d12f 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -14,7 +14,7 @@ return [ 'require_https' => env('REQUIRE_HTTPS', true), 'app_url' => rtrim(env('APP_URL', ''), '/'), 'app_domain' => env('APP_DOMAIN', ''), - 'app_version' => '5.1.33', + 'app_version' => '5.1.34', 'minimum_client_version' => '5.0.16', 'terms_version' => '1.0.1', 'api_secret' => env('API_SECRET', false), From f1f82016839935de4e807b06f234291f7b944ad7 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Fri, 2 Apr 2021 22:44:44 +1100 Subject: [PATCH 2/9] fixes for delivery note generation --- app/Http/Controllers/InvoiceController.php | 2 +- app/Services/Invoice/GenerateDeliveryNote.php | 13 ++++++++++++- app/Services/Invoice/InvoiceService.php | 2 +- app/Services/Payment/UpdateInvoicePayment.php | 3 +++ config/ninja.php | 2 +- resources/views/index/index.blade.php | 4 ++-- 6 files changed, 20 insertions(+), 6 deletions(-) diff --git a/app/Http/Controllers/InvoiceController.php b/app/Http/Controllers/InvoiceController.php index e64bac17a292..8451e1d7a3e5 100644 --- a/app/Http/Controllers/InvoiceController.php +++ b/app/Http/Controllers/InvoiceController.php @@ -795,7 +795,7 @@ class InvoiceController extends BaseController $file_path = $invoice->service()->getInvoicePdf($contact); -nlog($file_path); + nlog($file_path); return response()->download($file_path, basename($file_path)); } diff --git a/app/Services/Invoice/GenerateDeliveryNote.php b/app/Services/Invoice/GenerateDeliveryNote.php index 79c031a1718b..581a5da1fa8c 100644 --- a/app/Services/Invoice/GenerateDeliveryNote.php +++ b/app/Services/Invoice/GenerateDeliveryNote.php @@ -17,7 +17,9 @@ use App\Models\Design; use App\Models\Invoice; use App\Services\PdfMaker\Design as PdfMakerDesign; use App\Services\PdfMaker\PdfMaker as PdfMakerService; +use App\Utils\HostedPDF\NinjaPdf; use App\Utils\HtmlEngine; +use App\Utils\PhantomJS\Phantom; use App\Utils\Traits\MakesHash; use App\Utils\Traits\Pdf\PdfMaker; use Illuminate\Support\Facades\Storage; @@ -58,6 +60,10 @@ class GenerateDeliveryNote $file_path = sprintf('%s%s_delivery_note.pdf', $this->invoice->client->invoice_filepath(), $this->invoice->number); + if (config('ninja.phantomjs_pdf_generation')) { + return (new Phantom)->generate($this->invoice->invitations->first()); + } + $design = Design::find($design_id); $html = new HtmlEngine($this->invoice->invitations->first()); @@ -86,7 +92,12 @@ class GenerateDeliveryNote // Storage::makeDirectory($this->invoice->client->invoice_filepath(), 0775); - $pdf = $this->makePdf(null, null, $maker->getCompiledHTML()); + if(config('ninja.invoiceninja_hosted_pdf_generation')){ + $pdf = (new NinjaPdf())->build($maker->getCompiledHTML(true)); + } + else { + $pdf = $this->makePdf(null, null, $maker->getCompiledHTML()); + } if (config('ninja.log_pdf_html')) { info($maker->getCompiledHTML()); diff --git a/app/Services/Invoice/InvoiceService.php b/app/Services/Invoice/InvoiceService.php index 72e47ceecd49..6f056e7e900f 100644 --- a/app/Services/Invoice/InvoiceService.php +++ b/app/Services/Invoice/InvoiceService.php @@ -263,7 +263,7 @@ class InvoiceService { if ((int)$this->invoice->balance == 0) { - InvoiceWorkflowSettings::dispatch($this->invoice); + InvoiceWorkflowSettings::dispatchNow($this->invoice); $this->setStatus(Invoice::STATUS_PAID); } diff --git a/app/Services/Payment/UpdateInvoicePayment.php b/app/Services/Payment/UpdateInvoicePayment.php index c81b87bd434d..d2fc2eefed5c 100644 --- a/app/Services/Payment/UpdateInvoicePayment.php +++ b/app/Services/Payment/UpdateInvoicePayment.php @@ -12,6 +12,7 @@ namespace App\Services\Payment; use App\Events\Invoice\InvoiceWasUpdated; +use App\Jobs\Invoice\InvoiceWorkflowSettings; use App\Models\Invoice; use App\Models\Payment; use App\Models\PaymentHash; @@ -83,6 +84,8 @@ class UpdateInvoicePayment ->updateStatus() ->save(); + InvoiceWorkflowSettings::dispatchNow($invoice); + event(new InvoiceWasUpdated($invoice, $invoice->company, Ninja::eventVars())); }); diff --git a/config/ninja.php b/config/ninja.php index 7f0411c7d12f..9f868a7a5b1d 100644 --- a/config/ninja.php +++ b/config/ninja.php @@ -142,7 +142,7 @@ return [ 'expanded_logging' => env('EXPANDED_LOGGING', false), 'snappdf_chromium_path' => env('SNAPPDF_CHROMIUM_PATH', false), 'v4_migration_version' => '4.5.35', - 'flutter_canvas_kit' => env('FLUTTER_CANVAS_KIT', 'selfhosted-html'), + 'flutter_renderer' => env('FLUTTER_RENDERER', 'selfhosted-html'), 'webcron_secret' => env('WEBCRON_SECRET', false), 'disable_auto_update' => env('DISABLE_AUTO_UPDATE', false), 'invoiceninja_hosted_pdf_generation' => env('NINJA_HOSTED_PDF', false), diff --git a/resources/views/index/index.blade.php b/resources/views/index/index.blade.php index dfd798e2c1ee..84eb079a0141 100644 --- a/resources/views/index/index.blade.php +++ b/resources/views/index/index.blade.php @@ -146,9 +146,9 @@ - @if(config('ninja.flutter_canvas_kit') == 'hosted') + @if(config('ninja.flutter_renderer') == 'hosted') - @elseif(config('ninja.flutter_canvas_kit') == 'selfhosted-canvaskit') + @elseif(config('ninja.flutter_renderer') == 'selfhosted-canvaskit') @else From 858c99e09d4cfdbefed5f93a1db1cb7bb77ec8e5 Mon Sep 17 00:00:00 2001 From: = Date: Sun, 4 Apr 2021 22:14:33 +1000 Subject: [PATCH 3/9] Working on subscriptions --- app/Models/Subscription.php | 10 ++++ .../Subscription/SubscriptionService.php | 56 ++++++++++++++----- 2 files changed, 53 insertions(+), 13 deletions(-) diff --git a/app/Models/Subscription.php b/app/Models/Subscription.php index 748b27de0234..57ca3011ab06 100644 --- a/app/Models/Subscription.php +++ b/app/Models/Subscription.php @@ -20,6 +20,16 @@ class Subscription extends BaseModel { use HasFactory, SoftDeletes; + protected $hidden = [ + 'id', + 'user_id', + 'assigned_user_id', + 'company_id', + 'product_ids', + 'recurring_product_ids', + 'group_id', + ]; + protected $fillable = [ 'assigned_user_id', 'product_ids', diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index 9932e4029cef..e101c4fbcf58 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -27,6 +27,7 @@ use App\Models\SystemLog; use App\Repositories\InvoiceRepository; use App\Repositories\RecurringInvoiceRepository; use App\Repositories\SubscriptionRepository; +use App\Utils\Ninja; use App\Utils\Traits\CleanLineItems; use App\Utils\Traits\MakesHash; use GuzzleHttp\RequestOptions; @@ -70,7 +71,13 @@ class SubscriptionService ->save(); //execute any webhooks - $this->triggerWebhook(); + + $context = [ + 'context' => 'recurring_purchase', + 'recurring_invoice' => $recurring_invoice->hashed_id, + ]; + + $this->triggerWebhook($context); if(array_key_exists('post_purchase_url', $this->subscription->webhook_configuration) && strlen($this->subscription->webhook_configuration['post_purchase_url']) >=1) return redirect($this->subscription->webhook_configuration['post_purchase_url']); @@ -80,8 +87,13 @@ class SubscriptionService else { + $context = [ + 'context' => 'single_purchase', + 'invoice' => $this->encodePrimaryKey($payment_hash->fee_invoice_id), + ]; + //execute any webhooks - $this->triggerWebhook(); + $this->triggerWebhook($context); if(array_key_exists('post_purchase_url', $this->subscription->webhook_configuration) && strlen($this->subscription->webhook_configuration['post_purchase_url']) >=1) return redirect($this->subscription->webhook_configuration['post_purchase_url']); @@ -124,8 +136,13 @@ class SubscriptionService ->start() ->save(); + $context = [ + 'context' => 'trial', + 'recurring_invoice' => $recurring_invoice->hashed_id, + ]; + //execute any webhooks - $this->triggerWebhook(); + $this->triggerWebhook($context); if(array_key_exists('post_purchase_url', $this->subscription->webhook_configuration) && strlen($this->subscription->webhook_configuration['post_purchase_url']) >=1) return redirect($this->subscription->webhook_configuration['post_purchase_url']); @@ -208,22 +225,35 @@ class SubscriptionService // } //@todo - need refactor - public function triggerWebhook() + public function triggerWebhook($context) { + //context = 'trial, recurring_purchase, single_purchase' //hit the webhook to after a successful onboarding - // $body = [ - // 'subscription' => $this->subscription, - // 'client_subscription' => $this->client_subscription, - // 'client' => $this->client_subscription->client->toArray(), - // ]; + $body = [ + 'subscription' => $this->subscription->toArray(), + 'client' => $this->client_subscription->client->toArray(), + ]; + $body = array_merge($body, $context); + + if(Ninja::isHosted()) + { + $hosted = [ + 'company' => $this->subscription->company, + ]; - // $client = new \GuzzleHttp\Client(['headers' => $this->subscription->webhook_configuration->post_purchase_headers]); + $body = array_merge($body, $hosted); + } - // $response = $client->{$this->subscription->webhook_configuration->post_purchase_rest_method}($this->subscription->post_purchase_url,[ - // RequestOptions::JSON => ['body' => $body] - // ]); + $client = new \GuzzleHttp\Client( + [ + 'headers' => $this->subscription->webhook_configuration['post_purchase_headers'] + ]); + + $response = $client->{$this->subscription->webhook_configuration['post_purchase_rest_method']($this->subscription['post_purchase_url'],[ + RequestOptions::JSON => ['body' => $body] + ]); // SystemLogger::dispatch( // $body, From bf71acfe2d16516c704b267550c214be49aadcec Mon Sep 17 00:00:00 2001 From: = Date: Sun, 4 Apr 2021 22:47:59 +1000 Subject: [PATCH 4/9] Fixes for tests --- app/Services/Subscription/SubscriptionService.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index e101c4fbcf58..8f8b91312c01 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -236,7 +236,7 @@ class SubscriptionService ]; $body = array_merge($body, $context); - + if(Ninja::isHosted()) { $hosted = [ @@ -251,7 +251,7 @@ class SubscriptionService 'headers' => $this->subscription->webhook_configuration['post_purchase_headers'] ]); - $response = $client->{$this->subscription->webhook_configuration['post_purchase_rest_method']($this->subscription['post_purchase_url'],[ + $response = $client->{$this->subscription->webhook_configuration['post_purchase_rest_method']}($this->subscription['post_purchase_url'],[ RequestOptions::JSON => ['body' => $body] ]); From c814a754c32b7465a0c5b5901778e903e59c2e85 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 5 Apr 2021 08:37:01 +1000 Subject: [PATCH 5/9] Subscriptions --- app/Services/Subscription/SubscriptionService.php | 4 ++-- app/Transformers/SubscriptionTransformer.php | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index 8f8b91312c01..277ba045062a 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -231,8 +231,8 @@ class SubscriptionService //hit the webhook to after a successful onboarding $body = [ - 'subscription' => $this->subscription->toArray(), - 'client' => $this->client_subscription->client->toArray(), + 'subscription' => $this->subscription->hashed_id, + 'client' => $this->client_subscription->client->hashed_id, ]; $body = array_merge($body, $context); diff --git a/app/Transformers/SubscriptionTransformer.php b/app/Transformers/SubscriptionTransformer.php index 5fd60c134297..8ad12f5334d0 100644 --- a/app/Transformers/SubscriptionTransformer.php +++ b/app/Transformers/SubscriptionTransformer.php @@ -65,6 +65,7 @@ class SubscriptionTransformer extends EntityTransformer 'created_at' => (int)$subscription->created_at, 'updated_at' => (int)$subscription->updated_at, 'archived_at' => (int)$subscription->deleted_at, + 'plan_map' => '', //@deprecated 03/04/2021 ]; } From 51c7a164233ebdc47290d52bfd56fa0cb3ec177d Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 5 Apr 2021 09:08:16 +1000 Subject: [PATCH 6/9] Subscriptions --- app/Services/Subscription/SubscriptionService.php | 1 + 1 file changed, 1 insertion(+) diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index 277ba045062a..8b8190705fba 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -75,6 +75,7 @@ class SubscriptionService $context = [ 'context' => 'recurring_purchase', 'recurring_invoice' => $recurring_invoice->hashed_id, + 'invoice' => $this->encodePrimaryKey($payment_hash->fee_invoice_id), ]; $this->triggerWebhook($context); From fcaabace7fc121015ef4dcbe781478b8979e92fa Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 5 Apr 2021 09:21:54 +1000 Subject: [PATCH 7/9] Subscriptions --- .../Subscription/SubscriptionService.php | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index 8b8190705fba..d5ed21b9e869 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -76,6 +76,8 @@ class SubscriptionService 'context' => 'recurring_purchase', 'recurring_invoice' => $recurring_invoice->hashed_id, 'invoice' => $this->encodePrimaryKey($payment_hash->fee_invoice_id), + 'client' => $recurring_invoice->client->hashed_id, + 'subscription' => $this->subscription->hashed_id, ]; $this->triggerWebhook($context); @@ -87,10 +89,13 @@ class SubscriptionService } else { + $invoice = Invoice::find($payment_hash->fee_invoice_id); $context = [ 'context' => 'single_purchase', 'invoice' => $this->encodePrimaryKey($payment_hash->fee_invoice_id), + 'client' => $invoice->client->hashed_id, + 'subscription' => $this->subscription->hashed_id, ]; //execute any webhooks @@ -140,6 +145,8 @@ class SubscriptionService $context = [ 'context' => 'trial', 'recurring_invoice' => $recurring_invoice->hashed_id, + 'client' => $recurring_invoice->client->hashed_id, + 'subscription' => $this->subscription->hashed_id, ]; //execute any webhooks @@ -231,12 +238,7 @@ class SubscriptionService //context = 'trial, recurring_purchase, single_purchase' //hit the webhook to after a successful onboarding - $body = [ - 'subscription' => $this->subscription->hashed_id, - 'client' => $this->client_subscription->client->hashed_id, - ]; - - $body = array_merge($body, $context); + $body = $context; if(Ninja::isHosted()) { @@ -252,7 +254,7 @@ class SubscriptionService 'headers' => $this->subscription->webhook_configuration['post_purchase_headers'] ]); - $response = $client->{$this->subscription->webhook_configuration['post_purchase_rest_method']}($this->subscription['post_purchase_url'],[ + $response = $client->{$this->subscription->webhook_configuration['post_purchase_rest_method']}($this->subscription->webhook_configuration['post_purchase_url'],[ RequestOptions::JSON => ['body' => $body] ]); From 8d4fa8cb42e01580f0736345897af853c675a112 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 5 Apr 2021 12:42:49 +1000 Subject: [PATCH 8/9] Working on subs --- .../Subscription/SubscriptionService.php | 42 ++++++++++++------- 1 file changed, 26 insertions(+), 16 deletions(-) diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index d5ed21b9e869..1d33db7e9630 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -152,8 +152,9 @@ class SubscriptionService //execute any webhooks $this->triggerWebhook($context); - if(array_key_exists('post_purchase_url', $this->subscription->webhook_configuration) && strlen($this->subscription->webhook_configuration['post_purchase_url']) >=1) - return redirect($this->subscription->webhook_configuration['post_purchase_url']); + if(array_key_exists('return_url', $this->subscription->webhook_configuration) && strlen($this->subscription->webhook_configuration['return_url']) >=1){ + return redirect($this->subscription->webhook_configuration['return_url']); + } return redirect('/client/recurring_invoices/'.$recurring_invoice->hashed_id); } @@ -235,28 +236,37 @@ class SubscriptionService //@todo - need refactor public function triggerWebhook($context) { - //context = 'trial, recurring_purchase, single_purchase' - //hit the webhook to after a successful onboarding - $body = $context; + $body = array_merge($context, [ + 'company_key' => $this->subscription->company->company_key, + 'account_key' => $this->subscription->company->account->key, + 'db' => $this->subscription->company->db, + ]); - if(Ninja::isHosted()) - { - $hosted = [ - 'company' => $this->subscription->company, + $headers = [ + 'Content-Type' => 'application/json', + 'X-Requested-With' => 'XMLHttpRequest', ]; - $body = array_merge($body, $hosted); - } + //$this->subscription->webhook_configuration['post_purchase_headers'] - $client = new \GuzzleHttp\Client( + $client = new \GuzzleHttp\Client( [ - 'headers' => $this->subscription->webhook_configuration['post_purchase_headers'] + 'headers' => $headers, ]); - $response = $client->{$this->subscription->webhook_configuration['post_purchase_rest_method']}($this->subscription->webhook_configuration['post_purchase_url'],[ - RequestOptions::JSON => ['body' => $body] - ]); + + try{ + $response = $client->{$this->subscription->webhook_configuration['post_purchase_rest_method']}($this->subscription->webhook_configuration['post_purchase_url'],[ + RequestOptions::JSON => ['body' => $body], RequestOptions::ALLOW_REDIRECTS => false + ]); + } + catch(\Exception $e) + { + nlog($e->getMessage()); + } + + // $response = $client->post('http://ninja.test:8000/api/admin/plan',[RequestOptions::JSON => ['body' => $body]]); // SystemLogger::dispatch( // $body, From 660dca561b1dcc2e891a0341f330ff1d06e810cf Mon Sep 17 00:00:00 2001 From: David Bomba Date: Mon, 5 Apr 2021 22:37:25 +1000 Subject: [PATCH 9/9] subscriptions --- app/DataMapper/CompanySettings.php | 1 + app/Jobs/Mail/PaymentFailureMailer.php | 2 +- .../Subscription/SubscriptionService.php | 42 +++++++++---------- ...5_add_trial_duration_to_accounts_table.php | 30 +++++++++++++ 4 files changed, 53 insertions(+), 22 deletions(-) create mode 100644 database/migrations/2021_04_05_115345_add_trial_duration_to_accounts_table.php diff --git a/app/DataMapper/CompanySettings.php b/app/DataMapper/CompanySettings.php index d9ffe3792038..41e832f03576 100644 --- a/app/DataMapper/CompanySettings.php +++ b/app/DataMapper/CompanySettings.php @@ -600,6 +600,7 @@ class CompanySettings extends BaseSettings '$client.city_state_postal', '$client.country', '$contact.email', + '$client.phone', ], 'company_details' => [ '$company.name', diff --git a/app/Jobs/Mail/PaymentFailureMailer.php b/app/Jobs/Mail/PaymentFailureMailer.php index 1fb0f000db5c..bce2f69c3656 100644 --- a/app/Jobs/Mail/PaymentFailureMailer.php +++ b/app/Jobs/Mail/PaymentFailureMailer.php @@ -11,12 +11,12 @@ namespace App\Jobs\Mail; +use App\Jobs\Mail\NinjaMailer; use App\Jobs\Mail\NinjaMailerJob; use App\Jobs\Mail\NinjaMailerObject; use App\Libraries\MultiDB; use App\Mail\Admin\EntityNotificationMailer; use App\Mail\Admin\PaymentFailureObject; -use App\Mail\NinjaMailer; use App\Models\User; use App\Utils\Traits\Notifications\UserNotifies; use Illuminate\Bus\Queueable; diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index 1d33db7e9630..4e7dd9447d55 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -15,7 +15,9 @@ use App\DataMapper\InvoiceItem; use App\Factory\InvoiceFactory; use App\Factory\InvoiceToRecurringInvoiceFactory; use App\Factory\RecurringInvoiceFactory; +use App\Jobs\Util\SubscriptionWebhookHandler; use App\Jobs\Util\SystemLogger; +use App\Models\Client; use App\Models\ClientContact; use App\Models\ClientSubscription; use App\Models\Invoice; @@ -243,38 +245,36 @@ class SubscriptionService 'db' => $this->subscription->company->db, ]); - $headers = [ - 'Content-Type' => 'application/json', - 'X-Requested-With' => 'XMLHttpRequest', - ]; - - //$this->subscription->webhook_configuration['post_purchase_headers'] - - $client = new \GuzzleHttp\Client( - [ - 'headers' => $headers, - ]); + $headers = [ + 'Content-Type' => 'application/json', + 'X-Requested-With' => 'XMLHttpRequest', + ]; - try{ + $client = new \GuzzleHttp\Client( + [ + 'headers' => $headers, + ]); + + try { $response = $client->{$this->subscription->webhook_configuration['post_purchase_rest_method']}($this->subscription->webhook_configuration['post_purchase_url'],[ RequestOptions::JSON => ['body' => $body], RequestOptions::ALLOW_REDIRECTS => false ]); } catch(\Exception $e) { - nlog($e->getMessage()); + } - // $response = $client->post('http://ninja.test:8000/api/admin/plan',[RequestOptions::JSON => ['body' => $body]]); + $client = \App\Models\Client::find($this->decodePrimaryKey($body['client'])); - // SystemLogger::dispatch( - // $body, - // SystemLog::CATEGORY_WEBHOOK, - // SystemLog::EVENT_WEBHOOK_RESPONSE, - // SystemLog::TYPE_WEBHOOK_RESPONSE, - // $this->client_subscription->client, - // ); + SystemLogger::dispatch( + $body, + SystemLog::CATEGORY_WEBHOOK, + SystemLog::EVENT_WEBHOOK_RESPONSE, + SystemLog::TYPE_WEBHOOK_RESPONSE, + $client, + ); } diff --git a/database/migrations/2021_04_05_115345_add_trial_duration_to_accounts_table.php b/database/migrations/2021_04_05_115345_add_trial_duration_to_accounts_table.php new file mode 100644 index 000000000000..bdee046183ca --- /dev/null +++ b/database/migrations/2021_04_05_115345_add_trial_duration_to_accounts_table.php @@ -0,0 +1,30 @@ +unsignedInteger('trial_duration')->nullable(); + }); + + } + + /** + * Reverse the migrations. + * + * @return void + */ + public function down() + { + } +}