From 7eb6925c8edf2f0e9ac603470e585e8bb7c3c679 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Benjamin=20Beganovi=C4=87?= Date: Sat, 29 May 2021 13:17:02 +0200 Subject: [PATCH] Note about accessing the UTM data in the BaseDriver.php --- app/PaymentDrivers/BaseDriver.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/PaymentDrivers/BaseDriver.php b/app/PaymentDrivers/BaseDriver.php index 96352f0c3d50..a78ba36420e9 100644 --- a/app/PaymentDrivers/BaseDriver.php +++ b/app/PaymentDrivers/BaseDriver.php @@ -244,6 +244,9 @@ class BaseDriver extends AbstractPaymentDriver if (property_exists($this->payment_hash->data, 'billing_context')) { $billing_subscription = \App\Models\Subscription::find($this->payment_hash->data->billing_context->subscription_id); + // To access campaign hash => $this->payment_hash->data->billing_context->campaign; + // To access utm data => session()->get('utm-' . CAMPAIGN_HASH); + (new SubscriptionService($billing_subscription))->completePurchase($this->payment_hash); }