blob: 4f62182f99df6300163ffdcee33f23d98c0572de (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
<?php
class ControllerExtensionPaymentCod extends Controller {
public function index() {
return $this->load->view('extension/payment/cod');
}
public function confirm() {
$json = array();
if ($this->session->data['payment_method']['code'] == 'cod') {
$this->load->model('checkout/order');
$this->model_checkout_order->addOrderHistory($this->session->data['order_id'], $this->config->get('payment_cod_order_status_id'));
$json['redirect'] = $this->url->link('checkout/success');
}
$this->response->addHeader('Content-Type: application/json');
$this->response->setOutput(json_encode($json));
}
}
|