mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-07-09 03:14:30 -04:00
Improve add gateway process
This commit is contained in:
parent
da8a2be62e
commit
acc48081e5
@ -62,8 +62,6 @@ class AccountGatewayController extends BaseController
|
|||||||
$data['hiddenFields'] = Gateway::$hiddenFields;
|
$data['hiddenFields'] = Gateway::$hiddenFields;
|
||||||
$data['selectGateways'] = Gateway::where('id', '=', $accountGateway->gateway_id)->get();
|
$data['selectGateways'] = Gateway::where('id', '=', $accountGateway->gateway_id)->get();
|
||||||
|
|
||||||
$this->testGateway($accountGateway);
|
|
||||||
|
|
||||||
return View::make('accounts.account_gateway', $data);
|
return View::make('accounts.account_gateway', $data);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -318,14 +316,17 @@ class AccountGatewayController extends BaseController
|
|||||||
if (isset($wepayResponse)) {
|
if (isset($wepayResponse)) {
|
||||||
return $wepayResponse;
|
return $wepayResponse;
|
||||||
} else {
|
} else {
|
||||||
|
$this->testGateway($accountGateway);
|
||||||
|
|
||||||
if ($accountGatewayPublicId) {
|
if ($accountGatewayPublicId) {
|
||||||
$message = trans('texts.updated_gateway');
|
$message = trans('texts.updated_gateway');
|
||||||
|
Session::flash('message', $message);
|
||||||
|
return Redirect::to("gateways/{$accountGateway->public_id}/edit");
|
||||||
} else {
|
} else {
|
||||||
$message = trans('texts.created_gateway');
|
$message = trans('texts.created_gateway');
|
||||||
|
Session::flash('message', $message);
|
||||||
|
return Redirect::to("/settings/online_payments");
|
||||||
}
|
}
|
||||||
|
|
||||||
Session::flash('message', $message);
|
|
||||||
return Redirect::to("gateways/{$accountGateway->public_id}/edit");
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user