From eb8d164b378a5600b99f73aa6621b528d6dcea69 Mon Sep 17 00:00:00 2001 From: Hillel Coren Date: Sun, 26 Mar 2017 11:19:00 +0300 Subject: [PATCH] Show online payment settings by default --- app/Http/Controllers/AccountController.php | 28 ++++++++++------------ resources/lang/en/texts.php | 2 +- 2 files changed, 13 insertions(+), 17 deletions(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index 442eceae839d..a2c2322bffe0 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -482,23 +482,19 @@ class AccountController extends BaseController } } - if ($trashedCount == 0) { - return Redirect::to('gateways/create'); - } else { - $tokenBillingOptions = []; - for ($i = 1; $i <= 4; $i++) { - $tokenBillingOptions[$i] = trans("texts.token_billing_{$i}"); - } - - return View::make('accounts.payments', [ - 'showAdd' => $count < count(Gateway::$alternate) + 1, - 'title' => trans('texts.online_payments'), - 'tokenBillingOptions' => $tokenBillingOptions, - 'currency' => Utils::getFromCache(Session::get(SESSION_CURRENCY, DEFAULT_CURRENCY), 'currencies'), - 'taxRates' => TaxRate::scope()->whereIsInclusive(false)->orderBy('rate')->get(['public_id', 'name', 'rate']), - 'account' => $account, - ]); + $tokenBillingOptions = []; + for ($i = 1; $i <= 4; $i++) { + $tokenBillingOptions[$i] = trans("texts.token_billing_{$i}"); } + + return View::make('accounts.payments', [ + 'showAdd' => $count < count(Gateway::$alternate) + 1, + 'title' => trans('texts.online_payments'), + 'tokenBillingOptions' => $tokenBillingOptions, + 'currency' => Utils::getFromCache(Session::get(SESSION_CURRENCY, DEFAULT_CURRENCY), 'currencies'), + 'taxRates' => TaxRate::scope()->whereIsInclusive(false)->orderBy('rate')->get(['public_id', 'name', 'rate']), + 'account' => $account, + ]); } /** diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index ea9e15110240..5dc6bbc5e08d 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -439,7 +439,7 @@ $LANG = array( 'reset_all' => 'Reset All', 'approve' => 'Approve', 'token_billing_type_id' => 'Token Billing', - 'token_billing_help' => 'Enables you to store payment details with WePay, Stripe or Braintree.', + 'token_billing_help' => 'Store payment details with WePay, Stripe or Braintree.', 'token_billing_1' => 'Disabled', 'token_billing_2' => 'Opt-in - checkbox is shown but not selected', 'token_billing_3' => 'Opt-out - checkbox is shown and selected',