$this->load->model('payment/pp_payflow_iframe');
$this->load->model('sale/order');
$this->load->language('payment/pp_payflow_iframe');
$transaction = $this->model_payment_pp_payflow_iframe->getTransaction($this->request->get['transaction_reference']);
if ($transaction) {
$this->document->setTitle($this->language->get('heading_refund'));
$this->data['breadcrumbs'] = array();
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => false
);
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('text_payment'),
'href' => $this->url->link('extension/payment', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => ' :: '
);
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_title'),
'href' => $this->url->link('payment/pp_payflow_iframe', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => ' :: '
);
$this->data['breadcrumbs'][] = array(
'text' => $this->language->get('heading_refund'),
'href' => $this->url->link('payment/pp_payflow_iframe/refund', 'transaction_reference=' . $this->request->get['transaction_reference'] . '&token=' . $this->session->data['token'], 'SSL'),
'separator' => ' :: '
);
$this->data['transaction_reference'] = $transaction['transaction_reference'];
$this->data['transaction_amount'] = number_format($transaction['amount'], 2);
$this->data['cancel'] = $this->url->link('sale/order/info', 'token=' . $this->session->data['token'] . '&order_id=' . $transaction['order_id'], 'SSL');
$this->data['token'] = $this->session->data['token'];
$this->data['heading_refund'] = $this->language->get('heading_refund');
$this->data['entry_transaction_reference'] = $this->language->get('entry_transaction_reference');
$this->data['entry_transaction_amount'] = $this->language->get('entry_transaction_amount');
$this->data['entry_refund_amount'] = $this->language->get('entry_refund_amount');
$this->data['button_cancel'] = $this->language->get('button_cancel');
$this->data['button_refund'] = $this->language->get('button_refund');
$this->template = 'payment/pp_payflow_iframe_refund.tpl';
$this->children = array(
'common/header',
'common/footer'
);
$this->response->setOutput($this->render());
} else {
return $this->forward('error/not_found');
}