mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2024-11-09 12:42:36 +01: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->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)
|
||||
|
@ -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() {
|
||||
|
Loading…
Reference in New Issue
Block a user