PK 9UP admin/PK 9UP admin/controller/PK 9UP admin/controller/extension/PK ^Q # admin/controller/extension/payment/PK
^QmhyW# # , admin/controller/extension/payment/imoje.phplanguage->load('extension/payment/imoje');
$this->document->setTitle($this->language->get('heading_title'));
$this->document->addScript('view/javascript/select2/js/select2.min.js');
$this->document->addStyle('view/javascript/select2/css/select2.css');
$this->load->model('setting/setting');
$request = $this->request->post;
if(($this->request->server['REQUEST_METHOD'] == 'POST')
&& $this->validate($request)
) {
$settings = array_merge($this->model_setting_setting->getSetting('imoje'), $request);
$this->model_setting_setting->editSetting('imoje', $settings);
$this->session->data['success'] = $this->language->get('text_success');
$this->response->redirect($this->url->link('extension/extension', 'token=' . $this->session->data['token'], 'SSL'));
return;
}
include_once(DIR_SYSTEM . 'library/Payment-core/vendor/autoload.php');
$data = [
'button_save' => $this->language->get('button_save'),
'button_cancel' => $this->language->get('button_cancel'),
'text_edit' => $this->language->get('text_edit'),
'text_enabled' => $this->language->get('text_enabled'),
'text_disabled' => $this->language->get('text_disabled'),
'text_header_tip' => $this->language->get('text_header_tip'),
'imoje_status_label' => $this->language->get('imoje_status_label'),
'imoje_status' => isset($this->request->post['imoje_status'])
? $this->request->post['imoje_status']
: $this->config->get('imoje_status'),
'imoje_debug_mode_label' => $this->language->get('imoje_debug_mode_label'),
'imoje_debug_mode' => isset($this->request->post['imoje_debug_mode'])
? $this->request->post['imoje_debug_mode']
: $this->config->get('imoje_debug_mode'),
'imoje_sandbox_label' => $this->language->get('imoje_sandbox_label'),
'imoje_sandbox_enabled_hint' => $this->language->get('imoje_sandbox_enabled_hint'),
'imoje_sandbox' => isset($this->request->post['imoje_sandbox'])
? $this->request->post['imoje_sandbox']
: $this->config->get('imoje_sandbox'),
'imoje_merchant_id_label' => $this->language->get('imoje_merchant_id_label'),
'imoje_merchant_id' => isset($this->request->post['imoje_merchant_id'])
? $this->request->post['imoje_merchant_id']
: $this->config->get('imoje_merchant_id'),
'imoje_service_id_label' => $this->language->get('imoje_service_id_label'),
'imoje_service_id' => isset($this->request->post['imoje_service_id'])
? $this->request->post['imoje_service_id']
: $this->config->get('imoje_service_id'),
'imoje_service_key_label' => $this->language->get('imoje_service_key_label'),
'imoje_service_key' => isset($this->request->post['imoje_service_key'])
? $this->request->post['imoje_service_key']
: $this->config->get('imoje_service_key'),
'imoje_sort_order_label' => $this->language->get('imoje_sort_order_label'),
'imoje_sort_order' => isset($this->request->post['imoje_sort_order'])
? $this->request->post['imoje_sort_order']
: $this->config->get('imoje_sort_order'),
'imoje_payment_title_default' => $this->language->get('imoje_payment_title_default'),
'imoje_payment_title_label' => $this->language->get('imoje_payment_title_label'),
'imoje_payment_title' => isset($this->request->post['imoje_payment_title'])
? $this->request->post['imoje_payment_title']
: $this->config->get('imoje_payment_title'),
'imoje_currency_label' => $this->language->get('imoje_currency_label'),
'imoje_all_currencies' => Util::getSupportedCurrencies(),
'imoje_currencies' => isset($this->request->post['imoje_currencies'])
? $this->request->post['imoje_currencies']
: ($this->config->get('imoje_currencies')
?: []),
'imoje_send_cart_label' => $this->language->get('imoje_send_cart_label'),
'imoje_send_cart' => isset($this->request->post['imoje_send_cart'])
? $this->request->post['imoje_send_cart']
: $this->config->get('imoje_send_cart'),
'imoje_order_history_label' => $this->language->get('imoje_order_history_label'),
'imoje_order_history' => isset($this->request->post['imoje_order_history'])
? $this->request->post['imoje_order_history']
: $this->config->get('imoje_order_history'),
'text_error_validation' => $this->error,
'text_footer_notification' => $this->language->get('text_footer_notification'),
'text_notification_url' => HTTPS_CATALOG . 'index.php?route=extension/payment/imoje/notification',
'confirm_url' => $this->url->link('extension/payment/imoje', 'token=' . $this->session->data['token'], true),
'cancel_url' => $this->url->link('extension/extension', 'token=' . $this->session->data['token'], true),
'content_footer' => $this->load->controller('common/footer'),
'content_header' => $this->load->controller('common/header'),
'content_column_left' => $this->load->controller('common/column_left'),
'heading_title' => $this->language->get('text_heading_title'),
'breadcrumbs' => [
[
'text' => $this->language->get('text_home'),
'href' => $this->url->link('common/home', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => false,
],
[
'text' => $this->language->get('text_payment'),
'href' => $this->url->link('extension/extension', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => ' :: ',
],
[
'text' => $this->language->get('text_heading_title'),
'href' => $this->url->link('extension/payment/imoje', 'token=' . $this->session->data['token'], 'SSL'),
'separator' => ' :: ',
],
],
];
$this->response->setOutput($this->load->view('extension/payment/imoje', $data));
$current_imoje_settings = $this->model_setting_setting->getSetting('imoje');
if(isset($current_imoje_settings['imoje_error_tmp'])) {
unset($current_imoje_settings['imoje_error_tmp']);
$this->model_setting_setting->editSetting('imoje', $current_imoje_settings);
}
if(isset($current_imoje_settings['imoje_success_tmp'])) {
unset($current_imoje_settings['imoje_success_tmp']);
$this->model_setting_setting->editSetting('imoje', $current_imoje_settings);
}
if(isset($current_imoje_settings['imoje_no_twisto'])) {
unset($current_imoje_settings['imoje_no_twisto']);
$this->model_setting_setting->editSetting('imoje', $current_imoje_settings);
}
}
/**
* @param array $request
*
* @return bool
*/
protected function validate($request)
{
if(!$this->user->hasPermission('modify', 'extension/payment/imoje')) {
$this->error['error_warning_permissions'] = $this->language->get('error_permission');
return false;
}
include_once(DIR_SYSTEM . 'library/Payment-core/vendor/autoload.php');
$schema = [
'type' => 'object',
'properties' => [
'imoje_status' => [
'type' => 'string',
"enum" => [
'0',
'1',
],
],
'imoje_debug_mode' => [
'type' => 'string',
"enum" => [
'0',
'1',
],
],
'imoje_sandbox' => [
'type' => 'string',
"enum" => [
'0',
'1',
],
],
'imoje_merchant_id' => [
'type' => 'string',
],
'imoje_service_id' => [
'type' => 'string',
],
'imoje_service_key' => [
'type' => 'string',
],
'imoje_sort_order' => [
'type' => 'string',
'minLength' => 1,
],
'imoje_payment_title' => [
'type' => 'string',
],
'imoje_currencies' => [
'type' => 'array',
'items' => [
'type' => 'string',
'enum' => array_values(\Imoje\Payment\Util::getSupportedCurrencies()),
],
'minItems' => 1,
'uniqueItems' => true,
],
'imoje_order_history' => [
'type' => 'string',
"enum" => [
'0',
'1',
],
],
'imoje_send_cart' => [
'type' => 'string',
"enum" => [
'0',
'1',
],
],
],
'required' => [
'imoje_status',
'imoje_debug_mode',
'imoje_sandbox',
'imoje_merchant_id',
'imoje_service_id',
'imoje_service_key',
'imoje_sort_order',
'imoje_payment_title',
'imoje_currencies',
'imoje_send_cart',
'imoje_order_history',
],
'additionalProperties' => false,
];
$data = json_decode(json_encode($request));
$validator = new Validator();
$validator->validate($data, $schema);
$this->error = [];
foreach($validator->getErrors() as $key => $value) {
if($value['constraint'] === 'additionalProp') {
$this->error['error_additional_properties'] = $this->language->get('error_additional_properties');
} else {
$this->error['error_' . $value['property']] = $this->language->get('error_validation');
}
}
return empty($this->error);
}
}
PK 9UP admin/language/PK 9UP admin/language/en-gb/PK 9UP admin/language/en-gb/extension/PK ^Q ' admin/language/en-gb/extension/payment/PK
^QTP
0 admin/language/en-gb/extension/payment/imoje.php';
// Entry
$_['imoje_debug_mode_label'] = 'Debug';
$_['imoje_send_cart_label'] = 'Send cart data';
$_['imoje_order_history_label'] = 'Send order history (by email - works only with send cart option)';
$_['imoje_merchant_id_label'] = 'Merchant ID';
$_['imoje_service_id_label'] = 'Service ID';
$_['imoje_service_key_label'] = 'Service key';
$_['imoje_status_label'] = 'Status';
$_['imoje_sort_order_label'] = 'Sort Order';
$_['text_header_tip'] = "The module requires a configuration in the imoje administration panel.
Go to imoje.ingbank.pl and log in to the administration panel.
Go to stores tab and enter the notification address in the appropriate field and copy the configuration keys.
Copy the keys into the fields described below.";
$_['text_footer_notification'] = "Your address for notifications";
$_['imoje_sandbox_label'] = "Sandbox";
$_['imoje_sandbox_enabled_hint'] = "Sandbox mode is enabled!";
$_['imoje_payment_title_label'] = "Payment title";
$_['imoje_payment_title_default'] = "imoje payments - PayByLink, cards, BLIK.";
$_['imoje_currency_label'] = 'Currency';
// Error
$_['error_permission'] = 'Warning: You do not have permission to modify payment imoje!';
$_['error_validation'] = 'This field has incorrect value!';
$_['error_additional_properties'] = 'Error! Unknown data were posted!';
PK 9UP admin/language/pl-pl/PK 9UP admin/language/pl-pl/extension/PK ^Q ' admin/language/pl-pl/extension/payment/PK
^Q} 0 admin/language/pl-pl/extension/payment/imoje.php';
// Entry
$_['imoje_debug_mode_label'] = 'Tryb debug';
$_['imoje_send_cart_label'] = 'Wyślij koszyk';
$_['imoje_order_history_label'] = 'Wyślij historię zamówień (po adresie email - działa tylko z opcją wyślij koszyk)';
$_['imoje_merchant_id_label'] = 'Identyfikator klienta';
$_['imoje_service_id_label'] = 'Identyfikator sklepu';
$_['imoje_service_key_label'] = 'Klucz sklepu';
$_['imoje_status_label'] = 'Status';
$_['imoje_sort_order_label'] = 'Kolejność';
$_['text_header_tip'] = "Moduł imoje wymaga konfiguracji w panelu administracyjnym imoje.
Wejdź na imoje.ingbank.pl i zaloguj się do panelu administracyjnego.
W panelu wejdź w zakładkę sklepy. Wprowadź adres notyfikacji w odpowiednim polu oraz skopiuj klucze konfiguracyjne.
Skopiowane klucze wprowadź w pola opisane poniżej.";
$_['text_footer_notification'] = "Adres notyfikacyjny Twojego sklepu";
$_['imoje_sandbox_label'] = "Tryb Sandbox";
$_['imoje_sandbox_enabled_hint'] = "Tryb Sandbox jest włączony!";
$_['imoje_payment_title_label'] = "Nazwa metody płatności";
$_['imoje_payment_title_default'] = "Płatności online z imoje - szybkie przelewy, BLIK, karty.";
$_['imoje_currency_label'] = 'Waluta';
// Error
$_['error_permission'] = 'Wystąpił problem. Nie posiadasz uprawnień do modyfikacji wtyczki imoje!';
$_['error_validation'] = 'To pole ma niepoprawną wartość!';
$_['error_additional_properties'] = 'Błąd! Nieznane dane zostały przekazane.';
PK ^Q admin/view/PK 9UP admin/view/image/PK
9UP磲# # admin/view/image/imoje.pngPNG
IHDR f 2 IDATx^pUI@