$this->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']);
$this->data['merchant'] = $this->config->get('paypoint_merchant');
$this->data['trans_id'] = $this->session->data['order_id'];
$this->data['amount'] = $this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false);
if ($this->config->get('paypoint_password')) {
$this->data['digest'] = md5($this->session->data['order_id'] . $this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false) . $this->config->get('paypoint_password'));
} else {
$this->data['digest'] = '';
}
$this->data['bill_name'] = $order_info['payment_firstname'] . ' ' . $order_info['payment_lastname'];
$this->data['bill_addr_1'] = $order_info['payment_address_1'];
$this->data['bill_addr_2'] = $order_info['payment_address_2'];
$this->data['bill_city'] = $order_info['payment_city'];
$this->data['bill_state'] = $order_info['payment_zone'];
$this->data['bill_post_code'] = $order_info['payment_postcode'];
$this->data['bill_country'] = $order_info['payment_country'];
$this->data['bill_tel'] = $order_info['telephone'];
$this->data['bill_email'] = $order_info['email'];
if ($this->cart->hasShipping()) {
$this->data['ship_name'] = $order_info['shipping_firstname'] . ' ' . $order_info['shipping_lastname'];
$this->data['ship_addr_1'] = $order_info['shipping_address_1'];
$this->data['ship_addr_2'] = $order_info['shipping_address_2'];
$this->data['ship_city'] = $order_info['shipping_city'];
$this->data['ship_state'] = $order_info['shipping_zone'];
$this->data['ship_post_code'] = $order_info['shipping_postcode'];
$this->data['ship_country'] = $order_info['shipping_country'];
} else {
$this->data['ship_name'] = '';
$this->data['ship_addr_1'] = '';
$this->data['ship_addr_2'] = '';
$this->data['ship_city'] = '';
$this->data['ship_state'] = '';
$this->data['ship_post_code'] = '';
$this->data['ship_country'] = '';
}
$this->data['currency'] = $this->currency->getCode();
$this->data['callback'] = $this->url->link('payment/paypoint/callback', '', 'SSL');
switch ($this->config->get('paypoint_test')) {
case 'live':
$status = 'live';
break;
case 'successful':
default:
$status = 'true';
break;
case 'fail':
$status = 'false';
break;
}
$this->data['options'] = 'test_status=' . $status . ',dups=false,cb_post=false';
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/paypoint.tpl')) {
$this->template = $this->config->get('config_template') . '/template/payment/paypoint.tpl';
} else {
$this->template = 'default/template/payment/paypoint.tpl';
}
$this->render();