mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
wip
This commit is contained in:
parent
ada49ca083
commit
fdd1601120
@ -133,6 +133,7 @@ class BillingPortalPurchase extends Component
|
|||||||
'client_contact_id' => $this->contact->hashed_id,
|
'client_contact_id' => $this->contact->hashed_id,
|
||||||
]],
|
]],
|
||||||
'user_input_promo_code' => $this->coupon,
|
'user_input_promo_code' => $this->coupon,
|
||||||
|
'coupon' => $this->coupon,
|
||||||
'quantity' => 1, // Option to increase quantity
|
'quantity' => 1, // Option to increase quantity
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -144,6 +145,7 @@ class BillingPortalPurchase extends Component
|
|||||||
->save();
|
->save();
|
||||||
|
|
||||||
Cache::put($this->hash, [
|
Cache::put($this->hash, [
|
||||||
|
'billing_subscription_id' => $this->billing_subscription->id,
|
||||||
'email' => $this->email ?? $this->contact->email,
|
'email' => $this->email ?? $this->contact->email,
|
||||||
'client_id' => $this->contact->client->id,
|
'client_id' => $this->contact->client->id,
|
||||||
'invoice_id' => $this->invoice->id],
|
'invoice_id' => $this->invoice->id],
|
||||||
|
@ -241,7 +241,11 @@ class BaseDriver extends AbstractPaymentDriver
|
|||||||
|
|
||||||
event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars()));
|
event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars()));
|
||||||
|
|
||||||
(new BillingSubscriptionService)->completePurchase($this->payment_hash);
|
// if (property_exists($this->payment_hash->data, 'billing_context')) {
|
||||||
|
// $billing_subscription = \App\Models\BillingSubscription::find($this->payment_hash->data->billing_context->billing_subscription_id);
|
||||||
|
//
|
||||||
|
// (new BillingSubscriptionService($billing_subscription))->completePurchase($this->payment_hash);
|
||||||
|
// }
|
||||||
|
|
||||||
return $payment->service()->applyNumber()->save();
|
return $payment->service()->applyNumber()->save();
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user