From 1a953c5bcbae82d2c02559d71a28e7e0ea727f20 Mon Sep 17 00:00:00 2001 From: David Bomba Date: Wed, 17 Feb 2016 10:34:23 +1100 Subject: [PATCH] Improving error reporting API --- app/Models/Invoice.php | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 72c255ae0947..7198eff647fa 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -744,7 +744,7 @@ class Invoice extends EntityModel implements BalanceAffecting $opts = [ CURLOPT_URL => PHANTOMJS_CLOUD . env('PHANTOMJS_CLOUD_KEY') . '/', CURLOPT_RETURNTRANSFER => true, - CURLOPT_CUSTOMREQUEST => 'POST', + CURLOPT_CUSTOMREQUEST => 'GET', CURLOPT_POST => 1, CURLOPT_POSTFIELDS => $jsonEncodedData, CURLOPT_HTTPHEADER => [ @@ -757,13 +757,9 @@ class Invoice extends EntityModel implements BalanceAffecting $response = curl_exec($curl); curl_close($curl); - Log::info($response); - $encodedString = strip_tags($response); $pdfString = Utils::decodePDF($encodedString); - Log::info($pdfString); - if ( ! $pdfString || strlen($pdfString) < 200) { Utils::logError("PhantomJSCloud - failed to create pdf: {$encodedString}"); }