1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Working on white label renewls

This commit is contained in:
Hillel Coren 2016-12-28 16:53:18 +02:00
parent f0f62790a6
commit 392d55c190
2 changed files with 20 additions and 0 deletions

View File

@ -710,6 +710,11 @@ class BasePaymentDriver
$license->product_id = $productId;
$license->save();
// Add the license key to the invoice content
$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);

View File

@ -0,0 +1,15 @@
<div class="alert alert-info" id="whiteLabelExpired">
{{ trans('texts.white_label_expired') }} &nbsp;&nbsp;
<a href="#" onclick="buyWhiteLabel()" class="btn btn-primary btn-sm">{{ trans('texts.renew_license') }}</a>
<a href="#" onclick="hideWhiteLabelExpiredMessage()" class="pull-right">{{ trans('texts.hide') }}</a>
</div>
<script type="text/javascript">
function hideWhiteLabelExpiredMessage() {
jQuery('#whiteLabelExpired').fadeOut();
$.get('/white_label/hide_message', function(response) {
console.log('Reponse: %s', response);
});
return false;
}
</script>