Bug fix related to the selected currency

This commit is contained in:
Hillel Coren 2014-11-30 18:32:48 +02:00
parent 2295a64bff
commit e0aad0e248

View File

@ -227,7 +227,7 @@ class PaymentController extends \BaseController
$key = $invoice->invoice_number . '_details'; $key = $invoice->invoice_number . '_details';
$gateway = $invoice->client->account->account_gateways[0]->gateway; $gateway = $invoice->client->account->account_gateways[0]->gateway;
$paymentLibrary = $gateway->paymentlibrary; $paymentLibrary = $gateway->paymentlibrary;
$currencyCode = $invoice->client->currency ? $invoice->client->currency->code : $invoice->account->currency ? $invoice->account->currency->code : 'USD'; $currencyCode = $invoice->client->currency ? $invoice->client->currency->code : ($invoice->account->currency ? $invoice->account->currency->code : 'USD');
if ($input && $paymentLibrary->id == PAYMENT_LIBRARY_OMNIPAY) if ($input && $paymentLibrary->id == PAYMENT_LIBRARY_OMNIPAY)
{ {