Fix for GCS

This commit is contained in:
Hillel Coren 2017-08-06 16:08:30 +03:00
parent ebe68eb0a2
commit 075e6c4a65
2 changed files with 3 additions and 3 deletions

View File

@ -157,10 +157,10 @@ class CheckData extends Command
foreach ($invoices as $invoice) { foreach ($invoices as $invoice) {
$link = $invoice->getInvitationLink('view', true, true); $link = $invoice->getInvitationLink('view', true, true);
$this->logMessage('Checking invoice: ' . $invoice->id . ' - ' . $invoice->balance); //$this->logMessage('Checking invoice: ' . $invoice->id . ' - ' . $invoice->balance);
$result = CurlUtils::phantom('GET', $link . '?phantomjs=true&phantomjs_balances=true&phantomjs_secret=' . env('PHANTOMJS_SECRET')); $result = CurlUtils::phantom('GET', $link . '?phantomjs=true&phantomjs_balances=true&phantomjs_secret=' . env('PHANTOMJS_SECRET'));
$result = floatval(strip_tags($result)); $result = floatval(strip_tags($result));
$this->logMessage('Result: ' . $result); //$this->logMessage('Result: ' . $result);
if ($result && $result != $invoice->balance) { if ($result && $result != $invoice->balance) {
$this->logMessage("Amounts do not match {$link} - PHP: {$invoice->balance}, JS: {$result}"); $this->logMessage("Amounts do not match {$link} - PHP: {$invoice->balance}, JS: {$result}");

View File

@ -91,7 +91,7 @@ class DocumentRepository extends BaseRepository
if (! $disk->exists($filename)) {// Have we already stored the same file if (! $disk->exists($filename)) {// Have we already stored the same file
$stream = fopen($filePath, 'r'); $stream = fopen($filePath, 'r');
$disk->getDriver()->putStream($filename, $stream, ['mimetype' => $documentTypeData['mime']]); $disk->getDriver()->putStream($filename, $stream, ['mimetype' => $documentTypeData['mime']]);
fclose($stream); //fclose($stream);
} }
// This is an image; check if we need to create a preview // This is an image; check if we need to create a preview