1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-13 14:42:42 +01:00

Fix for gateway type in buy now buttons

This commit is contained in:
Hillel Coren 2016-12-04 11:48:20 +02:00
parent 34debcdb16
commit 441ff9bceb

View File

@ -624,11 +624,18 @@ class AccountController extends BaseController
); );
} }
$types = [GATEWAY_TYPE_CREDIT_CARD, GATEWAY_TYPE_BANK_TRANSFER, GATEWAY_TYPE_PAYPAL, GATEWAY_TYPE_BITCOIN, GATEWAY_TYPE_DWOLLA]; $types = [
GATEWAY_TYPE_CREDIT_CARD,
GATEWAY_TYPE_BANK_TRANSFER,
GATEWAY_TYPE_PAYPAL,
GATEWAY_TYPE_BITCOIN,
GATEWAY_TYPE_DWOLLA
];
$options = []; $options = [];
foreach ($types as $type) { foreach ($types as $type) {
if ($account->getGatewayByType($type)) { if ($account->getGatewayByType($type)) {
$options[$type] = trans("texts.{$type}"); $alias = GatewayType::getAliasFromId($type);
$options[$alias] = trans("texts.{$alias}");
} }
} }