Skip to content

Commit

Permalink
Merge pull request #36 from omise/support-ssl-server
Browse files Browse the repository at this point in the history
  • Loading branch information
nimid authored Apr 20, 2017
2 parents bdbdd89 + 6ce0a4b commit 5251c51
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/catalog/controller/payment/omise.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ public function checkoutCallback() {
if ($charge && $charge['authorized'] && $charge['captured']) {
// Status: processed.
$this->model_checkout_order->addOrderHistory($order_id, 15);
$this->response->redirect($this->url->link('checkout/success'));
$this->response->redirect($this->url->link('checkout/success', '', 'SSL'));
} elseif ($charge && $charge['status'] == 'pending') {
$this->renderWaitingPage();
} else {
// Status: failed.
$this->model_checkout_order->addOrderHistory($order_id, 10, $charge['failure_message']);
$this->response->redirect($this->url->link('checkout/failure'));
$this->response->redirect($this->url->link('checkout/failure', '', 'SSL'));
}
} else {
$this->response->redirect($this->url->link('common/home'));
Expand Down Expand Up @@ -77,7 +77,7 @@ public function checkout() {
"amount" => OmisePluginHelperCharge::amount($order_info['currency_code'], $order_total),
"currency" => $this->currency->getCode(),
"description" => $this->request->post['description'],
"return_uri" => $this->url->link('payment/omise/checkoutcallback&order_id='.$order_id),
"return_uri" => $this->url->link('payment/omise/checkoutcallback&order_id='.$order_id, '', 'SSL'),
"card" => $this->request->post['omise_token'],
"capture" => $this->config->get('omise_auto_capture')
),
Expand Down Expand Up @@ -181,12 +181,12 @@ public function index() {
if ($order_info) {
$data = array_merge($data, array(
'button_confirm' => $this->language->get('button_confirm'),
'checkout_url' => $this->url->link('payment/omise/checkout'),
'success_url' => $this->url->link('checkout/success'),
'checkout_url' => $this->url->link('payment/omise/checkout', '', 'SSL'),
'success_url' => $this->url->link('checkout/success', '', 'SSL'),
'text_config_one' => trim($this->config->get('text_config_one')),
'text_config_two' => trim($this->config->get('text_config_two')),
'orderid' => date('His') . $this->session->data['order_id'],
'callbackurl' => $this->url->link('payment/custom/callback'),
'callbackurl' => $this->url->link('payment/custom/callback', '', 'SSL'),
'orderdate' => date('YmdHis'),
'currency' => $order_info['currency_code'],
'orderamount' => $this->currency->format($order_info['total'], $order_info['currency_code'] , false, false),
Expand Down

0 comments on commit 5251c51

Please sign in to comment.