Check for default payment method

This commit is contained in:
Hillel Coren 2017-02-02 08:53:40 +02:00
parent 90bce544e9
commit 403a30685e

View File

@ -95,6 +95,10 @@ class PaymentService extends BaseService
$paymentMethod = $customer->default_payment_method; $paymentMethod = $customer->default_payment_method;
if (! $paymentMethod) {
return false;
}
if ($paymentMethod->requiresDelayedAutoBill()) { if ($paymentMethod->requiresDelayedAutoBill()) {
$invoiceDate = \DateTime::createFromFormat('Y-m-d', $invoice->invoice_date); $invoiceDate = \DateTime::createFromFormat('Y-m-d', $invoice->invoice_date);
$minDueDate = clone $invoiceDate; $minDueDate = clone $invoiceDate;