diff --git a/app/Http/Controllers/AccountGatewayController.php b/app/Http/Controllers/AccountGatewayController.php index fc6af8a66e..7067d6a80e 100644 --- a/app/Http/Controllers/AccountGatewayController.php +++ b/app/Http/Controllers/AccountGatewayController.php @@ -87,7 +87,7 @@ class AccountGatewayController extends BaseController $accountGatewaysIds = $account->gatewayIds(); $otherProviders = Input::get('other_providers'); - if ( ! Utils::isNinja() || Gateway::hasStandardGateway($accountGatewaysIds)) { + if ( ! Utils::isNinja() || ! env('WEPAY_CLIENT_ID') || Gateway::hasStandardGateway($accountGatewaysIds)) { $otherProviders = true; } @@ -346,7 +346,6 @@ class AccountGatewayController extends BaseController $rules = [ 'company_name' => 'required', - 'description' => 'required', 'tos_agree' => 'required', 'first_name' => 'required', 'last_name' => 'required', @@ -390,7 +389,7 @@ class AccountGatewayController extends BaseController $accountDetails = [ 'name' => Input::get('company_name'), - 'description' => Input::get('description'), + 'description' => trans('texts.wepay_account_description'), 'theme_object' => json_decode(WEPAY_THEME), 'callback_uri' => $accountGateway->getWebhookUrl(), ]; diff --git a/app/Ninja/Datatables/AccountGatewayDatatable.php b/app/Ninja/Datatables/AccountGatewayDatatable.php index 5c7a84d3ea..b5759cfbd2 100644 --- a/app/Ninja/Datatables/AccountGatewayDatatable.php +++ b/app/Ninja/Datatables/AccountGatewayDatatable.php @@ -59,14 +59,6 @@ class AccountGatewayDatatable extends EntityDatatable function($model) { return !$model->deleted_at && $model->gateway_id == GATEWAY_WEPAY && !empty($model->resendConfirmationUrl); } - ], [ - uctrans('texts.finish_setup'), - function ($model) { - return $model->setupUrl; - }, - function($model) { - return !$model->deleted_at && $model->gateway_id == GATEWAY_WEPAY && !empty($model->setupUrl); - } ] , [ uctrans('texts.edit_gateway'), function ($model) { @@ -76,7 +68,15 @@ class AccountGatewayDatatable extends EntityDatatable return !$model->deleted_at; } ], [ - uctrans('texts.manage_wepay_account'), + uctrans('texts.finish_setup'), + function ($model) { + return $model->setupUrl; + }, + function($model) { + return !$model->deleted_at && $model->gateway_id == GATEWAY_WEPAY && !empty($model->setupUrl); + } + ], [ + uctrans('texts.manage_account'), function ($model) { $accountGateway = AccountGateway::find($model->id); $endpoint = WEPAY_ENVIRONMENT == WEPAY_STAGE ? 'https://stage.wepay.com/' : 'https://www.wepay.com/'; diff --git a/resources/lang/en/texts.php b/resources/lang/en/texts.php index 42ae698834..32a21567b3 100644 --- a/resources/lang/en/texts.php +++ b/resources/lang/en/texts.php @@ -1296,7 +1296,7 @@ $LANG = array( 'wepay_tos_agree' => 'I agree to the :link.', 'wepay_tos_link_text' => 'WePay Terms of Service', 'resend_confirmation_email' => 'Resend Confirmation Email', - 'manage_wepay_account' => 'Manage WePay Account', + 'manage_account' => 'Manage Account', 'action_required' => 'Action Required', 'finish_setup' => 'Finish Setup', 'created_wepay_confirmation_required' => 'Please check your email and confirm your email address with WePay.', @@ -2039,6 +2039,8 @@ $LANG = array( 'buy_now_buttons_disabled' => 'This feature requires that a product is created and a payment gateway is configured.', 'enable_buy_now_buttons_help' => 'Enable support for buy now buttons', 'changes_take_effect_immediately' => 'Note: changes take effect immediately', + 'wepay_account_description' => 'Payment gateway for Invoice Ninja', + ); return $LANG; diff --git a/resources/views/accounts/account_gateway_wepay.blade.php b/resources/views/accounts/account_gateway_wepay.blade.php index 5017f43fc2..4b78004ebd 100644 --- a/resources/views/accounts/account_gateway_wepay.blade.php +++ b/resources/views/accounts/account_gateway_wepay.blade.php @@ -9,7 +9,6 @@ 'first_name' => 'required', 'last_name' => 'required', 'email' => 'required', - 'description' => 'required', 'company_name' => 'required', 'tos_agree' => 'required', 'country' => 'required', @@ -40,7 +39,6 @@ {!! Former::text('last_name') !!} {!! Former::text('email') !!} {!! Former::text('company_name')->help('wepay_company_name_help')->maxlength(255) !!} - {!! Former::text('description')->help('wepay_description_help') !!} @if (WEPAY_ENABLE_CANADA)