Bug fixes

This commit is contained in:
Hillel Coren 2014-10-26 22:13:50 +02:00
parent d6eff8f913
commit 198a13aa4c
3 changed files with 8 additions and 5 deletions

View File

@ -86,8 +86,7 @@ App::before(function($request)
if ($productId == PRODUCT_INVOICE_DESIGNS)
{
//$data = file_get_contents("http://ninja.dev/claim_license?license_key={$licenseKey}&product_id={$productId}");
$data = file_get_contents(NINJA_URL . "/claim_license?license_key={$licenseKey}&product_id={$productId}");
$data = file_get_contents((Utils::isNinjaDev() ? 'http://ninja.dev' : NINJA_URL) . "/claim_license?license_key={$licenseKey}&product_id={$productId}");
if ($data = json_decode($data))
{
@ -100,6 +99,10 @@ App::before(function($request)
$design->save();
}
if (!Utils::isNinja()) {
Cache::forget('invoice_designs_cache_' . Auth::user()->maxInvoiceDesignId());
}
Session::flash('message', trans('texts.bought_designs'));
}
}

View File

@ -244,7 +244,7 @@ define('NINJA_ACCOUNT_KEY', 'zg4ylmzDkdkPOT8yoKQw9LTWaoZJx79h');
define('NINJA_GATEWAY_ID', GATEWAY_AUTHORIZE_NET);
define('NINJA_GATEWAY_CONFIG', '{"apiLoginId":"626vWcD5","transactionKey":"4bn26TgL9r4Br4qJ","testMode":"","developerMode":""}');
define('NINJA_URL', 'https://www.invoiceninja.com');
define('NINJA_VERSION', '1.5.0');
define('NINJA_VERSION', '1.5.1');
define('RELEASES_URL', 'https://github.com/hillelcoren/invoice-ninja/releases/');
define('COUNT_FREE_DESIGNS', 4);

View File

@ -34,7 +34,7 @@
<div class="modal-footer" id="signUpFooter">
<button type="button" class="btn btn-default" data-dismiss="modal">{{ trans('texts.cancel') }}</button>
@if (Utils::isNinja())
@if (Utils::isNinjaProd())
<button type="button" class="btn btn-primary" onclick="showProPlan('invoice_designs')">{{ trans('texts.go_pro') }}</button>
@else
<button type="button" class="btn btn-primary" onclick="buyDesigns()">{{ trans('texts.buy') }}</button>
@ -121,7 +121,7 @@
}
function buyDesigns() {
window.open('{{ NINJA_URL }}/license?return_url=' + window.location + '&affiliate_key={{ DESIGNS_AFFILIATE_KEY }}&product_id={{ PRODUCT_INVOICE_DESIGNS }}');
window.open('{{ Utils::isNinjaDev() ? '' : NINJA_URL }}/license?return_url=' + window.location + '&affiliate_key={{ DESIGNS_AFFILIATE_KEY }}&product_id={{ PRODUCT_INVOICE_DESIGNS }}');
}
</script>