public function index() { $this->language->load('payment/openpay_cards'); $data['action'] = $this->url->link('payment/openpay_cards/confirm', '', 'SSL'); $data['text_credit_card'] = $this->language->get('text_credit_card'); $data['text_wait'] = $this->language->get('text_wait'); $data['help_cvc_front'] = $this->language->get('help_cvc_front'); $data['help_cvc_back'] = $this->language->get('help_cvc_back'); $data['entry_cc_owner'] = $this->language->get('entry_cc_owner'); $data['entry_cc_number'] = $this->language->get('entry_cc_number'); $data['entry_cc_expire_date'] = $this->language->get('entry_cc_expire_date'); $data['entry_cc_cvv2'] = $this->language->get('entry_cc_cvv2'); $data['error_error'] = $this->language->get('error_error'); $data['text_success_payment'] = $this->language->get('text_success_payment'); $data['button_confirm'] = $this->language->get('button_confirm'); $data['button_back'] = $this->language->get('button_back'); $data['merchant_id'] = $this->getMerchantId(); $data['public_key'] = $this->getPublicApiKey(); $data['test_mode'] = $this->isTestMode(); $data['months'] = array(); $now = new dateTime('2000-01-01'); for ($i = $now->format('n'), $interval = new DateInterval('P1M'); $i <= 12; $i++, $now->add($interval)) { $data['months'][] = array('text' => $now->format('m'), 'value' => $now->format('m')); } $data['year_expire'] = array(); $now = new dateTime(); for ($i = $now->format('y'), $interval = new DateInterval('P1Y'), $stop = $i + 10; $i <= $stop; $i++, $now->add($interval)) { $data['year_expire'][] = array('text' => $now->format('y'), 'value' => $now->format('y')); } if (file_exists(DIR_TEMPLATE . $this->config->get('config_template') . '/template/payment/openpay_cards.tpl')) { $this->template = $this->config->get('config_template') . '/template/payment/openpay_cards.tpl'; } else { $this->template = 'default/template/payment/openpay_cards.tpl'; } return $this->load->view($this->template, $data); }