diff --git a/app/Ninja/PaymentDrivers/BasePaymentDriver.php b/app/Ninja/PaymentDrivers/BasePaymentDriver.php index 40aa7a9993ff..8cdf9ebbf04c 100644 --- a/app/Ninja/PaymentDrivers/BasePaymentDriver.php +++ b/app/Ninja/PaymentDrivers/BasePaymentDriver.php @@ -813,11 +813,6 @@ class BasePaymentDriver $invoiceItem = $payment->invoice->invoice_items->first(); $invoiceItem->notes .= "\n\n#{$license->license_key}"; $invoiceItem->save(); - - // Add the license key to the redirect URL - $key = 'redirect_url:' . $payment->invitation->invitation_key; - $redirectUrl = session($key); - session([$key => "{$redirectUrl}?license_key={$license->license_key}&product_id={$productId}"]); } protected function creatingPayment($payment, $paymentMethod) diff --git a/resources/views/partials/white_label.blade.php b/resources/views/partials/white_label.blade.php index aaa52313505a..0b1fba2f8126 100644 --- a/resources/views/partials/white_label.blade.php +++ b/resources/views/partials/white_label.blade.php @@ -118,31 +118,7 @@ } function buyProduct(affiliateKey, productId) { - location.href = "{{ url('white_label/purchase') }}"; - - //window.open('{{ Utils::isNinjaDev() ? '' : NINJA_APP_URL }}/buy_now/?account_key={{ NINJA_LICENSE_ACCOUNT_KEY }}&product_id=' + productId + '&contact_key={{ Auth::user()->primaryAccount()->account_key }}' + '&redirect_url=' + window.location.href); - - /* - var url = '{{ Utils::isNinjaDev() ? '' : NINJA_APP_URL }}/buy_now/'; - $.ajax({ - url: url, - type: 'POST', - data: { - 'account_key': '{{ NINJA_LICENSE_ACCOUNT_KEY }}', - 'contact_key': '{{ Auth::user()->primaryAccount()->account_key }}', - 'product_id': productId, - 'first_name': '{{ Auth::user()->first_name }}', - 'last_name': '{{ Auth::user()->last_name }}', - 'email': '{{ Auth::user()->email }}', - 'redirect_url': window.location.href, - 'return_link': true, - }, - success: function(response) { - openUrl(response, '/white_label') - } - }); - */ } function showApplyLicense() {