1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-09-20 08:21:34 +02:00

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);
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 {