$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']);
if (!$this->config->get('worldpay_test')){
$this->data['action'] = 'https://secure.worldpay.com/wcc/purchase';
}else{
$this->data['action'] = 'https://secure-test.worldpay.com/wcc/purchase';
}
$this->data['merchant'] = $this->config->get('worldpay_merchant');
$this->data['order_id'] = $order_info['order_id'];
$this->data['amount'] = $this->currency->format($order_info['total'], $order_info['currency_code'], $order_info['currency_value'], false);
$this->data['currency'] = $order_info['currency_code'];
$this->data['description'] = $this->config->get('config_name') . ' - #' . $order_info['order_id'];
$this->data['name'] = $order_info['payment_firstname'] . ' ' . $order_info['payment_lastname'];
if (!$order_info['payment_address_2']) {
$this->data['address'] = $order_info['payment_address_1'] . ', ' . $order_info['payment_city'] . ', ' . $order_info['payment_zone'];
} else {
$this->data['address'] = $order_info['payment_address_1'] . ', ' . $order_info['payment_address_2'] . ', ' . $order_info['payment_city'] . ', ' . $order_info['payment_zone'];
}
$this->data['postcode'] = $order_info['payment_postcode'];
$this->data['country'] = $order_info['payment_iso_code_2'];
$this->data['telephone'] = $order_info['telephone'];
$this->data['email'] = $order_info['email'];
$this->data['test'] = $this->config->get('worldpay_test');
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/worldpay.tpl')) {
$this->template = $this->config->get('config_template') . '/template/payment/worldpay.tpl';
} else {
$this->template = 'default/template/payment/worldpay.tpl';
}
$this->render();