mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Refund subscriptions
This commit is contained in:
parent
0b1569d6d9
commit
cac8056832
@ -330,9 +330,9 @@ class BillingPortalPurchase extends Component
|
|||||||
|
|
||||||
$is_eligible = $this->subscription->service()->isEligible($this->contact);
|
$is_eligible = $this->subscription->service()->isEligible($this->contact);
|
||||||
|
|
||||||
if (is_array($is_eligible)) {
|
if ($is_eligible['exception']['message'] != 'Success') {
|
||||||
$this->steps['not_eligible'] = true;
|
$this->steps['not_eligible'] = true;
|
||||||
$this->steps['not_eligible_message'] = $is_eligible['exception'];
|
$this->steps['not_eligible_message'] = $is_eligible['exception']['message'];
|
||||||
$this->steps['show_loading_bar'] = false;
|
$this->steps['show_loading_bar'] = false;
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
@ -677,7 +677,7 @@ class SubscriptionService
|
|||||||
/* Stop the recurring invoice and archive */
|
/* Stop the recurring invoice and archive */
|
||||||
$recurring_invoice->service()->stop()->save();
|
$recurring_invoice->service()->stop()->save();
|
||||||
$recurring_invoice_repo = new RecurringInvoiceRepository();
|
$recurring_invoice_repo = new RecurringInvoiceRepository();
|
||||||
$recurring_invoice_repo->archive($$old_recurring_invoice);
|
$recurring_invoice_repo->archive($recurring_invoice);
|
||||||
|
|
||||||
if($refund_end_date->greaterThan(now()) && (int)$outstanding_invoice->balance == 0)
|
if($refund_end_date->greaterThan(now()) && (int)$outstanding_invoice->balance == 0)
|
||||||
{
|
{
|
||||||
@ -698,7 +698,7 @@ class SubscriptionService
|
|||||||
|
|
||||||
];
|
];
|
||||||
|
|
||||||
$payment->refundPayment($data);
|
$payment->refund($data);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user