Clean line items for billing subscriptions

This commit is contained in:
David Bomba 2021-03-22 22:31:53 +11:00
parent f058b16d06
commit dd46e6384a

View File

@ -20,12 +20,14 @@ use App\Models\PaymentHash;
use App\Models\Product; use App\Models\Product;
use App\Models\SystemLog; use App\Models\SystemLog;
use App\Repositories\InvoiceRepository; use App\Repositories\InvoiceRepository;
use App\Utils\Traits\CleanLineItems;
use App\Utils\Traits\MakesHash; use App\Utils\Traits\MakesHash;
use GuzzleHttp\RequestOptions; use GuzzleHttp\RequestOptions;
class BillingSubscriptionService class BillingSubscriptionService
{ {
use MakesHash; use MakesHash;
use CleanLineItems;
/** @var BillingSubscription */ /** @var BillingSubscription */
private $billing_subscription; private $billing_subscription;
@ -68,7 +70,7 @@ class BillingSubscriptionService
{ {
$invoice_repo = new InvoiceRepository(); $invoice_repo = new InvoiceRepository();
$data['line_items'] = $this->createLineItems($data); $data['line_items'] = $this->cleanItems($this->createLineItems($data));
/* /*
If trial_enabled -> return early If trial_enabled -> return early