OpenCart 🇺🇦

Схема

protected mixed index ( )

Аргументы

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

Описание

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

Исходный код

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

$this->data['text_credit_card'] = $this->language->get('text_credit_card');
$this->data['text_start_date'] = $this->language->get('text_start_date');
$this->data['text_issue'] = $this->language->get('text_issue');
$this->data['text_wait'] = $this->language->get('text_wait');

$this->data['entry_cc_owner'] = $this->language->get('entry_cc_owner');
$this->data['entry_cc_type'] = $this->language->get('entry_cc_type');
$this->data['entry_cc_number'] = $this->language->get('entry_cc_number');
$this->data['entry_cc_start_date'] = $this->language->get('entry_cc_start_date');
$this->data['entry_cc_expire_date'] = $this->language->get('entry_cc_expire_date');
$this->data['entry_cc_cvv2'] = $this->language->get('entry_cc_cvv2');
$this->data['entry_cc_issue'] = $this->language->get('entry_cc_issue');

$this->data['button_confirm'] = $this->language->get('button_confirm');

$this->data['cards'] = array();

$this->data['cards'][] = array(
	'text'  => 'Visa', 
	'value' => 'VISA'
);

$this->data['cards'][] = array(
	'text'  => 'MasterCard', 
	'value' => 'MC'
);

$this->data['cards'][] = array(
	'text'  => 'Visa Delta/Debit', 
	'value' => 'DELTA'
);

$this->data['cards'][] = array(
	'text'  => 'Solo', 
	'value' => 'SOLO'
);	

$this->data['cards'][] = array(
	'text'  => 'Maestro', 
	'value' => 'MAESTRO'
);

$this->data['cards'][] = array(
	'text'  => 'Visa Electron UK Debit', 
	'value' => 'UKE'
);

$this->data['cards'][] = array(
	'text'  => 'American Express', 
	'value' => 'AMEX'
);

$this->data['cards'][] = array(
	'text'  => 'Diners Club', 
	'value' => 'DC'
);

$this->data['cards'][] = array(
	'text'  => 'Japan Credit Bureau', 
	'value' => 'JCB'
);

$this->data['months'] = array();

for ($i = 1; $i <= 12; $i++) {
	$this->data['months'][] = array(
		'text'  => strftime('%B', mktime(0, 0, 0, $i, 1, 2000)), 
		'value' => sprintf('%02d', $i)
	);
}

$today = getdate();

$this->data['year_valid'] = array();

for ($i = $today['year'] - 10; $i < $today['year'] + 1; $i++) {	
	$this->data['year_valid'][] = array(
		'text'  => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)), 
		'value' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i))
	);
}

$this->data['year_expire'] = array();

for ($i = $today['year']; $i < $today['year'] + 11; $i++) {
	$this->data['year_expire'][] = array(
		'text'  => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)),
		'value' => strftime('%Y', mktime(0, 0, 0, 1, 1, $i)) 
	);
}

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

$this->render();