Skip to content
This repository has been archived by the owner on Mar 12, 2020. It is now read-only.

Commit

Permalink
redirect by showing the page order-confirmation instead of the order …
Browse files Browse the repository at this point in the history
…history
  • Loading branch information
Pavel Novitsky committed Sep 8, 2014
1 parent 586deb2 commit f89c56a
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 4 deletions.
6 changes: 6 additions & 0 deletions bluesnap.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class Bluesnap extends PaymentModule {
'payment',
'adminOrder',
'BackOfficeHeader',
'displayOrderConfirmation',
);

protected $html = '';
Expand Down Expand Up @@ -706,4 +707,9 @@ public static function log($string, $file = null)
file_put_contents($file, $string.' - '.date('Y-m-d H:i:s')."\n", FILE_APPEND | LOCK_EX);
}

public function hookDisplayOrderConfirmation($params)
{

}

}
7 changes: 6 additions & 1 deletion controllers/front/callback.php
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,12 @@ public function initContent()
}

$this->context->smarty->assign(array(
'bluesnap_order_confirmation_url' => Context::getContext()->link->getPageLink('order-confirmation')
'bluesnap_order_confirmation_url' => Context::getContext()->link->getPageLink('order-confirmation', NULL, NULL, array(
'id_order' => $this->module->currentOrder,
'id_cart' => $id_cart,
'id_module' => $this->module->id,
'key' => $order_obj->secure_key,
))
));

$this->setTemplate('callback.tpl');
Expand Down
6 changes: 3 additions & 3 deletions views/templates/front/callback.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@

<script type="text/javascript">
if (window.parent) {
window.parent.document.location.href='{$bluesnap_order_confirmation_url|escape:'htmlall':'UTF-8'}';
window.parent.document.location.href='{$bluesnap_order_confirmation_url}';
} else {
document.location.href = '{$bluesnap_order_confirmation_url|escape:'htmlall':'UTF-8'}';
document.location.href = '{$bluesnap_order_confirmation_url}';
}
</script>
</script>

0 comments on commit f89c56a

Please sign in to comment.