Note about accessing the UTM data in the BaseDriver.php

This commit is contained in:
Benjamin Beganović 2021-05-29 13:17:02 +02:00
parent f64b0b3d19
commit 7eb6925c8e

View File

@ -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);
}