diff --git a/app/Http/Controllers/AccountGatewayController.php b/app/Http/Controllers/AccountGatewayController.php index 8c1db8731d..6aad0c21b6 100644 --- a/app/Http/Controllers/AccountGatewayController.php +++ b/app/Http/Controllers/AccountGatewayController.php @@ -209,7 +209,8 @@ class AccountGatewayController extends BaseController $validator = Validator::make(Input::all(), $rules); if ($validator->fails()) { - return Redirect::to('gateways/create?other_providers=' . ($gatewayId == GATEWAY_WEPAY ? 'false' : 'true')) + $url = $accountGatewayPublicId ? "/gateways/{$accountGatewayPublicId}/edit" : 'gateways/create?other_providers=' . ($gatewayId == GATEWAY_WEPAY ? 'false' : 'true'); + return Redirect::to($url) ->withErrors($validator) ->withInput(); } else {