Refund subscriptions

This commit is contained in:
David Bomba 2021-04-15 15:46:50 +10:00
parent 0b1569d6d9
commit cac8056832
2 changed files with 4 additions and 4 deletions

View File

@ -330,9 +330,9 @@ class BillingPortalPurchase extends Component
$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_message'] = $is_eligible['exception'];
$this->steps['not_eligible_message'] = $is_eligible['exception']['message'];
$this->steps['show_loading_bar'] = false;
return;

View File

@ -677,7 +677,7 @@ class SubscriptionService
/* Stop the recurring invoice and archive */
$recurring_invoice->service()->stop()->save();
$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)
{
@ -698,7 +698,7 @@ class SubscriptionService
];
$payment->refundPayment($data);
$payment->refund($data);
}
}