$this->language->load('payment/pp_pro_iframe');
$this->load->model('checkout/order');
$this->load->model('payment/pp_pro_iframe');
$this->data['text_secure_connection'] = $this->language->get('text_secure_connection');
$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);
$hosted_button_id = $this->constructButtonData($order_info);
if ($hosted_button_id) {
$this->data['code'] = $hosted_button_id;
if ($this->config->get('pp_pro_iframe_test')) {
$this->data['url'] = 'https://securepayments.sandbox.paypal.com/cgi-bin/webscr';
} else {
$this->data['url'] = 'https://securepayments.paypal.com/cgi-bin/webscr';
}
$this->data['error_connection'] = '';
} else {
$this->data['error_connection'] = $this->language->get('error_connection');
}
if (file_exists(DIR_APPLICATION . 'view/theme/' . $this->config->get('config_template') . '/stylesheet/stylesheet.css')) {
$this->data['stylesheet'] = '/catalog/view/theme/' . $this->config->get('config_template') . '/stylesheet/stylesheet.css';
} else {
$this->data['stylesheet'] = '/catalog/view/theme/default/stylesheet/stylesheet.css';
}
if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/pp_pro_iframe_body.tpl')) {
$this->template = $this->config->get('config_template') . '/template/payment/pp_pro_iframe_body.tpl';
} else {
$this->template = 'default/template/payment/pp_pro_iframe_body.tpl';
}
$this->response->setOutput($this->render());