From 73e7aadaad7bb132ff595396892ead37bf1e01ea Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 7 Apr 2021 08:56:36 +1000 Subject: [PATCH] Working on pro plan; --- app/Providers/MailServiceProvider.php | 9 ++++++--- app/Services/Subscription/SubscriptionService.php | 4 +++- 2 files changed, 9 insertions(+), 4 deletions(-) diff --git a/app/Providers/MailServiceProvider.php b/app/Providers/MailServiceProvider.php index 01bebb0feab0..c19740b1f8ae 100644 --- a/app/Providers/MailServiceProvider.php +++ b/app/Providers/MailServiceProvider.php @@ -18,11 +18,14 @@ class MailServiceProvider extends MailProvider protected function registerIlluminateMailer() { - $this->app->singleton('mail.manager', function($app) { + // $this->app->singleton('mail.manager', function($app) { + // return new GmailTransportManager($app); + // }); + + $this->app->bind('mail.manager', function($app) { return new GmailTransportManager($app); }); - - + $this->app->bind('mailer', function ($app) { return $app->make('mail.manager')->mailer(); }); diff --git a/app/Services/Subscription/SubscriptionService.php b/app/Services/Subscription/SubscriptionService.php index bffc54e4799f..dc99c7519e87 100644 --- a/app/Services/Subscription/SubscriptionService.php +++ b/app/Services/Subscription/SubscriptionService.php @@ -82,7 +82,9 @@ class SubscriptionService 'subscription' => $this->subscription->hashed_id, ]; - $this->triggerWebhook($context); + $response = $this->triggerWebhook($context); + + nlog($response); 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']);