OpenCart 🇺🇦

Схема

protected mixed index ( )

Аргументы

Аргумент Возможный тип Описание
У метода нет аргументов

Описание

Метод пока еще не документирован.

Исходный код

$this->load->model('checkout/order');
$this->load->model('payment/pp_pro_iframe');

$this->language->load('payment/pp_pro_iframe');

if ($this->config->get('pp_pro_iframe_checkout_method') == 'redirect') {
	$order_info = $this->model_checkout_order->getOrder($this->session->data['order_id']);

	$hosted_button_id = $this->constructButtonData($order_info);

	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';
	}

	if ($hosted_button_id) {
		$this->data['code'] = $hosted_button_id;
		$this->data['error_connection'] = '';
	} else {
		$this->data['error_connection'] = $this->language->get('error_connection');
	}
}

$this->data['checkout_method'] = $this->config->get('pp_pro_iframe_checkout_method');

if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/pp_pro_iframe.tpl')) {
	$this->template = $this->config->get('config_template') . '/template/payment/pp_pro_iframe.tpl';
} else {
	$this->template = 'default/template/payment/pp_pro_iframe.tpl';
}

$this->render();