From 441ff9bceb8fbb3a2844b7e7044702272cf21c56 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 4 Dec 2016 11:48:20 +0200 Subject: [PATCH] Fix for gateway type in buy now buttons --- app/Http/Controllers/AccountController.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 6f73cb19c3..3782b1c7ba 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -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 = []; foreach ($types as $type) { if ($account->getGatewayByType($type)) { - $options[$type] = trans("texts.{$type}"); + $alias = GatewayType::getAliasFromId($type); + $options[$alias] = trans("texts.{$alias}"); } }