diff --git a/app/PaymentDrivers/BaseDriver.php b/app/PaymentDrivers/BaseDriver.php index a9250582a112..cb639b5e219f 100644 --- a/app/PaymentDrivers/BaseDriver.php +++ b/app/PaymentDrivers/BaseDriver.php @@ -241,11 +241,11 @@ class BaseDriver extends AbstractPaymentDriver event(new PaymentWasCreated($payment, $payment->company, Ninja::eventVars())); -// 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); -// } + 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(); }