Fix error after failed to add gateway

This commit is contained in:
Hillel Coren 2017-10-18 15:59:53 +03:00
parent 1e70afae3f
commit 204cd7ad17

View File

@ -209,7 +209,8 @@ class AccountGatewayController extends BaseController
$validator = Validator::make(Input::all(), $rules); $validator = Validator::make(Input::all(), $rules);
if ($validator->fails()) { 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) ->withErrors($validator)
->withInput(); ->withInput();
} else { } else {