mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Minor fixes for subscriptionsg
This commit is contained in:
parent
2475a5f8b9
commit
6c82beaf02
@ -359,6 +359,10 @@ class BaseDriver extends AbstractPaymentDriver
|
|||||||
event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars()));
|
event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars()));
|
||||||
|
|
||||||
if (property_exists($this->payment_hash->data, 'billing_context') && $status == Payment::STATUS_COMPLETED) {
|
if (property_exists($this->payment_hash->data, 'billing_context') && $status == Payment::STATUS_COMPLETED) {
|
||||||
|
|
||||||
|
if(is_int($this->payment_hash->data->billing_context->subscription_id))
|
||||||
|
$billing_subscription = \App\Models\Subscription::find($this->payment_hash->data->billing_context->subscription_id);
|
||||||
|
else
|
||||||
$billing_subscription = \App\Models\Subscription::find($this->decodePrimaryKey($this->payment_hash->data->billing_context->subscription_id));
|
$billing_subscription = \App\Models\Subscription::find($this->decodePrimaryKey($this->payment_hash->data->billing_context->subscription_id));
|
||||||
|
|
||||||
// To access campaign hash => $this->payment_hash->data->billing_context->campaign;
|
// To access campaign hash => $this->payment_hash->data->billing_context->campaign;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user