mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Clean up white label process
This commit is contained in:
parent
5ac8b2c9c4
commit
9bbdac40c0
@ -813,11 +813,6 @@ class BasePaymentDriver
|
|||||||
$invoiceItem = $payment->invoice->invoice_items->first();
|
$invoiceItem = $payment->invoice->invoice_items->first();
|
||||||
$invoiceItem->notes .= "\n\n#{$license->license_key}";
|
$invoiceItem->notes .= "\n\n#{$license->license_key}";
|
||||||
$invoiceItem->save();
|
$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)
|
protected function creatingPayment($payment, $paymentMethod)
|
||||||
|
@ -118,31 +118,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function buyProduct(affiliateKey, productId) {
|
function buyProduct(affiliateKey, productId) {
|
||||||
|
|
||||||
location.href = "{{ url('white_label/purchase') }}";
|
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() {
|
function showApplyLicense() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user