mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-23 20:00:33 -04:00
Use phantomjs cloud as backup for ninja install
This commit is contained in:
parent
5366106bc6
commit
0079d3a244
@ -1253,12 +1253,16 @@ class Invoice extends EntityModel implements BalanceAffecting
|
||||
try {
|
||||
if (env('PHANTOMJS_BIN_PATH')) {
|
||||
$pdfString = CurlUtils::phantom('GET', $link . '?phantomjs=true&phantomjs_secret=' . env('PHANTOMJS_SECRET'));
|
||||
} elseif ($key = env('PHANTOMJS_CLOUD_KEY')) {
|
||||
if (Utils::isNinjaDev()) {
|
||||
$link = env('TEST_LINK');
|
||||
}
|
||||
|
||||
if (! $pdfString && (Utils::isNinja() || ! env('PHANTOMJS_BIN_PATH'))) {
|
||||
if ($key = env('PHANTOMJS_CLOUD_KEY')) {
|
||||
if (Utils::isNinjaDev()) {
|
||||
$link = env('TEST_LINK');
|
||||
}
|
||||
$url = "http://api.phantomjscloud.com/api/browser/v2/{$key}/?request=%7Burl:%22{$link}?phantomjs=true%22,renderType:%22html%22%7D";
|
||||
$pdfString = CurlUtils::get($url);
|
||||
}
|
||||
$url = "http://api.phantomjscloud.com/api/browser/v2/{$key}/?request=%7Burl:%22{$link}?phantomjs=true%22,renderType:%22html%22%7D";
|
||||
$pdfString = CurlUtils::get($url);
|
||||
}
|
||||
|
||||
$pdfString = strip_tags($pdfString);
|
||||
|
Loading…
x
Reference in New Issue
Block a user