blob: 15b34340516acded062f10135c184151cad26019 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
<?php
class ControllerExtensionPaymentPayza extends Controller {
public function index() {
$data['button_confirm'] = $this->language->get('button_confirm');
$this->load->model('checkout/order');
$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);
$data['action'] = 'https://secure.payza.com/checkout';
$data['ap_merchant'] = $this->config->get('payment_payza_merchant');
$data['ap_amount'] = $this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false);
$data['ap_currency'] = $order_info['currency_code'];
$data['ap_purchasetype'] = 'Item';
$data['ap_itemname'] = $this->config->get('config_name') . ' - #' . $this->session->data['order_id'];
$data['ap_itemcode'] = $this->session->data['order_id'];
$data['ap_returnurl'] = $this->url->link('checkout/success');
$data['ap_cancelurl'] = $this->url->link('checkout/checkout', '', true);
return $this->load->view('extension/payment/payza', $data);
}
public function callback() {
if (isset($this->request->post['ap_securitycode']) && ($this->request->post['ap_securitycode'] == $this->config->get('payment_payza_security'))) {
$this->load->model('checkout/order');
$this->model_checkout_order->addOrderHistory($this->request->post['ap_itemcode'], $this->config->get('payment_payza_order_status_id'));
}
}
}
|