From 31c8eb1a19d79f57ca3e31c4eac275e59b05d8af Mon Sep 17 00:00:00 2001 From: David Bomba Date: Tue, 15 Jun 2021 11:09:12 +1000 Subject: [PATCH] Fixes for stripe import customers --- app/PaymentDrivers/Stripe/ImportCustomers.php | 2 +- app/PaymentDrivers/StripePaymentDriver.php | 8 ++++---- app/Services/Invoice/UpdateReminder.php | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/PaymentDrivers/Stripe/ImportCustomers.php b/app/PaymentDrivers/Stripe/ImportCustomers.php index 3d6ffc32b512..f1bd804aaaca 100644 --- a/app/PaymentDrivers/Stripe/ImportCustomers.php +++ b/app/PaymentDrivers/Stripe/ImportCustomers.php @@ -56,7 +56,7 @@ class ImportCustomers } /* Now call the update payment methods handler*/ - $this->stripe->updateAllPaymentMethods(); + // $this->stripe->updateAllPaymentMethods(); } diff --git a/app/PaymentDrivers/StripePaymentDriver.php b/app/PaymentDrivers/StripePaymentDriver.php index 818e8aa63fa3..d91b22413411 100644 --- a/app/PaymentDrivers/StripePaymentDriver.php +++ b/app/PaymentDrivers/StripePaymentDriver.php @@ -508,10 +508,10 @@ class StripePaymentDriver extends BaseDriver * the respective tokens in the system. * */ - // public function updateAllPaymentMethods() - // { - // return (new UpdatePaymentMethods($this))->run(); - // } + public function updateAllPaymentMethods() + { + return (new UpdatePaymentMethods($this))->run(); + } /** * Imports stripe customers and their payment methods diff --git a/app/Services/Invoice/UpdateReminder.php b/app/Services/Invoice/UpdateReminder.php index f08d873b9dee..46937ec44286 100644 --- a/app/Services/Invoice/UpdateReminder.php +++ b/app/Services/Invoice/UpdateReminder.php @@ -126,7 +126,7 @@ class UpdateReminder extends AbstractService $date_collection->push($reminder_date); } - if($date_collection->count() >=1) + if($date_collection->count() >=1 && $date_collection->sort()->first()->gte(now())) $this->invoice->next_send_date = $date_collection->sort()->first(); else $this->invoice->next_send_date = null;