mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Fixes for gatewayTypeId
This commit is contained in:
parent
f7747f06f5
commit
7d61ec8317
@ -140,7 +140,7 @@ class ClientPortalController extends BaseController
|
|||||||
$paymentURL = '';
|
$paymentURL = '';
|
||||||
if (count($paymentTypes) == 1) {
|
if (count($paymentTypes) == 1) {
|
||||||
$paymentURL = $paymentTypes[0]['url'];
|
$paymentURL = $paymentTypes[0]['url'];
|
||||||
if (in_array($paymentTypes[0]['gatewayTypeId'], [GATEWAY_TYPE_CUSTOM1, GATEWAY_TYPE_CUSTOM2, GATEWAY_TYPE_CUSTOM3])) {
|
if (array_key_exists('gatewayTypeId', $paymentTypes[0]) && in_array($paymentTypes[0]['gatewayTypeId'], [GATEWAY_TYPE_CUSTOM1, GATEWAY_TYPE_CUSTOM2, GATEWAY_TYPE_CUSTOM3])) {
|
||||||
// do nothing
|
// do nothing
|
||||||
} elseif (! $account->isGatewayConfigured(GATEWAY_PAYPAL_EXPRESS)) {
|
} elseif (! $account->isGatewayConfigured(GATEWAY_PAYPAL_EXPRESS)) {
|
||||||
$paymentURL = URL::to($paymentURL);
|
$paymentURL = URL::to($paymentURL);
|
||||||
@ -162,6 +162,11 @@ class ClientPortalController extends BaseController
|
|||||||
$showApprove = false;
|
$showApprove = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$gatewayTypeIdCast = false;
|
||||||
|
|
||||||
|
if(array_key_exists('gatewayTypeId', $paymentTypes[0]))
|
||||||
|
$gatewayTypeIdCast = $paymentTypes[0]['gatewayTypeId'];
|
||||||
|
|
||||||
$data += [
|
$data += [
|
||||||
'account' => $account,
|
'account' => $account,
|
||||||
'showApprove' => $showApprove,
|
'showApprove' => $showApprove,
|
||||||
@ -173,7 +178,7 @@ class ClientPortalController extends BaseController
|
|||||||
'paymentTypes' => $paymentTypes,
|
'paymentTypes' => $paymentTypes,
|
||||||
'paymentURL' => $paymentURL,
|
'paymentURL' => $paymentURL,
|
||||||
'phantomjs' => Request::has('phantomjs'),
|
'phantomjs' => Request::has('phantomjs'),
|
||||||
'gatewayTypeId' => count($paymentTypes) == 1 ? $paymentTypes[0]['gatewayTypeId'] : false,
|
'gatewayTypeId' => count($paymentTypes) == 1 ? $gatewayTypeIdCast : false,
|
||||||
];
|
];
|
||||||
|
|
||||||
if ($invoice->canBePaid()) {
|
if ($invoice->canBePaid()) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user