Error supression when logo is not present

This commit is contained in:
David Bomba 2022-03-25 15:16:39 +11:00
parent 4ec4b54327
commit 71b7cad096
2 changed files with 6 additions and 4 deletions

View File

@ -66,11 +66,11 @@ class CompanyPresenter extends EntityPresenter
);
if(strlen($settings->company_logo) >= 1 && (strpos($settings->company_logo, 'http') !== false))
return "data:image/png;base64, ". base64_encode(file_get_contents($settings->company_logo, false, stream_context_create($context_options)));
return "data:image/png;base64, ". base64_encode(@file_get_contents($settings->company_logo, false, stream_context_create($context_options)));
else if(strlen($settings->company_logo) >= 1)
return "data:image/png;base64, ". base64_encode(file_get_contents(url('') . $settings->company_logo, false, stream_context_create($context_options)));
return "data:image/png;base64, ". base64_encode(@file_get_contents(url('') . $settings->company_logo, false, stream_context_create($context_options)));
else
return "data:image/png;base64, ". base64_encode(file_get_contents(asset('images/new_logo.png'), false, stream_context_create($context_options)));
return "data:image/png;base64, ". base64_encode(@file_get_contents(asset('images/new_logo.png'), false, stream_context_create($context_options)));
}

View File

@ -249,13 +249,15 @@ class CreditCard
'TotalAmount' => $this->convertAmountForEway($amount),
'CurrencyCode' => $this->eway_driver->client->currency()->code,
'InvoiceNumber' => $invoice_numbers,
'InvoiceReference' => $description,
],
'TransactionType' => \Eway\Rapid\Enum\TransactionType::RECURRING,
];
$response = $this->eway_driver->init()->eway->createTransaction(\Eway\Rapid\Enum\ApiMethod::DIRECT, $transaction);
nlog('eway');
nlog($response);
$response_status = ErrorCode::getStatus($response->ResponseMessage);
if(!$response_status['success']){