add route parameters to redirectToRoute method in BaseFrontController
This commit is contained in:
@@ -42,9 +42,9 @@ class BaseFrontController extends BaseController
|
|||||||
* @param array $urlParameters the URL parametrs, as a var/value pair array
|
* @param array $urlParameters the URL parametrs, as a var/value pair array
|
||||||
* @param bool $referenceType
|
* @param bool $referenceType
|
||||||
*/
|
*/
|
||||||
public function redirectToRoute($routeId, $urlParameters = array(), $referenceType = Router::ABSOLUTE_PATH)
|
public function redirectToRoute($routeId, array $urlParameters = [], array $routeParameters = [], $referenceType = Router::ABSOLUTE_PATH)
|
||||||
{
|
{
|
||||||
$this->redirect(URL::getInstance()->absoluteUrl($this->getRoute($routeId, array(), $referenceType), $urlParameters));
|
$this->redirect(URL::getInstance()->absoluteUrl($this->getRoute($routeId, $routeParameters, $referenceType), $urlParameters));
|
||||||
}
|
}
|
||||||
|
|
||||||
public function checkAuth()
|
public function checkAuth()
|
||||||
|
|||||||
@@ -156,9 +156,10 @@ abstract class BasePaymentModuleController extends BaseFrontController
|
|||||||
|
|
||||||
$this->redirectToRoute(
|
$this->redirectToRoute(
|
||||||
'order.placed',
|
'order.placed',
|
||||||
array(
|
[],
|
||||||
|
[
|
||||||
'order_id' => $order_id
|
'order_id' => $order_id
|
||||||
),
|
],
|
||||||
Router::ABSOLUTE_PATH
|
Router::ABSOLUTE_PATH
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@@ -169,16 +170,17 @@ abstract class BasePaymentModuleController extends BaseFrontController
|
|||||||
* @param int $order_id the order ID
|
* @param int $order_id the order ID
|
||||||
* @param string|null $message an error message.
|
* @param string|null $message an error message.
|
||||||
*/
|
*/
|
||||||
public function redirectToFailurePage($order_id, $message = null)
|
public function redirectToFailurePage($order_id, $message)
|
||||||
{
|
{
|
||||||
$this->getLog()->addInfo("Redirecting customer to payment failure page");
|
$this->getLog()->addInfo("Redirecting customer to payment failure page");
|
||||||
|
|
||||||
$this->redirectToRoute(
|
$this->redirectToRoute(
|
||||||
'order.failed',
|
'order.failed',
|
||||||
array(
|
[],
|
||||||
|
[
|
||||||
'order_id' => $order_id,
|
'order_id' => $order_id,
|
||||||
'message' => $message
|
'message' => $message
|
||||||
),
|
],
|
||||||
Router::ABSOLUTE_PATH
|
Router::ABSOLUTE_PATH
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user