From 953809a2dfed085091d23b398ceaadf2ee73d110 Mon Sep 17 00:00:00 2001 From: joaocouto-ifthenpay Date: Fri, 4 Oct 2024 09:26:49 +0000 Subject: [PATCH] release: module update from ifthenpay/dev_prestashop_8 (https://github.com/ifthenpay/dev_prestashop_8/commit/452989a3bfec541a762967a2c6f35c0653d10e9d) --- .../Payments/IfthenpaygatewayAdminOrder.php | 75 + .../Admin/Payments/MbwayAdminRefund.php | 4 +- ifthenpay/classes/Base/Payments/CCardBase.php | 16 +- .../classes/Base/Payments/CofidispayBase.php | 11 +- .../Base/Payments/IfthenpaygatewayBase.php | 88 + ifthenpay/classes/Builders/DataBuilder.php | 307 ++- ifthenpay/classes/Callback/Callback.php | 121 +- ifthenpay/classes/Callback/CallbackData.php | 3 +- .../classes/Callback/CallbackDataCCard.php | 27 +- .../Callback/CallbackDataCofidispay.php | 33 +- .../Callback/CallbackDataIfthenpaygateway.php | 44 + .../classes/Callback/CallbackDataMbway.php | 17 +- .../Callback/CallbackDataMultibanco.php | 10 +- .../classes/Callback/CallbackDataPayshop.php | 14 +- .../classes/Callback/CallbackOffline.php | 50 +- ifthenpay/classes/Callback/CallbackOnline.php | 496 ++-- .../classes/Callback/CallbackProcess.php | 21 +- .../classes/Callback/CallbackStrategy.php | 11 +- .../classes/Callback/CallbackValidate.php | 8 +- ifthenpay/classes/Callback/CallbackVars.php | 21 + .../classes/Config/IfthenpayConfiguration.php | 204 +- ifthenpay/classes/Config/IfthenpaySql.php | 278 ++- .../Factory/Admin/AdminOrderFactory.php | 49 +- .../Factory/Callback/CallbackDataFactory.php | 40 +- .../classes/Factory/Config/ConfigFactory.php | 6 + .../Config/IfthenpayConfigFormFactory.php | 46 +- .../Factory/Models/IfthenpayModelFactory.php | 44 +- .../Factory/Payment/OrderDetailFactory.php | 48 +- .../Factory/Payment/PaymentFactory.php | 40 +- .../Factory/Payment/PaymentReturnFactory.php | 105 +- ifthenpay/classes/Forms/ConfigForm.php | 27 +- .../Forms/IfthenpaygatewayConfigForm.php | 726 ++++++ .../Models/IfthenpayIfthenpaygateway.php | 117 + .../classes/Models/IfthenpayMultibanco.php | 178 +- .../Data/IfthenpaygatewayCancelOrder.php | 96 + .../Data/IfthenpaygatewayOrderDetail.php | 56 + .../Data/IfthenpaygatewayPaymentReturn.php | 60 + ifthenpay/classes/Payments/Gateway.php | 109 +- .../classes/Payments/Ifthenpaygateway.php | 152 ++ ifthenpay/classes/Utility/CountryCodes.json | 2194 +++++++++++++++++ ifthenpay/classes/Utility/CountryCodes.php | 64 + ifthenpay/classes/Utility/Status.php | 25 +- ifthenpay/classes/Utility/Time.php | 22 + ifthenpay/classes/Utility/Utility.php | 20 + ifthenpay/config.xml | 4 +- ...AdminIfthenpayActivateNewGatewayMethod.php | 93 + .../AdminIfthenpayPaymentMethodSetup.php | 84 +- ifthenpay/controllers/front/validation.php | 8 +- ifthenpay/ifthenpay.php | 88 +- ifthenpay/mails/activateGatewayMethod.html | 397 +++ ifthenpay/mails/activateGatewayMethod.txt | 11 + ifthenpay/mails/en/activateGatewayMethod.html | 397 +++ ifthenpay/mails/en/activateGatewayMethod.txt | 11 + ifthenpay/mails/en/ifthenpaygateway.html | 156 ++ ifthenpay/mails/en/ifthenpaygateway.txt | 23 + ifthenpay/mails/en/ifthenpaygateway_conf.html | 49 + ifthenpay/mails/en/ifthenpaygateway_conf.txt | 12 + .../mails/en/ifthenpaygateway_conf_16.html | 132 + .../mails/en/ifthenpaygateway_conf_16.txt | 31 + ifthenpay/mails/ifthenpaygateway.html | 154 ++ ifthenpay/mails/ifthenpaygateway_16.html | 163 ++ ifthenpay/mails/ifthenpaygateway_16.txt | 31 + ifthenpay/mails/ifthenpaygateway_conf.html | 49 + ifthenpay/mails/ifthenpaygateway_conf.txt | 12 + ifthenpay/mails/ifthenpaygateway_conf_16.html | 130 + ifthenpay/mails/ifthenpaygateway_conf_16.txt | 31 + ifthenpay/mails/pt/activateGatewayMethod.html | 397 +++ ifthenpay/mails/pt/activateGatewayMethod.txt | 11 + ifthenpay/mails/pt/ifthenpaygateway.html | 154 ++ ifthenpay/mails/pt/ifthenpaygateway.txt | 23 + ifthenpay/mails/pt/ifthenpaygateway_16.html | 163 ++ ifthenpay/mails/pt/ifthenpaygateway_16.txt | 31 + ifthenpay/mails/pt/ifthenpaygateway_conf.html | 49 + ifthenpay/mails/pt/ifthenpaygateway_conf.txt | 12 + .../mails/pt/ifthenpaygateway_conf_16.html | 130 + .../mails/pt/ifthenpaygateway_conf_16.txt | 31 + ifthenpay/translations/pt.php | 338 +-- ..._1_1.css => ifthenpayAdminOrder_8_2_0.css} | 8 +- ...ig_8_1_1.css => ifthenpayConfig_8_2_0.css} | 8 +- ...1_1.css => ifthenpayConfirmPage_8_2_0.css} | 8 +- ...1_1.css => ifthenpayOrderDetail_8_2_0.css} | 8 +- ... => ifthenpayPaymentMethodSetup_8_2_0.css} | 61 +- ...ons_8_1_1.css => paymentOptions_8_2_0.css} | 43 +- ifthenpay/views/img/ifthenpaygateway.png | Bin 0 -> 4973 bytes .../views/img/ifthenpaygateway_option.png | Bin 0 -> 3815 bytes .../img/ifthenpaygateway_option_default.png | Bin 0 -> 3815 bytes ...1.js => adminAccountSettingsPage_8_2_0.js} | 38 +- ...Page_8_1_1.js => adminConfigPage_8_2_0.js} | 293 ++- ...8_1_1.js => adminOrderCreatePage_8_2_0.js} | 42 +- ...8_1_1.js => adminOrderDetailPage_8_2_0.js} | 36 +- ....js => mbwayCountdownConfirmPage_8_2_0.js} | 30 +- .../templates/admin/paymentMethodSetup.tpl | 19 +- .../views/templates/front/mbwayPhone.tpl | 35 +- .../templates/hook/_partials/paymentPanel.tpl | 201 +- ifthenpay/views/templates/hook/admin.tpl | 187 +- 95 files changed, 9037 insertions(+), 1468 deletions(-) create mode 100644 ifthenpay/classes/Admin/Payments/IfthenpaygatewayAdminOrder.php create mode 100644 ifthenpay/classes/Base/Payments/IfthenpaygatewayBase.php create mode 100644 ifthenpay/classes/Callback/CallbackDataIfthenpaygateway.php create mode 100644 ifthenpay/classes/Callback/CallbackVars.php create mode 100644 ifthenpay/classes/Forms/IfthenpaygatewayConfigForm.php create mode 100644 ifthenpay/classes/Models/IfthenpayIfthenpaygateway.php create mode 100644 ifthenpay/classes/Payments/Data/IfthenpaygatewayCancelOrder.php create mode 100644 ifthenpay/classes/Payments/Data/IfthenpaygatewayOrderDetail.php create mode 100644 ifthenpay/classes/Payments/Data/IfthenpaygatewayPaymentReturn.php create mode 100644 ifthenpay/classes/Payments/Ifthenpaygateway.php create mode 100644 ifthenpay/classes/Utility/CountryCodes.json create mode 100644 ifthenpay/classes/Utility/CountryCodes.php create mode 100644 ifthenpay/classes/Utility/Time.php create mode 100644 ifthenpay/controllers/admin/AdminIfthenpayActivateNewGatewayMethod.php create mode 100644 ifthenpay/mails/activateGatewayMethod.html create mode 100644 ifthenpay/mails/activateGatewayMethod.txt create mode 100644 ifthenpay/mails/en/activateGatewayMethod.html create mode 100644 ifthenpay/mails/en/activateGatewayMethod.txt create mode 100644 ifthenpay/mails/en/ifthenpaygateway.html create mode 100644 ifthenpay/mails/en/ifthenpaygateway.txt create mode 100644 ifthenpay/mails/en/ifthenpaygateway_conf.html create mode 100644 ifthenpay/mails/en/ifthenpaygateway_conf.txt create mode 100644 ifthenpay/mails/en/ifthenpaygateway_conf_16.html create mode 100644 ifthenpay/mails/en/ifthenpaygateway_conf_16.txt create mode 100644 ifthenpay/mails/ifthenpaygateway.html create mode 100644 ifthenpay/mails/ifthenpaygateway_16.html create mode 100644 ifthenpay/mails/ifthenpaygateway_16.txt create mode 100644 ifthenpay/mails/ifthenpaygateway_conf.html create mode 100644 ifthenpay/mails/ifthenpaygateway_conf.txt create mode 100644 ifthenpay/mails/ifthenpaygateway_conf_16.html create mode 100644 ifthenpay/mails/ifthenpaygateway_conf_16.txt create mode 100644 ifthenpay/mails/pt/activateGatewayMethod.html create mode 100644 ifthenpay/mails/pt/activateGatewayMethod.txt create mode 100644 ifthenpay/mails/pt/ifthenpaygateway.html create mode 100644 ifthenpay/mails/pt/ifthenpaygateway.txt create mode 100644 ifthenpay/mails/pt/ifthenpaygateway_16.html create mode 100644 ifthenpay/mails/pt/ifthenpaygateway_16.txt create mode 100644 ifthenpay/mails/pt/ifthenpaygateway_conf.html create mode 100644 ifthenpay/mails/pt/ifthenpaygateway_conf.txt create mode 100644 ifthenpay/mails/pt/ifthenpaygateway_conf_16.html create mode 100644 ifthenpay/mails/pt/ifthenpaygateway_conf_16.txt rename ifthenpay/views/css/{ifthenpayAdminOrder_8_1_1.css => ifthenpayAdminOrder_8_2_0.css} (94%) rename ifthenpay/views/css/{ifthenpayConfig_8_1_1.css => ifthenpayConfig_8_2_0.css} (97%) rename ifthenpay/views/css/{ifthenpayConfirmPage_8_1_1.css => ifthenpayConfirmPage_8_2_0.css} (97%) rename ifthenpay/views/css/{ifthenpayOrderDetail_8_1_1.css => ifthenpayOrderDetail_8_2_0.css} (94%) rename ifthenpay/views/css/{ifthenpayPaymentMethodSetup_8_1_1.css => ifthenpayPaymentMethodSetup_8_2_0.css} (60%) rename ifthenpay/views/css/{paymentOptions_8_1_1.css => paymentOptions_8_2_0.css} (83%) create mode 100644 ifthenpay/views/img/ifthenpaygateway.png create mode 100644 ifthenpay/views/img/ifthenpaygateway_option.png create mode 100644 ifthenpay/views/img/ifthenpaygateway_option_default.png rename ifthenpay/views/js/{adminAccountSettingsPage_8_1_1.js => adminAccountSettingsPage_8_2_0.js} (99%) rename ifthenpay/views/js/{adminConfigPage_8_1_1.js => adminConfigPage_8_2_0.js} (95%) rename ifthenpay/views/js/{adminOrderCreatePage_8_1_1.js => adminOrderCreatePage_8_2_0.js} (99%) rename ifthenpay/views/js/{adminOrderDetailPage_8_1_1.js => adminOrderDetailPage_8_2_0.js} (99%) rename ifthenpay/views/js/{mbwayCountdownConfirmPage_8_1_1.js => mbwayCountdownConfirmPage_8_2_0.js} (99%) diff --git a/ifthenpay/classes/Admin/Payments/IfthenpaygatewayAdminOrder.php b/ifthenpay/classes/Admin/Payments/IfthenpaygatewayAdminOrder.php new file mode 100644 index 0000000..9ca5ed1 --- /dev/null +++ b/ifthenpay/classes/Admin/Payments/IfthenpaygatewayAdminOrder.php @@ -0,0 +1,75 @@ + + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace PrestaShop\Module\Ifthenpay\Admin\Payments; + +if (!defined('_PS_VERSION_')) { + exit; +} + + +use PrestaShop\Module\Ifthenpay\Base\Payments\IfthenpaygatewayBase; +use PrestaShop\Module\Ifthenpay\Contracts\Admin\AdminOrderInterface; + +class IfthenpaygatewayAdminOrder extends IfthenpaygatewayBase implements AdminOrderInterface +{ + + public function setSmartyVariables($paymentInDatabase) + { + if ($paymentInDatabase) { + $this->smartyDefaultData->setPaymentUrl($this->paymentDataFromDb['payment_url']); + $this->smartyDefaultData->setDeadline( + (isset($this->paymentDataFromDb['deadline']) && $this->paymentDataFromDb['deadline'] != '') ? + (new \DateTime($this->paymentDataFromDb['deadline']))->format('d-m-Y') : '' + ); + } else { + $this->smartyDefaultData->setPaymentUrl($this->paymentGatewayResultData->paymentUrl); + $this->smartyDefaultData->setDeadline((new \DateTime($this->paymentGatewayResultData->deadline))->format('d-m-Y')); + } + } + + + + public function getAdminOrder() + { + $this->setPaymentModel('ifthenpaygateway'); + $this->getFromDatabaseById(); + if (!empty($this->paymentDataFromDb)) { + $this->setSmartyVariables(true); + } else { + $this->setGatewayBuilderData(); + $this->paymentGatewayResultData = $this->ifthenpayGateway->execute( + $this->paymentDefaultData->paymentMethod, + $this->gatewayBuilder, + strval($this->paymentDefaultData->order->id), + strval($this->paymentDefaultData->order->getOrdersTotalPaid()) + )->getData(); + $this->saveToDatabase(); + $this->setSmartyVariables(false); + } + return $this; + } +} diff --git a/ifthenpay/classes/Admin/Payments/MbwayAdminRefund.php b/ifthenpay/classes/Admin/Payments/MbwayAdminRefund.php index b341756..9027926 100644 --- a/ifthenpay/classes/Admin/Payments/MbwayAdminRefund.php +++ b/ifthenpay/classes/Admin/Payments/MbwayAdminRefund.php @@ -40,8 +40,8 @@ public function refundPayment() { $this->setPaymentModel('mbway'); $this->getFromDatabaseById(); - $this->setEmailVariables(); - $this->sendEmailToAdmin('refund', Utility::getMailTranslationString('mbway', 'refund')); + $this->setEmailVariables(); + $this->sendEmailToAdmin('refund_token', Utility::getMailTranslationString('mbway', 'refund')); return $this->securityCode; } } diff --git a/ifthenpay/classes/Base/Payments/CCardBase.php b/ifthenpay/classes/Base/Payments/CCardBase.php index 6f1c384..bd27037 100644 --- a/ifthenpay/classes/Base/Payments/CCardBase.php +++ b/ifthenpay/classes/Base/Payments/CCardBase.php @@ -36,7 +36,7 @@ class CCardBase extends PaymentBase { - + private function getUrlCallback() { return \Context::getContext()->link->getModuleLink('ifthenpay', 'callback', array(), true); @@ -45,18 +45,18 @@ private function getUrlCallback() protected function setGatewayBuilderData() { $this->gatewayBuilder->setCCardKey(\Configuration::get('IFTHENPAY_CCARD_KEY')); - $this->gatewayBuilder->setSuccessUrl($this->getUrlCallback() . '?type=online&payment=ccard&cartId=' . \Tools::getValue('id_cart') . '&qn=' . - Token::encrypt(Status::getStatusSuccess()) + $this->gatewayBuilder->setSuccessUrl($this->getUrlCallback() . '?type=online&p=ccard&cartId=' . \Tools::getValue('id_cart') . '&qn=' . + Token::encrypt(Status::getStatusSuccess()) ); - - $this->gatewayBuilder->setErrorUrl($this->getUrlCallback() . '?type=online&payment=ccard&cartId=' . \Tools::getValue('id_cart') . '&qn=' . + + $this->gatewayBuilder->setErrorUrl($this->getUrlCallback() . '?type=online&p=ccard&cartId=' . \Tools::getValue('id_cart') . '&qn=' . Token::encrypt(Status::getStatusError()) ); - - $this->gatewayBuilder->setCancelUrl($this->getUrlCallback() . '?type=online&payment=ccard&cartId=' . \Tools::getValue('id_cart') . '&qn=' . + + $this->gatewayBuilder->setCancelUrl($this->getUrlCallback() . '?type=online&p=ccard&cartId=' . \Tools::getValue('id_cart') . '&qn=' . Token::encrypt(Status::getStatusCancel()) ); - + } protected function saveToDatabase() diff --git a/ifthenpay/classes/Base/Payments/CofidispayBase.php b/ifthenpay/classes/Base/Payments/CofidispayBase.php index 3a426e2..2cf629d 100644 --- a/ifthenpay/classes/Base/Payments/CofidispayBase.php +++ b/ifthenpay/classes/Base/Payments/CofidispayBase.php @@ -36,7 +36,7 @@ class CofidispayBase extends PaymentBase { - + private function getUrlCallback() { return \Context::getContext()->link->getModuleLink('ifthenpay', 'callback', array(), true); @@ -45,10 +45,11 @@ private function getUrlCallback() protected function setGatewayBuilderData() { $this->gatewayBuilder->setCofidisKey(\Configuration::get('IFTHENPAY_COFIDIS_KEY')); - - $this->gatewayBuilder->setSuccessUrl($this->getUrlCallback() . '?type=online&payment=cofidispay&cartId=' . \Tools::getValue('id_cart') . '&qn=' . - Token::encrypt(Status::getStatusSuccess()) - ); + + $this->gatewayBuilder->setSuccessUrl( + $this->getUrlCallback() . '?type=online&p=cofidispay&cartId=' . \Tools::getValue('id_cart') . '&qn=' . + Token::encrypt(Status::getStatusSuccess()) + ); } protected function saveToDatabase() diff --git a/ifthenpay/classes/Base/Payments/IfthenpaygatewayBase.php b/ifthenpay/classes/Base/Payments/IfthenpaygatewayBase.php new file mode 100644 index 0000000..f2b7a61 --- /dev/null +++ b/ifthenpay/classes/Base/Payments/IfthenpaygatewayBase.php @@ -0,0 +1,88 @@ + + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +namespace PrestaShop\Module\Ifthenpay\Base\Payments; + +if (!defined('_PS_VERSION_')) { + exit; +} + +use PrestaShop\Module\Ifthenpay\Base\PaymentBase; + + +class IfthenpaygatewayBase extends PaymentBase +{ + protected function setGatewayBuilderData() + { + $this->gatewayBuilder->setKey(\Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_KEY')); + $this->gatewayBuilder->setSelectableMethods(\Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_METHODS')); + $this->gatewayBuilder->setDefaultMethod(\Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_DEFAULT_METHOD')); + $this->gatewayBuilder->setDeadline(\Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_DEADLINE')); + } + + + + protected function saveToDatabase() + { + $this->paymentModel->payment_url = $this->paymentGatewayResultData->paymentUrl; + $this->paymentModel->deadline = $this->paymentGatewayResultData->deadline; + $this->paymentModel->order_id = $this->paymentDefaultData->order->id; + $this->paymentModel->status = 'pending'; + $this->paymentModel->save(); + } + + + + protected function updateDatabase() + { + $this->setPaymentModel('ifthenpaygateway', $this->paymentDataFromDb['id_ifthenpay_ifthenpaygateway']); + $this->paymentModel->payment_url = $this->paymentGatewayResultData->payment_url; + $this->paymentModel->deadline = isset($this->paymentGatewayResultData->deadline) ? $this->paymentGatewayResultData->deadline : null; + $this->paymentModel->update(); + } + + + + protected function setEmailVariables() + { + $this->emailDefaultData['{mb_logo}'] = _PS_BASE_URL_ . _MODULE_DIR_ . 'ifthenpay/views/img/ifthenpaygateway.png'; + $this->emailDefaultData['{payment_url}'] = $this->paymentGatewayResultData ? $this->paymentGatewayResultData->paymentUrl : $this->paymentDataFromDb['payment_url']; + + $this->smartyDefaultData->setDeadline(isset($this->paymentGatewayResultData->deadline) ? (new \DateTime($this->paymentGatewayResultData->deadline))->format('d-m-Y') : ''); + + $deadline = isset($this->paymentGatewayResultData->deadline) ? $this->paymentGatewayResultData->deadline : $this->paymentDataFromDb['deadline']; + $deadline = $deadline != '' ? (new \DateTime($deadline))->format('d-m-Y') : ''; + + $deadlineHtml = << + Deadline: {$deadline} + + HTML; + + $this->emailDefaultData['{deadline}'] = $deadline != '' ? $deadlineHtml : ''; + } +} diff --git a/ifthenpay/classes/Builders/DataBuilder.php b/ifthenpay/classes/Builders/DataBuilder.php index 123177a..40c8f7f 100644 --- a/ifthenpay/classes/Builders/DataBuilder.php +++ b/ifthenpay/classes/Builders/DataBuilder.php @@ -1,4 +1,5 @@ data = new \stdClass; - } - - public function setTotalToPay($value) - { - $this->data->totalToPay = $value; - return $this; - } - - public function setPaymentMethod($value) - { - $this->data->paymentMethod = $value; - return $this; - } - - public function setEntidade($value) - { - $this->data->entidade = $value; - return $this; - } - - public function setSubEntidade($value) - { - $this->data->entidade = $value; - return $this; - } - - public function setReferencia($value) - { - $this->data->referencia = $value; - return $this; - } - - public function setTelemovel($value = null) - { - $this->data->telemovel = $value; - return $this; - } - - public function setValidade($value) - { - $this->data->validade = $value; - return $this; - } - - public function setIdPedido($value = null) - { - $this->data->idPedido = $value; - return $this; - } - - public function setBackofficeKey($value) - { - $this->data->backofficeKey = $value; - return $this; - } - - public function setSuccessUrl($value) - { - $this->data->successUrl = $value; - return $this; - } - - public function setErrorUrl($value) - { - $this->data->errorUrl = $value; - return $this; - } - - public function setCancelUrl($value) - { - $this->data->cancelUrl = $value; - return $this; - } - - public function setPaymentMessage($value) - { - $this->data->message = $value; - return $this; - } - - public function setPaymentUrl($value) - { - $this->data->paymentUrl = $value; - return $this; - } - - public function setPaymentStatus($value) - { - $this->data->status = $value; - return $this; - } - - public function setMin($value) - { - $this->data->min = $value; - return $this; - } - - public function setMax($value) - { - $this->data->max = $value; - return $this; - } - - public function setCountries($value) - { - $this->data->countries = $value; - return $this; - } - - public function setOrder($value) - { - $this->data->order = $value; - return $this; - } - - public function toArray() - { - return json_decode(json_encode($this->data), true); - } - - public function getData() - { - return $this->data; - } + protected $data; + + public function __construct() + { + $this->data = new \stdClass; + } + + public function setTotalToPay($value) + { + $this->data->totalToPay = $value; + return $this; + } + + public function setPaymentMethod($value) + { + $this->data->paymentMethod = $value; + return $this; + } + + public function setEntidade($value) + { + $this->data->entidade = $value; + return $this; + } + + public function setSubEntidade($value) + { + $this->data->entidade = $value; + return $this; + } + + public function setKey($value) + { + $this->data->key = $value; + return $this; + } + + public function setReferencia($value) + { + $this->data->referencia = $value; + return $this; + } + + public function setTelemovel($value = null) + { + $this->data->telemovel = $value; + return $this; + } + + public function setValidade($value) + { + $this->data->validade = $value; + return $this; + } + + public function setIdPedido($value = null) + { + $this->data->idPedido = $value; + return $this; + } + + public function setBackofficeKey($value) + { + $this->data->backofficeKey = $value; + return $this; + } + + public function setSuccessUrl($value) + { + $this->data->successUrl = $value; + return $this; + } + + public function setErrorUrl($value) + { + $this->data->errorUrl = $value; + return $this; + } + + public function setCancelUrl($value) + { + $this->data->cancelUrl = $value; + return $this; + } + + public function setPaymentMessage($value) + { + $this->data->message = $value; + return $this; + } + + public function setPaymentUrl($value) + { + $this->data->paymentUrl = $value; + return $this; + } + + public function setPaymentStatus($value) + { + $this->data->status = $value; + return $this; + } + + public function setMin($value) + { + $this->data->min = $value; + return $this; + } + + public function setMax($value) + { + $this->data->max = $value; + return $this; + } + + public function setCountries($value) + { + $this->data->countries = $value; + return $this; + } + + public function setOrder($value) + { + $this->data->order = $value; + return $this; + } + + public function toArray() + { + return json_decode(json_encode($this->data), true); + } + + public function getData() + { + return $this->data; + } + + // ifthenpaygateway related + + public function setSelectableMethods($value) + { + $this->data->selectableMethods = $value; + return $this; + } + + public function setDefaultMethod($value) + { + $this->data->defaultMethod = $value; + return $this; + } + + public function setDeadline($value) + { + $this->data->deadline = $value; + return $this; + } + + public function setCloseBtn($value) + { + $this->data->closeBtn = $value; + return $this; + } + + public function setTitle($value) + { + $this->data->title = $value; + return $this; + } + + public function setShowLogo($value) + { + $this->data->showLogo = $value; + return $this; + } } diff --git a/ifthenpay/classes/Callback/Callback.php b/ifthenpay/classes/Callback/Callback.php index c892ab5..58db0c9 100644 --- a/ifthenpay/classes/Callback/Callback.php +++ b/ifthenpay/classes/Callback/Callback.php @@ -31,6 +31,7 @@ } use PrestaShop\Module\Ifthenpay\Factory\Request\RequestFactory; +use PrestaShop\Module\Ifthenpay\Callback\CallbackVars as Cb; class Callback { @@ -43,12 +44,7 @@ class Callback private $entidade; private $subEntidade; private $paymentType; - private $urlCallbackParameters = [ - 'multibanco' => '?type=offline&ec={ec}&mv={mv}&payment={paymentMethod}&chave=[CHAVE_ANTI_PHISHING]&entidade=[ENTIDADE]&referencia=[REFERENCIA]&valor=[VALOR]', - 'mbway' => '?type=offline&ec={ec}&mv={mv}&payment={paymentMethod}&chave=[CHAVE_ANTI_PHISHING]&referencia=[REFERENCIA]&id_pedido=[ID_TRANSACAO]&valor=[VALOR]&estado=[ESTADO]', - 'payshop' => '?type=offline&ec={ec}&mv={mv}&payment={paymentMethod}&chave=[CHAVE_ANTI_PHISHING]&id_cliente=[ID_CLIENTE]&id_transacao=[ID_TRANSACAO]&referencia=[REFERENCIA]&valor=[VALOR]&estado=[ESTADO]', - 'cofidispay' => '?type=offline&ec={ec}&mv={mv}&payment={paymentMethod}&chave=[CHAVE_ANTI_PHISHING]&id_pedido=[ID_TRANSACAO]&valor=[VALOR]&estado=[ESTADO]', - ]; + public function __construct($data) { @@ -56,6 +52,91 @@ public function __construct($data) $this->backofficeKey = $data->getData()->backofficeKey; $this->entidade = $data->getData()->entidade; $this->subEntidade = $data->getData()->subEntidade; + + $this->urlCallbackParameters = [ + 'multibanco' => '?' . $this->toHttpQuery( + [ + Cb::TYPE => 'offline', + Cb::ECOMMERCE_VERSION => '{ec}', + Cb::MODULE_VERSION => '{mv}', + Cb::PAYMENT => '{paymentMethod}', + Cb::ANTIPHISH_KEY => '[ANTI_PHISHING_KEY]', + Cb::ORDER_ID => '[ID]', + Cb::ENTITY => '[ENTITY]', + Cb::REFERENCE => '[REFERENCE]', + Cb::AMOUNT => '[AMOUNT]', + Cb::PM => '[PAYMENT_METHOD]', + ] + ), + 'mbway' => '?' . $this->toHttpQuery( + [ + Cb::TYPE => 'offline', + Cb::ECOMMERCE_VERSION => '{ec}', + Cb::MODULE_VERSION => '{mv}', + Cb::PAYMENT => '{paymentMethod}', + Cb::ANTIPHISH_KEY => '[ANTI_PHISHING_KEY]', + Cb::ORDER_ID => '[ID]', + Cb::TRANSACTION_ID => '[REQUEST_ID]', + Cb::AMOUNT => '[AMOUNT]', + Cb::PM => '[PAYMENT_METHOD]', + ] + ), + 'payshop' => '?' . $this->toHttpQuery( + [ + Cb::TYPE => 'offline', + Cb::ECOMMERCE_VERSION => '{ec}', + Cb::MODULE_VERSION => '{mv}', + Cb::PAYMENT => '{paymentMethod}', + Cb::ANTIPHISH_KEY => '[ANTI_PHISHING_KEY]', + Cb::REFERENCE => '[REFERENCE]', + Cb::ORDER_ID => '[ID]', + Cb::TRANSACTION_ID => '[REQUEST_ID]', + Cb::AMOUNT => '[AMOUNT]', + Cb::PM => '[PAYMENT_METHOD]', + ] + ), + 'ccard' => '?' . $this->toHttpQuery( + [ + Cb::TYPE => 'offline', + Cb::ECOMMERCE_VERSION => '{ec}', + Cb::MODULE_VERSION => '{mv}', + Cb::PAYMENT => '{paymentMethod}', + Cb::ANTIPHISH_KEY => '[ANTI_PHISHING_KEY]', + Cb::ORDER_ID => '[ID]', + Cb::TRANSACTION_ID => '[REQUEST_ID]', + Cb::AMOUNT => '[AMOUNT]', + Cb::PM => '[PAYMENT_METHOD]', + ] + ), + 'cofidispay' => '?' . $this->toHttpQuery( + [ + Cb::TYPE => 'offline', + Cb::ECOMMERCE_VERSION => '{ec}', + Cb::MODULE_VERSION => '{mv}', + Cb::PAYMENT => '{paymentMethod}', + Cb::ANTIPHISH_KEY => '[ANTI_PHISHING_KEY]', + Cb::ORDER_ID => '[ID]', + Cb::TRANSACTION_ID => '[REQUEST_ID]', + Cb::AMOUNT => '[AMOUNT]', + Cb::PM => '[PAYMENT_METHOD]', + ] + ), + 'ifthenpaygateway' => '?' . $this->toHttpQuery( + [ + Cb::TYPE => 'offline', + Cb::ECOMMERCE_VERSION => '{ec}', + Cb::MODULE_VERSION => '{mv}', + Cb::PAYMENT => '{paymentMethod}', + Cb::ANTIPHISH_KEY => '[ANTI_PHISHING_KEY]', + Cb::ORDER_ID => '[ID]', + Cb::ENTITY => '[ENTITY]', + Cb::REFERENCE => '[REFERENCE]', + Cb::TRANSACTION_ID => '[REQUEST_ID]', + Cb::AMOUNT => '[AMOUNT]', + Cb::PM => '[PAYMENT_METHOD]', + ] + ), + ]; } private function createAntiPhishing() @@ -107,6 +188,28 @@ public function make($paymentType, $moduleLink, $activateCallback = false) } } + + + /** + * activates callback for ifthenpay gateway + * it does the same as the make() function above but exclusively for ifthenpaygateway method + */ + public function activateIfthenpayGatewayCallback($moduleLink, $activateCallback = false, string $antiPhishingKey = '') + { + if ($antiPhishingKey == '') { + $this->createAntiPhishing(); + } else{ + $this->chaveAntiPhishing = $antiPhishingKey; + } + + $this->createUrlCallback('ifthenpaygateway', $moduleLink); + if ($activateCallback) { + $this->activateCallback(); + } + } + + + /** * Get the value of urlCallback */ @@ -122,4 +225,10 @@ public function getChaveAntiPhishing() { return $this->chaveAntiPhishing; } + + + + private function toHttpQuery(array $array){ + return urldecode(http_build_query($array)); + } } diff --git a/ifthenpay/classes/Callback/CallbackData.php b/ifthenpay/classes/Callback/CallbackData.php index ef8ab22..895580b 100644 --- a/ifthenpay/classes/Callback/CallbackData.php +++ b/ifthenpay/classes/Callback/CallbackData.php @@ -30,6 +30,7 @@ } use PrestaShop\Module\Ifthenpay\Factory\Callback\CallbackDataFactory; +use PrestaShop\Module\Ifthenpay\Callback\CallbackVars as Cb; class CallbackData { @@ -42,6 +43,6 @@ public function __construct($request) public function execute() { - return CallbackDataFactory::build($this->request['payment'])->getData($this->request); + return CallbackDataFactory::build($this->request[Cb::PAYMENT])->getData($this->request); } } diff --git a/ifthenpay/classes/Callback/CallbackDataCCard.php b/ifthenpay/classes/Callback/CallbackDataCCard.php index 53f0014..950bb31 100644 --- a/ifthenpay/classes/Callback/CallbackDataCCard.php +++ b/ifthenpay/classes/Callback/CallbackDataCCard.php @@ -32,11 +32,30 @@ use PrestaShop\Module\Ifthenpay\Factory\Models\IfthenpayModelFactory; use PrestaShop\Module\Ifthenpay\Contracts\Callback\CallbackDataInterface; +use PrestaShop\Module\Ifthenpay\Callback\CallbackVars as Cb; class CallbackDataCCard implements CallbackDataInterface { - public function getData($request) - { - return IfthenpayModelFactory::build('ccard')->getCCardByRequestId($request['requestId']); - } + public function getData($request) + { + $model = IfthenpayModelFactory::build('ccard'); + + switch ($request['type']) { + case 'online': + return $model->getCCardByRequestId($request['requestId']); + + case 'offline': + + $data = $model->getCCardByRequestId($request[Cb::TRANSACTION_ID]); + + if (!empty($data)) { + return $data; + } + + return $model->getByOrderId($request[Cb::ORDER_ID]); + + default: + throw new \Exception('Invalid request type when obtaining callback data'); + } + } } diff --git a/ifthenpay/classes/Callback/CallbackDataCofidispay.php b/ifthenpay/classes/Callback/CallbackDataCofidispay.php index 6de2fcd..88f97b4 100644 --- a/ifthenpay/classes/Callback/CallbackDataCofidispay.php +++ b/ifthenpay/classes/Callback/CallbackDataCofidispay.php @@ -33,18 +33,29 @@ use PrestaShop\Module\Ifthenpay\Factory\Models\IfthenpayModelFactory; use PrestaShop\Module\Ifthenpay\Contracts\Callback\CallbackDataInterface; +use PrestaShop\Module\Ifthenpay\Callback\CallbackVars as Cb; class CallbackDataCofidispay implements CallbackDataInterface { - public function getData($request) - { - switch ($request['type']) { - case 'online': - return IfthenpayModelFactory::build('cofidispay')->getByOrderId($request['orderId']); - case 'offline': - return IfthenpayModelFactory::build('cofidispay')->getCofidispayByRequestId($request['id_pedido']); - default: - throw new \Exception('Invalid request type when obtaining callback data'); - } - } + public function getData($request) + { + $model = IfthenpayModelFactory::build('cofidispay'); + + switch ($request['type']) { + case 'online': + return $model->getByOrderId($request['orderId']); + case 'offline': + + $data = $model->getCofidispayByRequestId($request[Cb::TRANSACTION_ID]); + + if (!empty($data)) { + return $data; + } + + return $model->getByOrderId($request[Cb::ORDER_ID]); + + default: + throw new \Exception('Invalid request type when obtaining callback data'); + } + } } diff --git a/ifthenpay/classes/Callback/CallbackDataIfthenpaygateway.php b/ifthenpay/classes/Callback/CallbackDataIfthenpaygateway.php new file mode 100644 index 0000000..47299a7 --- /dev/null +++ b/ifthenpay/classes/Callback/CallbackDataIfthenpaygateway.php @@ -0,0 +1,44 @@ + + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + + +namespace PrestaShop\Module\Ifthenpay\Callback; + +if (!defined('_PS_VERSION_')) { + exit; +} + +use PrestaShop\Module\Ifthenpay\Factory\Models\IfthenpayModelFactory; +use PrestaShop\Module\Ifthenpay\Contracts\Callback\CallbackDataInterface; +use PrestaShop\Module\Ifthenpay\Callback\CallbackVars as Cb; + + +class CallbackDataIfthenpaygateway implements CallbackDataInterface +{ + public function getData($request) + { + return IfthenpayModelFactory::build('ifthenpaygateway')->getByOrderId($request[Cb::ORDER_ID]); + } +} diff --git a/ifthenpay/classes/Callback/CallbackDataMbway.php b/ifthenpay/classes/Callback/CallbackDataMbway.php index 7df2617..6ac9760 100644 --- a/ifthenpay/classes/Callback/CallbackDataMbway.php +++ b/ifthenpay/classes/Callback/CallbackDataMbway.php @@ -31,18 +31,19 @@ use PrestaShop\Module\Ifthenpay\Factory\Models\IfthenpayModelFactory; use PrestaShop\Module\Ifthenpay\Contracts\Callback\CallbackDataInterface; +use PrestaShop\Module\Ifthenpay\Callback\CallbackVars as Cb; class CallbackDataMbway implements CallbackDataInterface { public function getData($request) { - $mbwayModel = IfthenpayModelFactory::build('mbway'); - $callbackData = $mbwayModel->getMbwayByIdTransacao($request['id_pedido']); - - if (empty($callbackData)) { - return $mbwayModel->getByOrderId($request['referencia']); - } else { - return $callbackData; - } + $model = IfthenpayModelFactory::build('mbway'); + $data = $model->getMbwayByIdTransacao($request[Cb::TRANSACTION_ID]); + + if (!empty($data)) { + return $data; + } + + return $model->getByOrderId($request[Cb::ORDER_ID]); } } diff --git a/ifthenpay/classes/Callback/CallbackDataMultibanco.php b/ifthenpay/classes/Callback/CallbackDataMultibanco.php index 83e370c..0b4947d 100644 --- a/ifthenpay/classes/Callback/CallbackDataMultibanco.php +++ b/ifthenpay/classes/Callback/CallbackDataMultibanco.php @@ -32,11 +32,19 @@ use PrestaShop\Module\Ifthenpay\Factory\Models\IfthenpayModelFactory; use PrestaShop\Module\Ifthenpay\Contracts\Callback\CallbackDataInterface; +use PrestaShop\Module\Ifthenpay\Callback\CallbackVars as Cb; class CallbackDataMultibanco implements CallbackDataInterface { public function getData($request) { - return IfthenpayModelFactory::build('multibanco')->getMultibancoByReferencia($request['referencia']); + $model = IfthenpayModelFactory::build('multibanco'); + $data = $model->getMultibancoByReferencia($request[Cb::REFERENCE]); + + if (!empty($data)) { + return $data; + } + + return $model->getByOrderId($request[Cb::ORDER_ID]); } } diff --git a/ifthenpay/classes/Callback/CallbackDataPayshop.php b/ifthenpay/classes/Callback/CallbackDataPayshop.php index 2459c1d..3708bff 100644 --- a/ifthenpay/classes/Callback/CallbackDataPayshop.php +++ b/ifthenpay/classes/Callback/CallbackDataPayshop.php @@ -33,11 +33,19 @@ use PrestaShop\Module\Ifthenpay\Factory\Models\IfthenpayModelFactory; use PrestaShop\Module\Ifthenpay\Contracts\Callback\CallbackDataInterface; +use PrestaShop\Module\Ifthenpay\Callback\CallbackVars as Cb; class CallbackDataPayshop implements CallbackDataInterface { public function getData($request) - { - return IfthenpayModelFactory::build('payshop')->getPayshopByIdTransacao($request['id_transacao']); - } + { + $model = IfthenpayModelFactory::build('payshop'); + $data = $model->getPayshopByIdTransacao($request[Cb::TRANSACTION_ID]); + + if (!empty($data)) { + return $data; + } + + return $model->getByOrderId($request[Cb::ORDER_ID]); + } } diff --git a/ifthenpay/classes/Callback/CallbackOffline.php b/ifthenpay/classes/Callback/CallbackOffline.php index a0bcf8e..69b87d2 100644 --- a/ifthenpay/classes/Callback/CallbackOffline.php +++ b/ifthenpay/classes/Callback/CallbackOffline.php @@ -29,6 +29,7 @@ use PrestaShop\Module\Ifthenpay\Log\IfthenpayLogProcess; use PrestaShop\Module\Ifthenpay\Factory\Callback\CallbackFactory; use PrestaShop\Module\Ifthenpay\Contracts\Callback\CallbackProcessInterface; +use PrestaShop\Module\Ifthenpay\Callback\CallbackVars as Cb; if (!defined('_PS_VERSION_')) { exit; @@ -38,21 +39,62 @@ class CallbackOffline extends CallbackProcess implements CallbackProcessInterfac { public function process() { - $this->request['payment'] = $this->paymentMethod; + $this->request[Cb::PAYMENT] = $this->paymentMethod; - $this->setPaymentData(); + // get the callback payment method to use the correct phish key + $originalPaymentMethod = $this->paymentMethod; + + $this->setPaymentData(); + + // if no payment data is set, search other payment methods + if (empty($this->paymentData)) { + if ($this->paymentMethod === 'ifthenpaygateway') { + + $methodsWithCallback = ['multibanco', 'mbway', 'payshop', 'ccard', 'cofidispay', 'ifthenpaygateway']; + + // search every active payment method tables + + + foreach ($methodsWithCallback as $paymentMethod) { + $isActive = \Configuration::get('IFTHENPAY_' . strtoupper($this->paymentMethod)); + + if ($isActive == '1') { + $this->request[Cb::PAYMENT] = $paymentMethod; + $this->setPaymentData(); + if (!empty($this->paymentData)) { + // set the correct payment method + $this->paymentMethod = $paymentMethod; + break; + } + } + } + } else { + + $isActive = \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY'); + + if ($isActive == '1') { + // search the ifthenpaygateway table + $this->request[Cb::PAYMENT] = 'ifthenpaygateway'; + $this->setPaymentData(); + if (!empty($this->paymentData)) { + // set the correct payment method + $this->paymentMethod = 'ifthenpaygateway'; + } + } + } + } if (empty($this->paymentData)) { $this->executePaymentNotFound(); } else { try { $this->setOrder(); - CallbackFactory::buildCalllbackValidate($_GET, $this->order, \Configuration::get('IFTHENPAY_' . \Tools::strtoupper($this->paymentMethod) . '_CHAVE_ANTI_PHISHING'), $this->paymentData) + CallbackFactory::buildCalllbackValidate($_GET, $this->order, \Configuration::get('IFTHENPAY_' . \Tools::strtoupper($originalPaymentMethod) . '_CHAVE_ANTI_PHISHING'), $this->paymentData) ->validate(); $this->changeIfthenpayPaymentStatus('paid'); IfthenpayLogProcess::addLog('Callback received and validated with success for payment method ' . $this->paymentMethod, IfthenpayLogProcess::INFO, $this->order->id); - + $this->changePrestashopOrderStatus(\Configuration::get('IFTHENPAY_' . \Tools::strtoupper($this->paymentMethod) . '_OS_CONFIRMED')); IfthenpayLogProcess::addLog('Order status change with success to paid (after receiving callback)', IfthenpayLogProcess::INFO, $this->order->id); diff --git a/ifthenpay/classes/Callback/CallbackOnline.php b/ifthenpay/classes/Callback/CallbackOnline.php index 4ae3f1c..708382d 100644 --- a/ifthenpay/classes/Callback/CallbackOnline.php +++ b/ifthenpay/classes/Callback/CallbackOnline.php @@ -34,236 +34,286 @@ use PrestaShop\Module\Ifthenpay\Factory\Prestashop\PrestashopModelFactory; use PrestaShop\Module\Ifthenpay\Factory\Request\RequestFactory; use PrestaShop\Module\Ifthenpay\Contracts\Callback\CallbackProcessInterface; +use PrestaShop\Module\Ifthenpay\Callback\CallbackVars as Cb; + if (!defined('_PS_VERSION_')) { - exit; + exit; } class CallbackOnline extends CallbackProcess implements CallbackProcessInterface { - private $ifthenpayModule; - private $cart; - private $customer; - private $redirectUrl; - const CCARD = 'ccard'; - const COFIDISPAY = 'cofidispay'; - const CCARD_KEY = 'IFTHENPAY_CCARD_KEY'; - const COFIDIS_KEY = 'IFTHENPAY_COFIDIS_KEY'; - const COFIDIS_STATUS_INITIATED = 'INITIATED'; - const COFIDIS_STATUS_PENDING_INVOICE = 'PENDING_INVOICE'; - const COFIDIS_STATUS_CANCELED = 'CANCELED'; - const COFIDIS_STATUS_NOT_APPROVED = 'NOT_APPROVED'; - const COFIDIS_STATUS_TECHNICAL_ERROR= 'TECHNICAL_ERROR'; - const COFIDIS_ENDPOINT_STATUS = 'https://ifthenpay.com/api/cofidis/status'; - private function setPaymentKey($paymentMethod) - { - switch ($paymentMethod) { - case self::CCARD: - return self::CCARD_KEY; - case self::COFIDISPAY: - return self::COFIDIS_KEY; - default: - throw new \Exception('Invalid payment method'); - } - } - private function setupContext() - { - $this->request['payment'] = $this->paymentMethod; - $this->setPaymentData(); - $this->setOrder(); - - if (empty($this->paymentData)) { - $this->executePaymentNotFound(); - } - - $this->ifthenpayModule = \Module::getInstanceByName('ifthenpay'); - $this->cart = \Context::getContext()->cart; - $this->customer = PrestashopModelFactory::buildCustomer((string) $this->cart->id_customer); - $this->redirectUrl = \Context::getContext()->link->getPageLink('order-confirmation', true) . - '?id_cart=' . $this->request['cartId'] . '&id_module=' . (int)$this->ifthenpayModule->id . '&id_order=' . $this->order->id . '&key=' . - $this->customer->secure_key . '&paymentOption=' . $this->paymentMethod; - } - - private function redirectUser($type, $message) - { - $controller = \Context::getContext()->controller; - $notificationType = $type === 'success' ? 'success' : 'errors'; - - $controller->$notificationType[] = $this->ifthenpayModule->l($message, pathinfo(__FILE__)['filename']); - $controller->redirectWithNotifications($this->redirectUrl); - } - - public function process() - { - try { - $this->setupContext(); - $paymentStatus = Status::getTokenStatus(Token::decrypt($this->request['qn'])); - - if ($this->paymentData['status'] === 'pending') { - - switch ($this->paymentMethod) { - case self::CCARD: - $this->processCcardPayment($paymentStatus); - break; - case self::COFIDISPAY: - $this->processCofidisPayment($paymentStatus); - break; - default: - throw new \Exception('Invalid payment method'); - } - } - if ($this->paymentData['status'] === 'cancel') { - $this->redirectUser('cancel', $this->ifthenpayModule->l('Order has already been canceled by the customer', Utility::getClassName($this))); - return; - } - if ($this->paymentData['status'] === 'error') { - $this->redirectUser('error', sprintf($this->ifthenpayModule->l('Error processing %s payment', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); - return; - } - if ($this->paymentData['status'] === 'paid') { - $this->redirectUser('error', $this->ifthenpayModule->l('Order has already been paid', Utility::getClassName($this))); - return; - } - - } catch (\Throwable $th) { - $this->handleError($th); - } - } - - private function processCcardPayment($paymentStatus) - { - if ($paymentStatus === 'success') { - if ($this->request['sk'] !== TokenExtra::encript( - $this->request['id'] . $this->request['amount'] . $this->request['requestId'], - \Configuration::get( - $this->setPaymentKey($this->paymentMethod) - ) - )) { - throw new \Exception($this->ifthenpayModule->l('Invalid security token', Utility::getClassName($this))); - } - $orderTotal = floatval(Utility::convertPriceToEuros($this->order)); - $requestValor = floatval($this->request['amount']); - - if (round($orderTotal, 2) !== round($requestValor, 2)) { - IfthenpayLogProcess::addLog('Payment value by ' . $this->paymentMethod . ' not valid - ' . print_r($_GET), IfthenpayLogProcess::ERROR, $this->order->id); - \Context::getContext()->controller[] = sprintf($this->ifthenpayModule->l('Payment by %s not valid', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay')); - \Context::getContext()->controller->redirectWithNotifications($this->redirectUrl); - } - - $this->changeIfthenpayPaymentStatus('paid'); - $this->changePrestashopOrderStatus(\Configuration::get('IFTHENPAY_' . \Tools::strtoupper($this->paymentMethod) . '_OS_CONFIRMED')); - IfthenpayLogProcess::addLog('Payment by ' . $this->paymentMethod . ' made with success', IfthenpayLogProcess::INFO, $this->order->id); - $this->redirectUser('success', sprintf($this->ifthenpayModule->l('Payment by %s made with success', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); - } else if ($paymentStatus === 'cancel') { - $this->handleCanceledTransaction(); - } else { - $this->changeIfthenpayPaymentStatus('error'); - $this->changePrestashopOrderStatus(\Configuration::get('PS_OS_ERROR')); - - // prepare error message - $errorMsg = '{}'; - if (isset($this->request['error'])) { - $errorData = Utility::extractArrayWithKeys($this->request, ['error', 'id', 'amount', 'requestId']); - $errorMsg = Utility::dataToString($errorData); - } - $errorMsg = $errorMsg === '{}' ? 'error data not found' : $errorMsg; - - IfthenpayLogProcess::addLog("Error processing " . $this->paymentMethod . " payment - $errorMsg", IfthenpayLogProcess::INFO, $this->order->id); - $this->redirectUser('error', sprintf($this->ifthenpayModule->l('Error processing %s payment', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); - } - } - - private function processCofidisPayment($paymentStatus) - { - if ($paymentStatus !== 'success') { - throw new \Exception($this->ifthenpayModule->l('Invalid security token', Utility::getClassName($this))); - } - - // Sleep 5 seconds because error, cancel, not approved may not be present right after returning with error from cofidis - $transactionStatusArray = []; - $attempt = 0; - do { - $transactionStatusArray = $this->getCofidisTransactionStatus(); - if (count($transactionStatusArray) > 1) { - break; - } - sleep(5); - $attempt++; - } while ($attempt < 2); - - foreach ($transactionStatusArray as $transactionStatus) { - switch ($transactionStatus['statusCode']) { - case self::COFIDIS_STATUS_INITIATED: - case self::COFIDIS_STATUS_PENDING_INVOICE: - if ($this->request['Success'] === 'True') { - $this->handleSuccessfulTransaction(); - } - break; - case self::COFIDIS_STATUS_CANCELED: - $this->handleCanceledCofidisTransaction($transactionStatusArray); - case self::COFIDIS_STATUS_NOT_APPROVED: - $this->handleNotApprovedPayment(); - case self::COFIDIS_STATUS_TECHNICAL_ERROR: - $this->handleTechnicalError(); - default: - throw new \Exception($transactionStatus['statusCode'] . " status"); - } - } - } - - private function handleSuccessfulTransaction() { - IfthenpayLogProcess::addLog('Awaiting by ' . $this->paymentMethod . ' invoice', IfthenpayLogProcess::INFO, $this->order->id); - $this->redirectUser('success', sprintf($this->ifthenpayModule->l('Payment by %s made with success', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); - } - private function handleCanceledCofidisTransaction($transactionStatusArray) { - foreach ($transactionStatusArray as $transactionStatus) { - if ($transactionStatus['statusCode'] === self::COFIDIS_STATUS_TECHNICAL_ERROR) { - $this->changeIfthenpayPaymentStatus('cancel'); - $this->changePrestashopOrderStatus(\Configuration::get('PS_OS_CANCELED')); - IfthenpayLogProcess::addLog('Payment by ' . $this->paymentMethod . ' canceled due to technical error from Cofidis', IfthenpayLogProcess::INFO, $this->order->id); - $this->redirectUser('cancel', sprintf($this->ifthenpayModule->l('Payment by %s canceled', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); - } - } - $this->handleCanceledTransaction(); - } - private function handleCanceledTransaction() { - $this->changeIfthenpayPaymentStatus('cancel'); - $this->changePrestashopOrderStatus(\Configuration::get('PS_OS_CANCELED')); - IfthenpayLogProcess::addLog('Payment by ' . $this->paymentMethod . ' canceled by the customer', IfthenpayLogProcess::INFO, $this->order->id); - $this->redirectUser('cancel', sprintf($this->ifthenpayModule->l('Payment by %s canceled', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); - } - private function handleNotApprovedPayment() { - $this->changeIfthenpayPaymentStatus('cancel'); + private $ifthenpayModule; + private $cart; + private $customer; + private $redirectUrl; + const CCARD = 'ccard'; + const COFIDISPAY = 'cofidispay'; + const CCARD_KEY = 'IFTHENPAY_CCARD_KEY'; + const COFIDIS_KEY = 'IFTHENPAY_COFIDIS_KEY'; + const COFIDIS_STATUS_INITIATED = 'INITIATED'; + const COFIDIS_STATUS_PENDING_INVOICE = 'PENDING_INVOICE'; + const COFIDIS_STATUS_CANCELED = 'CANCELED'; + const COFIDIS_STATUS_NOT_APPROVED = 'NOT_APPROVED'; + const COFIDIS_STATUS_TECHNICAL_ERROR = 'TECHNICAL_ERROR'; + const COFIDIS_ENDPOINT_STATUS = 'https://ifthenpay.com/api/cofidis/status'; + const IFTHENPAYGATEWAY = 'ifthenpaygateway'; + const IFTHENPAYGATEWAY_KEY = 'IFTHENPAY_IFTHENPAYGATEWAY_KEY'; + + + private function setPaymentKey($paymentMethod) + { + switch ($paymentMethod) { + case self::CCARD: + return self::CCARD_KEY; + case self::COFIDISPAY: + return self::COFIDIS_KEY; + case self::IFTHENPAYGATEWAY: + return self::IFTHENPAYGATEWAY_KEY; + default: + throw new \Exception('Invalid payment method'); + } + } + private function setupContext() + { + $this->request[Cb::PAYMENT] = $this->paymentMethod; + $this->setPaymentData(); + $this->setOrder(); + + if (empty($this->paymentData)) { + $this->executePaymentNotFound(); + } + + $this->ifthenpayModule = \Module::getInstanceByName('ifthenpay'); + $this->cart = \Context::getContext()->cart; + $this->customer = PrestashopModelFactory::buildCustomer((string) $this->cart->id_customer); + $this->redirectUrl = \Context::getContext()->link->getPageLink('order-confirmation', true) . + '?id_cart=' . $this->request['cartId'] . '&id_module=' . (int)$this->ifthenpayModule->id . '&id_order=' . $this->order->id . '&key=' . + $this->customer->secure_key . '&paymentOption=' . $this->paymentMethod; + } + + private function redirectUser($type, $message) + { + $controller = \Context::getContext()->controller; + $notificationType = $type === 'success' ? 'success' : 'errors'; + + $controller->$notificationType[] = $this->ifthenpayModule->l($message, pathinfo(__FILE__)['filename']); + $controller->redirectWithNotifications($this->redirectUrl); + } + + public function process() + { + try { + $this->setupContext(); + $paymentStatus = Status::getTokenStatus(Token::decrypt($this->request['qn'])); + + if ($this->paymentData['status'] === 'pending') { + + switch ($this->paymentMethod) { + case self::CCARD: + $this->processCcardPayment($paymentStatus); + break; + case self::COFIDISPAY: + $this->processCofidisPayment($paymentStatus); + break; + case self::IFTHENPAYGATEWAY: + $this->processIfthenpaygatewayPayment($paymentStatus); + break; + default: + throw new \Exception('Invalid payment method'); + } + } + if ($this->paymentData['status'] === 'cancel') { + $this->redirectUser('cancel', $this->ifthenpayModule->l('Order has already been canceled by the customer', Utility::getClassName($this))); + return; + } + if ($this->paymentData['status'] === 'error') { + $this->redirectUser('error', sprintf($this->ifthenpayModule->l('Error processing %s payment', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); + return; + } + if ($this->paymentData['status'] === 'paid') { + $this->redirectUser('error', $this->ifthenpayModule->l('Order has already been paid', Utility::getClassName($this))); + return; + } + } catch (\Throwable $th) { + $this->handleError($th); + } + } + + private function processCcardPayment($paymentStatus) + { + if ($paymentStatus === 'success') { + if ($this->request['sk'] !== TokenExtra::encript( + $this->request['id'] . $this->request['amount'] . $this->request['requestId'], + \Configuration::get( + $this->setPaymentKey($this->paymentMethod) + ) + )) { + throw new \Exception($this->ifthenpayModule->l('Invalid security token', Utility::getClassName($this))); + } + $orderTotal = floatval(Utility::convertPriceToEuros($this->order)); + $requestValor = floatval($this->request['amount']); + + if (round($orderTotal, 2) !== round($requestValor, 2)) { + IfthenpayLogProcess::addLog('Payment value by ' . $this->paymentMethod . ' not valid - ' . print_r($_GET), IfthenpayLogProcess::ERROR, $this->order->id); + \Context::getContext()->controller[] = sprintf($this->ifthenpayModule->l('Payment by %s not valid', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay')); + \Context::getContext()->controller->redirectWithNotifications($this->redirectUrl); + } + + $this->changeIfthenpayPaymentStatus('paid'); + $this->changePrestashopOrderStatus(\Configuration::get('IFTHENPAY_' . \Tools::strtoupper($this->paymentMethod) . '_OS_CONFIRMED')); + IfthenpayLogProcess::addLog('Payment by ' . $this->paymentMethod . ' made with success', IfthenpayLogProcess::INFO, $this->order->id); + $this->redirectUser('success', sprintf($this->ifthenpayModule->l('Payment by %s made with success', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); + } else if ($paymentStatus === 'cancel') { + $this->handleCanceledTransaction(); + } else { + $this->changeIfthenpayPaymentStatus('error'); + $this->changePrestashopOrderStatus(\Configuration::get('PS_OS_ERROR')); + + // prepare error message + $errorMsg = '{}'; + if (isset($this->request['error'])) { + $errorData = Utility::extractArrayWithKeys($this->request, ['error', 'id', 'amount', 'requestId']); + $errorMsg = Utility::dataToString($errorData); + } + $errorMsg = $errorMsg === '{}' ? 'error data not found' : $errorMsg; + + IfthenpayLogProcess::addLog("Error processing " . $this->paymentMethod . " payment - $errorMsg", IfthenpayLogProcess::INFO, $this->order->id); + $this->redirectUser('error', sprintf($this->ifthenpayModule->l('Error processing %s payment', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); + } + } + + private function processCofidisPayment($paymentStatus) + { + if ($paymentStatus !== 'success') { + throw new \Exception($this->ifthenpayModule->l('Invalid security token', Utility::getClassName($this))); + } + + // Sleep 5 seconds because error, cancel, not approved may not be present right after returning with error from cofidis + $transactionStatusArray = []; + $attempt = 0; + do { + $transactionStatusArray = $this->getCofidisTransactionStatus(); + if (count($transactionStatusArray) > 1) { + break; + } + sleep(5); + $attempt++; + } while ($attempt < 2); + + foreach ($transactionStatusArray as $transactionStatus) { + switch ($transactionStatus['statusCode']) { + case self::COFIDIS_STATUS_INITIATED: + case self::COFIDIS_STATUS_PENDING_INVOICE: + if ($this->request['Success'] === 'True') { + $this->handleSuccessfulTransaction(); + } + break; + case self::COFIDIS_STATUS_CANCELED: + $this->handleCanceledCofidisTransaction($transactionStatusArray); + case self::COFIDIS_STATUS_NOT_APPROVED: + $this->handleNotApprovedPayment(); + case self::COFIDIS_STATUS_TECHNICAL_ERROR: + $this->handleTechnicalError(); + default: + throw new \Exception($transactionStatus['statusCode'] . " status"); + } + } + } + + private function handleSuccessfulTransaction() + { + IfthenpayLogProcess::addLog('Awaiting by ' . $this->paymentMethod . ' invoice', IfthenpayLogProcess::INFO, $this->order->id); + $this->redirectUser('success', sprintf($this->ifthenpayModule->l('Payment by %s made with success', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); + } + private function handleCanceledCofidisTransaction($transactionStatusArray) + { + foreach ($transactionStatusArray as $transactionStatus) { + if ($transactionStatus['statusCode'] === self::COFIDIS_STATUS_TECHNICAL_ERROR) { + $this->changeIfthenpayPaymentStatus('cancel'); + $this->changePrestashopOrderStatus(\Configuration::get('PS_OS_CANCELED')); + IfthenpayLogProcess::addLog('Payment by ' . $this->paymentMethod . ' canceled due to technical error from Cofidis', IfthenpayLogProcess::INFO, $this->order->id); + $this->redirectUser('cancel', sprintf($this->ifthenpayModule->l('Payment by %s canceled', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); + } + } + $this->handleCanceledTransaction(); + } + private function handleCanceledTransaction() + { + $this->changeIfthenpayPaymentStatus('cancel'); + $this->changePrestashopOrderStatus(\Configuration::get('PS_OS_CANCELED')); + IfthenpayLogProcess::addLog('Payment by ' . $this->paymentMethod . ' canceled by the customer', IfthenpayLogProcess::INFO, $this->order->id); + $this->redirectUser('cancel', sprintf($this->ifthenpayModule->l('Payment by %s canceled', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); + } + private function handleNotApprovedPayment() + { + $this->changeIfthenpayPaymentStatus('cancel'); $this->changePrestashopOrderStatus(\Configuration::get('IFTHENPAY_' . \Tools::strtoupper($this->paymentMethod) . '_OS_NOT_APPROVED')); IfthenpayLogProcess::addLog('Payment by ' . $this->paymentMethod . ' not approved by Cofidis', IfthenpayLogProcess::INFO, $this->order->id); $this->redirectUser('cancel', sprintf($this->ifthenpayModule->l('Payment by %s not approved', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); - } - private function handleTechnicalError() { - $this->changeIfthenpayPaymentStatus('cancel'); - $this->changePrestashopOrderStatus(\Configuration::get('PS_OS_CANCELED')); - IfthenpayLogProcess::addLog('Payment by ' . $this->paymentMethod . ' canceled due to technical error from Cofidis', IfthenpayLogProcess::INFO, $this->order->id); - $this->redirectUser('cancel', sprintf($this->ifthenpayModule->l('Payment by %s canceled due to technical error', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); - } - - private function getCofidisTransactionStatus() - { - $webservice = RequestFactory::buildWebservice(); - return $webservice->postRequest( - self::COFIDIS_ENDPOINT_STATUS, - [ - "cofidisKey" => \Configuration::get($this->setPaymentKey($this->paymentMethod)), - "requestId" => $this->paymentData['transaction_id'] - ], - true - )->getResponseJson(); - } - - private function handleError(\Throwable $th) - { - $this->changeIfthenpayPaymentStatus('error'); - $this->changePrestashopOrderStatus(\Configuration::get('PS_OS_ERROR')); - - IfthenpayLogProcess::addLog('Error processing ' . $this->paymentMethod . ' callback - ' . $th->getMessage(), IfthenpayLogProcess::ERROR, $this->order->id); - $this->redirectUser('error', sprintf($this->ifthenpayModule->l('Error processing %s payment', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); - } + } + private function handleTechnicalError() + { + $this->changeIfthenpayPaymentStatus('cancel'); + $this->changePrestashopOrderStatus(\Configuration::get('PS_OS_CANCELED')); + IfthenpayLogProcess::addLog('Payment by ' . $this->paymentMethod . ' canceled due to technical error from Cofidis', IfthenpayLogProcess::INFO, $this->order->id); + $this->redirectUser('cancel', sprintf($this->ifthenpayModule->l('Payment by %s canceled due to technical error', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); + } + + private function getCofidisTransactionStatus() + { + $webservice = RequestFactory::buildWebservice(); + return $webservice->postRequest( + self::COFIDIS_ENDPOINT_STATUS, + [ + "cofidisKey" => \Configuration::get($this->setPaymentKey($this->paymentMethod)), + "requestId" => $this->paymentData['transaction_id'] + ], + true + )->getResponseJson(); + } + + + + private function processIfthenpaygatewayPayment($paymentStatus) + { + if ($paymentStatus === 'pending') { + IfthenpayLogProcess::addLog('Payment by ' . $this->paymentMethod . ' is awaiting payment', IfthenpayLogProcess::INFO, $this->order->id); + $this->redirectUser('success', sprintf($this->ifthenpayModule->l('Payment by %s awaiting verification', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); + } else if ($paymentStatus === 'success') { + $this->changeIfthenpayPaymentStatus('pending'); + IfthenpayLogProcess::addLog('Payment by ' . $this->paymentMethod . ' made with success, awaiting verification', IfthenpayLogProcess::INFO, $this->order->id); + $this->redirectUser('success', sprintf($this->ifthenpayModule->l('Payment by %s made with success, awaiting verification', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); + } else if ($paymentStatus === 'cancel') { + $this->changeIfthenpayPaymentStatus('cancel'); + $this->changePrestashopOrderStatus(\Configuration::get('PS_OS_CANCELED')); + IfthenpayLogProcess::addLog('Payment by ' . $this->paymentMethod . ' canceled by the customer', IfthenpayLogProcess::INFO, $this->order->id); + $this->redirectUser('cancel', sprintf($this->ifthenpayModule->l('Payment by %s canceled', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); + } else { + $this->changeIfthenpayPaymentStatus('error'); + $this->changePrestashopOrderStatus(\Configuration::get('PS_OS_ERROR')); + + // prepare error message + $errorMsg = '{}'; + if (isset($this->request['error'])) { + $errorData = Utility::extractArrayWithKeys($this->request, ['error', 'id', 'amount', 'requestId']); + $errorMsg = Utility::dataToString($errorData); + } + $errorMsg = $errorMsg === '{}' ? 'error data not found' : $errorMsg; + + IfthenpayLogProcess::addLog("Error processing " . $this->paymentMethod . " payment - $errorMsg", IfthenpayLogProcess::INFO, $this->order->id); + $this->redirectUser('error', sprintf($this->ifthenpayModule->l('Error processing %s payment', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); + } + } + + + + private function handleError(\Throwable $th) + { + $this->changeIfthenpayPaymentStatus('error'); + $this->changePrestashopOrderStatus(\Configuration::get('PS_OS_ERROR')); + + IfthenpayLogProcess::addLog('Error processing ' . $this->paymentMethod . ' callback - ' . $th->getMessage(), IfthenpayLogProcess::ERROR, $this->order->id); + $this->redirectUser('error', sprintf($this->ifthenpayModule->l('Error processing %s payment', Utility::getClassName($this)), $this->ifthenpayModule->l($this->paymentMethod, 'ifthenpay'))); + } } diff --git a/ifthenpay/classes/Callback/CallbackProcess.php b/ifthenpay/classes/Callback/CallbackProcess.php index 2723e90..6542c08 100644 --- a/ifthenpay/classes/Callback/CallbackProcess.php +++ b/ifthenpay/classes/Callback/CallbackProcess.php @@ -42,12 +42,12 @@ class CallbackProcess protected $order; protected $request; - + /** * Set the value of paymentMethod * * @return self - */ + */ public function setPaymentMethod($paymentMethod) { $this->paymentMethod = $paymentMethod; @@ -59,18 +59,17 @@ public function setPaymentMethod($paymentMethod) * Set the value of paymentData * * @return self - */ + */ protected function setPaymentData() { - $this->paymentData = CallbackFactory::buildCalllbackData($_GET)->execute(); - + $this->paymentData = CallbackFactory::buildCalllbackData($this->request)->execute(); } /** * Set the value of order * * @return self - */ + */ protected function setOrder() { $this->order = PrestashopModelFactory::buildOrder($this->paymentData['order_id']); @@ -89,10 +88,10 @@ protected function changeIfthenpayPaymentStatus($status) //WORKAROUND: odd behaviour from prestashop model object, it loses the transaction_id of the order for Ccard, so there is a need to set it in the next two lines if($this->paymentMethod == 'ccard' && isset($this->paymentData['transaction_id'])){ - $ifthenpayModel->transaction_id = $this->paymentData['transaction_id']; + $ifthenpayModel->transaction_id = $this->paymentData['transaction_id']; } if($this->paymentMethod == 'cofidispay' && isset($this->paymentData['transaction_id'])){ - $ifthenpayModel->transaction_id = $this->paymentData['transaction_id']; + $ifthenpayModel->transaction_id = $this->paymentData['transaction_id']; } $ifthenpayModel->status = $status; $ifthenpayModel->update(); @@ -110,11 +109,11 @@ protected function changePrestashopOrderStatus($statusId) * Set the value of request * * @return self - */ + */ public function setRequest($request) { $this->request = $request; return $this; - } -} \ No newline at end of file + } +} diff --git a/ifthenpay/classes/Callback/CallbackStrategy.php b/ifthenpay/classes/Callback/CallbackStrategy.php index cec0d7b..e20e901 100644 --- a/ifthenpay/classes/Callback/CallbackStrategy.php +++ b/ifthenpay/classes/Callback/CallbackStrategy.php @@ -26,6 +26,7 @@ namespace PrestaShop\Module\Ifthenpay\Callback; use PrestaShop\Module\Ifthenpay\Log\IfthenpayLogProcess; +use PrestaShop\Module\Ifthenpay\Callback\CallbackVars as Cb; if (!defined('_PS_VERSION_')) { exit; @@ -33,13 +34,13 @@ class CallbackStrategy -{ +{ public function execute($request) { - if ($request['type'] === 'offline') { - return (new CallbackOffline())->setPaymentMethod($request['payment'])->setRequest($request)->process(); - } else if ($request['type'] === 'online') { - return (new CallbackOnline())->setPaymentMethod($request['payment'])->setRequest($request)->process(); + if ($request[Cb::TYPE] === 'offline') { + return (new CallbackOffline())->setPaymentMethod($request[Cb::PAYMENT])->setRequest($request)->process(); + } else if ($request[Cb::TYPE] === 'online') { + return (new CallbackOnline())->setPaymentMethod($request[Cb::PAYMENT])->setRequest($request)->process(); } else { IfthenpayLogProcess::addLog('Callback payment type is not defined', IfthenpayLogProcess::INFO, 0); throw new \Exception('Callback payment type is not defined'); diff --git a/ifthenpay/classes/Callback/CallbackValidate.php b/ifthenpay/classes/Callback/CallbackValidate.php index ee23b68..c1c122f 100644 --- a/ifthenpay/classes/Callback/CallbackValidate.php +++ b/ifthenpay/classes/Callback/CallbackValidate.php @@ -25,6 +25,8 @@ namespace PrestaShop\Module\Ifthenpay\Callback; +use PrestaShop\Module\Ifthenpay\Callback\CallbackVars as Cb; + if (!defined('_PS_VERSION_')) { exit; } @@ -55,7 +57,7 @@ private function validateOrder() private function validateOrderValue() { $orderTotal = floatval($this->order->getOrdersTotalPaid()); - $requestValor = floatval($this->httpRequest['valor']); + $requestValor = floatval($this->httpRequest[Cb::AMOUNT]); if (round($orderTotal, 2) !== round($requestValor, 2)) { throw new \Exception('Valor não corresponde ao valor da encomenda.'); } @@ -70,11 +72,11 @@ private function validateOrderStatus() private function validateChaveAntiPhishing() { - if (!$this->httpRequest['chave']) { + if (!$this->httpRequest[Cb::ANTIPHISH_KEY]) { throw new \Exception('Chave Anti-Phishing não foi enviada.'); } - if ($this->httpRequest['chave'] !== $this->configurationChaveAntiPhishing) { + if ($this->httpRequest[Cb::ANTIPHISH_KEY] !== $this->configurationChaveAntiPhishing) { throw new \Exception('Chave Anti-Phishing não é válida.'); } } diff --git a/ifthenpay/classes/Callback/CallbackVars.php b/ifthenpay/classes/Callback/CallbackVars.php new file mode 100644 index 0000000..9ae178e --- /dev/null +++ b/ifthenpay/classes/Callback/CallbackVars.php @@ -0,0 +1,21 @@ +userPaymentMethods = $userPaymentMethods; - $this->configurationNames = [ - 'IFTHENPAY_USER_PAYMENT_METHODS', - 'IFTHENPAY_BACKOFFICE_KEY', - 'IFTHENPAY_USER_PAYMENT_METHODS', - 'IFTHENPAY_USER_ACCOUNT', - 'IFTHENPAY_UPDATE_USER_ACCOUNT_TOKEN', - 'IFTHENPAY_ACTIVATE_SANDBOX_MODE', - ]; - } - - private function uninstallByPaymentMethod() - { - - - \Configuration::deleteByName('IFTHENPAY_BACKOFFICE_KEY'); - \Configuration::deleteByName('IFTHENPAY_USER_PAYMENT_METHODS'); - \Configuration::deleteByName('IFTHENPAY_USER_ACCOUNT'); - \Configuration::deleteByName('IFTHENPAY_ACTIVATE_SANDBOX_MODE'); - \Configuration::deleteByName('IFTHENPAY_PAYMENT_METHODS_SAVED'); - - - - foreach ($this->userPaymentMethods as $paymentMethod) { - if ($paymentMethod) { - - \Configuration::deleteByName('IFTHENPAY_' . \Tools::strtoupper($paymentMethod) . '_OS_WAITING'); - \Configuration::deleteByName('IFTHENPAY_' . \Tools::strtoupper($paymentMethod) . '_OS_CONFIRMED'); - \Configuration::deleteByName('IFTHENPAY_' . \Tools::strtoupper($paymentMethod)); - - \Configuration::deleteByName('IFTHENPAY_CALLBACK_ACTIVATED_FOR_' . strtoupper($paymentMethod)); - \Configuration::deleteByName('IFTHENPAY_' . strtoupper($paymentMethod . '_MINIMUM')); - \Configuration::deleteByName('IFTHENPAY_' . strtoupper($paymentMethod . '_MAXIMUM')); - \Configuration::deleteByName('IFTHENPAY_' . strtoupper($paymentMethod . '_COUNTRIES')); - \Configuration::deleteByName('IFTHENPAY_' . strtoupper($paymentMethod . '_ORDER')); - \Configuration::deleteByName('IFTHENPAY_' . strtoupper($paymentMethod)); - - switch ($paymentMethod) { - case 'multibanco': - \Configuration::deleteByName('IFTHENPAY_MULTIBANCO_ENTIDADE'); - \Configuration::deleteByName('IFTHENPAY_MULTIBANCO_SUBENTIDADE'); - \Configuration::deleteByName('IFTHENPAY_MULTIBANCO_VALIDADE'); - \Configuration::deleteByName('IFTHENPAY_MULTIBANCO_URL_CALLBACK'); - \Configuration::deleteByName('IFTHENPAY_MULTIBANCO_CHAVE_ANTI_PHISHING'); - \Configuration::deleteByName('IFTHENPAY_MULTIBANCO_CANCEL_ORDER_AFTER_TIMEOUT'); - break; - case 'mbway': - \Configuration::deleteByName('IFTHENPAY_MBWAY_KEY'); - \Configuration::deleteByName('IFTHENPAY_MBWAY_URL_CALLBACK'); - \Configuration::deleteByName('IFTHENPAY_MBWAY_CHAVE_ANTI_PHISHING'); - \Configuration::deleteByName('IFTHENPAY_MBWAY_CANCEL_ORDER_AFTER_TIMEOUT'); - \Configuration::deleteByName('IFTHENPAY_MBWAY_SHOW_COUNTDOWN'); - \Configuration::deleteByName('IFTHENPAY_MBWAY_CANCEL_ORDER_AFTER_TIMEOUT'); - \Configuration::deleteByName('IFTHENPAY_MBWAY_REFUND'); - break; - case 'payshop': - \Configuration::deleteByName('IFTHENPAY_PAYSHOP_KEY'); - \Configuration::deleteByName('IFTHENPAY_PAYSHOP_VALIDADE'); - \Configuration::deleteByName('IFTHENPAY_PAYSHOP_URL_CALLBACK'); - \Configuration::deleteByName('IFTHENPAY_PAYSHOP_CHAVE_ANTI_PHISHING'); - \Configuration::deleteByName('IFTHENPAY_PAYSHOP_CANCEL_ORDER_AFTER_TIMEOUT'); - break; - case 'ccard': - \Configuration::deleteByName('IFTHENPAY_CCARD_KEY'); - \Configuration::deleteByName('IFTHENPAY_CCARD_CANCEL_ORDER_AFTER_TIMEOUT'); - \Configuration::deleteByName('IFTHENPAY_CCARD_REFUND'); - break; - case 'cofidispay': - \Configuration::deleteByName('IFTHENPAY_COFIDIS_KEY'); - \Configuration::deleteByName('IFTHENPAY_COFIDIS_CANCEL_ORDER_AFTER_TIMEOUT'); - break; - default: - } - } - } - } - - public function install() - { - //not need install - } - - public function uninstall() - { - foreach ($this->configurationNames as $configurationName) { - \Configuration::deleteByName($configurationName); - } - if ($this->userPaymentMethods) { - $this->uninstallByPaymentMethod(); - } - } + private $configurationNames; + private $userPaymentMethods; + + public function __construct($userPaymentMethods) + { + $this->userPaymentMethods = $userPaymentMethods; + $this->configurationNames = [ + 'IFTHENPAY_USER_PAYMENT_METHODS', + 'IFTHENPAY_BACKOFFICE_KEY', + 'IFTHENPAY_USER_PAYMENT_METHODS', + 'IFTHENPAY_USER_ACCOUNT', + 'IFTHENPAY_UPDATE_USER_ACCOUNT_TOKEN', + 'IFTHENPAY_ACTIVATE_SANDBOX_MODE', + ]; + } + + private function uninstallByPaymentMethod() + { + + + \Configuration::deleteByName('IFTHENPAY_BACKOFFICE_KEY'); + \Configuration::deleteByName('IFTHENPAY_USER_PAYMENT_METHODS'); + \Configuration::deleteByName('IFTHENPAY_USER_ACCOUNT'); + \Configuration::deleteByName('IFTHENPAY_ACTIVATE_SANDBOX_MODE'); + \Configuration::deleteByName('IFTHENPAY_PAYMENT_METHODS_SAVED'); + + + + foreach ($this->userPaymentMethods as $paymentMethod) { + if ($paymentMethod) { + + \Configuration::deleteByName('IFTHENPAY_' . \Tools::strtoupper($paymentMethod) . '_OS_WAITING'); + \Configuration::deleteByName('IFTHENPAY_' . \Tools::strtoupper($paymentMethod) . '_OS_CONFIRMED'); + \Configuration::deleteByName('IFTHENPAY_' . \Tools::strtoupper($paymentMethod)); + + \Configuration::deleteByName('IFTHENPAY_CALLBACK_ACTIVATED_FOR_' . strtoupper($paymentMethod)); + \Configuration::deleteByName('IFTHENPAY_' . strtoupper($paymentMethod . '_MINIMUM')); + \Configuration::deleteByName('IFTHENPAY_' . strtoupper($paymentMethod . '_MAXIMUM')); + \Configuration::deleteByName('IFTHENPAY_' . strtoupper($paymentMethod . '_COUNTRIES')); + \Configuration::deleteByName('IFTHENPAY_' . strtoupper($paymentMethod . '_ORDER')); + \Configuration::deleteByName('IFTHENPAY_' . strtoupper($paymentMethod)); + + switch ($paymentMethod) { + case 'multibanco': + \Configuration::deleteByName('IFTHENPAY_MULTIBANCO_ENTIDADE'); + \Configuration::deleteByName('IFTHENPAY_MULTIBANCO_SUBENTIDADE'); + \Configuration::deleteByName('IFTHENPAY_MULTIBANCO_VALIDADE'); + \Configuration::deleteByName('IFTHENPAY_MULTIBANCO_URL_CALLBACK'); + \Configuration::deleteByName('IFTHENPAY_MULTIBANCO_CHAVE_ANTI_PHISHING'); + \Configuration::deleteByName('IFTHENPAY_MULTIBANCO_CANCEL_ORDER_AFTER_TIMEOUT'); + break; + case 'mbway': + \Configuration::deleteByName('IFTHENPAY_MBWAY_KEY'); + \Configuration::deleteByName('IFTHENPAY_MBWAY_URL_CALLBACK'); + \Configuration::deleteByName('IFTHENPAY_MBWAY_CHAVE_ANTI_PHISHING'); + \Configuration::deleteByName('IFTHENPAY_MBWAY_CANCEL_ORDER_AFTER_TIMEOUT'); + \Configuration::deleteByName('IFTHENPAY_MBWAY_SHOW_COUNTDOWN'); + \Configuration::deleteByName('IFTHENPAY_MBWAY_CANCEL_ORDER_AFTER_TIMEOUT'); + \Configuration::deleteByName('IFTHENPAY_MBWAY_REFUND'); + break; + case 'payshop': + \Configuration::deleteByName('IFTHENPAY_PAYSHOP_KEY'); + \Configuration::deleteByName('IFTHENPAY_PAYSHOP_VALIDADE'); + \Configuration::deleteByName('IFTHENPAY_PAYSHOP_URL_CALLBACK'); + \Configuration::deleteByName('IFTHENPAY_PAYSHOP_CHAVE_ANTI_PHISHING'); + \Configuration::deleteByName('IFTHENPAY_PAYSHOP_CANCEL_ORDER_AFTER_TIMEOUT'); + break; + case 'ccard': + \Configuration::deleteByName('IFTHENPAY_CCARD_KEY'); + \Configuration::deleteByName('IFTHENPAY_CCARD_CANCEL_ORDER_AFTER_TIMEOUT'); + \Configuration::deleteByName('IFTHENPAY_CCARD_REFUND'); + break; + case 'cofidispay': + \Configuration::deleteByName('IFTHENPAY_COFIDIS_KEY'); + \Configuration::deleteByName('IFTHENPAY_COFIDIS_CANCEL_ORDER_AFTER_TIMEOUT'); + break; + case 'ifthenpaygateway': + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_KEY'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_METHODS'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_DEFAULT_METHOD'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_DEADLINE'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_CLOSE_BTN'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_CANCEL_ORDER_AFTER_TIMEOUT'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_SHOW_LOGO'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_TITLE'); + break; + default: + } + } + } + } + + public function install() + { + //not need install + } + + public function uninstall() + { + foreach ($this->configurationNames as $configurationName) { + \Configuration::deleteByName($configurationName); + } + if ($this->userPaymentMethods) { + $this->uninstallByPaymentMethod(); + } + } } diff --git a/ifthenpay/classes/Config/IfthenpaySql.php b/ifthenpay/classes/Config/IfthenpaySql.php index f12a5b3..d6012ec 100644 --- a/ifthenpay/classes/Config/IfthenpaySql.php +++ b/ifthenpay/classes/Config/IfthenpaySql.php @@ -29,7 +29,7 @@ use PrestaShop\Module\Ifthenpay\Log\IfthenpayLogProcess; if (!defined('_PS_VERSION_')) { - exit; + exit; } use PrestaShop\Module\Ifthenpay\Utility\Utility; @@ -37,11 +37,11 @@ class IfthenpaySql implements InstallerInterface { - private $ifthenpayModule; - private $userPaymentMethods; - private $ifthenpayStatusKeys; - private $ifthenpaySqlTables = [ - 'multibanco' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_multibanco` ( + private $ifthenpayModule; + private $userPaymentMethods; + private $ifthenpayStatusKeys; + private $ifthenpaySqlTables = [ + 'multibanco' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_multibanco` ( `id_ifthenpay_multibanco` int(10) unsigned NOT NULL auto_increment, `entidade` varchar(5) NOT NULL, `referencia` varchar(9) NOT NULL, @@ -52,7 +52,7 @@ class IfthenpaySql implements InstallerInterface PRIMARY KEY (`id_ifthenpay_multibanco`), INDEX `referencia` (`referencia`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;', - 'mbway' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_mbway` ( + 'mbway' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_mbway` ( `id_ifthenpay_mbway` int(10) unsigned NOT NULL auto_increment, `transaction_id` varchar(20) NOT NULL, `telemovel` varchar(20) NOT NULL, @@ -61,7 +61,7 @@ class IfthenpaySql implements InstallerInterface PRIMARY KEY (`id_ifthenpay_mbway`), INDEX `transaction_id` (`transaction_id`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;', - 'payshop' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_payshop` ( + 'payshop' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_payshop` ( `id_ifthenpay_payshop` int(10) unsigned NOT NULL auto_increment, `transaction_id` varchar(20) NOT NULL, `referencia` varchar(13) NOT NULL, @@ -71,7 +71,7 @@ class IfthenpaySql implements InstallerInterface PRIMARY KEY (`id_ifthenpay_payshop`), INDEX `transaction_id` (`transaction_id`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;', - 'ccard' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_ccard` ( + 'ccard' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_ccard` ( `id_ifthenpay_ccard` int(10) unsigned NOT NULL auto_increment, `transaction_id` varchar(50) NOT NULL, `order_id` int(11) NOT NULL, @@ -79,45 +79,59 @@ class IfthenpaySql implements InstallerInterface PRIMARY KEY (`id_ifthenpay_ccard`), INDEX `transaction_id` (`transaction_id`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;', - 'cofidispay' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_cofidispay` ( + 'cofidispay' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_cofidispay` ( `id_ifthenpay_cofidispay` int(10) unsigned NOT NULL auto_increment, `transaction_id` varchar(50) NOT NULL, `order_id` int(11) NOT NULL, `status` varchar(50) NOT NULL, PRIMARY KEY (`id_ifthenpay_cofidispay`), INDEX `transaction_id` (`transaction_id`) - ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;', - ]; + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;', + 'ifthenpaygateway' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_ifthenpaygateway` ( + `id_ifthenpay_ifthenpaygateway` int(10) unsigned NOT NULL auto_increment, + `order_id` int(11) NOT NULL, + `status` varchar(50) NOT NULL, + `payment_url` varchar(255) NOT NULL, + `deadline` varchar(10) NOT NULL, + PRIMARY KEY (`id_ifthenpay_ifthenpaygateway`), + INDEX `order_id` (`order_id`) + ) ENGINE=MyISAM DEFAULT CHARSET=utf8;', + ]; - private $storeSql = [ - 'multibanco' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_multibanco_shop` ( + private $storeSql = [ + 'multibanco' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_multibanco_shop` ( `id_ifthenpay_multibanco` int(10) unsigned NOT NULL auto_increment, `id_shop` int(10) unsigned NOT NULL, PRIMARY KEY (`id_ifthenpay_multibanco`, `id_shop`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;', - 'mbway' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_mbway_shop` ( + 'mbway' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_mbway_shop` ( `id_ifthenpay_mbway` int(10) unsigned NOT NULL auto_increment, `id_shop` int(10) unsigned NOT NULL, PRIMARY KEY (`id_ifthenpay_mbway`, `id_shop`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;', - 'payshop' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_payshop_shop` ( + 'payshop' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_payshop_shop` ( `id_ifthenpay_payshop` int(10) unsigned NOT NULL auto_increment, `id_shop` int(10) unsigned NOT NULL, PRIMARY KEY (`id_ifthenpay_payshop`, `id_shop`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;', - 'ccard' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_ccard_shop` ( + 'ccard' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_ccard_shop` ( `id_ifthenpay_ccard` int(10) unsigned NOT NULL auto_increment, `id_shop` int(10) unsigned NOT NULL, PRIMARY KEY (`id_ifthenpay_ccard`, `id_shop`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;', - 'cofidispay' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_cofidispay_shop` ( + 'cofidispay' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_cofidispay_shop` ( `id_ifthenpay_cofidispay` int(10) unsigned NOT NULL auto_increment, `id_shop` int(10) unsigned NOT NULL, PRIMARY KEY (`id_ifthenpay_cofidispay`, `id_shop`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;', - ]; + 'ifthenpaygateway' => 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_ifthenpaygateway_shop` ( + `id_ifthenpay_ifthenpaygateway` int(10) unsigned NOT NULL auto_increment, + `id_shop` int(10) unsigned NOT NULL, + PRIMARY KEY (`id_ifthenpay_ifthenpaygateway`, `id_shop`) + ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;', + ]; - private $ifthenpaySqlLogTable = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_log` ( + private $ifthenpaySqlLogTable = 'CREATE TABLE IF NOT EXISTS `' . _DB_PREFIX_ . 'ifthenpay_log` ( `id_ifthenpay_log` int(10) unsigned NOT NULL auto_increment, `type` varchar(50) NOT NULL, `message` varchar(250) NOT NULL, @@ -126,139 +140,139 @@ class IfthenpaySql implements InstallerInterface PRIMARY KEY (`id_ifthenpay_log`) ) ENGINE=' . _MYSQL_ENGINE_ . ' DEFAULT CHARSET=utf8;'; - public function __construct($userPaymentMethods = null) - { - $this->userPaymentMethods = $userPaymentMethods; - $this->ifthenpayStatusKeys = ['IFTHENPAY_{paymentMethod}_OS_WAITING', 'IFTHENPAY_{paymentMethod}_OS_CONFIRMED']; - } + public function __construct($userPaymentMethods = null) + { + $this->userPaymentMethods = $userPaymentMethods; + $this->ifthenpayStatusKeys = ['IFTHENPAY_{paymentMethod}_OS_WAITING', 'IFTHENPAY_{paymentMethod}_OS_CONFIRMED']; + } + + private function migrate_from_17_to_8() + { + $tablesToCheck = array( + array('name' => _DB_PREFIX_ . 'ifthenpay_multibanco', 'oldColumnName' => 'request_id'), + array('name' => _DB_PREFIX_ . 'ifthenpay_mbway', 'oldColumnName' => 'id_transacao'), + array('name' => _DB_PREFIX_ . 'ifthenpay_ccard', 'oldColumnName' => 'requestId'), + array('name' => _DB_PREFIX_ . 'ifthenpay_payshop', 'oldColumnName' => 'id_transacao') + ); - private function migrate_from_17_to_8() - { - $tablesToCheck = array( - array('name' => _DB_PREFIX_ . 'ifthenpay_multibanco', 'oldColumnName' => 'request_id'), - array('name' => _DB_PREFIX_ . 'ifthenpay_mbway', 'oldColumnName' => 'id_transacao'), - array('name' => _DB_PREFIX_ . 'ifthenpay_ccard', 'oldColumnName' => 'requestId'), - array('name' => _DB_PREFIX_ . 'ifthenpay_payshop', 'oldColumnName' => 'id_transacao') - ); + foreach ($tablesToCheck as $tableInfo) { - foreach ($tablesToCheck as $tableInfo) { + $columnCheckResult = $this->checkColumnsExistence($tableInfo['name'], $tableInfo['oldColumnName']); - $columnCheckResult = $this->checkColumnsExistence($tableInfo['name'], $tableInfo['oldColumnName']); + if ($columnCheckResult == 1) { + $this->alterColumnName($tableInfo['name'], $tableInfo['oldColumnName']); + } + } + } - if ($columnCheckResult == 1) { - $this->alterColumnName($tableInfo['name'], $tableInfo['oldColumnName']); - } - } - } + function checkColumnsExistence($tableName, $oldColumnName) + { + $db = \Db::getInstance(); + $dbNameQuery = 'SELECT DATABASE()'; + $dbName = $db->getValue($dbNameQuery); - function checkColumnsExistence($tableName, $oldColumnName) - { - $db = \Db::getInstance(); - $dbNameQuery = 'SELECT DATABASE()'; - $dbName = $db->getValue($dbNameQuery); - - $query = 'SELECT COUNT(*) AS column_exists + $query = 'SELECT COUNT(*) AS column_exists FROM information_schema.columns WHERE table_name = \'' . pSQL($tableName) . '\' AND table_schema = \'' . pSQL($dbName) . '\' AND column_name = \'' . pSQL($oldColumnName) . '\''; - - $count = $db->getValue($query); - - return $count > 0 ? 1 : 0; - } - function alterColumnName($tableName, $oldColumnName, $newColumnName = 'transaction_id') - { - $alterQuery = 'ALTER TABLE `' . pSQL($tableName) . '` + $count = $db->getValue($query); + + return $count > 0 ? 1 : 0; + } + + function alterColumnName($tableName, $oldColumnName, $newColumnName = 'transaction_id') + { + $alterQuery = 'ALTER TABLE `' . pSQL($tableName) . '` CHANGE `' . pSQL($oldColumnName) . '` `' . pSQL($newColumnName) . '` VARCHAR(20) NULL'; - $result = \Db::getInstance()->execute($alterQuery); + $result = \Db::getInstance()->execute($alterQuery); - IfthenpayLogProcess::addLog('Ran migration script (alterColumnName()) for table ' . $tableName . ' with result code = ' . $result, IfthenpayLogProcess::INFO, 0); - } + IfthenpayLogProcess::addLog('Ran migration script (alterColumnName()) for table ' . $tableName . ' with result code = ' . $result, IfthenpayLogProcess::INFO, 0); + } - private function createShopSql() - { - foreach ($this->userPaymentMethods as $paymentMethod) { - $sql = \Db::getInstance()->execute($this->storeSql[$paymentMethod]); - if (!$sql) { - throw new \Exception($this->ifthenpayModule->l('Error creating ifthenpay payment shop table!', pathinfo(__FILE__)['filename'])); - } - } - } + private function createShopSql() + { + foreach ($this->userPaymentMethods as $paymentMethod) { + $sql = \Db::getInstance()->execute($this->storeSql[$paymentMethod]); + if (!$sql) { + throw new \Exception($this->ifthenpayModule->l('Error creating ifthenpay payment shop table!', pathinfo(__FILE__)['filename'])); + } + } + } - private function createIfthenpaySql() - { - foreach ($this->userPaymentMethods as $paymentMethod) { - $sql = \Db::getInstance()->execute($this->ifthenpaySqlTables[$paymentMethod]); - if (!$sql) { - throw new \Exception($this->ifthenpayModule->l('Error creating ifthenpay payment table!', pathinfo(__FILE__)['filename'])); - } - } - } + private function createIfthenpaySql() + { + foreach ($this->userPaymentMethods as $paymentMethod) { + $sql = \Db::getInstance()->execute($this->ifthenpaySqlTables[$paymentMethod]); + if (!$sql) { + throw new \Exception($this->ifthenpayModule->l('Error creating ifthenpay payment table!', pathinfo(__FILE__)['filename'])); + } + } + } - public function createIfthenpayLogSql() - { - $sql = \Db::getInstance()->execute($this->ifthenpaySqlLogTable); - if (!$sql) { - throw new \Exception($this->ifthenpayModule->l('Error creating ifthenpay log table!', pathinfo(__FILE__)['filename'])); - } - } + public function createIfthenpayLogSql() + { + $sql = \Db::getInstance()->execute($this->ifthenpaySqlLogTable); + if (!$sql) { + throw new \Exception($this->ifthenpayModule->l('Error creating ifthenpay log table!', pathinfo(__FILE__)['filename'])); + } + } - private function deleteIfthenpaySql() - { - foreach ($this->userPaymentMethods as $paymentMethod) { - $sql = \Db::getInstance()->execute('DROP TABLE IF EXISTS ' . _DB_PREFIX_ . 'ifthenpay_' . $paymentMethod); - if (!$sql) { - throw new \Exception($this->ifthenpayModule->l('Error deleting ifthenpay payment table!', pathinfo(__FILE__)['filename'])); - } - } - } + private function deleteIfthenpaySql() + { + foreach ($this->userPaymentMethods as $paymentMethod) { + $sql = \Db::getInstance()->execute('DROP TABLE IF EXISTS ' . _DB_PREFIX_ . 'ifthenpay_' . $paymentMethod); + if (!$sql) { + throw new \Exception($this->ifthenpayModule->l('Error deleting ifthenpay payment table!', pathinfo(__FILE__)['filename'])); + } + } + } - private function deleteShopSql() - { - foreach ($this->userPaymentMethods as $paymentMethod) { - $sql = \Db::getInstance()->execute('DROP TABLE IF EXISTS ' . _DB_PREFIX_ . 'ifthenpay_' . $paymentMethod . '_shop'); - if (!$sql) { - throw new \Exception($this->ifthenpayModule->l('Error deleting ifthenpay payment shop table!', pathinfo(__FILE__)['filename'])); - } - } - } + private function deleteShopSql() + { + foreach ($this->userPaymentMethods as $paymentMethod) { + $sql = \Db::getInstance()->execute('DROP TABLE IF EXISTS ' . _DB_PREFIX_ . 'ifthenpay_' . $paymentMethod . '_shop'); + if (!$sql) { + throw new \Exception($this->ifthenpayModule->l('Error deleting ifthenpay payment shop table!', pathinfo(__FILE__)['filename'])); + } + } + } - private function deleteIfthenpayLogSql() - { - $sql = \Db::getInstance()->execute('DROP TABLE IF EXISTS ' . _DB_PREFIX_ . 'ifthenpay_log'); - if (!$sql) { - throw new \Exception($this->ifthenpayModule->l('Error deleting ifthenpay log table!', pathinfo(__FILE__)['filename'])); - } - } + private function deleteIfthenpayLogSql() + { + $sql = \Db::getInstance()->execute('DROP TABLE IF EXISTS ' . _DB_PREFIX_ . 'ifthenpay_log'); + if (!$sql) { + throw new \Exception($this->ifthenpayModule->l('Error deleting ifthenpay log table!', pathinfo(__FILE__)['filename'])); + } + } - public function install() - { - $this->createIfthenpaySql(); - $this->createShopSql(); - $this->migrate_from_17_to_8(); - } + public function install() + { + $this->createIfthenpaySql(); + $this->createShopSql(); + $this->migrate_from_17_to_8(); + } - public function uninstall() - { - if ($this->userPaymentMethods) { - $this->deleteIfthenpaySql(); - $this->deleteShopSql(); - } - $this->deleteIfthenpayLogSql(); - } + public function uninstall() + { + if ($this->userPaymentMethods) { + $this->deleteIfthenpaySql(); + $this->deleteShopSql(); + } + $this->deleteIfthenpayLogSql(); + } - /** - * Set the value of ifthenpayModule - * - * @return self - */ - public function setIfthenpayModule($ifthenpayModule) - { - $this->ifthenpayModule = $ifthenpayModule; + /** + * Set the value of ifthenpayModule + * + * @return self + */ + public function setIfthenpayModule($ifthenpayModule) + { + $this->ifthenpayModule = $ifthenpayModule; - return $this; - } + return $this; + } } diff --git a/ifthenpay/classes/Factory/Admin/AdminOrderFactory.php b/ifthenpay/classes/Factory/Admin/AdminOrderFactory.php index a6c9fe0..ae5f44d 100644 --- a/ifthenpay/classes/Factory/Admin/AdminOrderFactory.php +++ b/ifthenpay/classes/Factory/Admin/AdminOrderFactory.php @@ -1,4 +1,5 @@ form = [ - 'form' => [ - 'legend' => [ - 'title' => \Tools::ucfirst($this->paymentMethod) . ' ' . $this->ifthenpayModule->l('Settings', pathinfo(__FILE__)['filename']), - 'icon' => 'icon-cogs', + protected function setFormParent(string $title = '') + { + + $title = $title != '' ? $title : $this->paymentMethod; + + $this->form = [ + 'form' => [ + 'legend' => [ + 'title' => \Tools::ucfirst($title) . ' ' . $this->ifthenpayModule->l('Settings', pathinfo(__FILE__)['filename']), + 'icon' => 'icon-cogs', ], 'input' => [ [ @@ -458,12 +461,12 @@ protected function isValid() if (!preg_match( "/^[0-9]+([.][0-9]{3})*$/" , $minimum) && $minimum != '') { Utility::setPrestashopCookie('error', 'Inputted Minimum Order Value is not valid'); return false; - } - + } + if (!preg_match( "/^[0-9]+([.][0-9]{3})*$/" , $maximum) && $maximum != '') { Utility::setPrestashopCookie('error', 'Inputted Maximum Order Value is not valid'); return false; - } + } if ($minimum > $maximum && $minimum != '' && $maximum != '') { Utility::setPrestashopCookie('error', 'Inputted Minimum Order Value is larger than Maximum Order Value'); @@ -478,7 +481,7 @@ protected function isValid() if (!preg_match( "/^[0-9]+([.][0-9])*$/" , $order) && $order != '') { Utility::setPrestashopCookie('error', 'Inputted Order Value is not valid'); return false; - } + } return true; } diff --git a/ifthenpay/classes/Forms/IfthenpaygatewayConfigForm.php b/ifthenpay/classes/Forms/IfthenpaygatewayConfigForm.php new file mode 100644 index 0000000..e739483 --- /dev/null +++ b/ifthenpay/classes/Forms/IfthenpaygatewayConfigForm.php @@ -0,0 +1,726 @@ + + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace PrestaShop\Module\Ifthenpay\Forms; + +if (!defined('_PS_VERSION_')) { + exit; +} + +use Configuration; +use PrestaShop\Module\Ifthenpay\Forms\ConfigForm; +use PrestaShop\Module\Ifthenpay\Utility\Utility; + +class IfthenpaygatewayConfigForm extends ConfigForm +{ + protected $paymentMethod = 'ifthenpaygateway'; + + protected $subEntityOptions = []; // array of subentity options for GUI select + protected $options = []; // array of entity options for GUI select + + + /** + * "gets" the form into object... it sets the form that will display in the payment method configuration + * + * @return void + */ + public function getForm() + { + // assign template variables + $this->setSmartyVariables(); + + $this->setFormParent('Ifthenpay Gateway'); + $this->setGatewayKeyOptions(); + + + $this->addActivateCallbackToForm(); + + + // GATEWAY KEY + $this->form['form']['input'][] = [ + + 'type' => 'html', + 'name' => 'IFTHENPAY_IFTHENPAYGATEWAY_KEY', + 'required' => true, + 'html_content' => $this->generateSelectGatewayKey($this->ifthenpayGateway->getIthenpaygatewayKeys(), \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_KEY')), + 'label' => $this->ifthenpayModule->l('Gateway Key', pathinfo(__FILE__)['filename']), + 'desc' => $this->ifthenpayModule->l('Choose Key', pathinfo(__FILE__)['filename']), + ]; + + + // PAYMENT METHODS + $storedMethods = \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_METHODS'); + $storedMethods = $storedMethods ? json_decode($storedMethods, true) : []; + $paymentMethodsSelectionHtml = $this->generateIfthenpaygatewayPaymentMethodsHtml(Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_KEY'), $storedMethods); + + $this->form['form']['input'][] = [ + 'type' => 'html', + 'name' => 'IFTHENPAY_IFTHENPAYGATEWAY_PAYMENT_METHODS', + 'html_content' => '
' . $paymentMethodsSelectionHtml . '
', + 'label' => $this->ifthenpayModule->l('Payment Methods', pathinfo(__FILE__)['filename']) + ]; + + + // DEFAULT METHOD + $defaultPaymentMethodSelectionHtml = $this->generateIfthenpaygatewayDefaultPaymentMethodSelectionHtml(Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_KEY')); + + $this->form['form']['input'][] = [ + 'type' => 'html', + 'name' => 'IFTHENPAY_IFTHENPAYGATEWAY_DEFAULT_METHOD', + 'html_content' => '
' . $defaultPaymentMethodSelectionHtml . '
', + 'label' => $this->ifthenpayModule->l('Default Payment Method', pathinfo(__FILE__)['filename']) + ]; + + + // PAYMENT DEADLINE + $this->form['form']['input'][] = [ + 'type' => 'text', + 'label' => $this->ifthenpayModule->l('Deadline', pathinfo(__FILE__)['filename']), + 'name' => 'IFTHENPAY_IFTHENPAYGATEWAY_DEADLINE', + 'desc' => $this->ifthenpayModule->l('Choose the number of days (from 1 to 99), leave empty if you do not want expiration.', pathinfo(__FILE__)['filename']) + ]; + + + // Gateway Close Button Text + $this->form['form']['input'][] = [ + 'type' => 'text', + 'label' => $this->ifthenpayModule->l('Gateway Close Button Text', pathinfo(__FILE__)['filename']), + 'name' => 'IFTHENPAY_IFTHENPAYGATEWAY_CLOSE_BTN', + 'desc' => $this->ifthenpayModule->l('Replaces the return button text in the gateway page. Leave empty to use default.', pathinfo(__FILE__)['filename']) + ]; + + + // CANCEL AFTER DEADLINE + $this->form['form']['input'][] = [ + 'type' => 'switch', + 'label' => $this->ifthenpayModule->l('Cancel Ifthenpay Gateway Order', pathinfo(__FILE__)['filename']), + 'name' => 'IFTHENPAY_IFTHENPAYGATEWAY_CANCEL_ORDER_AFTER_TIMEOUT', + 'desc' => $this->ifthenpayModule->l('Cancel order if not payed before end of Deadline. Requires Deadline to be set. This is triggered when admin visits the order list page.', pathinfo(__FILE__)['filename']), + 'is_bool' => true, + 'values' => [ + [ + 'id' => 'active_on', + 'value' => true, + 'label' => $this->ifthenpayModule->l('Activated', pathinfo(__FILE__)['filename']) + ], + [ + 'id' => 'active_off', + 'value' => false, + 'label' => $this->ifthenpayModule->l('Disabled', pathinfo(__FILE__)['filename']) + ] + ] + ]; + + + // add min max and country form elements + $this->addMinMaxFieldsToForm(); + $this->addCountriesFieldToForm(); + + + $this->form['form']['input'][] = [ + 'type' => 'select', + 'label' => $this->ifthenpayModule->l('Show Payment Method Logo on Checkout', pathinfo(__FILE__)['filename']), + 'name' => 'IFTHENPAY_IFTHENPAYGATEWAY_SHOW_LOGO', + 'options' => [ + 'query' => [ + ['id' => '1', 'name' => $this->ifthenpayModule->l('Enabled - Use Default Image', pathinfo(__FILE__)['filename'])], + ['id' => '0', 'name' => $this->ifthenpayModule->l('Disabled - Use Payment Method Title', pathinfo(__FILE__)['filename'])], + ['id' => 'composite', 'name' => $this->ifthenpayModule->l('Enabled - Use Generated Composite Image', pathinfo(__FILE__)['filename'])], + ], + 'id' => 'id', + 'name' => 'name' + ] + ]; + + $this->form['form']['input'][] = [ + 'type' => 'text', + 'label' => $this->ifthenpayModule->l('Payment Method Title', pathinfo(__FILE__)['filename']), + 'name' => 'IFTHENPAY_IFTHENPAYGATEWAY_TITLE', + ]; + + + $this->addOrderByNumberFieldsToForm(); + + // generate form + $this->generateHelperForm(); + } + + protected function getConfigFormValues() + { + return array_merge(parent::getCommonConfigFormValues(), [ + 'IFTHENPAY_IFTHENPAYGATEWAY_CLOSE_BTN' => \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_CLOSE_BTN'), + 'IFTHENPAY_IFTHENPAYGATEWAY_DEADLINE' => \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_DEADLINE'), + 'IFTHENPAY_IFTHENPAYGATEWAY_KEY' => \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_KEY'), + 'IFTHENPAY_IFTHENPAYGATEWAY_CANCEL_ORDER_AFTER_TIMEOUT' => \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_CANCEL_ORDER_AFTER_TIMEOUT'), + 'IFTHENPAY_IFTHENPAYGATEWAY_TITLE' => \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_TITLE') == '' ? 'Ifthenpay Gateway' : \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_TITLE'), + 'IFTHENPAY_IFTHENPAYGATEWAY_SHOW_LOGO' => \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_SHOW_LOGO') != false ? \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_SHOW_LOGO') : '1', + ]); + } + + public function setSmartyVariables() + { + // common to all payment methods + parent::assignSmartyPayMethodsCommonVars(); + } + + public function setGatewayBuilderData() + { + $getKeyFromRequest = \Tools::getValue('IFTHENPAY_IFTHENPAYGATEWAY_KEY'); + $getPaymentMethodsFromRequest = \Tools::getValue('IFTHENPAY_IFTHENPAYGATEWAY_METHODS'); + $getDefaultMethodFromRequest = \Tools::getValue('IFTHENPAY_IFTHENPAYGATEWAY_DEFAULT_METHOD'); + $getDeadlineFromRequest = \Tools::getValue('IFTHENPAY_IFTHENPAYGATEWAY_DEADLINE'); + $getTitleFromRequest = \Tools::getValue('IFTHENPAY_IFTHENPAYGATEWAY_TITLE'); + $getShowLogoFromRequest = \Tools::getValue('IFTHENPAY_IFTHENPAYGATEWAY_SHOW_LOGO'); + $getCloseBtn = \Tools::getValue('IFTHENPAY_IFTHENPAYGATEWAY_CLOSE_BTN'); + + parent::setGatewayBuilderData(); + $this->gatewayDataBuilder->setKey($getKeyFromRequest ? $getKeyFromRequest : \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_KEY')); + $this->gatewayDataBuilder->setSelectableMethods($getPaymentMethodsFromRequest ? json_encode($getPaymentMethodsFromRequest) : \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_METHODS')); + $this->gatewayDataBuilder->setDefaultMethod($getDefaultMethodFromRequest ? $getDefaultMethodFromRequest : \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_DEFAULT_METHOD')); + $this->gatewayDataBuilder->setDeadline($getDeadlineFromRequest); + $this->gatewayDataBuilder->setCloseBtn($getCloseBtn); + $this->gatewayDataBuilder->setTitle($getTitleFromRequest ? $getTitleFromRequest : \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_TITLE')); + $this->gatewayDataBuilder->setShowLogo($getShowLogoFromRequest != '' ? $getShowLogoFromRequest : \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_SHOW_LOGO')); + } + + public function processForm() + { + if ($this->isValid()) { + + $this->setGatewayBuilderData(); + + if ( + !$this->generateAndSavePaymentLogo(json_decode($this->gatewayDataBuilder->getData()->selectableMethods, true), $this->gatewayDataBuilder->getData()->showLogo) + ) { + return; + } + + // save specific values + \Configuration::updateValue('IFTHENPAY_IFTHENPAYGATEWAY_KEY', $this->gatewayDataBuilder->getData()->key); + \Configuration::updateValue('IFTHENPAY_IFTHENPAYGATEWAY_DEFAULT_METHOD', $this->gatewayDataBuilder->getData()->defaultMethod); + \Configuration::updateValue('IFTHENPAY_IFTHENPAYGATEWAY_DEADLINE', $this->gatewayDataBuilder->getData()->deadline); + \Configuration::updateValue('IFTHENPAY_IFTHENPAYGATEWAY_CLOSE_BTN', $this->gatewayDataBuilder->getData()->closeBtn); + \Configuration::updateValue('IFTHENPAY_IFTHENPAYGATEWAY_TITLE', $this->gatewayDataBuilder->getData()->title); + \Configuration::updateValue('IFTHENPAY_IFTHENPAYGATEWAY_SHOW_LOGO', $this->gatewayDataBuilder->getData()->showLogo); + \Configuration::updateValue('IFTHENPAY_IFTHENPAYGATEWAY_CANCEL_ORDER_AFTER_TIMEOUT', \Tools::getValue('IFTHENPAY_IFTHENPAYGATEWAY_CANCEL_ORDER_AFTER_TIMEOUT')); + + + // can activate callback? + $canActivateCallback = !\Configuration::get('IFTHENPAY_ACTIVATE_SANDBOX_MODE', false) && + \Tools::getValue('IFTHENPAY_CALLBACK_ACTIVATE_FOR_' . strtoupper($this->paymentMethod)); + + if ($canActivateCallback) { + $this->bulkActivateCallbacks(); + } + + // update methods after checking if necessary to activate callback + \Configuration::updateValue('IFTHENPAY_IFTHENPAYGATEWAY_METHODS', $this->gatewayDataBuilder->getData()->selectableMethods); + + + + + $this->updatePayMethodCommonValues(); + + // response msg after submiting form + Utility::setPrestashopCookie('success', $this->ifthenpayModule->l(ucfirst($this->paymentMethod) . ' payment method successfully updated.', pathinfo(__FILE__)['filename'])); + } + } + + + + private function generateAndSavePaymentLogo($paymentMethodGroups, $paymentLogoType): bool + { + // exit early if is only showing text instead of logo + if ($paymentLogoType == '0') { + return true; + } + + if ( + !function_exists('imagecreatefrompng') || + !function_exists('imagesx') || + !function_exists('imagesy') || + !function_exists('imagedestroy') || + !function_exists('imagecreatetruecolor') || + !function_exists('imagecolorallocatealpha') || + !function_exists('imagefill') || + !function_exists('imagesavealpha') || + !function_exists('imagecopyresampled') || + !function_exists('imagecopy') || + !function_exists('imagepng') + ) { + Utility::setPrestashopCookie('error', 'Missing image edit dependencies required to create composite image', pathinfo(__FILE__)['filename']); + return false; + } + + + if ( + !file_exists(_PS_MODULE_DIR_ . 'ifthenpay/views/img/ifthenpaygateway_option_default.png') || + !file_exists(_PS_MODULE_DIR_ . 'ifthenpay/views/img/ifthenpaygateway_option.png') || + !is_writable(_PS_MODULE_DIR_ . 'ifthenpay/views/img/ifthenpaygateway_option_default.png') || + !is_writable(_PS_MODULE_DIR_ . 'ifthenpay/views/img/ifthenpaygateway_option.png') + ) { + Utility::setPrestashopCookie('error', 'Missing file permissions required to create composite image', pathinfo(__FILE__)['filename']); + return false; + } + + $paymentLogos = array_map(function ($item) { + + if ($item['is_active'] == '1') { + return $item['image_url'] ?? null; + } + }, $paymentMethodGroups); + $paymentLogos = array_filter($paymentLogos); + + if ($paymentLogoType != 'composite' || count($paymentLogos) <= 0) { + + copy(_PS_MODULE_DIR_ . 'ifthenpay/views/img/ifthenpaygateway_option_default.png', _PS_MODULE_DIR_ . 'ifthenpay/views/img/ifthenpaygateway_option.png'); + return true; + } + + $canvasHeight = 38; + $innerLayerHeight = 26; + $verticalSpacing = 6; + $horizontalSpacing = 10; + + + $combinedWidth = 0; + $combinedHeight = $canvasHeight; + + + foreach ($paymentLogos as $url) { + $image = imagecreatefrompng($url); + $width = imagesx($image); + $height = imagesy($image); + + if ($height != $innerLayerHeight) { + + $width = intval(($innerLayerHeight * $width) / $height); + $height = $innerLayerHeight; + } + + $combinedWidth += $width; + imagedestroy($image); // Destroy immediately after size calculation + } + + $combinedWidth += ($horizontalSpacing * (count($paymentLogos) - 1)); + + $combinedImage = imagecreatetruecolor($combinedWidth, $combinedHeight); + $transparentColor = imagecolorallocatealpha($combinedImage, 0, 0, 0, 127); + imagefill($combinedImage, 0, 0, $transparentColor); + imagesavealpha($combinedImage, true); + + $currentX = 0; + foreach ($paymentLogos as $url) { + $image = imagecreatefrompng($url); + $width = imagesx($image); + $height = imagesy($image); + + if ($height != $innerLayerHeight) { + $resizedWidth = intval(($innerLayerHeight * $width) / $height); + $resizedImage = imagecreatetruecolor($resizedWidth, $canvasHeight); + + $transparentColor = imagecolorallocatealpha($resizedImage, 0, 0, 0, 127); + imagefill($resizedImage, 0, 0, $transparentColor); + imagesavealpha($resizedImage, true); + + imagecopyresampled($resizedImage, $image, 0, 0, 0, 0, $resizedWidth, $innerLayerHeight, $width, $height); + imagecopy($combinedImage, $resizedImage, $currentX, $verticalSpacing, 0, 0, $resizedWidth, $innerLayerHeight); + $currentX += $resizedWidth + $horizontalSpacing; + + imagedestroy($resizedImage); + } else { + imagecopy($combinedImage, $image, $currentX, 0, 0, 0, $width, $height); + $currentX += $width + $horizontalSpacing; + } + + imagedestroy($image); + } + + imagepng($combinedImage, _PS_MODULE_DIR_ . 'ifthenpay/views/img/ifthenpaygateway_option.png'); + + imagedestroy($combinedImage); + + return true; + } + + + + private function bulkActivateCallbacks() + { + + $paymentMethods = $this->gatewayDataBuilder->getData()->selectableMethods ? json_decode($this->gatewayDataBuilder->getData()->selectableMethods, true) : []; + $storedPaymentMethods = Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_METHODS'); + $storedPaymentMethods = $storedPaymentMethods ? json_decode($storedPaymentMethods, true) : []; + + $paymentMethodsToActivate = []; + + if ( + empty($storedPaymentMethods) || + (!\Configuration::get('IFTHENPAY_CALLBACK_ACTIVATE_FOR_IFTHENPAYGATEWAY', false) && + \Tools::getValue('IFTHENPAY_CALLBACK_ACTIVATE_FOR_IFTHENPAYGATEWAY')) + ) { + $paymentMethodsToActivate = array_filter($paymentMethods, fn($item) => $item['is_active'] === '1'); + } else { + foreach ($paymentMethods as $key => $paymentMethod) { + + if ( + (isset($storedPaymentMethods[$key]) && $storedPaymentMethods[$key]['is_active'] === '0' && $paymentMethod['is_active'] === '1') || + (!isset($storedPaymentMethods[$key]) && $paymentMethod['is_active'] === '1') + ) { + $paymentMethodsToActivate[$key] = $paymentMethod; + } + } + } + + if (!empty($paymentMethodsToActivate)) { + + $antiPhishingKey = Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_CHAVE_ANTI_PHISHING'); + + foreach ($paymentMethodsToActivate as $key => $values) { + + $paymentMethodEntitySubentity = explode('|', $values['account']); + $paymentMethodEntity = trim($paymentMethodEntitySubentity[0]); + $paymentMethodSubEntity = trim($paymentMethodEntitySubentity[1]); + + $this->gatewayDataBuilder->setEntidade($paymentMethodEntity); + $this->gatewayDataBuilder->setSubEntidade($paymentMethodSubEntity); + $ifthenpayCallback = $this->getIfthenpayCallback(); + + $ifthenpayCallback->activateIfthenpayGatewayCallback($this->getCallbackControllerUrl(), true, $antiPhishingKey); + } + + \Configuration::updateValue('IFTHENPAY_' . strtoupper($this->paymentMethod) . '_URL_CALLBACK', $ifthenpayCallback->getUrlCallback()); + \Configuration::updateValue('IFTHENPAY_' . strtoupper($this->paymentMethod) . '_CHAVE_ANTI_PHISHING', $ifthenpayCallback->getChaveAntiPhishing()); + } + } + + + /** + * verifies if form inputs are valid + * makes use of parent function that verifies common inputs such as min and max + * + * @return boolean + */ + public function isValid() + { + if (!parent::isValid()) { + return false; + } + + $key = \Tools::getValue('IFTHENPAY_' . strtoupper($this->paymentMethod) . '_KEY'); + if ($key == '') { + Utility::setPrestashopCookie('error', 'Selected Key is not valid', pathinfo(__FILE__)['filename']); + return false; + } + + $deadline = \Tools::getValue('IFTHENPAY_' . strtoupper($this->paymentMethod) . '_DEADLINE'); + if ( + isset($deadline) && + $deadline !== '' && + ((is_numeric($deadline) ? intval($deadline) != $deadline : true) || intval($deadline) <= 0) + ) { + Utility::setPrestashopCookie('error', 'Selected Deadline is not valid', pathinfo(__FILE__)['filename']); + return false; + } + + return true; + } + + public function deleteConfigValues() + { + $this->deleteCommonConfigValues(); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_KEY'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_DEFAULT_METHOD'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_METHODS'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_SHOW_LOGO'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_TITLE'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_DEADLINE'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_CLOSE_BTN'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_URL_CALLBACK'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_CHAVE_ANTI_PHISHING'); + \Configuration::deleteByName('IFTHENPAY_IFTHENPAYGATEWAY_CANCEL_ORDER_AFTER_TIMEOUT'); + } + + + /** + * generates an assoc array specifically for populating the select box of deadline of dynamic ifthenpaygateway reference + * + * @return void + */ + public function getDeadlineOptions() + { + $options = array(); + + $options[] = array( + "id" => '999999', + "name" => $this->ifthenpayModule->l('No Deadline', pathinfo(__FILE__)['filename']) + ); + + for ($i = 0; $i < 32; $i++) { + $options[] = array( + "id" => $i, + "name" => $i + ); + } + foreach ([45, 60, 90, 120] as $val) { + $options[] = array( + "id" => $val, + "name" => $val + ); + } + + return $options; + } + + + private function setGatewayKeyOptions() + { + + $gatewayKeys = $this->ifthenpayGateway->getIthenpaygatewayKeys(); + + foreach ($gatewayKeys as $gatewayKey) { + $this->options[] = [ + 'value' => $gatewayKey['GatewayKey'], + 'name' => $gatewayKey['Alias'], + 'type' => $gatewayKey['Tipo'] + ]; + } + } + + public function getGatewayKeySettingsFromConfig(string $gatewayKey): array + { + $ifthenpaygatewayAccounts = (array) unserialize($this->ifthenpayController->config->get('payment_ifthenpaygateway_userAccount')) ?? []; + + $gatewayKeySettings = array_filter($ifthenpaygatewayAccounts, function ($item) use ($gatewayKey) { + if ($item['GatewayKey'] === $gatewayKey) { + return true; + } + }); + + $gatewayKeySettings = reset($gatewayKeySettings); + return $gatewayKeySettings; + } + + + + private function generateSelectGatewayKey(array $gatewayKeys, string $selectedKey = '') + { + $optionsHtml = ''; + + foreach ($gatewayKeys as $gatewayKey) { + $selectedStr = $gatewayKey['GatewayKey'] === $selectedKey ? 'selected=""' : ''; + + $optionsHtml .= ''; + } + + $html = ''; + + return $html; + } + + + private function isGatewayKeyStatic(array $gatewayKeySettings): bool + { + return $gatewayKeySettings['Tipo'] === 'Estáticas'; + } + + + + public function generateIfthenpaygatewayDefaultPaymentMethodSelectionHtml(string $ifthenpaygatewayKey): string + { + + $storedDefaultPaymentMethod = Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_DEFAULT_PAYMENT_METHOD'); + + + + if ($ifthenpaygatewayKey == '') { + return '

' . $this->ifthenpayModule->l('Please select a Ifthenpay Gateway key to view this field.', pathinfo(__FILE__)['filename']) . '

'; + } + + + $backofficeKey = Configuration::get('IFTHENPAY_BACKOFFICE_KEY'); + + $paymentMethodGroupArray = $this->ifthenpayGateway->getIfthenpayGatewayPaymentMethodsDataByBackofficeKeyAndGatewayKey($backofficeKey, $ifthenpaygatewayKey); + + + $html = ''; + + $index = 0; + $accountOptions = ''; + + foreach ($paymentMethodGroupArray as $paymentMethodGroup) { + $index++; + + $isDisabled = ''; + if (isset($storedMethods[$paymentMethodGroup['Entity']]['is_active'])) { + $isDisabled = $storedMethods[$paymentMethodGroup['Entity']]['is_active'] ? '' : 'disabled'; + } + // disable option if no accounts exist + if (empty($paymentMethodGroup['accounts'])) { + $isDisabled = 'disabled'; + } + + $selectedStr = $index == $storedDefaultPaymentMethod ? 'selected' : ''; + + $accountOptions .= <<{$paymentMethodGroup['Method']}' + HTML; + } + + + $html = << + {$accountOptions} + + HTML; + + + return $html; + } + + + public function generateIfthenpaygatewayPaymentMethodsHtml(string $ifthenpaygatewayKey, array $storedMethods): string + { + if ($ifthenpaygatewayKey == '') { + return '

' . $this->ifthenpayModule->l('Please select a Ifthenpay Gateway key to view this field.', pathinfo(__FILE__)['filename']) . '

'; + } + + + $backofficeKey = \Configuration::get('IFTHENPAY_BACKOFFICE_KEY'); + + $paymentMethodGroupArray = $this->ifthenpayGateway->getIfthenpayGatewayPaymentMethodsDataByBackofficeKeyAndGatewayKey($backofficeKey, $ifthenpaygatewayKey); + + $gatewayKeySettings = $this->ifthenpayGateway->getIthenpaygatewayKeys(); + + + $isStaticGatewayKey = $this->isGatewayKeyStatic($gatewayKeySettings); + $html = ''; + + $hiddenInputs = ''; + foreach ($paymentMethodGroupArray as $paymentMethodGroup) { + + if (isset($paymentMethodGroup['IsVisible']) && $paymentMethodGroup['IsVisible'] == false ) { + continue; + } + + $accountOptions = ''; + $hiddenInput = ''; + + $entity = $paymentMethodGroup['Entity']; // unique identifier code like 'MB' or 'MULTIBANCO' + + $index = 0; + foreach ($paymentMethodGroup['accounts'] as $account) { + + if ($index === 0) { + $hiddenInput = << + HTML; + } + $index++; + + // set selected payment method key + $selectedStr = ''; + if (isset($storedMethods[$entity]['account'])) { + $selectedStr = $account['Conta'] == $storedMethods[$entity]['account'] ? 'selected' : ''; + $hiddenInput = << + HTML; + } + + + $accountOptions .= <<{$account['Alias']} + HTML; + } + + if ($hiddenInput !== '') { + $hiddenInputs .= $hiddenInput; + } + + + + $checkDisabledStr = $accountOptions === '' ? 'disabled' : ''; + $selectDisabledStr = ($accountOptions === '' || $isStaticGatewayKey) ? 'disabled' : ''; + $checkedStr = ''; + + + if ($accountOptions !== '') { + // show method account select + + + $selectOrActivate = << + {$accountOptions} + + HTML; + + // add hidden select inputs + if ($selectDisabledStr === 'disabled') { + $selectOrActivate .= $hiddenInputs; + } + + // if the isActive is saved use it + $checkedStr = (isset($storedMethods[$entity]['is_active']) && $storedMethods[$entity]['is_active'] == '1') || !$storedMethods ? 'checked' : ''; + } else { + // show request button + $selectOrActivate = << + button label findme {$paymentMethodGroup['Method']} + + + HTML; + + $requestPaymentMethodUrl = \Context::getContext()->link->getAdminLink('AdminIfthenpayActivateNewGatewayMethod') . "&paymentMethod=" . $entity . "&gatewayKey=" . $ifthenpaygatewayKey; + + $selectOrActivate = '' . $this->ifthenpayModule->l('Request Ifthenpay Gateway Method ', pathinfo(__FILE__)['filename']) . $paymentMethodGroup['Method'] . ''; + } + + + + + $html .= << + + + + +
+ +
+
+ {$selectOrActivate} +
+ + HTML; + } + + return $html; + } +} diff --git a/ifthenpay/classes/Models/IfthenpayIfthenpaygateway.php b/ifthenpay/classes/Models/IfthenpayIfthenpaygateway.php new file mode 100644 index 0000000..81d8eba --- /dev/null +++ b/ifthenpay/classes/Models/IfthenpayIfthenpaygateway.php @@ -0,0 +1,117 @@ + + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace PrestaShop\Module\Ifthenpay\Models; + +if (!defined('_PS_VERSION_')) { + exit; +} + +use PrestaShop\Module\Ifthenpay\Contracts\Models\PaymentModelInterface; +use PrestaShop\Module\Ifthenpay\Factory\Database\DatabaseFactory; + +class IfthenpayIfthenpaygateway extends \ObjectModel implements PaymentModelInterface +{ + + public $id; + public $id_ifthenpay_ifthenpaygateway; + public $payment_url; + public $deadline; + public $order_id; + public $status; + + + public static $definition = [ + 'table' => "ifthenpay_ifthenpaygateway", + 'primary' => 'id_ifthenpay_ifthenpaygateway', + 'multilang' => false, + 'multishop' => true, + 'fields' => [ + 'payment_url' => [ + 'type' => self::TYPE_STRING, + 'required' => false, + 'validate' => 'isString', + 'size' => 255 + ], + 'deadline' => [ + 'type' => self::TYPE_STRING, + 'required' => false, + 'validate' => 'isString', + 'size' => 10 + ], + 'order_id' => [ + 'type' => self::TYPE_INT, + 'required' => true, + 'validate' => 'isUnsignedInt' + ], + 'status' => [ + 'type' => self::TYPE_STRING, + 'required' => true, + 'validate' => 'isString', + 'size' => 50 + ], + ] + ]; + + + + public function __construct($id_name_table = null, $id_lang = null, $id_shop = null) + { + parent::__construct($id_name_table, $id_lang, $id_shop); + \Shop::addTableAssociation(self::$definition['table'], array('type' => 'shop')); + } + + + + public static function getByOrderId($orderId) + { + $query = DatabaseFactory::buildDbQuery(); + $query->from(self::$definition['table']); + $query->where('order_id = ' . (int) $orderId); + $rowOrder = \Db::getInstance()->getRow($query); + + if (is_array($rowOrder)) { + return $rowOrder; + } else { + return array(); + } + } + + + + public static function getAllPendingOrdersWithDeadline() + { + $rowOrder = \Db::getInstance() + ->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'orders`' + . ' INNER JOIN `' . _DB_PREFIX_ . 'ifthenpay_ifthenpaygateway` ON `' . _DB_PREFIX_ . 'orders`.`id_order` = `' . _DB_PREFIX_ . 'ifthenpay_ifthenpaygateway`.`order_id`' + . ' WHERE `current_state` = ' . \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_OS_WAITING') . ' AND `payment` = "ifthenpaygateway"'); + + if (is_array($rowOrder)) { + return $rowOrder; + } else { + return array(); + } + } +} diff --git a/ifthenpay/classes/Models/IfthenpayMultibanco.php b/ifthenpay/classes/Models/IfthenpayMultibanco.php index ca6f21b..3abecbb 100644 --- a/ifthenpay/classes/Models/IfthenpayMultibanco.php +++ b/ifthenpay/classes/Models/IfthenpayMultibanco.php @@ -1,4 +1,5 @@ "ifthenpay_multibanco", - 'primary' => 'id_ifthenpay_multibanco', - 'multilang' => false, - 'multishop' => true, - 'fields' => [ - 'entidade' => [ - 'type' => self::TYPE_STRING, - 'required' => true, - 'validate' => 'isString', - 'size' => 5 - ], - 'referencia' => [ - 'type' => self::TYPE_STRING, - 'required' => true, - 'validate' => 'isString', - 'size' => 9 - ], - 'validade' => [ - 'type' => self::TYPE_STRING, - 'required' => false, - 'validate' => 'isString', - 'size' => 16 - ], - 'transaction_id' => [ - 'type' => self::TYPE_STRING, - 'required' => false, - 'validate' => 'isString', - 'size' => 50 - ], - 'order_id' => [ - 'type' => self::TYPE_INT, - 'required' => true, - 'validate' => 'isUnsignedInt' - ], - 'status' => [ - 'type' => self::TYPE_STRING, - 'required' => true, - 'validate' => 'isString', - 'size' => 50 - ], - ] - ]; + public $id; + public $id_ifthenpay_multibanco; + public $entidade; + public $referencia; + public $order_id; - public function __construct($id_name_table = null, $id_lang = null, $id_shop = null) - { - parent::__construct($id_name_table, $id_lang, $id_shop); - \Shop::addTableAssociation(self::$definition['table'], array('type' => 'shop')); - } + public static $definition = [ + 'table' => "ifthenpay_multibanco", + 'primary' => 'id_ifthenpay_multibanco', + 'multilang' => false, + 'multishop' => true, + 'fields' => [ + 'entidade' => [ + 'type' => self::TYPE_STRING, + 'required' => true, + 'validate' => 'isString', + 'size' => 5 + ], + 'referencia' => [ + 'type' => self::TYPE_STRING, + 'required' => true, + 'validate' => 'isString', + 'size' => 9 + ], + 'validade' => [ + 'type' => self::TYPE_STRING, + 'required' => false, + 'validate' => 'isString', + 'size' => 16 + ], + 'transaction_id' => [ + 'type' => self::TYPE_STRING, + 'required' => false, + 'validate' => 'isString', + 'size' => 50 + ], + 'order_id' => [ + 'type' => self::TYPE_INT, + 'required' => true, + 'validate' => 'isUnsignedInt' + ], + 'status' => [ + 'type' => self::TYPE_STRING, + 'required' => true, + 'validate' => 'isString', + 'size' => 50 + ], + ] + ]; - public static function getByOrderId($orderId) - { - $query = DatabaseFactory::buildDbQuery(); - $query->from(self::$definition['table']); - $query->where('order_id = ' . (int) $orderId); - $rowOrder = \Db::getInstance()->getRow($query); + public function __construct($id_name_table = null, $id_lang = null, $id_shop = null) + { + parent::__construct($id_name_table, $id_lang, $id_shop); + \Shop::addTableAssociation(self::$definition['table'], array('type' => 'shop')); + } - if (is_array($rowOrder)) { - return $rowOrder; - } else { - return array(); - } - } + public static function getByOrderId($orderId) + { + $query = DatabaseFactory::buildDbQuery(); + $query->from(self::$definition['table']); + $query->where('order_id = ' . (int) $orderId); + $rowOrder = \Db::getInstance()->getRow($query); - public function getMultibancoByReferencia($referencia) - { - $rowOrder = \DB::getInstance() - ->executeS('SELECT * FROM ' . _DB_PREFIX_ . self::$definition['table'] . ' WHERE (referencia = ' . \pSQL($referencia) . ') ORDER BY ' . self::$definition['primary'] . ' DESC LIMIT 1'); + if (is_array($rowOrder)) { + return $rowOrder; + } else { + return array(); + } + } + public function getMultibancoByReferencia($referencia) + { + $rowOrder = \DB::getInstance() + ->executeS('SELECT * FROM ' . _DB_PREFIX_ . self::$definition['table'] . ' WHERE referencia = \'' . \pSQL($referencia) . '\' ORDER BY ' . self::$definition['primary'] . ' DESC LIMIT 1'); - if (is_array($rowOrder)) { - return $rowOrder[0]; - } else { - return array(); - } - } + if (is_array($rowOrder)) { + return $rowOrder[0]; + } else { + return array(); + } + } - public static function getAllPendingOrdersWithDeadline() - { - $rowOrder = \Db::getInstance() - ->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'orders`' - . ' INNER JOIN `' . _DB_PREFIX_ . 'ifthenpay_multibanco` ON `' . _DB_PREFIX_ . 'orders`.`id_order` = `' . _DB_PREFIX_ . 'ifthenpay_multibanco`.`order_id`' - . ' WHERE `current_state` = ' . \Configuration::get('IFTHENPAY_MULTIBANCO_OS_WAITING') . ' AND `payment` = "multibanco"'); + public static function getAllPendingOrdersWithDeadline() + { + $rowOrder = \Db::getInstance() + ->executeS('SELECT * FROM `' . _DB_PREFIX_ . 'orders`' + . ' INNER JOIN `' . _DB_PREFIX_ . 'ifthenpay_multibanco` ON `' . _DB_PREFIX_ . 'orders`.`id_order` = `' . _DB_PREFIX_ . 'ifthenpay_multibanco`.`order_id`' + . ' WHERE `current_state` = ' . \Configuration::get('IFTHENPAY_MULTIBANCO_OS_WAITING') . ' AND `payment` = "multibanco"'); - if (is_array($rowOrder)) { - return $rowOrder; - } else { - return array(); - } - } + if (is_array($rowOrder)) { + return $rowOrder; + } else { + return array(); + } + } } diff --git a/ifthenpay/classes/Payments/Data/IfthenpaygatewayCancelOrder.php b/ifthenpay/classes/Payments/Data/IfthenpaygatewayCancelOrder.php new file mode 100644 index 0000000..fd945ba --- /dev/null +++ b/ifthenpay/classes/Payments/Data/IfthenpaygatewayCancelOrder.php @@ -0,0 +1,96 @@ + + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace PrestaShop\Module\Ifthenpay\Payments\Data; + +use PrestaShop\Module\Ifthenpay\Factory\Models\IfthenpayModelFactory; +use PrestaShop\Module\Ifthenpay\Factory\Prestashop\PrestashopModelFactory; + + +if (!defined('_PS_VERSION_')) { + exit; +} + +class IfthenpaygatewayCancelOrder +{ + /** + * cancels ifthenpaygateway order if no payment has been received 30 minutes after order confirmation "date_add" + * + * @return void + */ + public function cancelOrder() + { + + if ( + \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_CANCEL_ORDER_AFTER_TIMEOUT') && + ( + ( + \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_DEADLINE') && + \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_DEADLINE') != '' && + \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_DEADLINE') != null + ) || + \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_DEADLINE') == '0' + ) + ) { + $ifthenpaygatewayOrders = IfthenpayModelFactory::build('ifthenpaygateway')->getAllPendingOrdersWithDeadline(); + + $timezone = \Configuration::get('PS_TIMEZONE'); + if (!$timezone) { + $timezone = 'Europe/Lisbon'; + } + date_default_timezone_set($timezone); + + foreach ($ifthenpaygatewayOrders as $ifthenpaygatewayOrder) { + + if ( + isset($ifthenpaygatewayOrder['deadline']) && + $ifthenpaygatewayOrder['deadline'] != '' && + $ifthenpaygatewayOrder['deadline'] != null && + $this->isBeyondDeadline($ifthenpaygatewayOrder['deadline']) + ) { + $new_history = PrestashopModelFactory::buildOrderHistory(); + $new_history->id_order = (int) $ifthenpaygatewayOrder['id_order']; + $new_history->changeIdOrderState((int) \Configuration::get('PS_OS_CANCELED'), (int) $ifthenpaygatewayOrder['id_order']); + $new_history->addWithemail(true); + } + } + } + } + + + private function isBeyondDeadline(string $deadline) + { + $timezone = new \DateTimeZone('Europe/Lisbon'); + + $deadline = \DateTime::createFromFormat('Ymd', $deadline, $timezone); + $deadlineStr = $deadline->format('Y-m-d'); + + $currentDateTime = new \DateTime('now', $timezone); + $currentDateTimeStr = $currentDateTime->format('Y-m-d'); + + return strtotime($deadlineStr) < strtotime($currentDateTimeStr); + } +} diff --git a/ifthenpay/classes/Payments/Data/IfthenpaygatewayOrderDetail.php b/ifthenpay/classes/Payments/Data/IfthenpaygatewayOrderDetail.php new file mode 100644 index 0000000..ecf502b --- /dev/null +++ b/ifthenpay/classes/Payments/Data/IfthenpaygatewayOrderDetail.php @@ -0,0 +1,56 @@ + + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace PrestaShop\Module\Ifthenpay\Payments\Data; + +if (!defined('_PS_VERSION_')) { + exit; +} + +use PrestaShop\Module\Ifthenpay\Base\Payments\IfthenpaygatewayBase; +use PrestaShop\Module\Ifthenpay\Contracts\Order\OrderDetailInterface; + +class IfthenpaygatewayOrderDetail extends IfthenpaygatewayBase implements OrderDetailInterface +{ + public function setSmartyVariables() + { + + $this->smartyDefaultData->setStatus(!empty($this->paymentDataFromDb) ? $this->paymentDataFromDb['status'] : ''); + + $this->smartyDefaultData->setPaymentUrl(!empty($this->paymentDataFromDb) ? $this->paymentDataFromDb['payment_url'] : ''); + + $deadline = !empty($this->paymentDataFromDb) ? $this->paymentDataFromDb['deadline'] : ''; + + $this->smartyDefaultData->setDeadline($deadline != '' ? (new \DateTime($deadline))->format('d-m-Y') : ''); + } + + public function getOrderDetail() + { + $this->setPaymentModel('ifthenpaygateway'); + $this->getFromDatabaseById(); + $this->setSmartyVariables(); + return $this; + } +} diff --git a/ifthenpay/classes/Payments/Data/IfthenpaygatewayPaymentReturn.php b/ifthenpay/classes/Payments/Data/IfthenpaygatewayPaymentReturn.php new file mode 100644 index 0000000..9bfc66d --- /dev/null +++ b/ifthenpay/classes/Payments/Data/IfthenpaygatewayPaymentReturn.php @@ -0,0 +1,60 @@ + + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace PrestaShop\Module\Ifthenpay\Payments\Data; + +if (!defined('_PS_VERSION_')) { + exit; +} + +use PrestaShop\Module\Ifthenpay\Utility\Utility; +use PrestaShop\Module\Ifthenpay\Base\Payments\IfthenpaygatewayBase; +use PrestaShop\Module\Ifthenpay\Contracts\Payments\PaymentReturnInterface; + +class IfthenpaygatewayPaymentReturn extends IfthenpaygatewayBase implements PaymentReturnInterface +{ + public function setSmartyVariables() + { + $this->smartyDefaultData->setPaymentUrl($this->paymentGatewayResultData->paymentUrl); + $this->smartyDefaultData->setDeadline(isset($this->paymentGatewayResultData->deadline) ? (new \DateTime($this->paymentGatewayResultData->deadline))->format('d-m-Y') : ''); + } + + public function getPaymentReturn() + { + $this->setPaymentModel('ifthenpaygateway'); + $this->setGatewayBuilderData(); + $this->paymentGatewayResultData = $this->ifthenpayGateway->execute( + $this->paymentDefaultData->paymentMethod, + $this->gatewayBuilder, + strval($this->paymentDefaultData->order->id), + strval($this->paymentDefaultData->order->getOrdersTotalPaid()) + )->getData(); + $this->saveToDatabase(); + $this->setSmartyVariables(); + $this->setEmailVariables(); + $this->sendEmail('ifthenpaygateway', Utility::getMailTranslationString('ifthenpaygateway', 'details')); + \Tools::redirect($this->paymentGatewayResultData->paymentUrl); + } +} diff --git a/ifthenpay/classes/Payments/Gateway.php b/ifthenpay/classes/Payments/Gateway.php index 1b72d9d..b4bcacf 100644 --- a/ifthenpay/classes/Payments/Gateway.php +++ b/ifthenpay/classes/Payments/Gateway.php @@ -39,7 +39,7 @@ class Gateway { private $webservice; private $account; - private $paymentMethods = ['multibanco', 'mbway', 'payshop', 'ccard', 'cofidispay', 'ifthenpay']; + private $paymentMethods = ['multibanco', 'mbway', 'payshop', 'ccard', 'cofidispay', 'ifthenpay', 'ifthenpaygateway']; private $previousModulePaymentMethods = ['pagamento por multibanco', 'pagamento por mbway', 'pagamento por payshop']; private $aliasPaymentMethods = [ 'multibanco' => [ @@ -77,6 +77,13 @@ class Gateway 'es' => 'Cofidis Pay', 'de' => 'Cofidis Pay' ], + 'ifthenpaygateway' => [ + 'gb' => 'Ifthenpay Gateway', + 'en' => 'Ifthenpay Gateway', + 'pt' => 'Ifthenpay Gateway', + 'es' => 'Ifthenpay Gateway', + 'de' => 'Ifthenpay Gateway' + ], ]; public function __construct() @@ -110,16 +117,36 @@ public function checkIfPaymentMethodIsPreviousModule($paymentMethod) public function authenticate($backofficeKey) { - $authenticate = $this->webservice->postRequest( - 'https://www.ifthenpay.com/IfmbWS/ifmbws.asmx/getEntidadeSubentidadeJsonV2', - ['chavebackoffice' => $backofficeKey] - )->getResponseJson(); + $gatewayKeys = $this->webservice->getRequest( + 'https://ifthenpay.com/IfmbWS/ifthenpaymobile.asmx/GetGatewayKeys', + [ + 'backofficekey' => $backofficeKey, + ] + )->getResponseJson(); - if (!$authenticate[0]['Entidade'] && empty($authenticate[0]['SubEntidade'])) { - throw new \Exception('Backoffice key is invalid'); - } else { - $this->account = $authenticate; - } + + $accountKeys = $this->webservice->postRequest( + 'https://www.ifthenpay.com/IfmbWS/ifmbws.asmx/' . + 'getEntidadeSubentidadeJsonV2', + [ + 'chavebackoffice' => $backofficeKey, + ] + )->getResponseJson(); + + if (!$accountKeys[0]['Entidade'] && empty($accountKeys[0]['SubEntidade'])) { + throw new \Exception('Backoffice key is invalid'); + } + + if (!empty($accountKeys)) { + $this->account = $accountKeys; + } + + if (!empty($gatewayKeys)) { + $this->account[] = [ + 'Entidade' => 'IFTHENPAYGATEWAY', + 'SubEntidade' => $gatewayKeys + ]; + } } public function getAccount() @@ -138,18 +165,21 @@ public function getPaymentMethods() $paymentMethodMapping = [ 'mb' => $this->paymentMethods[0], 'cofidis' => $this->paymentMethods[4], + 'ifthenpaygateway' => $this->paymentMethods[6], ]; foreach ($this->account as $account) { $entidade = strtolower($account['Entidade']); - + if (in_array($entidade, $this->paymentMethods)) { $userPaymentMethods[] = $entidade; } elseif (is_numeric($entidade) || $entidade == 'mb') { $userPaymentMethods[] = $paymentMethodMapping['mb']; } elseif ($entidade == 'cofidis') { $userPaymentMethods[] = $paymentMethodMapping['cofidis']; - } + } elseif ($entidade == 'ifthenpaygateway') { + $userPaymentMethods[] = $paymentMethodMapping['ifthenpaygateway']; + } } return array_unique($userPaymentMethods); } @@ -191,7 +221,7 @@ function ($value) { } public function refund($body) - { + { $refund = $this->webservice->postRequest( 'http://ifthenpay.com/api/endpoint/payments/refund', $body, @@ -201,6 +231,59 @@ public function refund($body) return $refund; } + + + public function getIthenpaygatewayKeys(){ + foreach (array_column($this->account, 'SubEntidade', 'Entidade') as $key => $value) { + if ($key === \Tools::strtoupper('ifthenpaygateway')) { + return $value; + } + } + } + + + + public function getIfthenpayGatewayPaymentMethodsDataByBackofficeKeyAndGatewayKey($backofficeKey, $gatewayKey): array + { + + $methods = $this->webservice->getRequest( + 'https://api.ifthenpay.com/gateway/methods/available', + [] + )->getResponseJson(); + + if (empty($methods)) { + return []; + } + + $accounts = $this->webservice->getRequest( + 'https://ifthenpay.com/IfmbWS/ifthenpaymobile.asmx/GetAccountsByGatewayKey', + [ + 'backofficekey' => $backofficeKey, + 'gatewayKey' => $gatewayKey + ] + )->getResponseJson(); + + if (empty($accounts)) { + return []; + } + + + foreach ($methods as &$method) { + + $methodCode = $method['Entity']; + $filteredAccounts = array_filter($accounts, function ($item) use ($methodCode) { + return $item['Entidade'] === $methodCode || ($methodCode === 'MB' && is_numeric($item['Entidade'])); + }); + + $method['accounts'] = $filteredAccounts; + } + unset($method); + + return $methods; + } + + + public function getCofidisLimits($cofidisKey) { $response = $this->webservice->getRequest("https://ifthenpay.com/api/cofidis/limits/$cofidisKey")->getResponseJson(); $limits = []; diff --git a/ifthenpay/classes/Payments/Ifthenpaygateway.php b/ifthenpay/classes/Payments/Ifthenpaygateway.php new file mode 100644 index 0000000..ae865df --- /dev/null +++ b/ifthenpay/classes/Payments/Ifthenpaygateway.php @@ -0,0 +1,152 @@ + + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +namespace PrestaShop\Module\Ifthenpay\Payments; + +if (!defined('_PS_VERSION_')) { + exit; +} + +use PrestaShop\Module\Ifthenpay\Payments\Payment as MasterPayment; +use PrestaShop\Module\Ifthenpay\Contracts\Payments\PaymentMethodInterface; +use PrestaShop\Module\Ifthenpay\Utility\Status; +use PrestaShop\Module\Ifthenpay\Utility\Time; +use PrestaShop\Module\Ifthenpay\Utility\Token; + +class Ifthenpaygateway extends MasterPayment implements PaymentMethodInterface +{ + private $key; + private $selectableMethods; + private $defaultMethod; + private $deadline; + private $ifthenpaygatewayPedido; + + + public function __construct($data, $orderId, $valor) + { + parent::__construct($orderId, $valor); + + $this->key = $data->getData()->key; + $this->selectableMethods = json_decode($data->getData()->selectableMethods, true) ?? []; + $this->defaultMethod = $data->getData()->defaultMethod; + if (isset($data->getData()->deadline)) { + $this->deadline = Time::dateAfterDays($data->getData()->deadline); + } + } + + public function checkValue() + { + if ($this->valor >= 1000000) { + throw new \Exception('Invalid Ifthenpaygateway value, above 999999€'); + } + } + + + + + private function requestIfthenpaygatewayLink(): void + { + $context = \Context::getContext(); + $langId = $context->cookie->id_lang; + $langObj = \Language::getLanguage((int) $langId); + $langIsoCode = isset($langObj['iso_code']) ? $langObj['iso_code'] : 'en'; + $langIsoCode = $langIsoCode == 'gb' ? 'en' : $langIsoCode; + + $methodsStr = ''; + foreach ($this->selectableMethods as $key => $value) { + if ($value != null && $value['is_active'] === '1') { + + $methodsStr .= str_replace(' ', '', $value['account']) . ';'; + } + } + + $baseCallbackUrl = \Context::getContext()->link->getModuleLink('ifthenpay', 'callback', array(), true); + + // TODO: PAYMENT URLS + $btnCloseUrl = $baseCallbackUrl . '?type=online&p=ifthenpaygateway&cartId=' . \Tools::getValue('id_cart') . '&oid=' . \Tools::getValue('id_order') . '&qn=' . Token::encrypt(Status::getStatusPending()); // return to store with pending status + $successUrl = $baseCallbackUrl . '?type=online&p=ifthenpaygateway&cartId=' . \Tools::getValue('id_cart') . '&oid=' . \Tools::getValue('id_order') . '&qn=' . Token::encrypt(Status::getStatusSuccess()); + $cancelUrl = $baseCallbackUrl . '?type=online&p=ifthenpaygateway&cartId=' . \Tools::getValue('id_cart') . '&oid=' . \Tools::getValue('id_order') . '&qn=' . Token::encrypt(Status::getStatusCancel()); + $errorUrl = $baseCallbackUrl . '?type=online&p=ifthenpaygateway&cartId=' . \Tools::getValue('id_cart') . '&oid=' . \Tools::getValue('id_order') . '&qn=' . Token::encrypt(Status::getStatusError()); + + + + $payload = [ + 'id' => $this->orderId, + "amount" => (string)$this->valor, + "description" => 'Prestashop order #' . $this->orderId, + "lang" => $langIsoCode, + "expiredate" => $this->deadline, + "accounts" => $methodsStr, + "selected_method" => $this->defaultMethod, + "btnCloseUrl" => $btnCloseUrl, + "success_url" => $successUrl, + "cancel_url" => $cancelUrl, + "error_url" => $errorUrl, + ]; + + $btnCloseLabel = \Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_CLOSE_BTN'); + if ($baseCallbackUrl != '') { + $payload['btnCloseLabel'] = $btnCloseLabel; + } + + + $this->ifthenpaygatewayPedido = $this->webservice->PostRequest( + 'https://api.ifthenpay.com/gateway/pinpay/' . $this->key, + $payload, + true + )->getResponseJson(); + } + + private function checkStatus(): void + { + if ($this->ifthenpaygatewayPedido['PinCode'] === null) { + throw new \Exception('Invalid gateway request'); + } + } + + + private function getGatewayLink() + { + $this->requestIfthenpaygatewayLink(); + + $this->checkStatus(); + + $this->dataBuilder->setKey($this->key); + + if ($this->deadline) { + $this->dataBuilder->setDeadline($this->deadline); + } + $this->dataBuilder->setPaymentUrl($this->ifthenpaygatewayPedido['RedirectUrl']); + $this->dataBuilder->setTotalToPay((string)$this->valor); + return $this->dataBuilder; + } + + public function buy() + { + $this->checkValue($this->valor); + return $this->getGatewayLink(); + } +} diff --git a/ifthenpay/classes/Utility/CountryCodes.json b/ifthenpay/classes/Utility/CountryCodes.json new file mode 100644 index 0000000..b3afefd --- /dev/null +++ b/ifthenpay/classes/Utility/CountryCodes.json @@ -0,0 +1,2194 @@ +{ + "mobile_prefixes": [ + { + "Id": "6BE61511-061F-4930-A990-B2EE11545A69", + "PT": "Afeganistão", + "EN": "Afghanistan", + "ES": "Afganistán", + "FR": "Afghanistan", + "Indicativo": 93, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "3747695C-5386-4D68-816A-9ADC141E0BD9", + "PT": "África do Sul", + "EN": "South Africa", + "ES": "Sudáfrica", + "FR": "Afrique du Sud", + "Indicativo": 27, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "D96CEEAF-79E8-4EB0-ACFC-47E530E973AD", + "PT": "Albânia", + "EN": "Albania", + "ES": "Albania", + "FR": "Albanie", + "Indicativo": 355, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "3EF4F90A-08BB-423D-B1C0-CF5311723019", + "PT": "Alemanha", + "EN": "Germany", + "ES": "Alemania", + "FR": "Allemagne", + "Indicativo": 49, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "9467859A-6F18-4169-9A8B-DFFA529CAF45", + "PT": "Andorra", + "EN": "Andorra", + "ES": "Andorra", + "FR": "Andorre", + "Indicativo": 376, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "3C04A838-4658-4950-83FC-2F161799E460", + "PT": "Angola", + "EN": "Angola", + "ES": "Angola", + "FR": "Angola", + "Indicativo": 244, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "30A497A6-6252-4BB6-92A9-AC622D281066", + "PT": "Anguila", + "EN": "Anguilla", + "ES": "Anguila", + "FR": "Anguilla", + "Indicativo": 264, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "81ED73D4-2E9E-4AD9-8310-10C20E7DE148", + "PT": "Antígua e Barbuda", + "EN": "Antigua and Barbuda", + "ES": "Antigua y Barbuda", + "FR": "Antigua et Barbuda", + "Indicativo": 268, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "0309E925-DF57-488D-BFD9-5CB20DA65DA3", + "PT": "Antilhas Holandesas", + "EN": "Netherlands Antilles", + "ES": "Antillas Neerlandesas", + "FR": "Antilles néerlandaises", + "Indicativo": 599, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "B34E6A71-0165-4F14-884D-C0BDD39C35DF", + "PT": "Arábia Saudita", + "EN": "Saudi Arabia", + "ES": "Arabia Saudí", + "FR": "Arabie Saoudite", + "Indicativo": 966, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "72F513F8-83DC-4B57-8EAC-90D30F0E8C58", + "PT": "Argélia", + "EN": "Algeria", + "ES": "Argelia", + "FR": "Algérie", + "Indicativo": 213, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "54287654-0E62-446F-BB87-D8B53C2FA3F6", + "PT": "Argentina", + "EN": "Argentina", + "ES": "Argentina", + "FR": "Argentine", + "Indicativo": 54, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "4E043AC8-070B-4D19-86D8-05E4CDECDC19", + "PT": "Arménia", + "EN": "Armenia", + "ES": "Armenia", + "FR": "Arménie", + "Indicativo": 374, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "6D940553-9A70-4D54-A670-9BCB8BBEE1CA", + "PT": "Aruba", + "EN": "Aruba", + "ES": "Aruba", + "FR": "Aruba", + "Indicativo": 297, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "F23A878A-1935-4D82-A0CE-4A3634107A3A", + "PT": "Ascensão", + "EN": "Ascension", + "ES": "Ascensión", + "FR": "Ascension", + "Indicativo": 247, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "BA52C71A-1017-4187-94CA-AF3A2CDF8ED9", + "PT": "Austrália", + "EN": "Australia", + "ES": "Australia", + "FR": "Australie", + "Indicativo": 61, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "3A32E9CC-B067-4BD2-87B4-FEC92CC5E8B2", + "PT": "Áustria", + "EN": "Austria", + "ES": "Austria", + "FR": "Autriche", + "Indicativo": 43, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "F0C060D3-7C6E-43BB-B6BF-967E687C7017", + "PT": "Azerbaijão", + "EN": "Azerbaijan", + "ES": "Azerbaiyán", + "FR": "Azerbaïdjan", + "Indicativo": 994, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "14BC009D-7644-4199-BB57-A87DEAF891AA", + "PT": "Bahamas", + "EN": "Bahamas", + "ES": "Bahamas", + "FR": "Bahamas", + "Indicativo": 1242, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "ACB3B926-41F3-4FA2-98FD-30F8EB48AEE1", + "PT": "Bahrein", + "EN": "Bahrain", + "ES": "Bahrein", + "FR": "Bahreïn", + "Indicativo": 973, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "E26EA77A-18FD-40A6-9153-C55BFD220218", + "PT": "Bangladesh", + "EN": "Bangladesh", + "ES": "Bangladesh", + "FR": "Bangladesh", + "Indicativo": 880, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "CA4E87B1-47FF-47D6-A3BD-74B111404A6B", + "PT": "Barbados", + "EN": "Barbados", + "ES": "Barbados", + "FR": "Barbade", + "Indicativo": 246, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "E4331580-87D1-401E-BBAB-5A841CF5C8B6", + "PT": "Bélgica", + "EN": "Belgium", + "ES": "Bélgica", + "FR": "Belgique", + "Indicativo": 32, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "D6AD7101-C790-411E-8375-500048685900", + "PT": "Belize", + "EN": "Belize", + "ES": "Belice", + "FR": "Belize", + "Indicativo": 501, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "B30ED59C-F35C-431F-8FBF-18AEEB7E4523", + "PT": "Benim", + "EN": "Benin", + "ES": "Benín", + "FR": "Bénin", + "Indicativo": 229, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "6E0F85DD-801F-4E3F-9FCB-34581A3E73D6", + "PT": "Bermudas", + "EN": "Bermuda", + "ES": "Bermudas", + "FR": "Bermudes", + "Indicativo": 1441, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "FC5B11C3-EBDB-40E0-9D2D-81DE524808A4", + "PT": "Bielorrússia", + "EN": "Belarus", + "ES": "Bielorrusia", + "FR": "Bélarus", + "Indicativo": 375, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "771B0B07-0C5A-4B69-9746-0F3419B259E8", + "PT": "Bolívia", + "EN": "Bolivia", + "ES": "Bolivia", + "FR": "Bolivie", + "Indicativo": 591, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "1B6C98CA-A4E8-447B-8793-32F9DD481E47", + "PT": "Bósnia e Herzegovina", + "EN": "Bosnia and Herzegovina", + "ES": "Bosnia y Herzegovina", + "FR": "Bosnie-Herzégovine", + "Indicativo": 387, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "548C7482-70E1-40C2-AAAB-CF4078784A8B", + "PT": "Botswana", + "EN": "Botswana", + "ES": "Botswana", + "FR": "Botswana", + "Indicativo": 267, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "3C135DDA-06B3-4214-B68A-F987AB0A00F0", + "PT": "Brasil", + "EN": "Brazil", + "ES": "Brasil", + "FR": "Brésil", + "Indicativo": 55, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "C492ACFF-84ED-4BEC-87E1-ED74AEF53599", + "PT": "Brunei", + "EN": "Brunei", + "ES": "Brunei", + "FR": "Brunei", + "Indicativo": 673, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "1021CE3D-E444-4562-B19F-6B0053DDE7E9", + "PT": "Bulgária", + "EN": "Bulgaria", + "ES": "Bulgaria", + "FR": "Bulgarie", + "Indicativo": 359, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "59F27A24-B1A4-4868-9EE0-5677032F37D2", + "PT": "Burkina Faso", + "EN": "Burkina Faso", + "ES": "Burkina Faso", + "FR": "Burkina Faso", + "Indicativo": 226, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "50F3BE5E-9A75-4CD9-8F45-08724E97BA5A", + "PT": "Burundi", + "EN": "Burundi", + "ES": "Burundi", + "FR": "Burundi", + "Indicativo": 257, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "0B717544-775B-431C-AA90-9C89F433E353", + "PT": "Butão", + "EN": "Bhutan", + "ES": "Bhután", + "FR": "Bhoutan", + "Indicativo": 975, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "F605EFBD-1669-4D51-8384-F54414AEE35F", + "PT": "Cabo Verde", + "EN": "Cape Verde", + "ES": "Cabo Verde", + "FR": "Cap-Vert", + "Indicativo": 238, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "FA42BD0C-1B65-447B-A130-378677AF6835", + "PT": "Camarões", + "EN": "Cameroon", + "ES": "Camerún", + "FR": "Cameroun", + "Indicativo": 237, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "0995A8E2-BF88-4B81-AF4A-3DD477E9B2E8", + "PT": "Camboja", + "EN": "Cambodia", + "ES": "Camboya", + "FR": "Cambodge", + "Indicativo": 855, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "7FE21E40-84A9-4E71-B34A-B499C046E0F0", + "PT": "Canadá", + "EN": "Canada", + "ES": "Canadá", + "FR": "Canada", + "Indicativo": 1, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "1D129A7F-D399-4511-BC80-BB879DA673F8", + "PT": "Cazaquistão", + "EN": "Kazakhstan", + "ES": "Kazajistán", + "FR": "Kazakhstan", + "Indicativo": 7, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "446525B4-3C87-4327-AE4A-D0527FA2D56C", + "PT": "Chade", + "EN": "Chad", + "ES": "Chad", + "FR": "Chad", + "Indicativo": 235, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "F4AE9A5E-3B5F-4853-BA8E-8440589F8DD5", + "PT": "Chile", + "EN": "Chile", + "ES": "Chile", + "FR": "Chili", + "Indicativo": 56, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "E1C16151-A64F-4DDA-BED1-CC2606F06C92", + "PT": "China", + "EN": "China", + "ES": "China", + "FR": "Chine", + "Indicativo": 86, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "14DE1C9F-54C0-4AF4-9ED8-CA34136B2DD0", + "PT": "Chipre", + "EN": "Cyprus", + "ES": "Chipre", + "FR": "Chypre", + "Indicativo": 357, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "847C9403-41B6-4503-98F3-0700EFCACC88", + "PT": "Colômbia", + "EN": "Colombia", + "ES": "Colombia", + "FR": "Colombie", + "Indicativo": 57, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "8C049F8F-8116-4547-996B-7BA50A910019", + "PT": "Comores", + "EN": "Comoros", + "ES": "Comoras", + "FR": "Comores", + "Indicativo": 269, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "7A2E980A-08C8-4BDE-913C-917E6F247A39", + "PT": "Congo", + "EN": "Congo", + "ES": "Congo", + "FR": "Congo", + "Indicativo": 242, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "5CE6BBB4-5355-4C37-993E-A438FFD5DFFF", + "PT": "Coreia do Norte", + "EN": "Cook Islands", + "ES": "Islas Cook", + "FR": "Îles Cook", + "Indicativo": 850, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "F512D2C0-2731-4AAC-AA6F-9B8AADB685C4", + "PT": "Coreia do Sul", + "EN": "Congo (Brazzaville)", + "ES": "Congo (Brazzaville)", + "FR": "Congo (Brazzaville)", + "Indicativo": 82, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "D3761C1C-93B6-44FC-9F6E-9A6D338C7D89", + "PT": "Costa do Marfim", + "EN": "Côte d'Ivoire", + "ES": "Costa de Marfil", + "FR": "Côte d'Ivoire", + "Indicativo": 225, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "9B298DD7-A5ED-4DB2-814F-15A939221DF9", + "PT": "Costa Rica", + "EN": "Costa Rica", + "ES": "Costa Rica", + "FR": "Costa Rica", + "Indicativo": 506, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "FD2AD145-E077-4E8B-AE3D-4F10FB9EB963", + "PT": "Croácia", + "EN": "Croatia", + "ES": "Croacia", + "FR": "Croatie", + "Indicativo": 385, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "70D03279-6E20-41EB-9A75-C8E17184E630", + "PT": "Cuba", + "EN": "Cuba", + "ES": "Cuba", + "FR": "Cuba", + "Indicativo": 53, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "46B68B38-75B6-4ADC-BA6D-A7B5693E49C3", + "PT": "Dinamarca", + "EN": "Denmark", + "ES": "Dinamarca", + "FR": "Danemark", + "Indicativo": 45, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "78C9CCA4-7975-4EA7-9C9A-5AFD1B608B9A", + "PT": "Djibuti", + "EN": "Djibouti", + "ES": "Yibuti", + "FR": "Djibouti", + "Indicativo": 253, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "5FB4D5AF-5E66-424B-8CCA-69477D565AA2", + "PT": "Dominica", + "EN": "Dominica", + "ES": "Dominica", + "FR": "Dominique", + "Indicativo": 767, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "CF99D5F0-9890-4C5E-991F-266ADEBDB13C", + "PT": "Egito", + "EN": "Egypt", + "ES": "Egipto", + "FR": "Égypte", + "Indicativo": 20, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "51C109DB-6193-4004-BE9F-39187786710A", + "PT": "El Salvador", + "EN": "Dominica", + "ES": "Dominica", + "FR": "Dominique", + "Indicativo": 503, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "13816A9B-1097-4C7A-9003-9628B480618E", + "PT": "Emirados Árabes", + "EN": "Philippines", + "ES": "Filipinas", + "FR": "Philippines", + "Indicativo": 971, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "71E45C33-C161-44AC-9731-93E1151DBF9A", + "PT": "Equador", + "EN": "Ecuador", + "ES": "Ecuador", + "FR": "Équateur", + "Indicativo": 593, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "6ACA76BE-0338-4A68-A67D-92E70EB99CDE", + "PT": "Eritreia", + "EN": "Eritrea", + "ES": "Eritrea", + "FR": "Érythrée", + "Indicativo": 291, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "760FDB85-5C41-4CFD-A0AE-99040F1F6A6A", + "PT": "Eslováquia", + "EN": "Slovakia", + "ES": "Eslovaquia", + "FR": "Slovaquie", + "Indicativo": 42, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "20C76718-6BE3-4702-83B1-0FC59169D058", + "PT": "Eslovénia", + "EN": "Slovenia", + "ES": "Eslovenia", + "FR": "Slovénie", + "Indicativo": 386, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "0771A56E-4550-46EB-A1E9-A1EB56B95207", + "PT": "Espanha", + "EN": "Spain", + "ES": "España", + "FR": "Espagne", + "Indicativo": 34, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "0237C5F0-4838-49C1-A9DD-3EBAEFDA18B1", + "PT": "Estados Unidos", + "EN": "United States of America", + "ES": "Estados Unidos de América", + "FR": "États-Unis d'Amérique", + "Indicativo": 1, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "DB513DF3-1F79-4905-BDD0-873557D4B0AC", + "PT": "Estónia", + "EN": "Estonia", + "ES": "Estonia", + "FR": "Estonie", + "Indicativo": 372, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "9140B8F8-242B-4418-B7B9-E00C62F1F438", + "PT": "Etiópia", + "EN": "Ethiopia", + "ES": "Etiopía", + "FR": "Éthiopie", + "Indicativo": 251, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "CD1F45C6-873D-4801-8672-B663972AEB79", + "PT": "Fiji", + "EN": "Fiji", + "ES": "Fiji", + "FR": "Fidji", + "Indicativo": 679, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "60C78FC0-5FA8-4DB8-AFCC-4BA271CCD2F4", + "PT": "Filipinas", + "EN": "Philippines", + "ES": "Filipinas", + "FR": "Philippines", + "Indicativo": 63, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "DC2F3E08-5266-4FD5-9B5A-EE32D18A5003", + "PT": "Finlândia", + "EN": "Finland", + "ES": "Finlandia", + "FR": "Finlande", + "Indicativo": 358, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "684442DB-AFA5-43E6-A060-DAD71F11AC6C", + "PT": "França", + "EN": "France", + "ES": "Francia", + "FR": "France", + "Indicativo": 33, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "B456B3EC-1A29-4A64-AF01-1F57A1052723", + "PT": "Gabão", + "EN": "Gabon", + "ES": "Gabón", + "FR": "Gabon", + "Indicativo": 241, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "BD00F09A-C247-45DA-AF33-01B6320209AE", + "PT": "Gâmbia", + "EN": "Gambia", + "ES": "Gambia", + "FR": "Gambie", + "Indicativo": 220, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "86E785D5-E84D-4789-8889-F64DC9375CD2", + "PT": "Gana", + "EN": "Ghana", + "ES": "Ghana", + "FR": "Ghana", + "Indicativo": 233, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "95495235-EFB7-4848-8DAE-E0A51548BE69", + "PT": "Geórgia", + "EN": "Georgia", + "ES": "Georgia", + "FR": "Géorgie", + "Indicativo": 995, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "0C8B788C-745F-45FB-9094-172E6FED3B8A", + "PT": "Geórgia", + "EN": "Georgia", + "ES": "Georgia", + "FR": "Géorgie", + "Indicativo": 995, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "6A55473B-5D6B-4E6E-94BD-AD2E3A2DC449", + "PT": "Granada", + "EN": "Grenada", + "ES": "Granada", + "FR": "Grenade", + "Indicativo": 1473, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "93912222-6815-4395-BCD8-DDA27B7E2A9F", + "PT": "Grécia", + "EN": "Greece", + "ES": "Grecia", + "FR": "Grèce", + "Indicativo": 30, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "67ED2F23-84BA-42F6-A809-C44505B42D3C", + "PT": "Gronelândia", + "EN": "Greenland", + "ES": "Groenlandia", + "FR": "Groenland", + "Indicativo": 299, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "A3B58509-FF24-4825-8E59-0F3F538FE0B3", + "PT": "Guadalupe", + "EN": "Guadeloupe", + "ES": "Guadalupe", + "FR": "Guadeloupe", + "Indicativo": 590, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "A14503F8-C97B-44D1-8C86-8F949DF903B5", + "PT": "Guam", + "EN": "Guam", + "ES": "Guam", + "FR": "Guam", + "Indicativo": 671, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "1F945B7D-A642-40D2-8361-81ADBFA74450", + "PT": "Guiana", + "EN": "Guyana", + "ES": "Guyana", + "FR": "Guyane", + "Indicativo": 592, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "A69E48B0-E8A4-4751-809E-98CC546FFBD0", + "PT": "Guiana Francesa", + "EN": "French Guyana", + "ES": "Guayana Francesa", + "FR": "Guyane française", + "Indicativo": 594, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "DBD07BFE-9E6D-46EB-8E87-8A7C220B5A6B", + "PT": "Guiné", + "EN": "Guinea", + "ES": "Guinea", + "FR": "Guinée", + "Indicativo": 224, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "B114E10D-012D-46BD-83C8-C597D77B38CD", + "PT": "Guiné Bissau", + "EN": "Guiné Bissau", + "ES": "Guiné Bissau", + "FR": "Guiné Bissau", + "Indicativo": 245, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "784AB380-4665-40C8-906D-C3320C0337E6", + "PT": "Guiné Equatorial", + "EN": "Lesotho", + "ES": "Lesotho", + "FR": "Lesotho", + "Indicativo": 240, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "8B32909E-F21C-499E-A3D6-5DC3DC359C09", + "PT": "Haiti", + "EN": "Haiti", + "ES": "Haití", + "FR": "Haïti", + "Indicativo": 509, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "6D9BB941-BB27-410A-A0C4-E4FD70C8DD4F", + "PT": "Holanda", + "EN": "Netherlands", + "ES": "Países Bajos", + "FR": "Pays-Bas", + "Indicativo": 31, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "C0DA9D19-A2F2-464C-916B-67059AC06009", + "PT": "Honduras", + "EN": "Honduras", + "ES": "Honduras", + "FR": "Honduras", + "Indicativo": 504, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "992529A6-A2EB-4A7F-80AC-F9531FFD2593", + "PT": "Hong Kong", + "EN": "Yemen", + "ES": "Yemen", + "FR": "Yémen", + "Indicativo": 852, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "56899D7A-68AC-4EFE-A22E-BBD83E0ED471", + "PT": "Hungria", + "EN": "Hungary", + "ES": "Hungría", + "FR": "Hongrie", + "Indicativo": 36, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "31C38149-03B2-441E-8E03-BB8EBC6CA08C", + "PT": "Iêmen", + "EN": "Yemen", + "ES": "Yemen", + "FR": "Yémen", + "Indicativo": 967, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "A44B8EB1-9AA7-4FF2-A288-A978C28A47FC", + "PT": "Ilhas Cayman", + "EN": "Cayman Islands", + "ES": "Islas Caimán", + "FR": "Îles Caïmans", + "Indicativo": 1345, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "651AEF44-5AA1-485E-BCC7-FAE345D76AD7", + "PT": "Ilhas Christmas", + "EN": "Christmas Islands", + "ES": "Islas de Navidad", + "FR": "Îles de Noël", + "Indicativo": 672, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "AEC35B48-8D6E-4234-8E6D-31CC0696AF67", + "PT": "Ilhas Cook", + "EN": "Ilhas Cook", + "ES": "Ilhas Cook", + "FR": "Ilhas Cook", + "Indicativo": 682, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "BB4EA308-F375-460C-A128-1FC3D836EC93", + "PT": "Ilhas Malvinas", + "EN": "Falkland Islands", + "ES": "Islas Malvinas", + "FR": "Îles Falkland", + "Indicativo": 500, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "E9C1020D-06D8-44DD-B46F-58117CA34C36", + "PT": "Ilhas Marshall", + "EN": "Marshall Islands", + "ES": "Islas Marshall", + "FR": "Îles Marshall", + "Indicativo": 692, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "0D210581-FF68-459D-B152-E7CA65758101", + "PT": "Ilhas Salomão", + "EN": "Solomon Islands", + "ES": "Islas Salomón", + "FR": "Îles Salomon", + "Indicativo": 677, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "A41C53D1-C077-4EB9-B046-5A850AF76019", + "PT": "Índia", + "EN": "India", + "ES": "India", + "FR": "Inde", + "Indicativo": 91, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "72B71FD4-A239-483A-A94C-859CA8E647CF", + "PT": "Indonésia", + "EN": "Indonesia", + "ES": "Indonesia", + "FR": "Indonésie", + "Indicativo": 62, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "F5E2ADB7-2A47-4ECB-9939-469D7D9F1103", + "PT": "Irã", + "EN": "Iran", + "ES": "Irán", + "FR": "Iran", + "Indicativo": 98, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "4292EC4A-9119-4A22-8541-52924367DD21", + "PT": "Iraque", + "EN": "Iraq", + "ES": "Iraq", + "FR": "Irak", + "Indicativo": 964, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "C0DF334A-6E6B-4C9E-A521-C30EBB8CECFC", + "PT": "Irlanda", + "EN": "Ireland", + "ES": "Irlanda", + "FR": "Irlande", + "Indicativo": 353, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "EA3896A0-3BDA-4C87-AE97-80D2A056772F", + "PT": "Islândia", + "EN": "Iceland", + "ES": "Islandia", + "FR": "Islande", + "Indicativo": 354, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "326AB169-E7D3-4E85-95BC-510DD9B9AA7A", + "PT": "Israel", + "EN": "Israel", + "ES": "Israel", + "FR": "Israël", + "Indicativo": 972, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "2329A844-9786-44AE-9337-FA7F2212CC20", + "PT": "Itália", + "EN": "Italy", + "ES": "Italia", + "FR": "Italie", + "Indicativo": 39, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "8ECD7687-9F9F-461B-8FCF-F2BEEAAB8264", + "PT": "Jamaica", + "EN": "Jamaica", + "ES": "Jamaica", + "FR": "Jamaïque", + "Indicativo": 1876, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "4EBF2994-E066-49DB-948C-59E056DA3484", + "PT": "Japão", + "EN": "Japan", + "ES": "Japón", + "FR": "Japon", + "Indicativo": 81, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "6CAE11AA-00FC-4184-B2C2-CC19AD6EAA86", + "PT": "Jordânia", + "EN": "Jordan", + "ES": "Jordania", + "FR": "Jordan", + "Indicativo": 962, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "54D36582-3033-450C-AD07-BC21023DF088", + "PT": "Jugoslávia", + "EN": "Yugoslavia", + "ES": "Yugoslavia", + "FR": "Yougoslavie", + "Indicativo": 381, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "2DF67362-4920-4C82-8EAA-04A008A73260", + "PT": "Kiribati", + "EN": "Kiribati", + "ES": "Kiribati", + "FR": "Kiribati", + "Indicativo": 686, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "D9BB1E62-5E01-4251-B818-0FBE45C81460", + "PT": "Kuwait", + "EN": "Kuwait", + "ES": "Kuwait", + "FR": "Koweït", + "Indicativo": 965, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "B5A1C81B-6431-4FE4-B442-68DAEE8D3A18", + "PT": "Laos", + "EN": "Laos", + "ES": "Laos", + "FR": "Laos", + "Indicativo": 856, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "262C6B74-8235-48F9-9611-28EA289448E7", + "PT": "Lesoto", + "EN": "Lesotho", + "ES": "Lesotho", + "FR": "Lesotho", + "Indicativo": 266, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "33D57475-BB8D-4B46-93FF-F2FB29664F7D", + "PT": "Letónia", + "EN": "Latvia", + "ES": "Letonia", + "FR": "Lettonie", + "Indicativo": 371, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "49D178DB-2D66-4ED2-8AE3-6E8B27638412", + "PT": "Líbano", + "EN": "Lebanon", + "ES": "Líbano", + "FR": "Liban", + "Indicativo": 961, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "637137A4-C643-4BBF-984D-EC3B056C34DC", + "PT": "Libéria", + "EN": "Liberia", + "ES": "Liberia", + "FR": "Liberia", + "Indicativo": 231, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "B080CBF8-A4C1-4EFA-9977-EC147644E4E6", + "PT": "Líbia", + "EN": "Libya", + "ES": "Libia", + "FR": "Libye", + "Indicativo": 218, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "95CD9EFF-9190-481F-A8FD-88E8D76BFE06", + "PT": "Liechtenstein", + "EN": "Liechtenstein", + "ES": "Liechtenstein", + "FR": "Liechtenstein", + "Indicativo": 423, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "2EE4638B-75C0-4B6C-B2FE-62A034FE9692", + "PT": "Lituânia", + "EN": "Lithuania", + "ES": "Lituania", + "FR": "Lituanie", + "Indicativo": 370, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "6F4D48F0-96EA-402C-BF54-219845C06BA4", + "PT": "Luxemburgo", + "EN": "Luxembourg", + "ES": "Luxemburgo", + "FR": "Luxembourg", + "Indicativo": 352, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "1B31A703-C22A-45C3-AE69-AFEF7F55D973", + "PT": "Macau", + "EN": "Macao", + "ES": "Macao", + "FR": "Macao", + "Indicativo": 853, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "5139FFDF-B23E-4773-89B7-9BE6689B4F5C", + "PT": "Macedónia do Norte", + "EN": "North Macedonia", + "ES": "Macedonia del Norte", + "FR": "Macédoine du Nord", + "Indicativo": 389, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "38A31889-2E12-4876-BA66-38EA97447B9C", + "PT": "Madagáscar", + "EN": "Madagascar", + "ES": "Madagascar", + "FR": "Madagascar", + "Indicativo": 261, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "F43A9019-233E-4688-A2F7-FE821719F89C", + "PT": "Malásia", + "EN": "Malaysia", + "ES": "Malasia", + "FR": "Malaisie", + "Indicativo": 60, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "692E07DE-A7AC-498C-A59F-0AE28A3FAACD", + "PT": "Malawi", + "EN": "Malawi", + "ES": "Malawi", + "FR": "Malawi", + "Indicativo": 265, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "3ED6B7E5-3A3F-47AE-A4AB-26D0258A6017", + "PT": "Maldivas", + "EN": "Maldives", + "ES": "Maldivas", + "FR": "Maldives", + "Indicativo": 960, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "F79EB932-165E-48AA-AD5D-970CAFF4C84A", + "PT": "Mali", + "EN": "Mali", + "ES": "Mali", + "FR": "Mali", + "Indicativo": 223, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "4CD028C6-6CA9-4566-8499-E2B31BBB66A2", + "PT": "Malta", + "EN": "Malta", + "ES": "Malta", + "FR": "Malte", + "Indicativo": 356, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "C325EB68-E25F-499A-A425-196B1EAC3DA7", + "PT": "Marrocos", + "EN": "Morocco", + "ES": "Marruecos", + "FR": "Maroc", + "Indicativo": 212, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "41D31D66-18DF-4164-BFE7-9FCADA6D7265", + "PT": "Martinica", + "EN": "Martinique", + "ES": "Martinica", + "FR": "Martinique", + "Indicativo": 596, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "C29D86E3-AFD6-46DF-A855-6ABAAFD62D67", + "PT": "Maurícia", + "EN": "Mauritius", + "ES": "Mauricio", + "FR": "Maurice", + "Indicativo": 230, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "F84388EE-B5F2-44A6-9DD2-6FCE166D0DD2", + "PT": "Mauritânia", + "EN": "Mauritania", + "ES": "Mauritania", + "FR": "Mauritanie", + "Indicativo": 222, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "C2B99CAC-D9A9-4983-B783-516F01860A43", + "PT": "Mayotte", + "EN": "Mayotte", + "ES": "Mayotte", + "FR": "Mayotte", + "Indicativo": 269, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "1F858B8F-EA54-43A6-9533-69A5F1D6EA96", + "PT": "México", + "EN": "Mexico", + "ES": "México", + "FR": "Mexique", + "Indicativo": 52, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "819A3905-9C7F-4BC8-BC47-BEC20A4B712F", + "PT": "Micronésia", + "EN": "Micronesia", + "ES": "Micronesia", + "FR": "Micronésie", + "Indicativo": 691, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "26FD4D72-FB17-4968-8DC5-8337AA65229D", + "PT": "Moçambique", + "EN": "Mozambique", + "ES": "Mozambique", + "FR": "Mozambique", + "Indicativo": 258, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "840AE3F4-924F-4B8E-BBD0-7B81C5BE7E8D", + "PT": "Moldávia", + "EN": "Moldova", + "ES": "Moldavia", + "FR": "Moldavie", + "Indicativo": 373, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "60C8F806-87B6-4F45-BDE4-1A579DB4FA65", + "PT": "Mónaco", + "EN": "Monaco", + "ES": "Mónaco", + "FR": "Monaco", + "Indicativo": 377, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "F7019E3D-134E-454E-A76D-E10CFA0FA470", + "PT": "Mongólia", + "EN": "Mongolia", + "ES": "Mongolia", + "FR": "Mongolie", + "Indicativo": 976, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "A3A90F4D-23C7-4628-8EDC-B955A46172B9", + "PT": "Montenegro", + "EN": "Montenegro", + "ES": "Montenegro", + "FR": "Monténégro", + "Indicativo": 382, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "876F9972-B474-4A23-ABBB-5F09F7DB958C", + "PT": "Montserrat", + "EN": "Montserrat", + "ES": "Montserrat", + "FR": "Montserrat", + "Indicativo": 1664, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "A6BD20BB-B9BB-485E-BB33-2E3C7049DAD3", + "PT": "Myanmar", + "EN": "Myanmar", + "ES": "Myanmar", + "FR": "Myanmar", + "Indicativo": 95, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "F9C85692-17C6-457C-B4FF-452E1183BBDB", + "PT": "Namíbia", + "EN": "Namibia", + "ES": "Namibia", + "FR": "Namibie", + "Indicativo": 264, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "11829062-D097-4C9C-BB6D-6DA97E019B41", + "PT": "Nauru", + "EN": "Nauru", + "ES": "Nauru", + "FR": "Nauru", + "Indicativo": 674, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "C3138035-AF11-42DE-B900-1817DD7ED836", + "PT": "Nepal", + "EN": "Nepal", + "ES": "Nepal", + "FR": "Népal", + "Indicativo": 977, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "E1A3A084-B369-420B-ACB6-6EDA84DA4F45", + "PT": "Nicarágua", + "EN": "Nicaragua", + "ES": "Nicaragua", + "FR": "Nicaragua", + "Indicativo": 505, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "BBA631A1-B495-471C-B1D3-796C5B90695B", + "PT": "Níger", + "EN": "Niger", + "ES": "Níger", + "FR": "Niger", + "Indicativo": 227, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "C2B76439-5BE7-435B-AF2F-A54E18BBDBC0", + "PT": "Nigéria", + "EN": "Nigeria", + "ES": "Nigeria", + "FR": "Nigeria", + "Indicativo": 234, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "CC15599B-F79C-4039-A40E-97B841C13652", + "PT": "Niue", + "EN": "Niue", + "ES": "Niue", + "FR": "Niue", + "Indicativo": 683, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "A702DF3B-6DCB-4941-A566-0F6148B56FCA", + "PT": "Noruega", + "EN": "Norway", + "ES": "Noruega", + "FR": "Norvège", + "Indicativo": 47, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "7F58FE6B-918E-472C-BAC9-9BDDC07E59B8", + "PT": "Nova Caledônia", + "EN": "New Caledonia", + "ES": "Nueva Caledonia", + "FR": "Nouvelle-Calédonie", + "Indicativo": 687, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "4E16AA4B-1FF1-47A4-9163-07483A47FFED", + "PT": "Nova Zelândia", + "EN": "New Zealand", + "ES": "Nueva Zelanda", + "FR": "Nouvelle-Zélande", + "Indicativo": 64, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "B89C91F9-A244-4033-8C65-7D07A6E4EEB4", + "PT": "Omã", + "EN": "Oman", + "ES": "Omán", + "FR": "Oman", + "Indicativo": 968, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "5EA46C85-6DFB-4D6A-98F6-C0F2EF089C78", + "PT": "Palau", + "EN": "Palau", + "ES": "Palau", + "FR": "Palau", + "Indicativo": 680, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "85E6282D-DEE9-4A5F-AE01-FB3FF4E158B9", + "PT": "Palestina", + "EN": "Palestine", + "ES": "Palestina", + "FR": "Palestine", + "Indicativo": 970, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "C4A3C423-A0F7-490B-9975-7A9150798BE1", + "PT": "Panamá", + "EN": "Panama", + "ES": "Panamá", + "FR": "Panama", + "Indicativo": 507, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "A759F137-0117-4F08-82CF-04A25E067C17", + "PT": "Papua Nova Guiné", + "EN": "Papua New Guinea", + "ES": "Papúa Nueva Guinea", + "FR": "Papouasie-Nouvelle-Guinée", + "Indicativo": 675, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "47250BC5-5442-4760-8479-EB5463170025", + "PT": "Paquistão", + "EN": "Pakistan", + "ES": "Pakistán", + "FR": "Pakistan", + "Indicativo": 92, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "E4C4E2C7-807C-446B-A33B-AB7B7767C6EB", + "PT": "Paraguai", + "EN": "Paraguay", + "ES": "Paraguay", + "FR": "Paraguay", + "Indicativo": 595, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "E7A13D5E-3FF7-4AB8-9CB7-BC36ACEF5AAA", + "PT": "Peru", + "EN": "Peru", + "ES": "Perú", + "FR": "Pérou", + "Indicativo": 51, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "0BDF1724-8AA8-4FB7-9CD7-C0ECCC09AD47", + "PT": "Polinésia Francesa", + "EN": "Papua New Guinea", + "ES": "Papúa Nueva Guinea", + "FR": "Papouasie-Nouvelle-Guinée", + "Indicativo": 689, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "688740ED-37BE-42E5-BA80-775B619392D2", + "PT": "Polónia", + "EN": "Poland", + "ES": "Polonia", + "FR": "Pologne", + "Indicativo": 48, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "02E5DD3A-EB39-49CD-9196-4394DA19C6DA", + "PT": "Porto Rico", + "EN": "Puerto Rico", + "ES": "Puerto Rico", + "FR": "Porto Rico", + "Indicativo": 1787, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "46FEC979-09E0-43FF-A30E-3C21161C5B9A", + "PT": "Portugal", + "EN": "Portugal", + "ES": "Portugal", + "FR": "Portugal", + "Indicativo": 351, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "42641E19-9335-4787-9851-DC204F0D7A80", + "PT": "Qatar", + "EN": "Qatar", + "ES": "Qatar", + "FR": "Qatar", + "Indicativo": 974, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "F8966B4E-F5BD-4136-9136-591CC4F0447A", + "PT": "Quênia", + "EN": "Kenya", + "ES": "Kenia", + "FR": "Kenya", + "Indicativo": 254, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "2F0D7E14-F4D5-4DCD-8388-8003F3BD1F20", + "PT": "Quirguistão", + "EN": "Kyrgyzstan", + "ES": "Kirguistán", + "FR": "Kirghizistan", + "Indicativo": 996, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "55310F3E-6557-4A96-BC6D-B7E0A335D7B4", + "PT": "Reino Unido", + "EN": "Portugal", + "ES": "Portugal", + "FR": "Portugal", + "Indicativo": 44, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "C60F7BB7-4A0A-4FF4-B857-1598AF4641C4", + "PT": "República Centro-Africana", + "EN": "Central African Republic", + "ES": "República Centroafricana", + "FR": "République centrafricaine", + "Indicativo": 236, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "BE4CCCE2-18D6-4798-96CD-895B88E06C36", + "PT": "República Checa", + "EN": "Czech Republic", + "ES": "República Checa", + "FR": "République tchèque", + "Indicativo": 420, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "DC29A349-D6B7-4FE4-B120-7869D03A7807", + "PT": "República Dominicana", + "EN": "Dominican Republic", + "ES": "República Dominicana", + "FR": "République dominicaine", + "Indicativo": 1809, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "7A8E126A-F1B2-4036-A009-FABC746E3777", + "PT": "Reunião", + "EN": "Reunion", + "ES": "Reunión", + "FR": "Réunion", + "Indicativo": 262, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "73BF35A9-F886-4647-B2C2-30AA5446DBC7", + "PT": "Roménia", + "EN": "Romania", + "ES": "Rumanía", + "FR": "Roumanie", + "Indicativo": 40, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "D8B0858C-18EC-4FAD-BBD1-D8D2CD1F9700", + "PT": "Ruanda", + "EN": "Rwanda", + "ES": "Ruanda", + "FR": "Rwanda", + "Indicativo": 250, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "EDF96515-BACF-443A-ACA9-BC187A7897B7", + "PT": "Saint-Pierre e Miquelon", + "EN": "Saint Pierre and Miquelon", + "ES": "San Pedro y Miquelón", + "FR": "Saint Pierre et Miquelon", + "Indicativo": 508, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "34123A3F-601D-4F64-8D1A-B7BD78FCD8A7", + "PT": "Samoa", + "EN": "Samoa", + "ES": "Samoa", + "FR": "Samoa", + "Indicativo": 685, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "0749B9F3-E64C-4743-B620-205091F25590", + "PT": "San Marino", + "EN": "Spain", + "ES": "España", + "FR": "Espagne", + "Indicativo": 378, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "94791AEF-5E67-4783-88AA-BC6C4033FF97", + "PT": "Santa Helena", + "EN": "Saint Helena", + "ES": "Santa Elena", + "FR": "Sainte-Hélène", + "Indicativo": 290, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "38B28E73-6344-4BE7-B220-53C10B0A7849", + "PT": "Santa Lúcia", + "EN": "Saint Lucia", + "ES": "Santa Lucía", + "FR": "Sainte-Lucie", + "Indicativo": 1758, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "CB26FC84-FDE3-4E0E-A797-185B610FFF45", + "PT": "São Tomé e Príncipe", + "EN": "Sao Tome and Principe", + "ES": "Santo Tomé y Príncipe", + "FR": "Sao Tomé et Principe", + "Indicativo": 239, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "2947493C-2457-40A8-8A1C-486DD9A6B36A", + "PT": "São Vicente e Grenadines", + "EN": "Saint Vincent and the Grenadines", + "ES": "San Vicente y las Granadinas", + "FR": "Saint-Vincent-et-les-Grenadines", + "Indicativo": 1784, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "D93BC657-4F2C-4179-8FF0-966A5275743A", + "PT": "Seicheles", + "EN": "Seychelles", + "ES": "Seychelles", + "FR": "Seychelles", + "Indicativo": 248, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "68528B45-7AB7-4E02-A297-32C42E1A577F", + "PT": "Senegal", + "EN": "Senegal", + "ES": "Senegal", + "FR": "Sénégal", + "Indicativo": 221, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "FEAA6B04-3018-4487-BFAA-B356DBFD5103", + "PT": "Serra Leoa", + "EN": "Somalia", + "ES": "Somalia", + "FR": "Somalie", + "Indicativo": 232, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "E04300D4-2F56-48F8-B6F4-C5C6084B6801", + "PT": "Singapura", + "EN": "Singapore", + "ES": "Singapur", + "FR": "Singapour", + "Indicativo": 65, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "3153452E-76C0-4A33-B74C-4ED94071913E", + "PT": "Síria", + "EN": "Syria", + "ES": "Siria", + "FR": "Syrie", + "Indicativo": 963, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "52B45B72-92D2-4398-BDF3-4CF466B2E2DC", + "PT": "Somália", + "EN": "Somalia", + "ES": "Somalia", + "FR": "Somalie", + "Indicativo": 252, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "48C8EFDF-07D9-45CF-B147-D0A5E9842129", + "PT": "Sri Lanka", + "EN": "Syria", + "ES": "Siria", + "FR": "Syrie", + "Indicativo": 94, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "DFC32C4F-519C-4B1D-A887-99601D2BF6D8", + "PT": "Sudão", + "EN": "Sudan", + "ES": "Sudán", + "FR": "Soudan", + "Indicativo": 249, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "E7000A82-7F45-4163-85A0-E2081F79141A", + "PT": "Sudão do Sul", + "EN": "South Sudan", + "ES": "Sudán del Sur", + "FR": "Sud-Soudan", + "Indicativo": 211, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "45837D2B-773A-4741-A4E8-CB37DA0A9676", + "PT": "Suécia", + "EN": "Sweden", + "ES": "Suecia", + "FR": "Suède", + "Indicativo": 46, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "2468D32E-BF55-450E-9B2E-AEEC7126702F", + "PT": "Suíça", + "EN": "Switzerland", + "ES": "Suiza", + "FR": "Suisse", + "Indicativo": 41, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "1A8007E4-AB2D-4316-974E-EE8CA0AC3A68", + "PT": "Suriname", + "EN": "Suriname", + "ES": "Surinam", + "FR": "Suriname", + "Indicativo": 597, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "C3AD21DD-8D43-48A4-9069-E34CBF0235D8", + "PT": "Tadjiquistão", + "EN": "Tajikistan", + "ES": "Tayikistán", + "FR": "Tadjikistan", + "Indicativo": 992, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "C578EE97-11CC-42AC-B50B-8E5FD6216EFA", + "PT": "Tailândia", + "EN": "Thailand", + "ES": "Tailandia", + "FR": "Thaïlande", + "Indicativo": 66, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "2C110165-B847-45B9-8B3D-530D94F57F0D", + "PT": "Tanzânia", + "EN": "Tanzania", + "ES": "Tanzania", + "FR": "Tanzanie", + "Indicativo": 255, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "19F539FC-4BB0-4674-BA9B-219AFD1BC341", + "PT": "Timor Leste", + "EN": "Thailand", + "ES": "Tailandia", + "FR": "Thaïlande", + "Indicativo": 670, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "5B223FDA-9018-4E2D-85F2-AB9BCE4383B3", + "PT": "Togo", + "EN": "Togo", + "ES": "Togo", + "FR": "Togo", + "Indicativo": 228, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "6B022592-1745-4F8A-849A-DA414F64F571", + "PT": "Tonga", + "EN": "Tonga", + "ES": "Tonga", + "FR": "Tonga", + "Indicativo": 676, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "4A965B9F-4446-4422-820B-B06DCCE603D2", + "PT": "Toquelau", + "EN": "Toquelau", + "ES": "Toquelau", + "FR": "Toquelau", + "Indicativo": 690, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "7A2047D3-BB7C-46E0-A5C9-8298FF781039", + "PT": "Trinidad e Tobago", + "EN": "Trinidad and Tobago", + "ES": "Trinidad y Tobago", + "FR": "Trinité-et-Tobago", + "Indicativo": 1868, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "FD3B20F1-3BED-421D-8BE3-5F9F95D01760", + "PT": "Tunísia", + "EN": "Tunisia", + "ES": "Túnez", + "FR": "Tunisie", + "Indicativo": 216, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "DC765958-53A6-48D7-8B41-4622DB9E3EEF", + "PT": "Turcas e Caico", + "EN": "Turks and Caicos Islands", + "ES": "Islas Turcas y Caicos", + "FR": "Îles Turks et Caicos", + "Indicativo": 1649, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "AC3323D6-D7E3-4035-96A9-7AA3189E6621", + "PT": "Turquemenistão", + "EN": "Turkmenistan", + "ES": "Turkmenistán", + "FR": "Turkménistan", + "Indicativo": 993, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "B91F59EA-4A1A-4DBD-8B40-ECCB0280D4E1", + "PT": "Turquia", + "EN": "Turkey", + "ES": "Turquía", + "FR": "Turquie", + "Indicativo": 90, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "5B66BEC8-1810-4AD7-BF80-7FE0F7FD468E", + "PT": "Tuvalu", + "EN": "Tuvalu", + "ES": "Tuvalu", + "FR": "Tuvalu", + "Indicativo": 688, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "793278F4-805F-4BB2-A270-560097069B6C", + "PT": "Ucrânia", + "EN": "Ukraine", + "ES": "Ucrania", + "FR": "Ukraine", + "Indicativo": 380, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "9046F27A-C476-4FF9-9470-9EA76F64FB3B", + "PT": "Uganda", + "EN": "Uganda", + "ES": "Uganda", + "FR": "Ouganda", + "Indicativo": 256, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "7B1A795B-98D1-4C31-B9EE-A3F73BD7874A", + "PT": "Uruguai", + "EN": "Uruguay", + "ES": "Uruguay", + "FR": "Uruguay", + "Indicativo": 598, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "72B3BF14-DA79-4E05-90C2-EA163D99725C", + "PT": "Uzbequistão", + "EN": "Uzbekistan", + "ES": "Uzbekistán", + "FR": "Ouzbékistan", + "Indicativo": 998, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "BB0DF9F5-B56F-4A73-8B04-75014B03894E", + "PT": "Vanuatu", + "EN": "Vanuatu", + "ES": "Vanuatu", + "FR": "Vanuatu", + "Indicativo": 678, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "061FA25D-34A8-46CE-9E93-9EDB5BE21C77", + "PT": "Vaticano", + "EN": "Vatican City", + "ES": "Ciudad del Vaticano", + "FR": "Cité du Vatican", + "Indicativo": 379, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "3EA11613-7546-4F0F-87AF-2539C2BD0893", + "PT": "Venezuela", + "EN": "Venezuela", + "ES": "Venezuela", + "FR": "Venezuela", + "Indicativo": 58, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "0F0D9FA5-E3EF-4128-B852-38D696FF2AAD", + "PT": "Vietnam", + "EN": "Vietnam", + "ES": "Vietnam", + "FR": "Vietnam", + "Indicativo": 84, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "2E0B745A-C6ED-44AA-85A4-CCDB9C313AB6", + "PT": "Wallis e Futuna", + "EN": "Wallis and Futuna", + "ES": "Wallis y Futuna", + "FR": "Wallis et Futuna", + "Indicativo": 681, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "A72B65DF-D878-4F8D-AD48-5148FFAF04D5", + "PT": "Zâmbia", + "EN": "Zambia", + "ES": "Zambia", + "FR": "Zambie", + "Indicativo": 260, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + }, + { + "Id": "2FE6B184-91B6-4268-B7C2-AE61EEF70A1C", + "PT": "Zimbabué", + "EN": "Zimbabwe", + "ES": "Zimbabue", + "FR": "Zimbabwe", + "Indicativo": 263, + "Ativo": 1, + "CreationDate": "2022-05-13 10:14:57.970" + } + ] + } diff --git a/ifthenpay/classes/Utility/CountryCodes.php b/ifthenpay/classes/Utility/CountryCodes.php new file mode 100644 index 0000000..9430331 --- /dev/null +++ b/ifthenpay/classes/Utility/CountryCodes.php @@ -0,0 +1,64 @@ + $country['Indicativo'], + 'name' => $country[$lang] . ' (+' . $country['Indicativo'] . ')' + ]; + } + + + return $countryCodeOptions; + } catch (\Throwable $th) { + return []; + } + } +} diff --git a/ifthenpay/classes/Utility/Status.php b/ifthenpay/classes/Utility/Status.php index d572247..7c5e0a2 100644 --- a/ifthenpay/classes/Utility/Status.php +++ b/ifthenpay/classes/Utility/Status.php @@ -30,7 +30,8 @@ } class Status { - + + private static $statusPending = "a7b9e3f042d8c16a"; private static $statusSuccess = "6dfcbb0428e4f89c"; private static $statusError = "101737ba0aa2e7c5"; private static $statusCancel = "d4d26126c0f39bf2"; @@ -38,6 +39,8 @@ class Status { public static function getTokenStatus($token) { switch ($token) { + case self::$statusPending: + return 'pending'; case self::$statusSuccess: return 'success'; case self::$statusCancel: @@ -49,9 +52,21 @@ public static function getTokenStatus($token) } } + + + /** + * Get the value of statusPending + */ + public static function getStatusPending() + { + return self::$statusPending; + } + + + /** * Get the value of statusSuccess - */ + */ public static function getStatusSuccess() { return self::$statusSuccess; @@ -59,7 +74,7 @@ public static function getStatusSuccess() /** * Get the value of statusError - */ + */ public static function getStatusError() { return self::$statusError; @@ -67,9 +82,9 @@ public static function getStatusError() /** * Get the value of statusCancel - */ + */ public static function getStatusCancel() { return self::$statusCancel; } -} \ No newline at end of file +} diff --git a/ifthenpay/classes/Utility/Time.php b/ifthenpay/classes/Utility/Time.php new file mode 100644 index 0000000..d7ecec5 --- /dev/null +++ b/ifthenpay/classes/Utility/Time.php @@ -0,0 +1,22 @@ +modify("+$numberOfDays days"); + + return $dateTime->format('Ymd'); + } +} diff --git a/ifthenpay/classes/Utility/Utility.php b/ifthenpay/classes/Utility/Utility.php index 0808888..9fd5faa 100644 --- a/ifthenpay/classes/Utility/Utility.php +++ b/ifthenpay/classes/Utility/Utility.php @@ -209,4 +209,24 @@ public static function GenerateSecurityCode() { $code = strval($rnd); return $code; } + + + /** + * masks a string by replacing the characters according to the binary mask given in $mask + * if mask string is smaller then the string to mask ($text), then it replaces the remainder with the mask character + */ + public static function maskString(string $text, string $mask, string $maskCharacter = 'X') + { + $maskedText = ''; + + for ($i = 0; $i < strlen($text); $i++) { + if(!isset($mask[$i])){ + $maskedText .= $maskCharacter; + }else{ + $maskedText .= ($mask[$i] == '0') ? $maskCharacter : $text[$i]; + } + } + + return $maskedText; + } } diff --git a/ifthenpay/config.xml b/ifthenpay/config.xml index 67e601f..6ff52bb 100755 --- a/ifthenpay/config.xml +++ b/ifthenpay/config.xml @@ -2,7 +2,7 @@ ifthenpay - + @@ -10,4 +10,4 @@ 1 0 - \ No newline at end of file + diff --git a/ifthenpay/controllers/admin/AdminIfthenpayActivateNewGatewayMethod.php b/ifthenpay/controllers/admin/AdminIfthenpayActivateNewGatewayMethod.php new file mode 100644 index 0000000..af3f8fb --- /dev/null +++ b/ifthenpay/controllers/admin/AdminIfthenpayActivateNewGatewayMethod.php @@ -0,0 +1,93 @@ + + * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +if (!defined('_PS_VERSION_')) { + exit; +} + +use PrestaShop\Module\Ifthenpay\Log\IfthenpayLogProcess; +use PrestaShop\Module\Ifthenpay\Utility\Utility; + +class AdminIfthenpayActivateNewGatewayMethodController extends ModuleAdminController +{ + + public function __construct() + { + parent::__construct(); + $this->bootstrap = true; + + } + + public function initContent() + { + parent::initContent(); + + $gatewayKey = $_GET['gatewayKey'] ?? ''; + $paymentMethod = $_GET['paymentMethod'] == 'MB' ? 'MULTIBANCO' : $_GET['paymentMethod']; + + + $psVersion = _PS_VERSION_ ?? ''; + + $module = Module::getInstanceByName('ifthenpay'); + $moduleVersion = $module->version; + + $mailVars = [ + '{backoffice_key}' => Configuration::get('IFTHENPAY_BACKOFFICE_KEY'), + '{gateway_key}' => $gatewayKey, + '{store_email}' => Configuration::get('PS_SHOP_EMAIL'), + '{store_name}' => Configuration::get('PS_SHOP_NAME'), + '{payment_method}' => $paymentMethod, + '{ecommerce_platform}' => "Prestashop " . $psVersion, + '{module_version}' => $moduleVersion, + ]; + + + try { + \Mail::Send( + (int)Configuration::get('PS_LANG_DEFAULT'), + 'activateGatewayMethod', + $paymentMethod . ': Ativação de Serviço', + $mailVars, + 'suporte@ifthenpay.com', + 'Ifthenpay', + null, + null, + null, + null, + _PS_MODULE_DIR_ . 'ifthenpay/mails/', + false, + null + ); + + Utility::setPrestashopCookie('success', sprintf($this->module->l('%s gateway method request sent with email %s'), $paymentMethod, Configuration::get('PS_SHOP_EMAIL'))); + IfthenpayLogProcess::addLog('Email associate method with gateway sent with success', IfthenpayLogProcess::INFO, 0); + Tools::redirectAdmin($this->context->link->getAdminLink('AdminIfthenpayPaymentMethodSetup') . '&paymentMethod=ifthenpaygateway'); + } catch (\Throwable $th) { + Utility::setPrestashopCookie('error', sprintf($this->module->l('Error sending %s gateway method request with email %s'), $paymentMethod, Configuration::get('PS_SHOP_EMAIL'))); + IfthenpayLogProcess::addLog('Error sent email associate gateway method - ' . $th->getMessage(), IfthenpayLogProcess::ERROR, 0); + } + } +} diff --git a/ifthenpay/controllers/admin/AdminIfthenpayPaymentMethodSetup.php b/ifthenpay/controllers/admin/AdminIfthenpayPaymentMethodSetup.php index cb98ffa..e5c852d 100644 --- a/ifthenpay/controllers/admin/AdminIfthenpayPaymentMethodSetup.php +++ b/ifthenpay/controllers/admin/AdminIfthenpayPaymentMethodSetup.php @@ -29,6 +29,7 @@ exit; } +use PrestaShop\Module\Ifthenpay\Factory\Config\IfthenpayConfigFormFactory; use PrestaShop\Module\Ifthenpay\Utility\Utility; use PrestaShop\Module\Ifthenpay\Log\IfthenpayLogProcess; use PrestaShop\Module\Ifthenpay\Factory\Payment\GatewayFactory; @@ -169,6 +170,54 @@ public function ajaxProcessGetCofidisLimits() } + + public function ajaxProcessGetIfthenpayGatewayMethods(): void + { + try { + + $ifthenpaygatewayKey = Tools::getValue('gatewayKey') ?? ''; + + if ($ifthenpaygatewayKey !== '') { + + // payment methods selection + $selectPaymentMethodsHtml = IfthenpayConfigFormFactory::build( + 'ifthenpaygateway', + $this->module, + $this + )->generateIfthenpaygatewayPaymentMethodsHtml($ifthenpaygatewayKey, []); + $json['payment_methods_html'] = $selectPaymentMethodsHtml; + + + // default payment method selection + $selectDefaultPaymentMethodHtml = IfthenpayConfigFormFactory::build( + 'ifthenpaygateway', + $this->module, + $this + )->generateIfthenpaygatewayDefaultPaymentMethodSelectionHtml($ifthenpaygatewayKey); + $json['default_selected_html'] = $selectDefaultPaymentMethodHtml; + + + $json['status'] = 'success'; + + } else { + $json['payment_methods_html'] = '

' . $this->module->l('Please select a Ifthenpay Gateway key to view this field.', pathinfo(__FILE__)['filename']) . '

'; + $json['default_selected_html'] = '

' . $this->module->l('Please select a Ifthenpay Gateway key to view this field.', pathinfo(__FILE__)['filename']) . '

'; + } + die(json_encode($json)); + } catch (\Throwable $th) { + IfthenpayLogProcess::addLog('Error testing the callback in backoffice - ' . $th->getMessage(), IfthenpayLogProcess::ERROR, 0); + + $response = [ + 'status' => 'error', + 'message' => $this->module->l('Invalid data, order not found', pathinfo(__FILE__)['filename']), + ]; + + die(json_encode($response)); + } + } + + + public function ajaxProcessTestCallback() { try { @@ -178,12 +227,14 @@ public function ajaxProcessTestCallback() $isCallbackActive = Configuration::get('IFTHENPAY_CALLBACK_ACTIVATED_FOR_' . strtoupper($method)); $callbackUrl = Configuration::get('IFTHENPAY_'. strtoupper($method) .'_URL_CALLBACK'); $callbackUrl .= '&test=true'; - + $reference = Tools::getValue('reference'); $amount = Tools::getValue('amount'); $mbwayTransactionId = Tools::getValue('mbway_transaction_id'); $payshopTransactionId = Tools::getValue('payshop_transaction_id'); - $cofidispayTransactionId = Tools::getValue('cofidispay_transaction_id'); + $cofidispayTransactionId = Tools::getValue('cofidis_transaction_id'); + $orderId = Tools::getValue('order_id'); + if (!$callbackUrl) { die(json_encode([ @@ -200,35 +251,36 @@ public function ajaxProcessTestCallback() $antiPhishingKey = Configuration::get('IFTHENPAY_' . strtoupper($method) . '_CHAVE_ANTI_PHISHING'); - $callbackUrl = str_replace('[CHAVE_ANTI_PHISHING]', $antiPhishingKey, $callbackUrl); + $callbackUrl = str_replace('[ANTI_PHISHING_KEY]', $antiPhishingKey, $callbackUrl); if ($method === 'multibanco') { $entity = Configuration::get('IFTHENPAY_' . strtoupper($method) . '_ENTIDADE'); - $callbackUrl = str_replace('[ENTIDADE]', $entity, $callbackUrl); - - $callbackUrl = str_replace('[REFERENCIA]', $reference, $callbackUrl); - $callbackUrl = str_replace('[VALOR]', $amount, $callbackUrl); + $callbackUrl = str_replace('[ENTITY]', $entity, $callbackUrl); + $callbackUrl = str_replace('[REFERENCE]', $reference, $callbackUrl); + $callbackUrl = str_replace('[AMOUNT]', $amount, $callbackUrl); } if ($method === 'mbway') { - $callbackUrl = str_replace('[ID_TRANSACAO]', $mbwayTransactionId, $callbackUrl); - $callbackUrl = str_replace('[VALOR]', $amount, $callbackUrl); - $callbackUrl = str_replace('[ESTADO]', 'PAGO', $callbackUrl); + $callbackUrl = str_replace('[REQUEST_ID]', $mbwayTransactionId, $callbackUrl); + $callbackUrl = str_replace('[AMOUNT]', $amount, $callbackUrl); } if ($method === 'payshop') { - $callbackUrl = str_replace('[ID_TRANSACAO]', $payshopTransactionId, $callbackUrl); - $callbackUrl = str_replace('[VALOR]', $amount, $callbackUrl); - $callbackUrl = str_replace('[ESTADO]', 'PAGO', $callbackUrl); + $callbackUrl = str_replace('[REQUEST_ID]', $payshopTransactionId, $callbackUrl); + $callbackUrl = str_replace('[AMOUNT]', $amount, $callbackUrl); } if ($method === 'cofidispay') { - $callbackUrl = str_replace('[ID_TRANSACAO]', $cofidispayTransactionId, $callbackUrl); - $callbackUrl = str_replace('[VALOR]', $amount, $callbackUrl); - $callbackUrl = str_replace('[ESTADO]', 'PAGO', $callbackUrl); + $callbackUrl = str_replace('[REQUEST_ID]', $cofidispayTransactionId, $callbackUrl); + $callbackUrl = str_replace('[AMOUNT]', $amount, $callbackUrl); } + if ($method === 'ifthenpaygateway') { + $callbackUrl = str_replace('[ID]', $orderId, $callbackUrl); + $callbackUrl = str_replace('[AMOUNT]', $amount, $callbackUrl); + } + $webservice = RequestFactory::buildWebservice(); $request = $webservice->getRequest_callback($callbackUrl); diff --git a/ifthenpay/controllers/front/validation.php b/ifthenpay/controllers/front/validation.php index 166d5cc..433aa5c 100644 --- a/ifthenpay/controllers/front/validation.php +++ b/ifthenpay/controllers/front/validation.php @@ -114,9 +114,15 @@ private function isAuthorized($paymentOption) if (!$mbwayPhone) { return $this->module->l('MB WAY phone is required.', pathinfo(__FILE__)['filename']); } - if (strlen($mbwayPhone) < 9) { + if (strlen($mbwayPhone) < 9 || !ctype_digit($mbwayPhone)) { return $this->module->l('MB WAY phone is not valid.', pathinfo(__FILE__)['filename']); } + + $mbwayPhoneCode = Tools::getValue("ifthenpayMbwayPhoneCode") ?? ''; + if ($mbwayPhoneCode != ''){ + $mbwayPhone = $mbwayPhoneCode . '#' . $mbwayPhone; + } + Configuration::updateValue('IFTHENPAY_MBWAY_PHONE_' . $this->context->cart->id, $mbwayPhone); } return true; diff --git a/ifthenpay/ifthenpay.php b/ifthenpay/ifthenpay.php index 11f22c4..a1bd632 100755 --- a/ifthenpay/ifthenpay.php +++ b/ifthenpay/ifthenpay.php @@ -39,6 +39,7 @@ use PrestaShop\Module\Ifthenpay\Factory\Prestashop\PrestashopFactory; use PrestaShop\Module\Ifthenpay\Factory\Config\IfthenpayInstallerFactory; use PrestaShop\Module\Ifthenpay\Factory\Prestashop\PrestashopModelFactory; +use PrestaShop\Module\Ifthenpay\Utility\CountryCodes; class Ifthenpay extends PaymentModule { @@ -49,7 +50,7 @@ public function __construct() { $this->name = 'ifthenpay'; $this->tab = 'payments_gateways'; - $this->version = '8.1.1'; + $this->version = '8.2.0'; $this->author = 'Ifthenpay'; $this->need_instance = 0; $this->bootstrap = true; @@ -103,7 +104,7 @@ public function install() if ( !parent::install() || !$this->registerHook('paymentOptions') || !$this->registerHook('paymentReturn') || !$this->registerHook('displayAdminOrder') || !$this->registerHook('displayOrderDetail') || !$this->registerHook('displayHeader') || - !$this->registerHook('actionAdminControllerSetMedia') || !$this->registerHook('actionFrontControllerSetMedia') || + !$this->registerHook('actionAdminControllerSetMedia') || !$this->registerHook('actionFrontControllerSetMedia') || !$this->registerHook('displayBackOfficeHeader') || !$this->registerHook('actionProductCancel') ) { return false; @@ -216,7 +217,7 @@ protected function renderForm() return $helper->generateForm(array($this->getConfigForm())); } - + /** * Create the structure of your form. * This is the first configuration page, where it shows all payment methods and update status. @@ -226,7 +227,7 @@ protected function getConfigForm() $form = []; /** - * If there is no backofficeKey stored in the DB, + * If there is no backofficeKey stored in the DB, * the user will be asked to enter one. */ if (!$this->ifthenpayConfig['IFTHENPAY_BACKOFFICE_KEY']) { @@ -345,9 +346,9 @@ protected function getConfigForm() } - /** - * Check MB Dynamic References. - * Otherwise, a "request" button must be created. + /** + * Check MB Dynamic References. + * Otherwise, a "request" button must be created. */ $accounts = unserialize(Configuration::get('IFTHENPAY_USER_ACCOUNT')); @@ -401,7 +402,7 @@ protected function getConfigForm() return $form; } - /** + /** * Set values for the inputs. */ protected function getConfigFormValues() @@ -525,7 +526,7 @@ private function postProcessBackofficeKey() ) ); ConfigFactory::buildIfthenpayControllersTabs($this)->dynamicInstall('AdminIfthenpayActivateNewAccount'); - + ConfigFactory::buildIfthenpayControllersTabs($this)->dynamicInstall('AdminIfthenpayActivateNewGatewayMethod'); IfthenpayInstallerFactory::build( 'ifthenpayInstaller', @@ -534,7 +535,7 @@ private function postProcessBackofficeKey() )->execute('install'); Utility::setPrestashopCookie('success', $this->l('Backoffice key was saved with success!')); - IfthenpayLogProcess::addLog('Backoffice key saved with success. - ' . $backofficeKey, IfthenpayLogProcess::INFO, 0); + IfthenpayLogProcess::addLog('Backoffice key saved with success. - ' . Utility::maskString($backofficeKey, '1000101001001010001'), IfthenpayLogProcess::INFO, 0); Utility::redirectIfthenpayConfigPage(); } catch (\Throwable $th) { IfthenpayLogProcess::addLog( @@ -630,10 +631,6 @@ public function hookPaymentOptions($params) $option = PrestashopFactory::buildPaymentOption(); if ($paymentMethod === 'mbway') { - $this->context->smarty->assign( - 'mbwaySvg', - $this->_path . 'views/img/mbway.svg' - ); $this->context->smarty->assign( [ 'action' => $this->context->link->getModuleLink( @@ -646,6 +643,17 @@ public function hookPaymentOptions($params) ), ] ); + + + $lang = $this->context->language->iso_code ?? ''; + $countryCodeOptions = CountryCodes::getCountryCodesAsValueNameArray($lang); + $this->context->smarty->assign( + [ + "countryCodeOptions" => $countryCodeOptions + ] + ); + + $option->setForm( $this->context->smarty->fetch( $this->local_path . @@ -661,6 +669,42 @@ public function hookPaymentOptions($params) ) ); } + if ($paymentMethod === 'ifthenpaygateway') { + $option->setCallToActionText( + $this->l('Pay by ') . $ifthenpayGateway->getAliasPaymentMethods( + $paymentMethod, + $this->context->language->iso_code + ) + ) + ->setAction( + $this->context->link->getModuleLink( + $this->name, + 'validation', + [ + 'paymentOption' => $paymentMethod, + ], + true + ) + ) + ->setModuleName($this->name); + + $logoTypeToShow = Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_SHOW_LOGO'); + $paymentMethodTitle = Configuration::get('IFTHENPAY_IFTHENPAYGATEWAY_TITLE'); + // if show logo + if ($logoTypeToShow === '0') //show regular logo + { + $option->setCallToActionText($this->l('Pay by ') . $paymentMethodTitle); + } else { //show regular logo + $option->setLogo( + Media::getMediaPath( + _PS_MODULE_DIR_ . $this->name . '/views/img/' . $paymentMethod . '_option.png' + ) + ); + } + + $payments_options[] = $option; + continue; + } $option->setCallToActionText( $this->l('Pay by ') . $ifthenpayGateway->getAliasPaymentMethods( $paymentMethod, @@ -729,6 +773,13 @@ public function isValid($params, $paymentMethod) private function isPayMethodConfigured($paymentMethod) { switch ($paymentMethod) { + case 'ifthenpaygateway': + if ( + \Configuration::get('IFTHENPAY_' . strtoupper($paymentMethod) . '_KEY') + ) { + return true; + } + break; case 'multibanco': if ( \Configuration::get('IFTHENPAY_' . strtoupper($paymentMethod) . '_ENTIDADE') && @@ -949,7 +1000,7 @@ public function hookdisplayAdminOrder($params) default: $switchRefund = false; } - + $this->smarty->assign($ifthenpayAdminOrder->getSmartyVariables()->toArray()); $this->smarty->assign('paymentMethods', (array) unserialize($this->ifthenpayConfig['IFTHENPAY_USER_PAYMENT_METHODS'])); $this->smarty->assign('swtichRefund', $switchRefund); @@ -960,7 +1011,7 @@ public function hookdisplayAdminOrder($params) $this->smarty->assign('timeExceeded', $this->l(': the validation time has been exceeded!')); $this->smarty->assign('invalidCode', $this->l('Invalid security code')); $this->smarty->assign('validationSuccessful', $this->l('Security code was inserted successfully! You can now proceed with the refund.')); - + return $this->display(__FILE__, 'admin.tpl'); } catch (\Throwable $th) { @@ -1115,6 +1166,7 @@ public function hookDisplayBackOfficeHeader($params) ConfigFactory::buildCancelPayshopOrder()->cancelOrder(); ConfigFactory::buildCancelMultibancoOrder()->cancelOrder(); ConfigFactory::buildCancelCofidisOrder()->cancelOrder(); + ConfigFactory::buildCancelIfthenpaygatewayOrder()->cancelOrder(); } } @@ -1130,7 +1182,7 @@ public function hookActionProductCancel($params) $paymentData = IfthenpayModelFactory::build($payment)->getByOrderId((string) $orderID); if ($payment == 'multibanco' || $payment == 'payshop') { - + $type = 'warning'; $msg = $this->l('The partial refund feature is not available for ').$payment; @@ -1144,7 +1196,7 @@ public function hookActionProductCancel($params) 'requestId' => $paymentData['transaction_id'], 'amount' => $params['cancel_amount'] ]; - + $ifthenpayGateway = GatewayFactory::build('gateway'); $response = $ifthenpayGateway->refund($body); diff --git a/ifthenpay/mails/activateGatewayMethod.html b/ifthenpay/mails/activateGatewayMethod.html new file mode 100644 index 0000000..09084c0 --- /dev/null +++ b/ifthenpay/mails/activateGatewayMethod.html @@ -0,0 +1,397 @@ + + + + + + Contacto + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + +
+
+ + + + + + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

+ Ativar método de pagamento para a + + Gateway Ifthenpay + +

+ +
+
+
+ Chave de acesso ao backoffice: + {backoffice_key} +
+
+
+ Gateway Key: + + {gateway_key} +
+
+
+ Email Cliente: + + {store_email} +
+
+
+ Método a ativar: + + {payment_method} +
+
+
+ Loja online: + + {store_name} +
+
+
+ Plataforma ecommerce: + + {ecommerce_platform} +
+
+
+ Versão do Módulo ifthenpay: + + {module_version} +
+
+
+ Atualizar Conta Cliente: + Após adicionar o método não precisa de tomar mais nenhuma ação, este método ficará disponível para seleção na página de configuração da extensão +
+
+
+
+
+
+
+ + + + + + +
+
+ + + + + + +
+
+
+
+
+
+ +
+
+
+ + + + +
+
+ Pedido gerado automáticamente pelo módulo Ifthenpay +
+
+
+
diff --git a/ifthenpay/mails/activateGatewayMethod.txt b/ifthenpay/mails/activateGatewayMethod.txt new file mode 100644 index 0000000..1f70212 --- /dev/null +++ b/ifthenpay/mails/activateGatewayMethod.txt @@ -0,0 +1,11 @@ +Ativar método de pagamento para a Gateway Ifthenpay +Chave de acesso ao backoffice: {backoffice_key} +Gateway Key: {gateway_key} +Email Cliente: {store_email} +Método a ativar: {payment_method} +Loja online: {store_name} +Plataforma ecommerce: {ecommerce_platform} +Versão do Módulo ifthenpay: {module_version} +Atualizar Conta Cliente: Após adicionar o método não precisa de tomar mais nenhuma ação, este método ficará disponível para seleção na página de configuração da extensão. + +Pedido gerado automáticamente pelo módulo Ifthenpay diff --git a/ifthenpay/mails/en/activateGatewayMethod.html b/ifthenpay/mails/en/activateGatewayMethod.html new file mode 100644 index 0000000..09084c0 --- /dev/null +++ b/ifthenpay/mails/en/activateGatewayMethod.html @@ -0,0 +1,397 @@ + + + + + + Contacto + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + +
+
+ + + + + + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

+ Ativar método de pagamento para a + + Gateway Ifthenpay + +

+ +
+
+
+ Chave de acesso ao backoffice: + {backoffice_key} +
+
+
+ Gateway Key: + + {gateway_key} +
+
+
+ Email Cliente: + + {store_email} +
+
+
+ Método a ativar: + + {payment_method} +
+
+
+ Loja online: + + {store_name} +
+
+
+ Plataforma ecommerce: + + {ecommerce_platform} +
+
+
+ Versão do Módulo ifthenpay: + + {module_version} +
+
+
+ Atualizar Conta Cliente: + Após adicionar o método não precisa de tomar mais nenhuma ação, este método ficará disponível para seleção na página de configuração da extensão +
+
+
+
+
+
+
+ + + + + + +
+
+ + + + + + +
+
+
+
+
+
+ +
+
+
+ + + + +
+
+ Pedido gerado automáticamente pelo módulo Ifthenpay +
+
+
+
diff --git a/ifthenpay/mails/en/activateGatewayMethod.txt b/ifthenpay/mails/en/activateGatewayMethod.txt new file mode 100644 index 0000000..1f70212 --- /dev/null +++ b/ifthenpay/mails/en/activateGatewayMethod.txt @@ -0,0 +1,11 @@ +Ativar método de pagamento para a Gateway Ifthenpay +Chave de acesso ao backoffice: {backoffice_key} +Gateway Key: {gateway_key} +Email Cliente: {store_email} +Método a ativar: {payment_method} +Loja online: {store_name} +Plataforma ecommerce: {ecommerce_platform} +Versão do Módulo ifthenpay: {module_version} +Atualizar Conta Cliente: Após adicionar o método não precisa de tomar mais nenhuma ação, este método ficará disponível para seleção na página de configuração da extensão. + +Pedido gerado automáticamente pelo módulo Ifthenpay diff --git a/ifthenpay/mails/en/ifthenpaygateway.html b/ifthenpay/mails/en/ifthenpaygateway.html new file mode 100644 index 0000000..2af4c6b --- /dev/null +++ b/ifthenpay/mails/en/ifthenpaygateway.html @@ -0,0 +1,156 @@ + + + + + + Message from store {shop_name} + + + + + + + + + + + + +
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Hi {firstname} {lastname},
+ Thanks for shopping at {shop_name}! +
+
+ + + + + + +
  + +

+ Order {order_name} - Wait for payment by Ifthenpay Gateway

+ + Your order with the reference {order_name} has been successfully placed and will be dispatched as soon as payment is received . + +
+
 
+
+ + + + + + + + + + + + {deadline} + +
Gateway Link: {payment_url}
Total to Pay: {total_paid}
+
+ + + You can review your order and download your invoice at "Orders history" your customer account by clicking "My account" in our store. + + +
+ + + If you have a visitor account, you can track your order at "Visitor orders" from our store. + +
+
 
+ + diff --git a/ifthenpay/mails/en/ifthenpaygateway.txt b/ifthenpay/mails/en/ifthenpaygateway.txt new file mode 100644 index 0000000..95b7277 --- /dev/null +++ b/ifthenpay/mails/en/ifthenpaygateway.txt @@ -0,0 +1,23 @@ +Hi {firstname} {lastname}, + +Thank you for shopping in the store {shop_name}! + +Your order {order_name} has been successfully placed and will be shipped as soon as your payment is confirmed. + +You Chose payment by Payshop reference. + +Here are the details to make the payment: + +Gateway Link: {payment_url} + +Total to Pay: {total_paid} + +Deadline: {deadline} + +You can review your Order and download your Invoice in the "Order History" section from your Customer Account by clicking on "My Account" in our store. + +If you still have a Visitor Account, you can follow your Order by using this link: {shop_url} guest-tracking.php + +{shop_name} - {shop_url} + +{shop_url} powered by PrestaShop™ diff --git a/ifthenpay/mails/en/ifthenpaygateway_conf.html b/ifthenpay/mails/en/ifthenpaygateway_conf.html new file mode 100644 index 0000000..6889f97 --- /dev/null +++ b/ifthenpay/mails/en/ifthenpaygateway_conf.html @@ -0,0 +1,49 @@ + + + + + {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{shop_name}
 
Hi, {firstname} {lastname},
 
Your order, {order_name} - Payment confirmed
 
Thank you very much for purchasing at {shop_name}!

Payment for your order, {order_name} was successfully processed.
 
If you want to view or download your order invoice via  "Order history" within your virtual store account.

If you have a guest account, you can track your order through the link "Guest Tracking" 
 
{shop_name}
+ + \ No newline at end of file diff --git a/ifthenpay/mails/en/ifthenpaygateway_conf.txt b/ifthenpay/mails/en/ifthenpaygateway_conf.txt new file mode 100644 index 0000000..365da90 --- /dev/null +++ b/ifthenpay/mails/en/ifthenpaygateway_conf.txt @@ -0,0 +1,12 @@ +Hi {firstname} {lastname}, + +Thanks for buying {shop_name}! + +The payment for your order {order_name} has been successfully processed. + +By accessing your account, you can review your request. + +If you have a guest account you can track your order through this link: {shop_url}?controller=guest-tracking + +{shop_name} - {shop_url} + diff --git a/ifthenpay/mails/en/ifthenpaygateway_conf_16.html b/ifthenpay/mails/en/ifthenpaygateway_conf_16.html new file mode 100644 index 0000000..984ffd9 --- /dev/null +++ b/ifthenpay/mails/en/ifthenpaygateway_conf_16.html @@ -0,0 +1,132 @@ + + + + + + Message from store {shop_name} + + + + + + + + + +
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Hi {firstname} {lastname},
+ Thanks for shopping at {shop_name}! +
+
+ + + + + + +
  + +

+ Order {order_name} - Payment confirmed +

+ + Payment of your order {order_name} has been successfully processed. +
+
 
+
+ + + You can review your order and download your invoice at "Orders history" your customer account by clicking "My account" in our store. + + +
+ + + If you have a visitor account, you can track your order at "Visitor orders" from our store. + + +
+
 
+ + \ No newline at end of file diff --git a/ifthenpay/mails/en/ifthenpaygateway_conf_16.txt b/ifthenpay/mails/en/ifthenpaygateway_conf_16.txt new file mode 100644 index 0000000..8258883 --- /dev/null +++ b/ifthenpay/mails/en/ifthenpaygateway_conf_16.txt @@ -0,0 +1,31 @@ + +[{shop_url}] + +Hi {firstname} {lastname}, + +Thanks for shopping at {shop_name}! + +Your order with the reference {order_name} has been placed with +success and will BE SHIPPED AS SOON AS THE PAYMENT IS RECEIVED. + +You have chosen to pay by Multibanco. + +Here are the details to make the payment: + +Gateway Link: {payment_url} + +Total to Pay: {total_paid} + +Deadline: {deadline} + +You can review your order and download your invoice from +from the "Order history" section [{history_url}] +of your customer account by clicking on "My Account" +[{my_account_url}] in our store. + +If you have a visitor account, you can track your order on +"Visitor orders" section +[{guest_tracking_url}] from our store. + +{shop_name} [{shop_url}] uses the platform +PrestaShop (tm) [http://www.prestashop.com/] diff --git a/ifthenpay/mails/ifthenpaygateway.html b/ifthenpay/mails/ifthenpaygateway.html new file mode 100644 index 0000000..87fc347 --- /dev/null +++ b/ifthenpay/mails/ifthenpaygateway.html @@ -0,0 +1,154 @@ + + + + + + Mensagem a partir da loja {shop_name} + + + + + + + + + + + + +
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Olá {firstname} {lastname},
+ Obrigado por fazer compras na {shop_name}! +
+
+ + + + + + +
  + +

+ Encomenda {order_name} - Aguardar pagamento por Ifthenpay Gateway

+ + A sua encomenda com a referência {order_name} foi colocada com sucesso e será despachada logo que seja recepcionado o pagamento. +
+
 
+
+ + + + + + + + + + + + + +
Link Gateway: {payment_url}
Valor: {total_paid}
Data limite: {deadline}
+
+ + + Pode rever a sua encomenda e descarregar a sua fatura em "Histórico de encomendas" da sua conta de cliente clicando em "A minha conta" na nossa loja. + +
+ + + Se tiver uma conta de visitante, pode seguir a sua encomenda em "Encomendas de visitantes" da nossa loja. + +
+
 
+ + diff --git a/ifthenpay/mails/ifthenpaygateway_16.html b/ifthenpay/mails/ifthenpaygateway_16.html new file mode 100644 index 0000000..eeae65d --- /dev/null +++ b/ifthenpay/mails/ifthenpaygateway_16.html @@ -0,0 +1,163 @@ + + + + + + Mensagem a partir da loja {shop_name} + + + + + + + + + +
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Olá {firstname} {lastname},
+ Obrigado por fazer compras na {shop_name}! +
+
+ + + + + + +
  + +

+ Encomenda {order_name} - Aguardar pagamento por Ifthenpay Gateway +

+ + A sua encomenda com a referência {order_name} foi colocada com sucesso e será despachada logo que seja recepcionado o pagamento. +
+
 
+
+ + + + + + +
  + +

+ Selecionou realizar o pagamento por Ifthenpay Gateway. +

+ + + + + + + + + + + + + + +
Link Gateway: {payment_url}
Valor: {total_paid}
Data limite: {deadline}
+
+
+
 
+
+ + + Pode rever a sua encomenda e fazer download da sua fatura apartir da seção "Histórico de encomendas" da sua conta de cliente clicando em "A minha conta" na nossa loja. + +
+ + + Se tiver uma conta de visitante, pode seguir a sua encomenda na seção "Encomendas de visitantes" da nossa loja. + +
+
 
+ + diff --git a/ifthenpay/mails/ifthenpaygateway_16.txt b/ifthenpay/mails/ifthenpaygateway_16.txt new file mode 100644 index 0000000..f4fcff4 --- /dev/null +++ b/ifthenpay/mails/ifthenpaygateway_16.txt @@ -0,0 +1,31 @@ + +[{shop_url}] + +Olá {firstname} {lastname}, + +Obrigado por fazer compras na {shop_name}! + +A sua encomenda com a referência {order_name} foi colocada com +sucesso e será DESPACHADA LOGO QUE SEJA RECEPCIONADO O PAGAMENTO. + +Selecionou realizar o pagamento por Ifthenpay Gateway. + +Aqui estão os detalhes para realizar o pagamento: + +Link Gateway: {payment_url} + +Valor: {total_paid} + +Validade: {deadline} + +Pode rever a sua encomenda e fazer download da sua fatura apartir +da seção "Histórico de encomendas" [{history_url}] +da sua conta de cliente clicando em "A minha conta" +[{my_account_url}] na nossa loja. + +Se tiver uma conta de visitante, pode seguir a sua encomenda na +seção "Encomendas de visitantes" +[{guest_tracking_url}] da nossa loja. + +{shop_name} [{shop_url}] usa a plataforma +PrestaShop(tm) [http://www.prestashop.com/] diff --git a/ifthenpay/mails/ifthenpaygateway_conf.html b/ifthenpay/mails/ifthenpaygateway_conf.html new file mode 100644 index 0000000..36c8f6e --- /dev/null +++ b/ifthenpay/mails/ifthenpaygateway_conf.html @@ -0,0 +1,49 @@ + + + + + {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{shop_name}
 
Olá, {firstname} {lastname},
 
Seu pedido, {order_name} - Pagamento confirmado
 
Muito obrigado pela compra na {shop_name}!

Pagamento do seu pedido, {order_name} foi processado com sucesso.
 
Se quiser visualizar ou fazer download da sua fatura do seu pedido através do  "Histórico de pedidos" dentro da sua conta na loja virtual.

Se tem uma conta de convidado, pode acompanhar seu pedido pelo link "Guest Tracking" 
 
{shop_name}
+ + \ No newline at end of file diff --git a/ifthenpay/mails/ifthenpaygateway_conf.txt b/ifthenpay/mails/ifthenpaygateway_conf.txt new file mode 100644 index 0000000..1338f6b --- /dev/null +++ b/ifthenpay/mails/ifthenpaygateway_conf.txt @@ -0,0 +1,12 @@ +Olá {firstname} {lastname}, + +Obrigado pela compra {shop_name}! + +O pagamento do seu pedido {order_name} foi processado com sucesso. + +Acendendo à sua conta poderá rever o seu pedido. + +Se tem uma conta de convidado pode acompanhar seu pedido através deste link: {shop_url}?controller=guest-tracking + +{shop_name} - {shop_url} + diff --git a/ifthenpay/mails/ifthenpaygateway_conf_16.html b/ifthenpay/mails/ifthenpaygateway_conf_16.html new file mode 100644 index 0000000..c3da65e --- /dev/null +++ b/ifthenpay/mails/ifthenpaygateway_conf_16.html @@ -0,0 +1,130 @@ + + + + + + Mensagem a partir da loja {shop_name} + + + + + + + + + +
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Olá {firstname} {lastname},
+ Obrigado por fazer compras na {shop_name}! +
+
+ + + + + + +
  + +

+ Encomenda {order_name} - Pagamento confirmado +

+ + Pagamento do seu pedido {order_name} foi processado com sucesso. +
+
 
+
+ + + Pode rever a sua encomenda e fazer download da sua fatura apartir da seção "Histórico de encomendas" da sua conta de cliente clicando em "A minha conta" na nossa loja. + +
+ + + Se tiver uma conta de visitante, pode seguir a sua encomenda na seção "Encomendas de visitantes" da nossa loja. + +
+
 
+ + \ No newline at end of file diff --git a/ifthenpay/mails/ifthenpaygateway_conf_16.txt b/ifthenpay/mails/ifthenpaygateway_conf_16.txt new file mode 100644 index 0000000..f4fcff4 --- /dev/null +++ b/ifthenpay/mails/ifthenpaygateway_conf_16.txt @@ -0,0 +1,31 @@ + +[{shop_url}] + +Olá {firstname} {lastname}, + +Obrigado por fazer compras na {shop_name}! + +A sua encomenda com a referência {order_name} foi colocada com +sucesso e será DESPACHADA LOGO QUE SEJA RECEPCIONADO O PAGAMENTO. + +Selecionou realizar o pagamento por Ifthenpay Gateway. + +Aqui estão os detalhes para realizar o pagamento: + +Link Gateway: {payment_url} + +Valor: {total_paid} + +Validade: {deadline} + +Pode rever a sua encomenda e fazer download da sua fatura apartir +da seção "Histórico de encomendas" [{history_url}] +da sua conta de cliente clicando em "A minha conta" +[{my_account_url}] na nossa loja. + +Se tiver uma conta de visitante, pode seguir a sua encomenda na +seção "Encomendas de visitantes" +[{guest_tracking_url}] da nossa loja. + +{shop_name} [{shop_url}] usa a plataforma +PrestaShop(tm) [http://www.prestashop.com/] diff --git a/ifthenpay/mails/pt/activateGatewayMethod.html b/ifthenpay/mails/pt/activateGatewayMethod.html new file mode 100644 index 0000000..09084c0 --- /dev/null +++ b/ifthenpay/mails/pt/activateGatewayMethod.html @@ -0,0 +1,397 @@ + + + + + + Contacto + + + + + + + + + + + + + + + + + + + + + + + +
+
+ + + + + +
+
+ + + + + + +
+
+ + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+
+

+ Ativar método de pagamento para a + + Gateway Ifthenpay + +

+ +
+
+
+ Chave de acesso ao backoffice: + {backoffice_key} +
+
+
+ Gateway Key: + + {gateway_key} +
+
+
+ Email Cliente: + + {store_email} +
+
+
+ Método a ativar: + + {payment_method} +
+
+
+ Loja online: + + {store_name} +
+
+
+ Plataforma ecommerce: + + {ecommerce_platform} +
+
+
+ Versão do Módulo ifthenpay: + + {module_version} +
+
+
+ Atualizar Conta Cliente: + Após adicionar o método não precisa de tomar mais nenhuma ação, este método ficará disponível para seleção na página de configuração da extensão +
+
+
+
+
+
+
+ + + + + + +
+
+ + + + + + +
+
+
+
+
+
+ +
+
+
+ + + + +
+
+ Pedido gerado automáticamente pelo módulo Ifthenpay +
+
+
+
diff --git a/ifthenpay/mails/pt/activateGatewayMethod.txt b/ifthenpay/mails/pt/activateGatewayMethod.txt new file mode 100644 index 0000000..1f70212 --- /dev/null +++ b/ifthenpay/mails/pt/activateGatewayMethod.txt @@ -0,0 +1,11 @@ +Ativar método de pagamento para a Gateway Ifthenpay +Chave de acesso ao backoffice: {backoffice_key} +Gateway Key: {gateway_key} +Email Cliente: {store_email} +Método a ativar: {payment_method} +Loja online: {store_name} +Plataforma ecommerce: {ecommerce_platform} +Versão do Módulo ifthenpay: {module_version} +Atualizar Conta Cliente: Após adicionar o método não precisa de tomar mais nenhuma ação, este método ficará disponível para seleção na página de configuração da extensão. + +Pedido gerado automáticamente pelo módulo Ifthenpay diff --git a/ifthenpay/mails/pt/ifthenpaygateway.html b/ifthenpay/mails/pt/ifthenpaygateway.html new file mode 100644 index 0000000..87fc347 --- /dev/null +++ b/ifthenpay/mails/pt/ifthenpaygateway.html @@ -0,0 +1,154 @@ + + + + + + Mensagem a partir da loja {shop_name} + + + + + + + + + + + + +
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Olá {firstname} {lastname},
+ Obrigado por fazer compras na {shop_name}! +
+
+ + + + + + +
  + +

+ Encomenda {order_name} - Aguardar pagamento por Ifthenpay Gateway

+ + A sua encomenda com a referência {order_name} foi colocada com sucesso e será despachada logo que seja recepcionado o pagamento. +
+
 
+
+ + + + + + + + + + + + + +
Link Gateway: {payment_url}
Valor: {total_paid}
Data limite: {deadline}
+
+ + + Pode rever a sua encomenda e descarregar a sua fatura em "Histórico de encomendas" da sua conta de cliente clicando em "A minha conta" na nossa loja. + +
+ + + Se tiver uma conta de visitante, pode seguir a sua encomenda em "Encomendas de visitantes" da nossa loja. + +
+
 
+ + diff --git a/ifthenpay/mails/pt/ifthenpaygateway.txt b/ifthenpay/mails/pt/ifthenpaygateway.txt new file mode 100644 index 0000000..1614a1c --- /dev/null +++ b/ifthenpay/mails/pt/ifthenpaygateway.txt @@ -0,0 +1,23 @@ +Olá {firstname} {lastname}, + +Obrigado por ter feito compras na loja {shop_name}! + +Sua encomenda {order_name} foi colocada com sucesso e será enviada logo que o seu pagamento for confirmado. + +Escolheu como forma de pagamento a Pagamento por Payshop. + +Aqui estão os detalhes para realizar o pagamento: + +Gateway Link: {payment_url} + +Valor: {total_paid} + +Validade: {deadline} + +Pode rever a sua Encomenda e realizar a descarga (download) da sua Fatura na secção "Histórico de Encomendas" a partir da sua Conta de Cliente por clicar em "Minha Conta" na nossa loja. + +Se possui ainda uma Conta de Visitante, pode seguir a sua Encomenda por usar este link: {shop_url}guest-tracking.php + +{shop_name} - {shop_url} + +{shop_url} powered by PrestaShop™ diff --git a/ifthenpay/mails/pt/ifthenpaygateway_16.html b/ifthenpay/mails/pt/ifthenpaygateway_16.html new file mode 100644 index 0000000..886919b --- /dev/null +++ b/ifthenpay/mails/pt/ifthenpaygateway_16.html @@ -0,0 +1,163 @@ + + + + + + Mensagem a partir da loja {shop_name} + + + + + + + + + +
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Olá {firstname} {lastname},
+ Obrigado por fazer compras na {shop_name}! +
+
+ + + + + + +
  + +

+ Encomenda {order_name} - Aguardar pagamento por Ifthenpay Gateway +

+ + A sua encomenda com a referência {order_name} foi colocada com sucesso e será despachada logo que seja recepcionado o pagamento. +
+
 
+
+ + + + + + +
  + +

+ Selecionou realizar o pagamento por Ifthenpay Gateway. +

+ + + + + + + + + + + + + + +
Link Gateway: {payment_url}
Valor: {total_paid}
Data limite: {deadline}
+
+
+
 
+
+ + + Pode rever a sua encomenda e fazer download da sua fatura apartir da seção "Histórico de encomendas" da sua conta de cliente clicando em "A minha conta" na nossa loja. + +
+ + + Se tiver uma conta de visitante, pode seguir a sua encomenda na seção "Encomendas de visitantes" da nossa loja. + +
+
 
+ + diff --git a/ifthenpay/mails/pt/ifthenpaygateway_16.txt b/ifthenpay/mails/pt/ifthenpaygateway_16.txt new file mode 100644 index 0000000..f4fcff4 --- /dev/null +++ b/ifthenpay/mails/pt/ifthenpaygateway_16.txt @@ -0,0 +1,31 @@ + +[{shop_url}] + +Olá {firstname} {lastname}, + +Obrigado por fazer compras na {shop_name}! + +A sua encomenda com a referência {order_name} foi colocada com +sucesso e será DESPACHADA LOGO QUE SEJA RECEPCIONADO O PAGAMENTO. + +Selecionou realizar o pagamento por Ifthenpay Gateway. + +Aqui estão os detalhes para realizar o pagamento: + +Link Gateway: {payment_url} + +Valor: {total_paid} + +Validade: {deadline} + +Pode rever a sua encomenda e fazer download da sua fatura apartir +da seção "Histórico de encomendas" [{history_url}] +da sua conta de cliente clicando em "A minha conta" +[{my_account_url}] na nossa loja. + +Se tiver uma conta de visitante, pode seguir a sua encomenda na +seção "Encomendas de visitantes" +[{guest_tracking_url}] da nossa loja. + +{shop_name} [{shop_url}] usa a plataforma +PrestaShop(tm) [http://www.prestashop.com/] diff --git a/ifthenpay/mails/pt/ifthenpaygateway_conf.html b/ifthenpay/mails/pt/ifthenpaygateway_conf.html new file mode 100644 index 0000000..36c8f6e --- /dev/null +++ b/ifthenpay/mails/pt/ifthenpaygateway_conf.html @@ -0,0 +1,49 @@ + + + + + {shop_name} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
{shop_name}
 
Olá, {firstname} {lastname},
 
Seu pedido, {order_name} - Pagamento confirmado
 
Muito obrigado pela compra na {shop_name}!

Pagamento do seu pedido, {order_name} foi processado com sucesso.
 
Se quiser visualizar ou fazer download da sua fatura do seu pedido através do  "Histórico de pedidos" dentro da sua conta na loja virtual.

Se tem uma conta de convidado, pode acompanhar seu pedido pelo link "Guest Tracking" 
 
{shop_name}
+ + \ No newline at end of file diff --git a/ifthenpay/mails/pt/ifthenpaygateway_conf.txt b/ifthenpay/mails/pt/ifthenpaygateway_conf.txt new file mode 100644 index 0000000..1338f6b --- /dev/null +++ b/ifthenpay/mails/pt/ifthenpaygateway_conf.txt @@ -0,0 +1,12 @@ +Olá {firstname} {lastname}, + +Obrigado pela compra {shop_name}! + +O pagamento do seu pedido {order_name} foi processado com sucesso. + +Acendendo à sua conta poderá rever o seu pedido. + +Se tem uma conta de convidado pode acompanhar seu pedido através deste link: {shop_url}?controller=guest-tracking + +{shop_name} - {shop_url} + diff --git a/ifthenpay/mails/pt/ifthenpaygateway_conf_16.html b/ifthenpay/mails/pt/ifthenpaygateway_conf_16.html new file mode 100644 index 0000000..c3da65e --- /dev/null +++ b/ifthenpay/mails/pt/ifthenpaygateway_conf_16.html @@ -0,0 +1,130 @@ + + + + + + Mensagem a partir da loja {shop_name} + + + + + + + + + +
  + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Olá {firstname} {lastname},
+ Obrigado por fazer compras na {shop_name}! +
+
+ + + + + + +
  + +

+ Encomenda {order_name} - Pagamento confirmado +

+ + Pagamento do seu pedido {order_name} foi processado com sucesso. +
+
 
+
+ + + Pode rever a sua encomenda e fazer download da sua fatura apartir da seção "Histórico de encomendas" da sua conta de cliente clicando em "A minha conta" na nossa loja. + +
+ + + Se tiver uma conta de visitante, pode seguir a sua encomenda na seção "Encomendas de visitantes" da nossa loja. + +
+
 
+ + \ No newline at end of file diff --git a/ifthenpay/mails/pt/ifthenpaygateway_conf_16.txt b/ifthenpay/mails/pt/ifthenpaygateway_conf_16.txt new file mode 100644 index 0000000..f4fcff4 --- /dev/null +++ b/ifthenpay/mails/pt/ifthenpaygateway_conf_16.txt @@ -0,0 +1,31 @@ + +[{shop_url}] + +Olá {firstname} {lastname}, + +Obrigado por fazer compras na {shop_name}! + +A sua encomenda com a referência {order_name} foi colocada com +sucesso e será DESPACHADA LOGO QUE SEJA RECEPCIONADO O PAGAMENTO. + +Selecionou realizar o pagamento por Ifthenpay Gateway. + +Aqui estão os detalhes para realizar o pagamento: + +Link Gateway: {payment_url} + +Valor: {total_paid} + +Validade: {deadline} + +Pode rever a sua encomenda e fazer download da sua fatura apartir +da seção "Histórico de encomendas" [{history_url}] +da sua conta de cliente clicando em "A minha conta" +[{my_account_url}] na nossa loja. + +Se tiver uma conta de visitante, pode seguir a sua encomenda na +seção "Encomendas de visitantes" +[{guest_tracking_url}] da nossa loja. + +{shop_name} [{shop_url}] usa a plataforma +PrestaShop(tm) [http://www.prestashop.com/] diff --git a/ifthenpay/translations/pt.php b/ifthenpay/translations/pt.php index 630e428..d26ebc6 100755 --- a/ifthenpay/translations/pt.php +++ b/ifthenpay/translations/pt.php @@ -21,6 +21,7 @@ $_MODULE['<{ifthenpay}prestashop>ifthenpay_68b694e3fa9e145d0062587526875551'] = 'Métodos de pagamento atualizados com sucesso!'; $_MODULE['<{ifthenpay}prestashop>ifthenpay_61fb4576f3e45f8fbea20a5117c543ac'] = 'Erro ao salvar métodos de pagamento!'; $_MODULE['<{ifthenpay}prestashop>ifthenpay_d22e8bf6263dfeb9e56945a2075b6b34'] = 'Pagamento por '; +$_MODULE['<{ifthenpay}prestashop>ifthenpay_7fd935169c162d84067a6f82ba800bdd'] = 'Detalhe da ordem de pagamento apenas está disponível em contexto de loja. Selecione a loja no seletor suspenso na parte superior da tela.'; $_MODULE['<{ifthenpay}prestashop>ifthenpay_a1bec2c3a9270c7739478cc5a50977c1'] = 'O reembolso parcial não está disponível para '; $_MODULE['<{ifthenpay}prestashop>ifthenpay_71eae2197220f2227cb189ec46669a96'] = 'Tem a certeza que deseja fazer um reembolso do pagamento anteriormente realizado? Caso proceda, a seguinte operação será irreversível.'; $_MODULE['<{ifthenpay}prestashop>ifthenpay_f7718ee0bb474e598102b877afc29d98'] = 'Notificação de reembolso enviada com sucesso!'; @@ -36,115 +37,6 @@ $_MODULE['<{ifthenpay}prestashop>ifthenpay_f7d0971a81767a31cece3a9f90e53801'] = 'Número de Telemóvel MB WAY'; $_MODULE['<{ifthenpay}prestashop>ifthenpay_40c536671e638efbe0a5045390f81876'] = 'Ocorreu um erro ao obter os detalhes da encomenda.'; $_MODULE['<{ifthenpay}prestashop>ifthenpay_84eed055f473cdf350c00c608b2bb1af'] = 'Ocorreu um erro durante a requisição à API Ifthenpay. Não foi possível reembolsar o pagamento pretendido.'; -$_MODULE['<{ifthenpay}prestashop>ifthenpaysql_b466eee08a9b34db749d4805d50e95d8'] = 'Ocorreu um erro ao criar a tabela ifthenpay payment shop!'; -$_MODULE['<{ifthenpay}prestashop>ifthenpaysql_e6d755c2053083d4b5d444bfe4bf521c'] = 'Ocorreu um erro ao criar a tabela ifthenpay payment!'; -$_MODULE['<{ifthenpay}prestashop>ifthenpaysql_9f4240a0926b09586510034ae430f688'] = 'Ocorreu um erro ao criar a tabela ifthenpay log!'; -$_MODULE['<{ifthenpay}prestashop>ifthenpaysql_3a950843ef852fcb407c0a67b0af7ad6'] = 'Ocorreu um erro ao apagar a tabela ifthenpay!'; -$_MODULE['<{ifthenpay}prestashop>ifthenpaysql_e90b4a11ba5f7f995071874b39f9aca1'] = 'Ocorreu um erro ao apagar a tabela ifthenpay payment shop!'; -$_MODULE['<{ifthenpay}prestashop>ifthenpaysql_6551f6471a15db60c3d34707cdb69311'] = 'Ocorreu um erro ao apagar a tabela ifthenpay log!'; -$_MODULE['<{ifthenpay}prestashop>ifthenpaycontrollerstabs_517caf47ad7616b63f2785ba515cb0c7'] = 'Setup Pagamentos'; -$_MODULE['<{ifthenpay}prestashop>ccardconfigform_ac1d5c290d4b2176a26575ea5dc3c655'] = 'Chave CCard'; -$_MODULE['<{ifthenpay}prestashop>ccardconfigform_e6885a9d3fa0a1a7d4106c46ba2f9fe5'] = 'Escolha a Chave CCard'; -$_MODULE['<{ifthenpay}prestashop>ccardconfigform_0d6184f604b11a1906364b29c0166b34'] = 'Cancelar Encomenda Ccard'; -$_MODULE['<{ifthenpay}prestashop>ccardconfigform_558214076f3f19ff1ada2f3b342a11a2'] = 'Cancela encomenda se não for paga dentro de 30 minutos após a confirmação. É executado quando o administrador visita a página de lista de encomendas.'; -$_MODULE['<{ifthenpay}prestashop>ccardconfigform_90651ebea9a35ec4e018c8157492e17c'] = 'Ativado'; -$_MODULE['<{ifthenpay}prestashop>ccardconfigform_88559a0cfd8250c9d65970cc145c92d4'] = 'Desativado'; -$_MODULE['<{ifthenpay}prestashop>ccardconfigform_c985a711556e2edf5cac28dfbdb43ff0'] = 'Reembolso Parcial'; -$_MODULE['<{ifthenpay}prestashop>ccardconfigform_172d2c272a7ecb427387b7d30bf819b3'] = 'Permite que o administrador possa efetuar reembolsos parciais diretamente com a Gateway de pagamentos da Ifthenpay.'; -$_MODULE['<{ifthenpay}prestashop>payshopconfigform_96a43d03a15c37a755ba073dbded41b1'] = 'Chave Payshop'; -$_MODULE['<{ifthenpay}prestashop>payshopconfigform_3904ace72e3ea07abc47497c3e1ed8ec'] = 'Escolha a Chave Payshop'; -$_MODULE['<{ifthenpay}prestashop>payshopconfigform_4d4577e71b968aff7d67381ccdbe698c'] = 'Cancelar Encomenda Payshop'; -$_MODULE['<{ifthenpay}prestashop>payshopconfigform_e05014b208c52abad532620055dee892'] = 'Cancela encomenda se não for paga antes da Validade. É executado quando o admin visita a página de lista de encomendas e necessita que tenha a Validade atribuída.'; -$_MODULE['<{ifthenpay}prestashop>payshopconfigform_90651ebea9a35ec4e018c8157492e17c'] = 'Ativado'; -$_MODULE['<{ifthenpay}prestashop>payshopconfigform_88559a0cfd8250c9d65970cc145c92d4'] = 'Desativado'; -$_MODULE['<{ifthenpay}prestashop>payshopconfigform_159f7d51b9a4ff702c9b5543b8f7980f'] = 'Validade'; -$_MODULE['<{ifthenpay}prestashop>payshopconfigform_c0f0687c262de6620384fc1e99f54d5b'] = 'Escolha o número de dias (de 1 a 99). Deixe vazio se não pretender expiração.'; -$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_1a434befae3f49ae09347ded52032f6f'] = 'Entidade'; -$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_6b46678cf658dc51a2a8b71db8a49205'] = 'Escolha a Entidade'; -$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_536d445375d07170a4964fb242c18c39'] = 'Sub-Entidade'; -$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_e1d72b843ddfc1584d7a261568a1971d'] = 'Escolha a Sub-Entidade'; -$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_159f7d51b9a4ff702c9b5543b8f7980f'] = 'Validade'; -$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_43b9ffbb87947aca1c5f2a4b27b04b63'] = 'Selecione os dias de Validade. Ao selecionar 0, a referência expira no próprio dia às 23:59. Ao selecionar \"Sem Validade\", a referência não expira.'; -$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_bf7cb6b4440bf6acd3269f0c9961524c'] = 'Cancelar Encomenda Multibanco'; -$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_e05014b208c52abad532620055dee892'] = 'Cancela encomenda se não for paga antes da Validade. É executado quando o admin visita a página de lista de encomendas e necessita que tenha a Validade atribuída.'; -$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_90651ebea9a35ec4e018c8157492e17c'] = 'Ativado'; -$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_88559a0cfd8250c9d65970cc145c92d4'] = 'Desativado'; -$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_c277b03ba68f89052c31d3fbf192b81d'] = 'Sem Validade'; -$_MODULE['<{ifthenpay}prestashop>configform_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuração'; -$_MODULE['<{ifthenpay}prestashop>configform_c9cc8cce247e49bae79f15173ce97354'] = 'Salvar'; -$_MODULE['<{ifthenpay}prestashop>configform_406c70d61a3eefd08d468bd8a7b1b77f'] = 'Callback'; -$_MODULE['<{ifthenpay}prestashop>configform_847437ba907f7aaf71d4da80cef19e6e'] = 'Ativar callback automaticamente. Se o modo sandbox estiver ativo, o callback não ativará.'; -$_MODULE['<{ifthenpay}prestashop>configform_90651ebea9a35ec4e018c8157492e17c'] = 'Ativado'; -$_MODULE['<{ifthenpay}prestashop>configform_88559a0cfd8250c9d65970cc145c92d4'] = 'Desativado'; -$_MODULE['<{ifthenpay}prestashop>configform_ba087184ee6e25ec7a1b51b8897679e3'] = 'Valor Mínimo de Encomenda'; -$_MODULE['<{ifthenpay}prestashop>configform_083ed98fe173b63c2449f410f1b1f3b2'] = 'Exibe este método de pagamento para encomendas com valor total superior ao valor inserido.'; -$_MODULE['<{ifthenpay}prestashop>configform_8052ade5baca2959aaa9b8fb1a62bae2'] = 'Valor Máximo de Encomenda'; -$_MODULE['<{ifthenpay}prestashop>configform_235ade195b1a4282b1d4916af584b645'] = 'Exibe este método de pagamento para encomendas com valor total inferior ao valor inserido.'; -$_MODULE['<{ifthenpay}prestashop>configform_a240fa27925a635b08dc28c9e4f9216d'] = 'Ordenar'; -$_MODULE['<{ifthenpay}prestashop>configform_ff55c63f99e78602d2061e33888204e4'] = 'Ordena os métodos de pagamento na página de checkout. Ordena do menor para o maior, por exemplo, (Multibanco: 1, MB WAY: 4, CCARD: 2) resulta em (Multibanco, CCARD, MB WAY). Esta opção apenas afeta os métodos de pagamento deste módulo.'; -$_MODULE['<{ifthenpay}prestashop>configform_52b7e372bca509e26e66340426dc8531'] = 'Restrições de Países'; -$_MODULE['<{ifthenpay}prestashop>configform_553764f34cf3606a947e68808815ba34'] = 'Exibir esta forma de pagamento apenas para pedidos com país de envio dentro dos selecionados. Deixe em branco para permitir todos os países. Use a tecla CTRL do teclado e clique com o botão esquerdo do mouse para alternar a seleção.'; -$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_39ddac06802a1d64c01f8cd2d2acc22f'] = 'Chave Cofidis'; -$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_0abcb97c624a4c6c396f3c8d346fd0c7'] = 'Escolha a Chave Cofidis'; -$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_d8f53a08253097b8b061e70469b16bcd'] = 'Cancelar Encomenda Cofidis Pay'; -$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_0809963eb55dad5ec32464c2768c4c75'] = 'Cancela encomenda caso esta não seja paga dentro de 60 minutos após a confirmação. É executado quando o administrador visita a página de lista de encomendas e necessita que o callback esteja ativo.'; -$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_90651ebea9a35ec4e018c8157492e17c'] = 'Ativado'; -$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_88559a0cfd8250c9d65970cc145c92d4'] = 'Desativado'; -$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_5546f21c8234bed36ccfa9e6e909a19d'] = 'Exibir esta forma de pagamento apenas para pedidos com valor total superior ao valor inserido. O valor inserido não pode ser inferior ao valor definido no backoffice ifthenpay.'; -$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_b5e9cc76fb67d350c522b09ef830c185'] = 'Exibir esta forma de pagamento apenas para pedidos com valor total inferior ao valor inserido. O valor inserido não pode ser maior que o valor definido no backoffice do ifthenpay.'; -$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_f509bfde859916c38f876eec7d7bb814'] = 'Chave MB WAY'; -$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_b6f32a76c083c0abc94f7934946f9630'] = 'Escolha a Chave MB WAY'; -$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_ecc8615e7d20238229148d9db6cef308'] = 'Cancelar Encomenda MB WAY'; -$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_a413869069673c333d0bc4c8ba7328f9'] = 'Cancela encomenda se não for paga dentro de 30 minutos após a confirmação. É executado quando o admin visita a página de lista de encomendas e necessita que o callback esteja ativo.'; -$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_90651ebea9a35ec4e018c8157492e17c'] = 'Ativado'; -$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_88559a0cfd8250c9d65970cc145c92d4'] = 'Desativado'; -$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_ebea5d9dd6b7cf70342dbc10b5e3c1d2'] = 'Contador MB WAY'; -$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_b6c87a037f6231097bdc3cfb8c2eeb7d'] = 'Exibe o Contador MB WAY após confirmar a encomenda. Desative esta funcionalidade se tiver conflitos com plugins de \"one page checkout\".'; -$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_c985a711556e2edf5cac28dfbdb43ff0'] = 'Reembolso Parcial'; -$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_172d2c272a7ecb427387b7d30bf819b3'] = 'Permite que o administrador possa efetuar reembolsos parciais diretamente com a Gateway de pagamentos da Ifthenpay.'; -$_MODULE['<{ifthenpay}prestashop>callbackoffline_414c9b5355141d37397db5bd3700346d'] = 'Callback recebido e validado com sucesso para o método de pagamento '; -$_MODULE['<{ifthenpay}prestashop>callbackonline_f6d7f246dd9c17814278463273bb0ce8'] = 'Encomenda já foi cancelada pelo cliente'; -$_MODULE['<{ifthenpay}prestashop>callbackonline_664cf9a52340819fa397cd84015cabd5'] = 'Erro ao processar o pagamento por %s'; -$_MODULE['<{ifthenpay}prestashop>callbackonline_0cfa95d3cafb01fd3bee0e611d15b4d4'] = 'Encomenda já foi paga'; -$_MODULE['<{ifthenpay}prestashop>callbackonline_db26e10564e958809d798e8048fcbc0a'] = 'Token de segurança inválido'; -$_MODULE['<{ifthenpay}prestashop>callbackonline_1801181e762a9203f6a4f07d0c8bb636'] = 'Pagamento por %s não é válido'; -$_MODULE['<{ifthenpay}prestashop>callbackonline_de5396944c7b2f265a23f49ab60d5660'] = 'Pagamento por %s foi feito com sucesso'; -$_MODULE['<{ifthenpay}prestashop>callbackonline_c031b6ebe26767b6ba934d169362e10e'] = 'Pagamento por %s foi cancelado'; -$_MODULE['<{ifthenpay}prestashop>callbackonline_fe73f9a7f553c0acd7c379e1f1ef5d85'] = 'Pagamento por %s não foi aprovado'; -$_MODULE['<{ifthenpay}prestashop>resendmbwaynotification_0cc3b2a90a69dbd64612b314342ce598'] = 'Notificação MB WAY reenviada com sucesso, confirme o pagamento na sua app MBWAY.'; -$_MODULE['<{ifthenpay}prestashop>resendmbwaynotification_7697ed00c70082f94db91aaa05f1cf48'] = 'Ocorreu um erro ao enviar notificação MBWAY, por favor contacte o administrador de loja.'; -$_MODULE['<{ifthenpay}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Este método de pagamento não está disponivel.'; -$_MODULE['<{ifthenpay}prestashop>validation_8010fdb6b7c74cfd3071b091d303ce53'] = 'Número de telemóvel MB WAY é obrigatório.'; -$_MODULE['<{ifthenpay}prestashop>validation_c3cde82036408779b90451daa301d3c0'] = 'Número de telemóvel MB WAY não é válido.'; -$_MODULE['<{ifthenpay}prestashop>remember_0ae85bcd55426eca4c9bf77ef7c0fc58'] = 'Notificação para lembrar dados de pagamento enviada com sucesso!'; -$_MODULE['<{ifthenpay}prestashop>remember_92761ffa2f0ad5ea4f88568d791db254'] = 'Ocurreu um erro ao enviar notificação para lembrar dados de pagamento!'; -$_MODULE['<{ifthenpay}prestashop>adminifthenpaychoosenewpaymentmethod_296d54a1f92cab1e694a556ac7e5eed9'] = 'Método de pagamento alterado com sucesso!'; -$_MODULE['<{ifthenpay}prestashop>adminifthenpaychoosenewpaymentmethod_8eaa6de13d65f645f0c65159acdb9889'] = 'Ocorreu um erro ao alterar o método de pagamento!'; -$_MODULE['<{ifthenpay}prestashop>resend_0a4999a6c2e7d2cd629ce4b5058538b9'] = 'Dados de pagamento enviados com sucesso!'; -$_MODULE['<{ifthenpay}prestashop>resend_a5134a4b3ec1aabc08be138ae88e18fc'] = 'Ocorreu um erro ao enviar os dados de pagamento!'; -$_MODULE['<{ifthenpay}prestashop>refund_97e451cb46e70936702d69de95ff3e03'] = 'Erro ao enviar notificação de reembolso!'; -$_MODULE['<{ifthenpay}prestashop>update_7a063e612b4087a294104cfcfe86ae82'] = 'Dados de pagamento atualizados com sucesso!'; -$_MODULE['<{ifthenpay}prestashop>update_c5f9b5a01e569e55d4a908063eae1010'] = 'Ocorreu um erro ao atualizar os dados de pagamento!'; -$_MODULE['<{ifthenpay}prestashop>adminifthenpaypaymentmethodsetup_0557fa923dcee4d0f86b1409f5c2167f'] = 'Voltar'; -$_MODULE['<{ifthenpay}prestashop>adminifthenpaypaymentmethodsetup_1181ec30284b021c6447f6faa09a6ac5'] = 'Ocorreu um erro ao salvar os dados %s.'; -$_MODULE['<{ifthenpay}prestashop>adminifthenpaypaymentmethodsetup_88cd044696a1b3dd5a979b16a809d1fb'] = 'Por favor preencha todos os campos'; -$_MODULE['<{ifthenpay}prestashop>adminifthenpaypaymentmethodsetup_66030fe3d61658dc3c4d06da85b995b4'] = 'Url de Callback não está definida'; -$_MODULE['<{ifthenpay}prestashop>adminifthenpaypaymentmethodsetup_ade03c00d03f69fb8d1ea8faa21be58b'] = 'Callback não está ativo'; -$_MODULE['<{ifthenpay}prestashop>adminifthenpaypaymentmethodsetup_4ba40c2a2c1bf5813c624c6055106722'] = 'Dados inválidos, encomenda não foi encontrada'; -$_MODULE['<{ifthenpay}prestashop>adminifthenpayactivatenewaccount_816e0840b08820bcaffcc98d166d8d95'] = 'Pedido de criação de conta %s enviado com email %s'; -$_MODULE['<{ifthenpay}prestashop>adminifthenpayactivatenewaccount_dc1c218276a48973435a8a0121db83a6'] = 'Erro ao enviar pedido de criação de conta %s com email %s'; -$_MODULE['<{ifthenpay}prestashop>admin_f990493af3321939ca512f8f2cace108'] = 'Pagar com %s'; -$_MODULE['<{ifthenpay}prestashop>admin_58e5f5c34a9ee652fc603ccefb1fceec'] = 'Entidade:'; -$_MODULE['<{ifthenpay}prestashop>admin_3dd42bfc8345e82c43b4a40a3426ec49'] = 'Referência:'; -$_MODULE['<{ifthenpay}prestashop>admin_7ae97bdfba9f86d39f5e069bc2beb49f'] = 'Validade:'; -$_MODULE['<{ifthenpay}prestashop>admin_67c6f262d0c1c6c22c21681db565f403'] = 'Total a Pagar:'; -$_MODULE['<{ifthenpay}prestashop>admin_673ae02fffb72f0fe68a66f096a01347'] = 'Telemóvel:'; -$_MODULE['<{ifthenpay}prestashop>admin_1e43b2d069a49c44722db8dcaeec3ed4'] = 'ID de Pedido MB WAY:'; -$_MODULE['<{ifthenpay}prestashop>admin_2ee19001cdb088e16b63abb395f86c7a'] = 'ID de Pedido:'; -$_MODULE['<{ifthenpay}prestashop>admin_d9c576911121b8c26e4414344c669af3'] = 'Atualizar Dados %s'; -$_MODULE['<{ifthenpay}prestashop>admin_67ad69c10e1c65a32d920f09fb6974c8'] = 'Reenviar Dados de Pagamento'; -$_MODULE['<{ifthenpay}prestashop>admin_b08a1233f7d56f37a66f555b6b683fa2'] = 'Relembrar Detalhes de Pagamento'; -$_MODULE['<{ifthenpay}prestashop>admin_fd4446c77834c05abcf1800fc4b0e074'] = 'Escolher Novo Método de Pagamento'; $_MODULE['<{ifthenpay}prestashop>confirmation_88526efe38fd18179a127024aba8c1d7'] = 'A sua encomenda em %s foi completada.'; $_MODULE['<{ifthenpay}prestashop>confirmation_d271ee6cb1b8e0ac3c6141393e77e9f0'] = 'Total a Pagar'; $_MODULE['<{ifthenpay}prestashop>confirmation_63d5049791d9d79d86e9a108b0a999ca'] = 'Referência'; @@ -171,6 +63,19 @@ $_MODULE['<{ifthenpay}prestashop>payment_return_cd430c2eb4b87fb3b49320bd21af074e'] = 'equipa de suporte.'; $_MODULE['<{ifthenpay}prestashop>payment_return_c6701602de1528fd79d5eff3e8eb1edd'] = 'Algo correu mal!'; $_MODULE['<{ifthenpay}prestashop>payment_return_e6f0ef027eb6eefe9214d6125bea4972'] = 'Ocorreu um erro no processamento do seu pagamento, por favor contate a nossa '; +$_MODULE['<{ifthenpay}prestashop>admin_f990493af3321939ca512f8f2cace108'] = 'Pagar com %s'; +$_MODULE['<{ifthenpay}prestashop>admin_58e5f5c34a9ee652fc603ccefb1fceec'] = 'Entidade:'; +$_MODULE['<{ifthenpay}prestashop>admin_3dd42bfc8345e82c43b4a40a3426ec49'] = 'Referência:'; +$_MODULE['<{ifthenpay}prestashop>admin_7ae97bdfba9f86d39f5e069bc2beb49f'] = 'Validade:'; +$_MODULE['<{ifthenpay}prestashop>admin_67c6f262d0c1c6c22c21681db565f403'] = 'Total a Pagar:'; +$_MODULE['<{ifthenpay}prestashop>admin_673ae02fffb72f0fe68a66f096a01347'] = 'Telemóvel:'; +$_MODULE['<{ifthenpay}prestashop>admin_1e43b2d069a49c44722db8dcaeec3ed4'] = 'ID de Pedido MB WAY:'; +$_MODULE['<{ifthenpay}prestashop>admin_2ee19001cdb088e16b63abb395f86c7a'] = 'ID de Pedido:'; +$_MODULE['<{ifthenpay}prestashop>admin_285d945fa6ba7687b062d3c89343b137'] = 'Link de Gateway de Pagamento'; +$_MODULE['<{ifthenpay}prestashop>admin_d9c576911121b8c26e4414344c669af3'] = 'Atualizar Dados %s'; +$_MODULE['<{ifthenpay}prestashop>admin_67ad69c10e1c65a32d920f09fb6974c8'] = 'Reenviar Dados de Pagamento'; +$_MODULE['<{ifthenpay}prestashop>admin_b08a1233f7d56f37a66f555b6b683fa2'] = 'Relembrar Detalhes de Pagamento'; +$_MODULE['<{ifthenpay}prestashop>admin_fd4446c77834c05abcf1800fc4b0e074'] = 'Escolher Novo Método de Pagamento'; $_MODULE['<{ifthenpay}prestashop>paymentpanel_f990493af3321939ca512f8f2cace108'] = 'Pagar com %s'; $_MODULE['<{ifthenpay}prestashop>paymentpanel_58e5f5c34a9ee652fc603ccefb1fceec'] = 'Entidade:'; $_MODULE['<{ifthenpay}prestashop>paymentpanel_3dd42bfc8345e82c43b4a40a3426ec49'] = 'Referência:'; @@ -181,48 +86,9 @@ $_MODULE['<{ifthenpay}prestashop>paymentpanel_2ca3deb5cd68fa9119b285804fab572f'] = 'Encomenda:'; $_MODULE['<{ifthenpay}prestashop>paymentpanel_94cc7ed3a77f529f08f6f67019a4e192'] = 'Não recebeu notificação MB WAY?'; $_MODULE['<{ifthenpay}prestashop>paymentpanel_e59f96dd35ec8a1ecf2864fe47bb202b'] = 'Reenviar notificação MB WAY'; -$_MODULE['<{ifthenpay}prestashop>mbwayphone_93575b18c771fe3fe779f073a4d66d59'] = 'Número de Telemóvel MB WAY'; -$_MODULE['<{ifthenpay}prestashop>error_a25c753ee3e4be15ec0daa5a40deb7b8'] = 'Ocorreu um erro'; -$_MODULE['<{ifthenpay}prestashop>cofidisoption_f7ecd8beac48d54531e68be68b50bde7'] = 'Com COFIDIS PAY tem até 12 prestações sem juros'; -$_MODULE['<{ifthenpay}prestashop>cofidisoption_2f12d29eba0e54c3faffd69a149961b8'] = 'Será redirecionado para uma página segura a fim de efetuar o pagamento'; -$_MODULE['<{ifthenpay}prestashop>cofidisoption_8541bcaf21a8a3a7570f43340a8a7a34'] = 'Pague a sua encomenda em prestações sem juros nem encargos através do seu cartão de débito ou crédito'; -$_MODULE['<{ifthenpay}prestashop>cofidisoption_ff92f2c13296d622d094b32fccc163bd'] = 'O pagamento das prestações será efetuado através do cartão de débito ou crédito do cliente através de uma solução de pagamento baseada num contrato de factoring estabelecido entre a Cofidis e o Comerciante. Consulte a informação junto da Cofidis, registada no Banco de Portugal sob o número 921'; -$_MODULE['<{ifthenpay}prestashop>payment_execution_f990493af3321939ca512f8f2cace108'] = 'Pagar por %s'; -$_MODULE['<{ifthenpay}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Sumário de Encomenda'; -$_MODULE['<{ifthenpay}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'O seu carrinho está vazio.'; -$_MODULE['<{ifthenpay}prestashop>payment_execution_4538c7593c734a2c792b0efa29e7f129'] = 'Multibanco'; -$_MODULE['<{ifthenpay}prestashop>payment_execution_7d817336ea734433cdab54a33b638b51'] = 'Escolheu pagar por %s.'; -$_MODULE['<{ifthenpay}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Aqui está um curto sumário da sua encomenda:'; -$_MODULE['<{ifthenpay}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'O valor total da sua encomenda é'; -$_MODULE['<{ifthenpay}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(tax incl.)'; -$_MODULE['<{ifthenpay}prestashop>payment_execution_6638d744aebed85433de96406052e62e'] = 'A informação de pagamento será exibida na página seguinte.'; -$_MODULE['<{ifthenpay}prestashop>payment_execution_b939c4940deb5588f47ee8f12c61f11f'] = 'Por favor confirme a sua encomenda clicando em \"Confirmo a minha encomenda\".'; -$_MODULE['<{ifthenpay}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Outros métodos de pagamento'; -$_MODULE['<{ifthenpay}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Confirmo a minha encomenda'; -$_MODULE['<{ifthenpay}prestashop>config_5c501852232d2eaaa88eb15e9e9a81cf'] = 'Pagamentos Inteligentes'; -$_MODULE['<{ifthenpay}prestashop>config_4bd9ef088a14b5f6fd9ef86e6f33037f'] = 'Precisa de ajuda?'; -$_MODULE['<{ifthenpay}prestashop>config_1ab2760af5c2828261ea75f7eb76b76b'] = 'Ir para Suporte!'; -$_MODULE['<{ifthenpay}prestashop>config_21bdc5689c12595ae14298354d5550d5'] = 'Já tem Conta?'; -$_MODULE['<{ifthenpay}prestashop>config_6b298b50a1c14abc94f5a483dabc6e1b'] = 'Pedir Conta!'; -$_MODULE['<{ifthenpay}prestashop>config_050d6dbbea52b8140563586a2d74909f'] = 'Pagamentos Multibanco, MB WAY, PAYSHOP, Cartão de Crédito e Cofidis Pay têm inúmeras vantagens para o seu negócio'; -$_MODULE['<{ifthenpay}prestashop>config_15c5438becb339d5b59e1d7d5c806c4d'] = 'Sem custos para o utilizador'; -$_MODULE['<{ifthenpay}prestashop>config_1efb0f79ed270c023a8c7e0cc19e9f90'] = 'Pagamentos 24 horas por dia com notificações imediatas'; -$_MODULE['<{ifthenpay}prestashop>config_0c966dad5faa3ab1bd07c50e3e7d6135'] = 'Pagamentos seguros por Multibanco, MB WAY, PAYSHOP, Cartão de Crédito e Cofidis Pay'; -$_MODULE['<{ifthenpay}prestashop>config_72e96c106c7b1c3f54960881c6b04a39'] = 'Proteção dos dados do utilizador, sem necessidade de introduzir dados bancários online'; -$_MODULE['<{ifthenpay}prestashop>config_8387416d3da30c44a41094024d66f9ef'] = 'Pagamento em multicanal: terminal Multibanco, Homebanking, MB Spot, telemóvel, TPA, MB WAY, Agente PAYSHOP ou Loja CTT '; -$_MODULE['<{ifthenpay}prestashop>config_3b0271438e9545336fec51eb323781e2'] = 'Diretamente da conta bancária dos utilizadores sem necessidade de criar ou carregar previamente outro tipo de contas (wallets)'; -$_MODULE['<{ifthenpay}prestashop>config_b05de066de4d80ea93d6715e0b9fb60e'] = 'O \"Checkout\" nas lojas online é efetuado integralmente dentro do site do vendedor'; -$_MODULE['<{ifthenpay}prestashop>config_caae9ff05bff71e0ad0cbc4a1903c51e'] = 'Controlo das vendas no smartphone através da nossa app gratuita'; -$_MODULE['<{ifthenpay}prestashop>config_fdc092bc2cef799b4a240e36b8dce642'] = 'Aumento da eficácia das cobranças e redução dos custos e trabalho administrativo'; -$_MODULE['<{ifthenpay}prestashop>config_d5815623c49bc79327917762848902f0'] = 'Configurações dos métodos de pagamento'; -$_MODULE['<{ifthenpay}prestashop>config_8c16ca51c42c27c62a13edc0d22813bc'] = 'Usar uma conta diferente.'; -$_MODULE['<{ifthenpay}prestashop>config_c299787c4b008ff0ef129aa4d9851900'] = 'Se deseja usar uma conta diferente clique no botão de reset abaixo.'; -$_MODULE['<{ifthenpay}prestashop>config_2153a894781143fcfff2dc6e1ed44f47'] = 'Aviso: esta ação irá apagar a configuração atual'; -$_MODULE['<{ifthenpay}prestashop>config_526d688f37a86d3c3f27d0c5016eb71d'] = 'Reset'; -$_MODULE['<{ifthenpay}prestashop>config_935cc0d7ffe68032534a1d822ff1c7be'] = 'Nova atualização disponível!'; -$_MODULE['<{ifthenpay}prestashop>config_7a4c8c666aeb0fdd740eb648bc83e051'] = 'Descarregar atualização de módulo'; -$_MODULE['<{ifthenpay}prestashop>config_3c2cc0108255326e07da1e0b9c098689'] = 'Versão '; -$_MODULE['<{ifthenpay}prestashop>config_39378e4ed45f9d286ae667780ad270b7'] = 'O seu módulo está atualizado!'; +$_MODULE['<{ifthenpay}prestashop>paymentpanel_b06c5ecc37b9cd61a0cab0534ed1f15d'] = 'Erro no pagamento'; +$_MODULE['<{ifthenpay}prestashop>paymentpanel_808dd23db65f863f1b821d29f7fdc105'] = 'Pagamento cancelado'; +$_MODULE['<{ifthenpay}prestashop>paymentpanel_285d945fa6ba7687b062d3c89343b137'] = 'Link de Pagamento'; $_MODULE['<{ifthenpay}prestashop>paymentmethodsetup_1ebf6b62a890e57840d9eed25d069624'] = 'Método de pagamento %s'; $_MODULE['<{ifthenpay}prestashop>paymentmethodsetup_7ad8d66a3bc93f5ebaebc0092882fcb4'] = 'Este módulo permite o pagamento seguro por %s'; $_MODULE['<{ifthenpay}prestashop>paymentmethodsetup_72265b70acdcc3728ef11442b6c1536b'] = 'Se o cliente optar por pagar por %s, o estado da encomenda será colocado em em \"Aguardar pagamento por %s\"'; @@ -249,7 +115,175 @@ $_MODULE['<{ifthenpay}prestashop>paymentmethodsetup_ff3bb5381b63f96d25ac99aadaa84d9a'] = 'ID de Pedido Payshop'; $_MODULE['<{ifthenpay}prestashop>paymentmethodsetup_87990a2b2b17a2915aecf44c9be44e7c'] = 'Pode ser encontrado como \"ID de Pedido\" em Vender/Encomendas/Encomendas selecionando a encomenda que deseja testar e procurando nos detalhes de pagamento'; $_MODULE['<{ifthenpay}prestashop>paymentmethodsetup_ebd3c63721a7b4f2c465d5ab45f5f592'] = 'ID de Pedido Cofidispay'; +$_MODULE['<{ifthenpay}prestashop>paymentmethodsetup_d79cf3f429596f77db95c65074663a54'] = 'ID de Encomenda'; $_MODULE['<{ifthenpay}prestashop>paymentmethodsetup_b2f40690858b404ed10e62bdf422c704'] = 'Valor'; +$_MODULE['<{ifthenpay}prestashop>config_5c501852232d2eaaa88eb15e9e9a81cf'] = 'Pagamentos Inteligentes'; +$_MODULE['<{ifthenpay}prestashop>config_4bd9ef088a14b5f6fd9ef86e6f33037f'] = 'Precisa de ajuda?'; +$_MODULE['<{ifthenpay}prestashop>config_1ab2760af5c2828261ea75f7eb76b76b'] = 'Ir para Suporte!'; +$_MODULE['<{ifthenpay}prestashop>config_21bdc5689c12595ae14298354d5550d5'] = 'Já tem Conta?'; +$_MODULE['<{ifthenpay}prestashop>config_6b298b50a1c14abc94f5a483dabc6e1b'] = 'Pedir Conta!'; +$_MODULE['<{ifthenpay}prestashop>config_050d6dbbea52b8140563586a2d74909f'] = 'Pagamentos Multibanco, MB WAY, PAYSHOP, Cartão de Crédito e Cofidis Pay têm inúmeras vantagens para o seu negócio'; +$_MODULE['<{ifthenpay}prestashop>config_15c5438becb339d5b59e1d7d5c806c4d'] = 'Sem custos para o utilizador'; +$_MODULE['<{ifthenpay}prestashop>config_1efb0f79ed270c023a8c7e0cc19e9f90'] = 'Pagamentos 24 horas por dia com notificações imediatas'; +$_MODULE['<{ifthenpay}prestashop>config_0c966dad5faa3ab1bd07c50e3e7d6135'] = 'Pagamentos seguros por Multibanco, MB WAY, PAYSHOP, Cartão de Crédito e Cofidis Pay'; +$_MODULE['<{ifthenpay}prestashop>config_72e96c106c7b1c3f54960881c6b04a39'] = 'Proteção dos dados do utilizador, sem necessidade de introduzir dados bancários online'; +$_MODULE['<{ifthenpay}prestashop>config_8387416d3da30c44a41094024d66f9ef'] = 'Pagamento em multicanal: terminal Multibanco, Homebanking, MB Spot, telemóvel, TPA, MB WAY, Agente PAYSHOP ou Loja CTT '; +$_MODULE['<{ifthenpay}prestashop>config_3b0271438e9545336fec51eb323781e2'] = 'Diretamente da conta bancária dos utilizadores sem necessidade de criar ou carregar previamente outro tipo de contas (wallets)'; +$_MODULE['<{ifthenpay}prestashop>config_b05de066de4d80ea93d6715e0b9fb60e'] = 'O \"Checkout\" nas lojas online é efetuado integralmente dentro do site do vendedor'; +$_MODULE['<{ifthenpay}prestashop>config_caae9ff05bff71e0ad0cbc4a1903c51e'] = 'Controlo das vendas no smartphone através da nossa app gratuita'; +$_MODULE['<{ifthenpay}prestashop>config_fdc092bc2cef799b4a240e36b8dce642'] = 'Aumento da eficácia das cobranças e redução dos custos e trabalho administrativo'; +$_MODULE['<{ifthenpay}prestashop>config_d5815623c49bc79327917762848902f0'] = 'Configurações dos métodos de pagamento'; +$_MODULE['<{ifthenpay}prestashop>config_8c16ca51c42c27c62a13edc0d22813bc'] = 'Usar uma conta diferente.'; +$_MODULE['<{ifthenpay}prestashop>config_c299787c4b008ff0ef129aa4d9851900'] = 'Se deseja usar uma conta diferente clique no botão de reset abaixo.'; +$_MODULE['<{ifthenpay}prestashop>config_2153a894781143fcfff2dc6e1ed44f47'] = 'Aviso: esta ação irá apagar a configuração atual'; +$_MODULE['<{ifthenpay}prestashop>config_526d688f37a86d3c3f27d0c5016eb71d'] = 'Reset'; +$_MODULE['<{ifthenpay}prestashop>config_935cc0d7ffe68032534a1d822ff1c7be'] = 'Nova atualização disponível!'; +$_MODULE['<{ifthenpay}prestashop>config_7a4c8c666aeb0fdd740eb648bc83e051'] = 'Descarregar atualização de módulo'; +$_MODULE['<{ifthenpay}prestashop>config_3c2cc0108255326e07da1e0b9c098689'] = 'Versão '; +$_MODULE['<{ifthenpay}prestashop>config_39378e4ed45f9d286ae667780ad270b7'] = 'O seu módulo está atualizado!'; +$_MODULE['<{ifthenpay}prestashop>buttonpaymentmanage_34e34c43ec6b943c10a3cc1a1a16fb11'] = 'Gerir'; $_MODULE['<{ifthenpay}prestashop>buttonativatenewaccount_632f0876c2e2be7b8c794c6258e58bcc'] = 'Não tem conta %s?'; $_MODULE['<{ifthenpay}prestashop>buttonativatenewaccount_e85fdea1a72cab96c19ca711a319f1f8'] = 'Requerer a criação de conta %s'; -$_MODULE['<{ifthenpay}prestashop>buttonpaymentmanage_34e34c43ec6b943c10a3cc1a1a16fb11'] = 'Gerir'; +$_MODULE['<{ifthenpay}prestashop>cofidisoption_f7ecd8beac48d54531e68be68b50bde7'] = 'Com COFIDIS PAY tem até 12 prestações sem juros'; +$_MODULE['<{ifthenpay}prestashop>cofidisoption_2f12d29eba0e54c3faffd69a149961b8'] = 'Será redirecionado para uma página segura a fim de efetuar o pagamento'; +$_MODULE['<{ifthenpay}prestashop>cofidisoption_8541bcaf21a8a3a7570f43340a8a7a34'] = 'Pague a sua encomenda em prestações sem juros nem encargos através do seu cartão de débito ou crédito'; +$_MODULE['<{ifthenpay}prestashop>cofidisoption_ff92f2c13296d622d094b32fccc163bd'] = 'O pagamento das prestações será efetuado através do cartão de débito ou crédito do cliente através de uma solução de pagamento baseada num contrato de factoring estabelecido entre a Cofidis e o Comerciante. Consulte a informação junto da Cofidis, registada no Banco de Portugal sob o número 921'; +$_MODULE['<{ifthenpay}prestashop>payment_execution_f990493af3321939ca512f8f2cace108'] = 'Pagar por %s'; +$_MODULE['<{ifthenpay}prestashop>payment_execution_f1d3b424cd68795ecaa552883759aceb'] = 'Sumário de Encomenda'; +$_MODULE['<{ifthenpay}prestashop>payment_execution_879f6b8877752685a966564d072f498f'] = 'O seu carrinho está vazio.'; +$_MODULE['<{ifthenpay}prestashop>payment_execution_4538c7593c734a2c792b0efa29e7f129'] = 'Multibanco'; +$_MODULE['<{ifthenpay}prestashop>payment_execution_7d817336ea734433cdab54a33b638b51'] = 'Escolheu pagar por %s.'; +$_MODULE['<{ifthenpay}prestashop>payment_execution_c884ed19483d45970c5bf23a681e2dd2'] = 'Aqui está um curto sumário da sua encomenda:'; +$_MODULE['<{ifthenpay}prestashop>payment_execution_e2867a925cba382f1436d1834bb52a1c'] = 'O valor total da sua encomenda é'; +$_MODULE['<{ifthenpay}prestashop>payment_execution_1f87346a16cf80c372065de3c54c86d9'] = '(tax incl.)'; +$_MODULE['<{ifthenpay}prestashop>payment_execution_6638d744aebed85433de96406052e62e'] = 'A informação de pagamento será exibida na página seguinte.'; +$_MODULE['<{ifthenpay}prestashop>payment_execution_b939c4940deb5588f47ee8f12c61f11f'] = 'Por favor confirme a sua encomenda clicando em \"Confirmo a minha encomenda\".'; +$_MODULE['<{ifthenpay}prestashop>payment_execution_569fd05bdafa1712c4f6be5b153b8418'] = 'Outros métodos de pagamento'; +$_MODULE['<{ifthenpay}prestashop>payment_execution_46b9e3665f187c739c55983f757ccda0'] = 'Confirmo a minha encomenda'; +$_MODULE['<{ifthenpay}prestashop>error_a25c753ee3e4be15ec0daa5a40deb7b8'] = 'Ocorreu um erro'; +$_MODULE['<{ifthenpay}prestashop>mbwayphone_214451807f667e6ccb32e1e695394299'] = 'Por favor, introduza o número de telemóvel associado à sua conta MB WAY'; +$_MODULE['<{ifthenpay}prestashop>mbwayphone_93575b18c771fe3fe779f073a4d66d59'] = 'Número de Telemóvel MB WAY'; +$_MODULE['<{ifthenpay}prestashop>callbackoffline_414c9b5355141d37397db5bd3700346d'] = 'Callback recebido e validado com sucesso para o método de pagamento '; +$_MODULE['<{ifthenpay}prestashop>callbackonline_f6d7f246dd9c17814278463273bb0ce8'] = 'Encomenda já foi cancelada pelo cliente'; +$_MODULE['<{ifthenpay}prestashop>callbackonline_664cf9a52340819fa397cd84015cabd5'] = 'Erro ao processar o pagamento por %s'; +$_MODULE['<{ifthenpay}prestashop>callbackonline_0cfa95d3cafb01fd3bee0e611d15b4d4'] = 'Encomenda já foi paga'; +$_MODULE['<{ifthenpay}prestashop>callbackonline_db26e10564e958809d798e8048fcbc0a'] = 'Token de segurança inválido'; +$_MODULE['<{ifthenpay}prestashop>callbackonline_1801181e762a9203f6a4f07d0c8bb636'] = 'Pagamento por %s não é válido'; +$_MODULE['<{ifthenpay}prestashop>callbackonline_de5396944c7b2f265a23f49ab60d5660'] = 'Pagamento por %s foi feito com sucesso'; +$_MODULE['<{ifthenpay}prestashop>callbackonline_c031b6ebe26767b6ba934d169362e10e'] = 'Pagamento por %s foi cancelado'; +$_MODULE['<{ifthenpay}prestashop>callbackonline_fe73f9a7f553c0acd7c379e1f1ef5d85'] = 'Pagamento por %s não foi aprovado'; +$_MODULE['<{ifthenpay}prestashop>callbackonline_5e0f0b8381556d80e5308c434336551e'] = 'Pagamento por %s cancelado devido a erro técnico'; +$_MODULE['<{ifthenpay}prestashop>callbackonline_e5af67d7818c9c8e10630c89032a106e'] = 'Pagamento por %s aguaradando verificação'; +$_MODULE['<{ifthenpay}prestashop>callbackonline_07f0018c7c1285007aa8c9a79911cae4'] = 'Pagamento por %s executado com sucesso, aguardando verificação'; +$_MODULE['<{ifthenpay}prestashop>payshopconfigform_96a43d03a15c37a755ba073dbded41b1'] = 'Chave Payshop'; +$_MODULE['<{ifthenpay}prestashop>payshopconfigform_3904ace72e3ea07abc47497c3e1ed8ec'] = 'Escolha a Chave Payshop'; +$_MODULE['<{ifthenpay}prestashop>payshopconfigform_4d4577e71b968aff7d67381ccdbe698c'] = 'Cancelar Encomenda Payshop'; +$_MODULE['<{ifthenpay}prestashop>payshopconfigform_e05014b208c52abad532620055dee892'] = 'Cancela encomenda se não for paga antes da Validade. É executado quando o admin visita a página de lista de encomendas e necessita que tenha a Validade atribuída.'; +$_MODULE['<{ifthenpay}prestashop>payshopconfigform_90651ebea9a35ec4e018c8157492e17c'] = 'Ativado'; +$_MODULE['<{ifthenpay}prestashop>payshopconfigform_88559a0cfd8250c9d65970cc145c92d4'] = 'Desativado'; +$_MODULE['<{ifthenpay}prestashop>payshopconfigform_159f7d51b9a4ff702c9b5543b8f7980f'] = 'Validade'; +$_MODULE['<{ifthenpay}prestashop>payshopconfigform_c0f0687c262de6620384fc1e99f54d5b'] = 'Escolha o número de dias (de 1 a 99). Deixe vazio se não pretender expiração.'; +$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_f509bfde859916c38f876eec7d7bb814'] = 'Chave MB WAY'; +$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_b6f32a76c083c0abc94f7934946f9630'] = 'Escolha a Chave MB WAY'; +$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_ecc8615e7d20238229148d9db6cef308'] = 'Cancelar Encomenda MB WAY'; +$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_a413869069673c333d0bc4c8ba7328f9'] = 'Cancela encomenda se não for paga dentro de 30 minutos após a confirmação. É executado quando o admin visita a página de lista de encomendas e necessita que o callback esteja ativo.'; +$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_90651ebea9a35ec4e018c8157492e17c'] = 'Ativado'; +$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_88559a0cfd8250c9d65970cc145c92d4'] = 'Desativado'; +$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_ebea5d9dd6b7cf70342dbc10b5e3c1d2'] = 'Contador MB WAY'; +$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_b6c87a037f6231097bdc3cfb8c2eeb7d'] = 'Exibe o Contador MB WAY após confirmar a encomenda. Desative esta funcionalidade se tiver conflitos com plugins de \"one page checkout\".'; +$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_c985a711556e2edf5cac28dfbdb43ff0'] = 'Reembolso Parcial'; +$_MODULE['<{ifthenpay}prestashop>mbwayconfigform_172d2c272a7ecb427387b7d30bf819b3'] = 'Permite que o administrador possa efetuar reembolsos parciais diretamente com a Gateway de pagamentos da Ifthenpay.'; +$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_39ddac06802a1d64c01f8cd2d2acc22f'] = 'Chave Cofidis'; +$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_0abcb97c624a4c6c396f3c8d346fd0c7'] = 'Escolha a Chave Cofidis'; +$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_d8f53a08253097b8b061e70469b16bcd'] = 'Cancelar Encomenda Cofidis Pay'; +$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_0809963eb55dad5ec32464c2768c4c75'] = 'Cancela encomenda caso esta não seja paga dentro de 60 minutos após a confirmação. É executado quando o administrador visita a página de lista de encomendas e necessita que o callback esteja ativo.'; +$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_90651ebea9a35ec4e018c8157492e17c'] = 'Ativado'; +$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_88559a0cfd8250c9d65970cc145c92d4'] = 'Desativado'; +$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_5546f21c8234bed36ccfa9e6e909a19d'] = 'Exibir esta forma de pagamento apenas para pedidos com valor total superior ao valor inserido. O valor inserido não pode ser inferior ao valor definido no backoffice ifthenpay.'; +$_MODULE['<{ifthenpay}prestashop>cofidispayconfigform_b5e9cc76fb67d350c522b09ef830c185'] = 'Exibir esta forma de pagamento apenas para pedidos com valor total inferior ao valor inserido. O valor inserido não pode ser maior que o valor definido no backoffice do ifthenpay.'; +$_MODULE['<{ifthenpay}prestashop>ccardconfigform_ac1d5c290d4b2176a26575ea5dc3c655'] = 'Chave CCard'; +$_MODULE['<{ifthenpay}prestashop>ccardconfigform_e6885a9d3fa0a1a7d4106c46ba2f9fe5'] = 'Escolha a Chave CCard'; +$_MODULE['<{ifthenpay}prestashop>ccardconfigform_0d6184f604b11a1906364b29c0166b34'] = 'Cancelar Encomenda Ccard'; +$_MODULE['<{ifthenpay}prestashop>ccardconfigform_558214076f3f19ff1ada2f3b342a11a2'] = 'Cancela encomenda se não for paga dentro de 30 minutos após a confirmação. É executado quando o administrador visita a página de lista de encomendas.'; +$_MODULE['<{ifthenpay}prestashop>ccardconfigform_90651ebea9a35ec4e018c8157492e17c'] = 'Ativado'; +$_MODULE['<{ifthenpay}prestashop>ccardconfigform_88559a0cfd8250c9d65970cc145c92d4'] = 'Desativado'; +$_MODULE['<{ifthenpay}prestashop>ccardconfigform_c985a711556e2edf5cac28dfbdb43ff0'] = 'Reembolso Parcial'; +$_MODULE['<{ifthenpay}prestashop>ccardconfigform_172d2c272a7ecb427387b7d30bf819b3'] = 'Permite que o administrador possa efetuar reembolsos parciais diretamente com a Gateway de pagamentos da Ifthenpay.'; +$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_1a434befae3f49ae09347ded52032f6f'] = 'Entidade'; +$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_6b46678cf658dc51a2a8b71db8a49205'] = 'Escolha a Entidade'; +$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_536d445375d07170a4964fb242c18c39'] = 'Sub-Entidade'; +$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_e1d72b843ddfc1584d7a261568a1971d'] = 'Escolha a Sub-Entidade'; +$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_159f7d51b9a4ff702c9b5543b8f7980f'] = 'Validade'; +$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_43b9ffbb87947aca1c5f2a4b27b04b63'] = 'Selecione os dias de Validade. Ao selecionar 0, a referência expira no próprio dia às 23:59. Ao selecionar \"Sem Validade\", a referência não expira.'; +$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_bf7cb6b4440bf6acd3269f0c9961524c'] = 'Cancelar Encomenda Multibanco'; +$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_e05014b208c52abad532620055dee892'] = 'Cancela encomenda se não for paga antes da Validade. É executado quando o admin visita a página de lista de encomendas e necessita que tenha a Validade atribuída.'; +$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_90651ebea9a35ec4e018c8157492e17c'] = 'Ativado'; +$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_88559a0cfd8250c9d65970cc145c92d4'] = 'Desativado'; +$_MODULE['<{ifthenpay}prestashop>multibancoconfigform_c277b03ba68f89052c31d3fbf192b81d'] = 'Sem Validade'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_7414d7f7cc42b649265fcc98d226405e'] = 'Chave de Gateway'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_7de178dba0a49585afebb9c78ede6066'] = 'Escolha a Chave'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_af01f8c298aa063d9c7490f00eddd2df'] = 'Métodos de Pagamento'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_e9b1f97555c85dbebbe11f70f54680b8'] = 'Método de Pagamento por Defeito'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_159f7d51b9a4ff702c9b5543b8f7980f'] = 'Validade'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_c0f0687c262de6620384fc1e99f54d5b'] = 'Escolha o número de dias (de 1 a 99). Deixe vazio se não pretender expiração.'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_ffea92ce41631577f98bd89b85610d1c'] = 'Texto de Botão Fechar da Gateway'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_1dbd6ff361d38e7db37360a3ac560665'] = 'Substitui o texto do botão de voltar para loja na página da gateway. Deixe vazio para usar texto definido por defeito.'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_07fac1ff5dd0c9ef555d13293fdf7ccd'] = 'Cancelar Encomenda Ifthenpay Gateway'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_e05014b208c52abad532620055dee892'] = 'Cancela encomenda se não for paga antes da Validade. É executado quando o admin visita a página de lista de encomendas e necessita que tenha a Validade atribuída.'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_cb456215c3333db0551bd0788bc258c7'] = 'Ativado'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_b9f5c797ebbf55adccdd8539a65a0241'] = 'Desativado'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_20b893ca15bf66fc00e864719931f61b'] = 'Exibir Logo do Método de Pagamento no Checkout'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_33db3d55cbf763bcb63525ee77506f26'] = 'Habilitado - Utiliza imagem por defeito'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_fe9c634817145532563f5602811d33e9'] = 'Desabilitado - Utiliza título do método de pagamento'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_48af631db8e930fb7230c5bf227c9d23'] = 'Habilitado - Utiliza imagem composito gerada'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_271548352665f11ee13438af9acdca93'] = 'Título do Método de Pagamento'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_c277b03ba68f89052c31d3fbf192b81d'] = 'Sem validade'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_e70a5cde94d3fa55e8551e2021244dcf'] = 'Por favor selecione uma chave Ifthenpay Gateway para ver este campo'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_6adf97f83acf6453d4a6a4b1070f3754'] = 'Nenhum'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaygatewayconfigform_62e17d712445e620d728ef2d658baf1b'] = 'Pedir Método Ifthenpay Gateway'; +$_MODULE['<{ifthenpay}prestashop>configform_f4f70727dc34561dfde1a3c529b6205c'] = 'Configuração'; +$_MODULE['<{ifthenpay}prestashop>configform_c9cc8cce247e49bae79f15173ce97354'] = 'Salvar'; +$_MODULE['<{ifthenpay}prestashop>configform_406c70d61a3eefd08d468bd8a7b1b77f'] = 'Callback'; +$_MODULE['<{ifthenpay}prestashop>configform_847437ba907f7aaf71d4da80cef19e6e'] = 'Ativar callback automaticamente. Se o modo sandbox estiver ativo, o callback não ativará.'; +$_MODULE['<{ifthenpay}prestashop>configform_90651ebea9a35ec4e018c8157492e17c'] = 'Ativado'; +$_MODULE['<{ifthenpay}prestashop>configform_88559a0cfd8250c9d65970cc145c92d4'] = 'Desativado'; +$_MODULE['<{ifthenpay}prestashop>configform_ba087184ee6e25ec7a1b51b8897679e3'] = 'Valor Mínimo de Encomenda'; +$_MODULE['<{ifthenpay}prestashop>configform_083ed98fe173b63c2449f410f1b1f3b2'] = 'Exibe este método de pagamento para encomendas com valor total superior ao valor inserido.'; +$_MODULE['<{ifthenpay}prestashop>configform_8052ade5baca2959aaa9b8fb1a62bae2'] = 'Valor Máximo de Encomenda'; +$_MODULE['<{ifthenpay}prestashop>configform_235ade195b1a4282b1d4916af584b645'] = 'Exibe este método de pagamento para encomendas com valor total inferior ao valor inserido.'; +$_MODULE['<{ifthenpay}prestashop>configform_a240fa27925a635b08dc28c9e4f9216d'] = 'Ordenar'; +$_MODULE['<{ifthenpay}prestashop>configform_ff55c63f99e78602d2061e33888204e4'] = 'Ordena os métodos de pagamento na página de checkout. Ordena do menor para o maior, por exemplo, (Multibanco: 1, MB WAY: 4, CCARD: 2) resulta em (Multibanco, CCARD, MB WAY). Esta opção apenas afeta os métodos de pagamento deste módulo.'; +$_MODULE['<{ifthenpay}prestashop>configform_52b7e372bca509e26e66340426dc8531'] = 'Restrições de Países'; +$_MODULE['<{ifthenpay}prestashop>configform_553764f34cf3606a947e68808815ba34'] = 'Exibir esta forma de pagamento apenas para pedidos com país de envio dentro dos selecionados. Deixe em branco para permitir todos os países. Use a tecla CTRL do teclado e clique com o botão esquerdo do mouse para alternar a seleção.'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaysql_b466eee08a9b34db749d4805d50e95d8'] = 'Ocorreu um erro ao criar a tabela ifthenpay payment shop!'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaysql_e6d755c2053083d4b5d444bfe4bf521c'] = 'Ocorreu um erro ao criar a tabela ifthenpay payment!'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaysql_9f4240a0926b09586510034ae430f688'] = 'Ocorreu um erro ao criar a tabela ifthenpay log!'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaysql_3a950843ef852fcb407c0a67b0af7ad6'] = 'Ocorreu um erro ao apagar a tabela ifthenpay!'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaysql_e90b4a11ba5f7f995071874b39f9aca1'] = 'Ocorreu um erro ao apagar a tabela ifthenpay payment shop!'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaysql_6551f6471a15db60c3d34707cdb69311'] = 'Ocorreu um erro ao apagar a tabela ifthenpay log!'; +$_MODULE['<{ifthenpay}prestashop>ifthenpaycontrollerstabs_517caf47ad7616b63f2785ba515cb0c7'] = 'Setup Pagamentos'; +$_MODULE['<{ifthenpay}prestashop>update_7a063e612b4087a294104cfcfe86ae82'] = 'Dados de pagamento atualizados com sucesso!'; +$_MODULE['<{ifthenpay}prestashop>update_c5f9b5a01e569e55d4a908063eae1010'] = 'Ocorreu um erro ao atualizar os dados de pagamento!'; +$_MODULE['<{ifthenpay}prestashop>refund_97e451cb46e70936702d69de95ff3e03'] = 'Erro ao enviar notificação de reembolso!'; +$_MODULE['<{ifthenpay}prestashop>remember_0ae85bcd55426eca4c9bf77ef7c0fc58'] = 'Notificação para lembrar dados de pagamento enviada com sucesso!'; +$_MODULE['<{ifthenpay}prestashop>remember_92761ffa2f0ad5ea4f88568d791db254'] = 'Ocurreu um erro ao enviar notificação para lembrar dados de pagamento!'; +$_MODULE['<{ifthenpay}prestashop>adminifthenpaychoosenewpaymentmethod_296d54a1f92cab1e694a556ac7e5eed9'] = 'Método de pagamento alterado com sucesso!'; +$_MODULE['<{ifthenpay}prestashop>adminifthenpaychoosenewpaymentmethod_8eaa6de13d65f645f0c65159acdb9889'] = 'Ocorreu um erro ao alterar o método de pagamento!'; +$_MODULE['<{ifthenpay}prestashop>adminifthenpaypaymentmethodsetup_0557fa923dcee4d0f86b1409f5c2167f'] = 'Voltar'; +$_MODULE['<{ifthenpay}prestashop>adminifthenpaypaymentmethodsetup_1181ec30284b021c6447f6faa09a6ac5'] = 'Ocorreu um erro ao salvar os dados %s.'; +$_MODULE['<{ifthenpay}prestashop>adminifthenpaypaymentmethodsetup_88cd044696a1b3dd5a979b16a809d1fb'] = 'Por favor preencha todos os campos'; +$_MODULE['<{ifthenpay}prestashop>adminifthenpaypaymentmethodsetup_e70a5cde94d3fa55e8551e2021244dcf'] = 'Por favor selecione uma chave Ifthenpay Gateway para ver este campo.'; +$_MODULE['<{ifthenpay}prestashop>adminifthenpaypaymentmethodsetup_4ba40c2a2c1bf5813c624c6055106722'] = 'Dados inválidos, encomenda não foi encontrada'; +$_MODULE['<{ifthenpay}prestashop>adminifthenpaypaymentmethodsetup_66030fe3d61658dc3c4d06da85b995b4'] = 'Url de Callback não está definida'; +$_MODULE['<{ifthenpay}prestashop>adminifthenpaypaymentmethodsetup_ade03c00d03f69fb8d1ea8faa21be58b'] = 'Callback não está ativo'; +$_MODULE['<{ifthenpay}prestashop>adminifthenpayactivatenewaccount_816e0840b08820bcaffcc98d166d8d95'] = 'Pedido de criação de conta %s enviado com email %s'; +$_MODULE['<{ifthenpay}prestashop>adminifthenpayactivatenewaccount_dc1c218276a48973435a8a0121db83a6'] = 'Erro ao enviar pedido de criação de conta %s com email %s'; +$_MODULE['<{ifthenpay}prestashop>resend_0a4999a6c2e7d2cd629ce4b5058538b9'] = 'Dados de pagamento enviados com sucesso!'; +$_MODULE['<{ifthenpay}prestashop>resend_a5134a4b3ec1aabc08be138ae88e18fc'] = 'Ocorreu um erro ao enviar os dados de pagamento!'; +$_MODULE['<{ifthenpay}prestashop>adminifthenpayactivatenewgatewaymethod_e1a1e70fa23f662fca71376c5b9a287b'] = 'Pedido de criação de método de gateway %s enviado com email %s'; +$_MODULE['<{ifthenpay}prestashop>adminifthenpayactivatenewgatewaymethod_44b1bc38efac50b6d0395a2aad9861d4'] = 'Erro ao enviar pedido de criação de método de gateway %s com email %s'; +$_MODULE['<{ifthenpay}prestashop>validation_e2b7dec8fa4b498156dfee6e4c84b156'] = 'Este método de pagamento não está disponivel.'; +$_MODULE['<{ifthenpay}prestashop>validation_8010fdb6b7c74cfd3071b091d303ce53'] = 'Número de telemóvel MB WAY é obrigatório.'; +$_MODULE['<{ifthenpay}prestashop>validation_c3cde82036408779b90451daa301d3c0'] = 'Número de telemóvel MB WAY não é válido.'; +$_MODULE['<{ifthenpay}prestashop>resendmbwaynotification_0cc3b2a90a69dbd64612b314342ce598'] = 'Notificação MB WAY reenviada com sucesso, confirme o pagamento na sua app MBWAY.'; +$_MODULE['<{ifthenpay}prestashop>resendmbwaynotification_7697ed00c70082f94db91aaa05f1cf48'] = 'Ocorreu um erro ao enviar notificação MBWAY, por favor contacte o administrador de loja.'; diff --git a/ifthenpay/views/css/ifthenpayAdminOrder_8_1_1.css b/ifthenpay/views/css/ifthenpayAdminOrder_8_2_0.css similarity index 94% rename from ifthenpay/views/css/ifthenpayAdminOrder_8_1_1.css rename to ifthenpay/views/css/ifthenpayAdminOrder_8_2_0.css index 5941588..5afc543 100644 --- a/ifthenpay/views/css/ifthenpayAdminOrder_8_1_1.css +++ b/ifthenpay/views/css/ifthenpayAdminOrder_8_2_0.css @@ -1,5 +1,5 @@ /** -* 2007-2024 Ifthenpay Lda +* 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -17,12 +17,12 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * -* @copyright 2007-2024 Ifthenpay Lda +* @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** -* 2007-2024 Ifthenpay Lda +* 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -40,7 +40,7 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * -* @copyright 2007-2024 Ifthenpay Lda +* @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/ifthenpay/views/css/ifthenpayConfig_8_1_1.css b/ifthenpay/views/css/ifthenpayConfig_8_2_0.css similarity index 97% rename from ifthenpay/views/css/ifthenpayConfig_8_1_1.css rename to ifthenpay/views/css/ifthenpayConfig_8_2_0.css index 375d4f3..8fd2f39 100644 --- a/ifthenpay/views/css/ifthenpayConfig_8_1_1.css +++ b/ifthenpay/views/css/ifthenpayConfig_8_2_0.css @@ -1,5 +1,5 @@ /** -* 2007-2024 Ifthenpay Lda +* 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -17,12 +17,12 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * -* @copyright 2007-2024 Ifthenpay Lda +* @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** -* 2007-2024 Ifthenpay Lda +* 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -40,7 +40,7 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * -* @copyright 2007-2024 Ifthenpay Lda +* @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/ifthenpay/views/css/ifthenpayConfirmPage_8_1_1.css b/ifthenpay/views/css/ifthenpayConfirmPage_8_2_0.css similarity index 97% rename from ifthenpay/views/css/ifthenpayConfirmPage_8_1_1.css rename to ifthenpay/views/css/ifthenpayConfirmPage_8_2_0.css index c0e5f9f..55945b8 100644 --- a/ifthenpay/views/css/ifthenpayConfirmPage_8_1_1.css +++ b/ifthenpay/views/css/ifthenpayConfirmPage_8_2_0.css @@ -1,5 +1,5 @@ /** -* 2007-2024 Ifthenpay Lda +* 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -17,12 +17,12 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * -* @copyright 2007-2024 Ifthenpay Lda +* @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** -* 2007-2024 Ifthenpay Lda +* 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -40,7 +40,7 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * -* @copyright 2007-2024 Ifthenpay Lda +* @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/ifthenpay/views/css/ifthenpayOrderDetail_8_1_1.css b/ifthenpay/views/css/ifthenpayOrderDetail_8_2_0.css similarity index 94% rename from ifthenpay/views/css/ifthenpayOrderDetail_8_1_1.css rename to ifthenpay/views/css/ifthenpayOrderDetail_8_2_0.css index db285f5..864a218 100644 --- a/ifthenpay/views/css/ifthenpayOrderDetail_8_1_1.css +++ b/ifthenpay/views/css/ifthenpayOrderDetail_8_2_0.css @@ -1,5 +1,5 @@ /** -* 2007-2024 Ifthenpay Lda +* 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -17,12 +17,12 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * -* @copyright 2007-2024 Ifthenpay Lda +* @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** -* 2007-2024 Ifthenpay Lda +* 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -40,7 +40,7 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * -* @copyright 2007-2024 Ifthenpay Lda +* @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ diff --git a/ifthenpay/views/css/ifthenpayPaymentMethodSetup_8_1_1.css b/ifthenpay/views/css/ifthenpayPaymentMethodSetup_8_2_0.css similarity index 60% rename from ifthenpay/views/css/ifthenpayPaymentMethodSetup_8_1_1.css rename to ifthenpay/views/css/ifthenpayPaymentMethodSetup_8_2_0.css index 4c86cbf..2f0e9e6 100644 --- a/ifthenpay/views/css/ifthenpayPaymentMethodSetup_8_1_1.css +++ b/ifthenpay/views/css/ifthenpayPaymentMethodSetup_8_2_0.css @@ -1,5 +1,5 @@ /** -* 2007-2024 Ifthenpay Lda +* 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -17,7 +17,7 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * -* @copyright 2007-2024 Ifthenpay Lda +* @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -57,4 +57,61 @@ .clearboth { clear: both; +} + +.method_line { + display: flex; + flex-wrap: wrap; + align-items: center; + margin-bottom: 24px; +} + +.method_checkbox { + display: flex; + align-items: center; + min-width: 160px; +} + +.method_checkbox input { + vertical-align: middle; + margin-right: 10px; +} + +.method_checkbox img { + max-height: 30px; +} + +.method_select { + width: 400px; + margin-left: 10px; +} + +.method_select select { + width: 100%; + box-sizing: border-box; +} + +.request_ifthenpaygateway_method { + width: 400px; +} + +@media (max-width: 992px) { + .method_line { + flex-direction: column; + align-items: flex-start; + } + .method_checkbox { + margin-bottom: 8px; + } + .method_select { + width: 100%; + margin-left: 0px; + } +} +.method_line .method_checkbox img { + margin-left: 8px; +} + +.width_100 { + width: 100%; } \ No newline at end of file diff --git a/ifthenpay/views/css/paymentOptions_8_1_1.css b/ifthenpay/views/css/paymentOptions_8_2_0.css similarity index 83% rename from ifthenpay/views/css/paymentOptions_8_1_1.css rename to ifthenpay/views/css/paymentOptions_8_2_0.css index 8abb602..ec5594e 100644 --- a/ifthenpay/views/css/paymentOptions_8_1_1.css +++ b/ifthenpay/views/css/paymentOptions_8_2_0.css @@ -1,5 +1,5 @@ /** -* 2007-2024 Ifthenpay Lda +* 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -17,12 +17,12 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * -* @copyright 2007-2024 Ifthenpay Lda +* @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ /** -* 2007-2024 Ifthenpay Lda +* 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -40,7 +40,7 @@ * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * -* @copyright 2007-2024 Ifthenpay Lda +* @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -118,13 +118,13 @@ } .cofidispay_option { - padding: 20px; - text-align: center; - box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); - background-color: #f5f5f5; - max-width: 500px; - margin-top: 20px; - margin-bottom: 20px; + padding: 20px; + text-align: center; + box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1); + background-color: #f5f5f5; + max-width: 500px; + margin-top: 20px; + margin-bottom: 20px; } .cofidispay_option h5 { @@ -132,10 +132,27 @@ } .cofidispay_option p { - font-size: 11px; - text-align: justify; + font-size: 11px; + text-align: justify; } .cofidispay_option p b { font-weight: 600; } + +#ifthenpayPhoneWrapper { + display: flex; +} + +#ifthenpayMbwayPhoneCode, .ifthenpay_mbway_phone { + height: 40px; /* Adjust as per your requirement */ + padding: 8px; +} + +#ifthenpayMbwayPhoneCode { + margin-right: 10px; +} + +.ifthenpay_mbway_phone { + flex-grow: 1; /* Makes the input take the remaining space */ +} \ No newline at end of file diff --git a/ifthenpay/views/img/ifthenpaygateway.png b/ifthenpay/views/img/ifthenpaygateway.png new file mode 100644 index 0000000000000000000000000000000000000000..9c822928bf366d2a9e8d3f761b1302829dbca151 GIT binary patch literal 4973 zcmaJ_XIN9)wv9-KAib9mq=g!K2{oY#(iISpKmtSvp@b?$nxb@R(nFIbNC`?uqf`L_ z5fr3}1yp)b`onXN=e{5By#4LHSNX;mbIvu#uXWe_vH_5mn-%~70F4Y0mS+_GSxBuVAbar4e!AKt&sI=_wlKucqP5*x= z7W)s{A8(2NZ@&Mhu)lSP4_d|&?T-uab3JREo6zr2K5B43G!l>Vv&P}P{+yz@2M&+( z_rUpp;8sc?v8xzw6fVeL{4czzshW|uKOX7riZ()MfX@`9F&LDZikuEyURhaJQ30+4 zh3e_6>gnj}=_%{z%IWIs=pyv~a1l7y04&-Y|A&kEFBkr=+}~Ef`kX~Zp#3m`Xq3Jm z4h#CLWHrpc=c4+rdVh0K|DKD^zj9^Hl9Bn{*#Fh&KU-(+`91x|wr7ifjF0v{bGzS} zt&x?K%>clKMI(fcb@22L2bv7l9+;=a|T2m=tb_INkM_xLAo;Vp{je zAm1+B7;6vg4!+S2k&TK(qmh>6+f!}im; z+Nzbp0>?n)@XUCmds}<;!Q<-glck!-)I0gdL1Qs;{5$Z`r@s!JM{@`jh}VN!I(^aO z1nOlog4S)DtSn)#8TLR0@Wqo?5f2?Dgyle)=N4I%NujKk#!qYGx>nQ*jPI>VL=qkQ;Sy8tP6Z?p0v5m1d&oypW;W^2 zy+EtgAQX#JA2~jWt&Af2u9DN4k&|43kLk z8wl;e^m#w5&??7Q?a})*{h4+hcT{WAxIeFaPU3v_I;(q*I5V}MSF6+1S@;LF5fa+A z`JtxYQ)ynMGNwLWTn)Vg+X5>Yg|@z}ti)3 zST>v-5b8W|kOz1_8ON*SPV^WUJ7SAdiz$v9Y*NV1h{x=lFNDTkTij|GzDE}$eOdwD$hv<@pT5e(yXjyg^Kg+-$G0GaY; z6Z3bFX&4T)%3-m^nrC%6S3&T=VJ7CEg>43j)}4noYJe0A}p3YyO!D*Q+{pAASla zmYlHfYlHXQa}rBk9cpYJ9P3V%!eu3fsvK@>K8{MLCs8q54V3w4(_g&emto8?4+!VO zi!YlqxW!V|b`0?B?2*Olx8=RN7QU*m-u`yC(n<6D2gAIa2eEMUClUp%}sRT6UM6n7~@NJyAltJ^D+$ zPkavJmbxHk6Z)hfoDI(-^Kt*;vw|-+aY&n+0mZ9bRB8_Q7mRU>LTT|nmf{+>a>z?~ zwzaP|R?Sg{Qdqw}S_e+2tbj(%wmsq@?2YfIVUZ+HUHc%~H+L6S6fy@M84Fu6(jJ2Q zpI1q3x~1JPyFbHBD_g<5TGCt>15=*A|d7aO@{7?xXZh@w5I1y0k!&C5|U)PcJa=Xta)tXjNRv(w;#5|Aep-9 zU6ZzMj;81oMX|>sCW4}qkxd5Sn&+$0Qu?G{*oeL^Lf=9bZ@zK)HJ zyFJM@gXm}u>iqjpY9V*7@THGbLdxab_55^E{pvNL_ zbp|f2e2f2F5xfZ!VJo!3Pm4eBLCAZ{j+%^mn_T<*LEIi;xd`QV3IBkQpQEftiyZ+{p`OFex z!wx*WYD!Qf^yzSH2Vdpc{ZhX%di>)3^@&$kMvn=RF&>vIqND+**<%hWvhOqD)#DAe zI~_@$%4LF*b{luoFDH0dm?Rb`M4&JsJwI*_PZW63GZQjXpG~QCT)Qw+)hpnL71=zp z>nKxnezsn+*6ty1(Jy&g#)Qoh10MPwXV&Xkx@cZJ;$B)aUH%zHY*n364LZKvr>Ll- z`6^C-CbT1xp?9xx8CLx~bg-$VTPOELSeJzM{w3aHzJ!x3o}Z`pG#~2~bx*8?v%oID zJWdg>2C7taTHwPOJ2M)Tr&}swB0OQDrn{<#7Cc)!R(%16@ovw<97W1^AtGz$zrvRw z2K4I1EsyZN!{3@^ZKT$U1Gq_6P$Dx)UMB-sr&3zpfT`a)DyEW}X0k)s^-T0T+A@as zb?PX*vDfG?u=zOoYIpQlNmzfr1Ke+*W{Pr9B z;t73_H`qeHt+cu2sdjoWM`VOS6Jtc{{o_0X+GTe(TnWU;k1^?4!xe^xXrS*6JH6I- zu7fD3mvytDI%ZtWWosu~FT|#t;`9J9w_rME`=h~-bC5@TRJkM+)3{QW&>$992Ep&} zIsI&92)dn${Q(Gq3h{OEVeXtK99q@fJ|&t2}hGz3*PaWO9Lu6a9QZ8KhbQi9kd>rUabAGZ39bwGlJw6X&;ubxj7C0*n>e|Ujg&j2 zUVCkfvuG%U?&}x+k#%dOc`nga+l9OJT|I*=1Ubz6KBVS}i-DwtYFOn)C&Pr+*xRss zlRfqh)|Muo^E?I=lY!(A3IaJ_uEC0We`4T{9I0il2k6+|D$~|eisqNNmoZR^bK4dI zha{9@as)%b4$QIPw&@3n;*{z}H~9wEhs{4epwNjjiey!+^P@1lmoCWhDO>*zJ_KaCq>+_;zQ1NAfC21uVcLH>Hu$>HB1gxe-H7*NX#g^IPWz zCtsvVeN)J+m)WrEyc&}1R{_t902bj|xH1dxt6Hh%&{UqN_4=?4aXjY(gHN?sh}My) z>V)m?)!Fh2`P(S@k4LNmj$*aIoL9~Cz>bB<9;?BYdJU;a8M;)UlbL>vvPx76<1Z-T z#fLykwJz~BI#7ca>$ZcZYT(E*MYW-T#*tWe(Y*Y*`!nlu8B~OQR)i#KQE+()vaTXb zOx!wV_$WFy`NdrmHq3A=HuP+>rHhQgU!tYX6(HAt+8o$>g%w#**=apg`H-Ragk7dp z^O{aT8NqNx_)*}Zz9`++qrnt3qP_6pY&)r_U}GjyUvX3d=sK28TJkg#Zc z?{OKRRQaoceH6FYBrr1J8EKZ&rVe;ZYVG?#=tUMIbM-|SQF@}!4Dq%2$N0#wv_Efb z*M#=CE#&2X$!z5HdEvhH(wh{Iy{C9h?~$aRxJ(N3|Eks5fxsK6W9=LhTf2SK0=c3x>_v zy8H_gm5RJ>7f2t*o_~aG_`x<4zitZ}D*v*}spe=d`{ZT97xVFTYvE{+-N@2w(ZoZ| zF92wO`y5iIHj5Nspn?=)?HlwkzUJ5*;`H0 zXkf%WY3;$hYs!i}Z?pr~QCG+-4@5fR^V^Cjtk>ng8Z3Pl9#_j(#jJIS@1xB-FQjMf zO+1vLsJiRNG8n*l}N!3q&q<7PNhO}7&kE3)sV?*csUpn1WuU{ir}cPfYU2#uD0d6*p~rciG6 zqoLQ$!?*9@%kv8nOuy!JI}hwAI!sw*ZjaBspP)!-rcB8*1g$!xb8ZhkY+ufZ_7hV- z7P3_jAJJUWr934KULzeor4>v1M83#pXQC9FcvRXA?GL7z5*D;aUVHM6h%C)((>VbK zhx<*@EO9Sxn`<6Pt`zKjt)vba0m@`?PG3y>Uf$kbYg3ogb~l z-WAd2f|u$kV6$2GBcF3aW1lhEL!@YY)iU=;+LPcR1DeumA&T&;)p6m?Zx?2Yt=xiG zQkP5uHFL|UskrP#Jqi(BP^86u6hv%_G7R|H)My%Ca{Ie=Bf#P?Q0XdgmY7Af5cSoH zAkE)M3#T^aZZ(G2%9nGzLvTlC6`NO8&!A_CPbMkPRqAsNeUos^_o=qIbIyI=|*JPZuzgO zJzfElN0RdV_3V8Zt2rMdp-ah;NGs^_WH1H=UhArjpK2DG> z$%z`jLwYkg4!)u3`1P3m(dmI^w@ZCv;(-6l%r-`mAtuO&RRN!pLz7_1G!Kkkf7i(2 zm`?o$LeHmgFIie5j>`6cw9W5X{8as$E4Hg8RiarAzwX9|_4h#+dz5p}QyNsyQb&mcYZUN@m literal 0 HcmV?d00001 diff --git a/ifthenpay/views/img/ifthenpaygateway_option.png b/ifthenpay/views/img/ifthenpaygateway_option.png new file mode 100644 index 0000000000000000000000000000000000000000..1d9c8f2c24850f37c82391ddfc857f3a04bb3a78 GIT binary patch literal 3815 zcmaJ^c|4SB{~o&r$)1j7OkyN6)`>y38C%AleQC^sn8g@o>=enCBt>?KBO(&oEFqy# zqA-?@Jt{>U*?!}^r*nRPyuHuod7gXuT-Wto|G4iYTWd1`;1M7I01&V+N7}Q-E38j} zmz(uh9ugj44U#mJ3(bK{pwTf@JirJ?_Q8WJh!|hIJsyJ#3+l$}0RS9ee@7RZ3)%{S zB@>~TeGHUAq_EfkfSv(^g24vhX&@iGuRlp2{N-^A803%B2Rmz_RnZg^yq~{$I2G>@ zZtaK-55Vf+zy_y4dJF_hfQYAIKn!9aDHy@f2mhsuV9ocpVPMc-5L$pf_&-j$plv}W zWGWt{1=Uc&s;a4h;Bcs#rWPEob^@fXs-_N8Wxa3}HBE#T9HD*^^!Ed1S)<|z2z#XI z-?msQeXt*mMnS+}bUGbM*MO3#zA!Z%9i4p*b#)aMLM1qiM8hytNWn*cDj@N}SgJpT z=1(Sp_7yQchMFS+w;d)5yVoWD3Z{0SrU^VK^3T4P z-D98ETeil7n}a{6)Dzv~g?kK97XiRyoVF0TSmOh1qL#cxw#JK!vC!?gqffJxE=+Jf z1%``XJHA~dNVK`w43Op;2Rs$J`7)%+0+TIN?0@r$J@EUf18ieGZrX0+JStk{QbVr@ z>LvXtfbW`Xw|{%|qI3`}X+vAwLYh|<8H(~NiMRLkBFA?*N^U(6XdlS)y^c@Hm_Cjg zc>%PePu+8gn7qNx1LAOdW_FXgt~cd+Apb5?*|`tBaOma{KOW5w5%A?+RQ!976tBK%@te0J!Fz*H#-LeU0Y@=PZQ+Y=V|rFYNFGe&qCTH>hye# z`HDn5Ipm}_02_9xy-Q6}u4S@D-tq9`-}#EgB2QJ(1^;-YoQrmXD6++>Rs;k|@r^II z@uCmijuqCno~M$}K9?P41AH698A)CC8PU0+*q!hpeePQA&Xf2moAVyd<|8)hfVSJ) zmz!jQ5LVwhtsG7;3u8y1-#nzN-rxjLh&l;v&L7pk< zJcxpYD!WtRLN^P_t>kTXN@PBJ0zEG{hbc|WdKC`2mMxB=!#)a~d@S-qXF-6HgSOnm zjsR189MVfVHwRLtyjuK_V6E`upGw(O!*Cz^=8NLk6L^Xe-P? zC7#`SW~Y3B%PTuwov$=E;@gZ0v-0`<*MV#YN}aVkyn1xC8VzzCgc3Z;B}1H67+trR z-?a;RoEGN?YL0)Bo#pzfz2@YNn8qwPL~cve7ku&Vn379b=ZjV>*p_*8FkIsK3MT_= zvAK}(+o4l01N{Al^B|%ompgpcFZCoRnOG(^PYjQ`$(T!&#lJv&7d_4v6t z27kU4?W=Fo*eZS3%-5P`YQ`MnjLI#%Vbb+=({Xk?YHig$JL;ps^DcuAyM*Xd+@Ng3 zl-75XPN|p+8eZ(z`4))G@{KWT2kL?$iDf81!*wuok4Qrkt5@tYPpXri!nO>&=7Df#r(zi&5r)xthtj zCId?_L3PBmdO)s|U37Jmvr{1LLbcftZx|%mg>rD?oU;;9uzye%Wduiviq96TF+(kg zP{x%yWGMJWpM=il)sl!2%X7Qt$z855X9F9k&K!oKcTHcptfe&yYy?n_j)0{Y$ zwN+23;z{u={xE|D=rS_-^X$Rzyk2?2pF+wq;>)fCkO{qb(h@Qx$&-02N3l^}cPoWr z)&L8?{;2=e`t`9u%vG6LUK>?e_l~0U<1LBNCQ74|xt8+a5!w&^C-bisNQlq*0;iF~ zy&d260OwlDx{uv+OgcLkN1GmmE8s)M(D!shfK87iQQ%e%SN6U#;@+DNZ+ODNvoW#F z0#Ur-F10PPMlc>1l12HO*2H@BVB`@oSS;$1jJOb>PU+K%!~!u-7f6u#-G)@rQWHj5 zoO9w9+RXn>;beswk#Tgq=AEVv08s0`#B{C=udsh^=XEtR6$mo zbpAKbFEg2?Px!m$pU`+vjo0y9!iJ)eNk+d9g;k$n(<{$7Q>1@C?!kQI{C(;9p-6qn zABPi|oL1v$?EP&sEtlvmKvFT->5vFFDu!dhrr7Yn#QNdM_6WocwzZq-E?wd79-MFI zejMdI^xJ$4VJTAD-35cRvh#5JBN8TRdr%W1(U5*iVl;H+6e2fC;(kPtz%%@9w(PBy zAI{VG!Kr4p&g3jzsT8G7$9nH)g!C6nflVKrUiZV4yF(mApUa%+%NV3u``w8kWIa(a z@|LTbi-^#!@_s?88hNLevGgTV_u^7dJsh5qV^pYsuixvk82Ea4)$C?*Qnst;`x+7c zaaCZJ$ECHLvx1(UPHxa*2wp%TLd>SF4O3m5y>nh>R2-OS*I*RbWRPN8?=-k3Tk@%s zNk3L;(Em-;DKxQNgPCRf{&Y-1?i)6c35}|lnVCJ9BU&@Pr1s>P(cFh#;0V#@;94pr zGqY0rm|f49kh6M)LQ(qj_n{~t7A%}*FTe2wKUTj-&nhh~75URWZpSjte9eGCJts>2 zm@#saVc!tSb|`9ax|#vL#)r8{$37x_4N0uiUwK5?$ea+`q>uZX?Y4N7x8+k8mu+6d z*_b1b0bT40r6wapskTYyRz;cG`|F`!j%rCwFZ)22_vnHcgX{-_V{qFip^DXEg_pDDQ#Ps zJDbfp>Wf?FLX$5ygdW-J4XlOEcX9FGS)aawJ7XGTyb5^?8G43jLmkiP(Czi9np2tY z%lm5Ey;8STYa3kx|JIs!XUerGHub(IZSvNUYud8Y^t4FFwazRY#=F#MW^WjhwVDsw z5;Y^(SJa#w9v-{qRFF2mOf&l5K UVq=cQ{?*e0WsR&hK70QE04bWQS^xk5 literal 0 HcmV?d00001 diff --git a/ifthenpay/views/img/ifthenpaygateway_option_default.png b/ifthenpay/views/img/ifthenpaygateway_option_default.png new file mode 100644 index 0000000000000000000000000000000000000000..1d9c8f2c24850f37c82391ddfc857f3a04bb3a78 GIT binary patch literal 3815 zcmaJ^c|4SB{~o&r$)1j7OkyN6)`>y38C%AleQC^sn8g@o>=enCBt>?KBO(&oEFqy# zqA-?@Jt{>U*?!}^r*nRPyuHuod7gXuT-Wto|G4iYTWd1`;1M7I01&V+N7}Q-E38j} zmz(uh9ugj44U#mJ3(bK{pwTf@JirJ?_Q8WJh!|hIJsyJ#3+l$}0RS9ee@7RZ3)%{S zB@>~TeGHUAq_EfkfSv(^g24vhX&@iGuRlp2{N-^A803%B2Rmz_RnZg^yq~{$I2G>@ zZtaK-55Vf+zy_y4dJF_hfQYAIKn!9aDHy@f2mhsuV9ocpVPMc-5L$pf_&-j$plv}W zWGWt{1=Uc&s;a4h;Bcs#rWPEob^@fXs-_N8Wxa3}HBE#T9HD*^^!Ed1S)<|z2z#XI z-?msQeXt*mMnS+}bUGbM*MO3#zA!Z%9i4p*b#)aMLM1qiM8hytNWn*cDj@N}SgJpT z=1(Sp_7yQchMFS+w;d)5yVoWD3Z{0SrU^VK^3T4P z-D98ETeil7n}a{6)Dzv~g?kK97XiRyoVF0TSmOh1qL#cxw#JK!vC!?gqffJxE=+Jf z1%``XJHA~dNVK`w43Op;2Rs$J`7)%+0+TIN?0@r$J@EUf18ieGZrX0+JStk{QbVr@ z>LvXtfbW`Xw|{%|qI3`}X+vAwLYh|<8H(~NiMRLkBFA?*N^U(6XdlS)y^c@Hm_Cjg zc>%PePu+8gn7qNx1LAOdW_FXgt~cd+Apb5?*|`tBaOma{KOW5w5%A?+RQ!976tBK%@te0J!Fz*H#-LeU0Y@=PZQ+Y=V|rFYNFGe&qCTH>hye# z`HDn5Ipm}_02_9xy-Q6}u4S@D-tq9`-}#EgB2QJ(1^;-YoQrmXD6++>Rs;k|@r^II z@uCmijuqCno~M$}K9?P41AH698A)CC8PU0+*q!hpeePQA&Xf2moAVyd<|8)hfVSJ) zmz!jQ5LVwhtsG7;3u8y1-#nzN-rxjLh&l;v&L7pk< zJcxpYD!WtRLN^P_t>kTXN@PBJ0zEG{hbc|WdKC`2mMxB=!#)a~d@S-qXF-6HgSOnm zjsR189MVfVHwRLtyjuK_V6E`upGw(O!*Cz^=8NLk6L^Xe-P? zC7#`SW~Y3B%PTuwov$=E;@gZ0v-0`<*MV#YN}aVkyn1xC8VzzCgc3Z;B}1H67+trR z-?a;RoEGN?YL0)Bo#pzfz2@YNn8qwPL~cve7ku&Vn379b=ZjV>*p_*8FkIsK3MT_= zvAK}(+o4l01N{Al^B|%ompgpcFZCoRnOG(^PYjQ`$(T!&#lJv&7d_4v6t z27kU4?W=Fo*eZS3%-5P`YQ`MnjLI#%Vbb+=({Xk?YHig$JL;ps^DcuAyM*Xd+@Ng3 zl-75XPN|p+8eZ(z`4))G@{KWT2kL?$iDf81!*wuok4Qrkt5@tYPpXri!nO>&=7Df#r(zi&5r)xthtj zCId?_L3PBmdO)s|U37Jmvr{1LLbcftZx|%mg>rD?oU;;9uzye%Wduiviq96TF+(kg zP{x%yWGMJWpM=il)sl!2%X7Qt$z855X9F9k&K!oKcTHcptfe&yYy?n_j)0{Y$ zwN+23;z{u={xE|D=rS_-^X$Rzyk2?2pF+wq;>)fCkO{qb(h@Qx$&-02N3l^}cPoWr z)&L8?{;2=e`t`9u%vG6LUK>?e_l~0U<1LBNCQ74|xt8+a5!w&^C-bisNQlq*0;iF~ zy&d260OwlDx{uv+OgcLkN1GmmE8s)M(D!shfK87iQQ%e%SN6U#;@+DNZ+ODNvoW#F z0#Ur-F10PPMlc>1l12HO*2H@BVB`@oSS;$1jJOb>PU+K%!~!u-7f6u#-G)@rQWHj5 zoO9w9+RXn>;beswk#Tgq=AEVv08s0`#B{C=udsh^=XEtR6$mo zbpAKbFEg2?Px!m$pU`+vjo0y9!iJ)eNk+d9g;k$n(<{$7Q>1@C?!kQI{C(;9p-6qn zABPi|oL1v$?EP&sEtlvmKvFT->5vFFDu!dhrr7Yn#QNdM_6WocwzZq-E?wd79-MFI zejMdI^xJ$4VJTAD-35cRvh#5JBN8TRdr%W1(U5*iVl;H+6e2fC;(kPtz%%@9w(PBy zAI{VG!Kr4p&g3jzsT8G7$9nH)g!C6nflVKrUiZV4yF(mApUa%+%NV3u``w8kWIa(a z@|LTbi-^#!@_s?88hNLevGgTV_u^7dJsh5qV^pYsuixvk82Ea4)$C?*Qnst;`x+7c zaaCZJ$ECHLvx1(UPHxa*2wp%TLd>SF4O3m5y>nh>R2-OS*I*RbWRPN8?=-k3Tk@%s zNk3L;(Em-;DKxQNgPCRf{&Y-1?i)6c35}|lnVCJ9BU&@Pr1s>P(cFh#;0V#@;94pr zGqY0rm|f49kh6M)LQ(qj_n{~t7A%}*FTe2wKUTj-&nhh~75URWZpSjte9eGCJts>2 zm@#saVc!tSb|`9ax|#vL#)r8{$37x_4N0uiUwK5?$ea+`q>uZX?Y4N7x8+k8mu+6d z*_b1b0bT40r6wapskTYyRz;cG`|F`!j%rCwFZ)22_vnHcgX{-_V{qFip^DXEg_pDDQ#Ps zJDbfp>Wf?FLX$5ygdW-J4XlOEcX9FGS)aawJ7XGTyb5^?8G43jLmkiP(Czi9np2tY z%lm5Ey;8STYa3kx|JIs!XUerGHub(IZSvNUYud8Y^t4FFwazRY#=F#MW^WjhwVDsw z5;Y^(SJa#w9v-{qRFF2mOf&l5K UVq=cQ{?*e0WsR&hK70QE04bWQS^xk5 literal 0 HcmV?d00001 diff --git a/ifthenpay/views/js/adminAccountSettingsPage_8_1_1.js b/ifthenpay/views/js/adminAccountSettingsPage_8_2_0.js similarity index 99% rename from ifthenpay/views/js/adminAccountSettingsPage_8_1_1.js rename to ifthenpay/views/js/adminAccountSettingsPage_8_2_0.js index 27c922a..29d8605 100644 --- a/ifthenpay/views/js/adminAccountSettingsPage_8_1_1.js +++ b/ifthenpay/views/js/adminAccountSettingsPage_8_2_0.js @@ -270,7 +270,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = value: true }); /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -288,7 +288,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -355,7 +355,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsContainerInversifyContainerAdminAccountSettingsPageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -373,7 +373,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -488,7 +488,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = }); exports.AppComponent = void 0; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -506,7 +506,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -558,7 +558,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsDecoratorsEventTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -576,7 +576,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -619,7 +619,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsEventsAdminAccountSettingsPageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -637,7 +637,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -753,7 +753,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsEventsPageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -771,7 +771,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -835,7 +835,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsFacadesAdminAccountSettingsPageCreateAppTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -853,7 +853,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -962,7 +962,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsFacadesMainAppTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -980,7 +980,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -1060,7 +1060,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsServicesHttpServiceTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -1078,7 +1078,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -6595,7 +6595,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = /***/ function _(module, exports, __webpack_require__) { module.exports = __webpack_require__( - /*! /var/www/html/prestashop/1787/modules/ifthenpay/_dev/js/adminAccountSettingsPage.ts */ + /*! /home/devilbox/data/www/prestashop817/htdocs/modules/ifthenpay/_dev/js/adminAccountSettingsPage.ts */ "./_dev/js/adminAccountSettingsPage.ts"); /***/ } diff --git a/ifthenpay/views/js/adminConfigPage_8_1_1.js b/ifthenpay/views/js/adminConfigPage_8_2_0.js similarity index 95% rename from ifthenpay/views/js/adminConfigPage_8_1_1.js rename to ifthenpay/views/js/adminConfigPage_8_2_0.js index 8e3b003..7f028d8 100644 --- a/ifthenpay/views/js/adminConfigPage_8_1_1.js +++ b/ifthenpay/views/js/adminConfigPage_8_2_0.js @@ -270,7 +270,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = value: true }); /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -288,7 +288,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -311,6 +311,15 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = dom_alignSpinnerWithInput(); } + if (isCofidis()) { + dom_alignSpinnerWithInput(); + } + + if (isIfthenpaygateway()) { + dom_alignSpinnerWithInput(); + dom_disableUncheckedDefaultPaymentMethods(); + } + var app = inversify_adminConfigPage_1["default"].get(AdminConfigPageCreateApp_1.AdminConfigPageCreateApp); app.start(); }); @@ -362,12 +371,23 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = if (domSpinner.closest(".col-lg-8")) { var domMbSubEnt = document.getElementById("ifthenpayMultibancoSubentidade"); - domMbSubEnt.style["float"] = "left"; + var domIfthenpaygatewayKey = document.getElementById("ifthenpayIfthenpaygatewayKey"); + var domElement = void 0; + + if (domMbSubEnt) { + domElement = domMbSubEnt; + } else if (domIfthenpaygatewayKey) { + domElement = domIfthenpaygatewayKey; + } else { + return; + } + + domElement.style["float"] = "left"; domSpinner.style["float"] = "left"; domSpinner.style.margin = "0"; domSpinner.style.paddingLeft = "10px"; domSpinner.closest(".col-lg-8").classList.remove("col-lg-8", "col-lg-offset-3"); - var domHelpBlockParent = domMbSubEnt.closest(".form-group"); + var domHelpBlockParent = domElement.closest(".form-group"); var domHelpBlock = domHelpBlockParent.querySelector(".col-lg-8 .help-block"); if (domHelpBlock != null) { @@ -386,6 +406,30 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function isMultbanco() { return document.getElementById("ifthenpayMultibancoEntidade") ? true : false; } + + function isCofidis() { + return document.getElementById("ifthenpayCofidisKey") ? true : false; + } + + function isIfthenpaygateway() { + return document.getElementById("ifthenpayIfthenpaygatewayKey") ? true : false; + } + + function dom_disableUncheckedDefaultPaymentMethods() { + var methods = $("#methods_container .method_checkbox_input"); + methods.each(function (i, obj) { + var method = $(obj).data("method"); + var isSwitchOn = $(obj).prop("checked"); + var defaultPaymentSelect = $("#payment_ifthenpaygateway_default"); + var target = defaultPaymentSelect.find('option[data-method="' + method + '"]'); + target.prop("disabled", !isSwitchOn); + + if (target.prop("selected")) { + target.prop("selected", false); + defaultPaymentSelect.find("option").first().prop("selected", true); + } + }); + } /***/ }, @@ -402,7 +446,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsClassesShowFormGroupTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -420,7 +464,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -479,7 +523,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsContainerInversifyAdminConfigPageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -497,7 +541,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -617,7 +661,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = }); exports.AppComponent = void 0; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -635,7 +679,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -687,7 +731,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsDecoratorsEventTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -705,7 +749,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -748,7 +792,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsEventsAdminConfigPageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -766,7 +810,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -897,21 +941,57 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = }); }; - + AdminConfigPage.prototype.changeIfthenpayGatewayKey = function (event) { + var spinner = $("#appSpinner"); + spinner.parent().insertAfter($(event.target)); + spinner.show(); + this.httpService = inversify_adminConfigPage_1["default"].get(HttpService_1.HttpService); + this.httpService.setUrl(controllerUrl); + this.httpService.post({ + ajax: 1, + controller: "AdminIfthenpayPaymentMethodSetup", + action: "getIfthenpayGatewayMethods", + gatewayKey: $(event.target).val() + }).then(function (response) { + var containerGatewayAccounts = $("#methods_container"); // clean methods and accounts + + containerGatewayAccounts.html(""); + + if ("payment_methods_html" in response) { + containerGatewayAccounts.html(response["payment_methods_html"]); + } + + var containerDefaultMethod = $("#default_method_container"); // clean default method + + containerDefaultMethod.html(""); + + if ("default_selected_html" in response) { + containerDefaultMethod.html(response["default_selected_html"]); + } + + spinner.hide(); + }); + }; + + AdminConfigPage.prototype.updateSelectedDefault = function (event) { + var method = $(event.target).data("method"); + var isSwitchOn = $(event.target).prop("checked"); + var defaultPaymentSelect = $("#payment_ifthenpaygateway_default"); + var target = defaultPaymentSelect.find('option[data-method="' + method + '"]'); + target.prop("disabled", !isSwitchOn); + + if (target.prop("selected")) { + target.prop("selected", false); + defaultPaymentSelect.find("option").first().prop("selected", true); + } + }; + AdminConfigPage.prototype.changeCofidisKey = function (event) { - var _this = this; var spinner = $("#appSpinner"); var containerCofidisMax = $("#ifthenpayMaxAmount"); var containerCofidisMin = $("#ifthenpayMinAmount"); - - spinner.parent().insertAfter(containerCofidisMin); + spinner.parent().insertAfter($(event.target)); spinner.show(); - - var cofidisKey = $(event.target).val(); - if (cofidisKey === null || cofidisKey === "") { - spinner.hide(); - return; - } this.httpService = inversify_adminConfigPage_1["default"].get(HttpService_1.HttpService); this.httpService.setUrl(controllerUrl); this.httpService.post({ @@ -919,10 +999,11 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = controller: "AdminIfthenpayPaymentMethodSetup", action: "getCofidisLimits", cofidisKey: $(event.target).val() - }).then(function (limits) { - containerCofidisMax.val(limits.maxAmount); - containerCofidisMin.val(limits.minAmount); - + }).then(function (response) { + var _a, _b; + + containerCofidisMax.val((_a = response["maxAmount"]) !== null && _a !== void 0 ? _a : ""); + containerCofidisMin.val((_b = response["minAmount"]) !== null && _b !== void 0 ? _b : ""); spinner.hide(); }); }; @@ -935,17 +1016,20 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = var referenceDom = $("#reference"); var amountDom = $("#amount"); var mbwayTransactionIdDom = $("#mbway_transaction_id"); - var payshopTransactionIdDom = $("#payshop_transaction_id"); // message template - var cofidispayTransactionIdDom = $("#cofidispay_transaction_id"); + var payshopTransactionIdDom = $("#payshop_transaction_id"); + var cofidisTransactionIdDom = $("#cofidispay_transaction_id"); + var orderIdDom = $("#order_id"); // message template + var msgHtml = "\n
\n \n
    \n
  • {{message}}
  • \n
\n
\n"; var method = methodDom.length ? methodDom.val() : ""; var reference = referenceDom.length ? referenceDom.val() : ""; var amount = amountDom.length ? amountDom.val() : ""; var mbwayTransactionId = mbwayTransactionIdDom.length ? mbwayTransactionIdDom.val() : ""; - var payshopTransactionId = payshopTransactionIdDom.length ? payshopTransactionIdDom.val() : ""; // verify if multibanco or mbway or payshop have arguments - var cofidispayTransactionId = cofidispayTransactionIdDom.length ? cofidispayTransactionIdDom.val() : ""; + var payshopTransactionId = payshopTransactionIdDom.length ? payshopTransactionIdDom.val() : ""; + var cofidisTransactionId = cofidisTransactionIdDom.length ? cofidisTransactionIdDom.val() : ""; + var orderId = orderIdDom.length ? orderIdDom.val() : ""; // verify if multibanco or mbway or payshop have arguments - if (method === "multibanco" && (reference === "" || amount === "") || method === "mbway" && (amount === "" || mbwayTransactionId === "") || method === "payshop" && (amount === "" || payshopTransactionId === "") || method === "cofidispay" && (amount === "" || cofidispayTransactionId === "")) { + if (method === "multibanco" && (reference === "" || amount === "") || method === "mbway" && (amount === "" || mbwayTransactionId === "") || method === "payshop" && (amount === "" || payshopTransactionId === "") || method === "cofidis" && (amount === "" || cofidisTransactionId === "") || method === "ifthenpaygateway" && (amount === "" || orderId === "")) { bootstrapMsgContainer.html(msgHtml.replace("{{type}}", "danger").replace("{{message}}", msgFillAllFields)); return; } @@ -960,7 +1044,8 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = amount: amount, mbway_transaction_id: mbwayTransactionId, payshop_transaction_id: payshopTransactionId, - cofidispay_transaction_id: cofidispayTransactionId, + cofidis_transaction_id: cofidisTransactionId, + order_id: orderId, method: method }).then(function (response) { var msgType = ""; @@ -978,7 +1063,13 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = }; __decorate([(0, Event_1.Event)("change", "#ifthenpayMultibancoEntidade"), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], AdminConfigPage.prototype, "changeEntidade", null); + + __decorate([(0, Event_1.Event)("change", "#ifthenpayIfthenpaygatewayKey"), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], AdminConfigPage.prototype, "changeIfthenpayGatewayKey", null); + + __decorate([(0, Event_1.Event)("change", "#methods_container", ".method_checkbox_input"), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], AdminConfigPage.prototype, "updateSelectedDefault", null); + __decorate([(0, Event_1.Event)("change", "#ifthenpayCofidisKey"), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], AdminConfigPage.prototype, "changeCofidisKey", null); + __decorate([(0, Event_1.Event)("click", "#testCallback"), __metadata("design:type", Function), __metadata("design:paramtypes", [Object]), __metadata("design:returntype", void 0)], AdminConfigPage.prototype, "testCallback", null); return AdminConfigPage; @@ -1000,7 +1091,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsEventsPageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -1018,7 +1109,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -1082,7 +1173,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsFacadesAdminConfigPageCreateAppTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -1100,7 +1191,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -1213,7 +1304,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsFacadesMainAppTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -1231,7 +1322,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -1311,7 +1402,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsServicesHttpServiceTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -1329,7 +1420,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -1388,6 +1479,90 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = /***/ }, + /***/ + "./_dev/scss/ifthenpayAdminOrder.scss": + /*!********************************************!*\ + !*** ./_dev/scss/ifthenpayAdminOrder.scss ***! + \********************************************/ + + /*! no static exports found */ + + /***/ + function _devScssIfthenpayAdminOrderScss(module, exports) {// removed by extract-text-webpack-plugin + + /***/ + }, + + /***/ + "./_dev/scss/ifthenpayConfig.scss": + /*!****************************************!*\ + !*** ./_dev/scss/ifthenpayConfig.scss ***! + \****************************************/ + + /*! no static exports found */ + + /***/ + function _devScssIfthenpayConfigScss(module, exports) {// removed by extract-text-webpack-plugin + + /***/ + }, + + /***/ + "./_dev/scss/ifthenpayConfirmPage.scss": + /*!*********************************************!*\ + !*** ./_dev/scss/ifthenpayConfirmPage.scss ***! + \*********************************************/ + + /*! no static exports found */ + + /***/ + function _devScssIfthenpayConfirmPageScss(module, exports) {// removed by extract-text-webpack-plugin + + /***/ + }, + + /***/ + "./_dev/scss/ifthenpayOrderDetail.scss": + /*!*********************************************!*\ + !*** ./_dev/scss/ifthenpayOrderDetail.scss ***! + \*********************************************/ + + /*! no static exports found */ + + /***/ + function _devScssIfthenpayOrderDetailScss(module, exports) {// removed by extract-text-webpack-plugin + + /***/ + }, + + /***/ + "./_dev/scss/ifthenpayPaymentMethodSetup.scss": + /*!****************************************************!*\ + !*** ./_dev/scss/ifthenpayPaymentMethodSetup.scss ***! + \****************************************************/ + + /*! no static exports found */ + + /***/ + function _devScssIfthenpayPaymentMethodSetupScss(module, exports) {// removed by extract-text-webpack-plugin + + /***/ + }, + + /***/ + "./_dev/scss/paymentOptions.scss": + /*!***************************************!*\ + !*** ./_dev/scss/paymentOptions.scss ***! + \***************************************/ + + /*! no static exports found */ + + /***/ + function _devScssPaymentOptionsScss(module, exports) {// removed by extract-text-webpack-plugin + + /***/ + }, + /***/ "./node_modules/inversify/lib/annotation/decorator_utils.js": /*!******************************************************************!*\ @@ -6837,17 +7012,41 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = /***/ 0: - /*!******************************************!*\ - !*** multi ./_dev/js/adminConfigPage.ts ***! - \******************************************/ + /*!*************************************************************************************************************************************************************************************************************************************************************************!*\ + !*** multi ./_dev/js/adminConfigPage.ts ./_dev/scss/ifthenpayConfig.scss ./_dev/scss/ifthenpayPaymentMethodSetup.scss ./_dev/scss/ifthenpayConfirmPage.scss ./_dev/scss/ifthenpayAdminOrder.scss ./_dev/scss/ifthenpayOrderDetail.scss ./_dev/scss/paymentOptions.scss ***! + \*************************************************************************************************************************************************************************************************************************************************************************/ /*! no static exports found */ /***/ function _(module, exports, __webpack_require__) { - module.exports = __webpack_require__( - /*! /var/www/html/prestashop/1787/modules/ifthenpay/_dev/js/adminConfigPage.ts */ + __webpack_require__( + /*! /home/devilbox/data/www/prestashop817/htdocs/modules/ifthenpay/_dev/js/adminConfigPage.ts */ "./_dev/js/adminConfigPage.ts"); + + __webpack_require__( + /*! /home/devilbox/data/www/prestashop817/htdocs/modules/ifthenpay/_dev/scss/ifthenpayConfig.scss */ + "./_dev/scss/ifthenpayConfig.scss"); + + __webpack_require__( + /*! /home/devilbox/data/www/prestashop817/htdocs/modules/ifthenpay/_dev/scss/ifthenpayPaymentMethodSetup.scss */ + "./_dev/scss/ifthenpayPaymentMethodSetup.scss"); + + __webpack_require__( + /*! /home/devilbox/data/www/prestashop817/htdocs/modules/ifthenpay/_dev/scss/ifthenpayConfirmPage.scss */ + "./_dev/scss/ifthenpayConfirmPage.scss"); + + __webpack_require__( + /*! /home/devilbox/data/www/prestashop817/htdocs/modules/ifthenpay/_dev/scss/ifthenpayAdminOrder.scss */ + "./_dev/scss/ifthenpayAdminOrder.scss"); + + __webpack_require__( + /*! /home/devilbox/data/www/prestashop817/htdocs/modules/ifthenpay/_dev/scss/ifthenpayOrderDetail.scss */ + "./_dev/scss/ifthenpayOrderDetail.scss"); + + module.exports = __webpack_require__( + /*! /home/devilbox/data/www/prestashop817/htdocs/modules/ifthenpay/_dev/scss/paymentOptions.scss */ + "./_dev/scss/paymentOptions.scss"); /***/ } /******/ diff --git a/ifthenpay/views/js/adminOrderCreatePage_8_1_1.js b/ifthenpay/views/js/adminOrderCreatePage_8_2_0.js similarity index 99% rename from ifthenpay/views/js/adminOrderCreatePage_8_1_1.js rename to ifthenpay/views/js/adminOrderCreatePage_8_2_0.js index beadb6f..78a5a9a 100644 --- a/ifthenpay/views/js/adminOrderCreatePage_8_1_1.js +++ b/ifthenpay/views/js/adminOrderCreatePage_8_2_0.js @@ -266,7 +266,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsAdminOrderCreatePageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -284,7 +284,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -324,7 +324,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsClassesAddIfthenpayPaymentMethodNewVersionTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -342,7 +342,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -399,7 +399,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsContainerInversifyAdminOrderCreatePageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -417,7 +417,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -532,7 +532,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = }); exports.AppComponent = void 0; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -550,7 +550,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -602,7 +602,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsDecoratorsEventTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -620,7 +620,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -663,7 +663,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsEventsAdminOrderCreatePageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -681,7 +681,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -779,7 +779,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsEventsPageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -797,7 +797,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -861,7 +861,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsFacadesAdminOrderCreateAppTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -879,7 +879,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -992,7 +992,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsFacadesMainAppTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -1010,7 +1010,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -1090,7 +1090,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsUtilityUtilityTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -1108,7 +1108,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -6603,7 +6603,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = /***/ function _(module, exports, __webpack_require__) { module.exports = __webpack_require__( - /*! /var/www/html/prestashop/1787/modules/ifthenpay/_dev/js/adminOrderCreatePage.ts */ + /*! /home/devilbox/data/www/prestashop817/htdocs/modules/ifthenpay/_dev/js/adminOrderCreatePage.ts */ "./_dev/js/adminOrderCreatePage.ts"); /***/ } diff --git a/ifthenpay/views/js/adminOrderDetailPage_8_1_1.js b/ifthenpay/views/js/adminOrderDetailPage_8_2_0.js similarity index 99% rename from ifthenpay/views/js/adminOrderDetailPage_8_1_1.js rename to ifthenpay/views/js/adminOrderDetailPage_8_2_0.js index f1e75c0..ebd700c 100644 --- a/ifthenpay/views/js/adminOrderDetailPage_8_1_1.js +++ b/ifthenpay/views/js/adminOrderDetailPage_8_2_0.js @@ -266,7 +266,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsAdminOrderDetailPageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -284,7 +284,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -324,7 +324,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsContainerInversifyAdminOrderDetailPageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -342,7 +342,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -452,7 +452,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = }); exports.AppComponent = void 0; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -470,7 +470,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -522,7 +522,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsDecoratorsEventTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -540,7 +540,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -583,7 +583,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsEventsAdminOrderDetailPageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -601,7 +601,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -679,7 +679,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = if ($('#cancelPaymentMethod').length === 0) { this.documentFragment.append(''); Object.keys(this.ifthenpayUserPaymentMethods).forEach(function (key) { - if (_this.ifthenpayUserPaymentMethods[key] !== 'ccard' && _this.ifthenpayUserPaymentMethods[key] !== 'cofidispay') { + if (_this.ifthenpayUserPaymentMethods[key] !== 'ccard' && _this.ifthenpayUserPaymentMethods[key] !== 'cofidispay' && _this.ifthenpayUserPaymentMethods[key] !== 'ifthenpaygateway') { _this.documentFragment.children().append("")); } }); @@ -833,7 +833,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsEventsPageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -851,7 +851,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -915,7 +915,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsFacadesAdminOrderDetailPageCreateAppTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -933,7 +933,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -1042,7 +1042,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsFacadesMainAppTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -1060,7 +1060,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -6586,7 +6586,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = /***/ function _(module, exports, __webpack_require__) { module.exports = __webpack_require__( - /*! /var/www/html/prestashop/1787/modules/ifthenpay/_dev/js/adminOrderDetailPage.ts */ + /*! /home/devilbox/data/www/prestashop817/htdocs/modules/ifthenpay/_dev/js/adminOrderDetailPage.ts */ "./_dev/js/adminOrderDetailPage.ts"); /***/ } diff --git a/ifthenpay/views/js/mbwayCountdownConfirmPage_8_1_1.js b/ifthenpay/views/js/mbwayCountdownConfirmPage_8_2_0.js similarity index 99% rename from ifthenpay/views/js/mbwayCountdownConfirmPage_8_1_1.js rename to ifthenpay/views/js/mbwayCountdownConfirmPage_8_2_0.js index 5b35cd9..fc8b727 100644 --- a/ifthenpay/views/js/mbwayCountdownConfirmPage_8_1_1.js +++ b/ifthenpay/views/js/mbwayCountdownConfirmPage_8_2_0.js @@ -266,7 +266,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsClassesMbwayCountDownTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -284,7 +284,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -433,7 +433,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsContainerInversifyPaymentConfirmPageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -451,7 +451,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -566,7 +566,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = }); exports.AppComponent = void 0; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -584,7 +584,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -636,7 +636,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsFacadesMainAppTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -654,7 +654,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -734,7 +734,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsFacadesPaymentConfirmPageCreateAppTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -752,7 +752,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -861,7 +861,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsMbwayCountdownConfirmPageTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -879,7 +879,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -919,7 +919,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = function _devJsServicesHttpServiceTs(module, exports, __webpack_require__) { "use strict"; /** - * 2007-2024 Ifthenpay Lda + * 2007-2022 Ifthenpay Lda * * NOTICE OF LICENSE * @@ -937,7 +937,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = * versions in the future. If you wish to customize PrestaShop for your * needs please refer to http://www.prestashop.com for more information. * - * @copyright 2007-2024 Ifthenpay Lda + * @copyright 2007-2022 Ifthenpay Lda * @author Ifthenpay Lda * @license http://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ @@ -6454,7 +6454,7 @@ function _typeof(obj) { "@babel/helpers - typeof"; return _typeof = "function" = /***/ function _(module, exports, __webpack_require__) { module.exports = __webpack_require__( - /*! /var/www/html/prestashop/1787/modules/ifthenpay/_dev/js/mbwayCountdownConfirmPage.ts */ + /*! /home/devilbox/data/www/prestashop817/htdocs/modules/ifthenpay/_dev/js/mbwayCountdownConfirmPage.ts */ "./_dev/js/mbwayCountdownConfirmPage.ts"); /***/ } diff --git a/ifthenpay/views/templates/admin/paymentMethodSetup.tpl b/ifthenpay/views/templates/admin/paymentMethodSetup.tpl index 1592f05..0056e64 100644 --- a/ifthenpay/views/templates/admin/paymentMethodSetup.tpl +++ b/ifthenpay/views/templates/admin/paymentMethodSetup.tpl @@ -28,10 +28,17 @@ {* info panel start *} + +{if $paymentMethod === 'ifthenpaygateway'} + {assign var="paymentName" value="Ifthenpay Gateway"} +{else} + {assign var="paymentName" value="{$paymenMethod}"} +{/if} +
- {l s='%s payment method' mod='ifthenpay' sprintf=[$paymentMethod|ucfirst]} + {l s='%s payment method' mod='ifthenpay' sprintf=[$paymentName|ucfirst]}
@@ -156,7 +163,15 @@
- {/if} + {elseif $paymentMethod === 'ifthenpaygateway'} + +
+ +
+ +
+
+ {/if}
diff --git a/ifthenpay/views/templates/front/mbwayPhone.tpl b/ifthenpay/views/templates/front/mbwayPhone.tpl index 8143e0a..497547e 100644 --- a/ifthenpay/views/templates/front/mbwayPhone.tpl +++ b/ifthenpay/views/templates/front/mbwayPhone.tpl @@ -24,11 +24,34 @@ *}
+ + {l s='Please enter the mobile phone number associated with your MB WAY account' mod='ifthenpay'} + +
-
- smartphone - -
- \ No newline at end of file + {if not empty($countryCodeOptions)} + + + + + {else} +
+ smartphone + +
+ + {/if} + +
+ + diff --git a/ifthenpay/views/templates/hook/_partials/paymentPanel.tpl b/ifthenpay/views/templates/hook/_partials/paymentPanel.tpl index b95e3f6..52f64ec 100644 --- a/ifthenpay/views/templates/hook/_partials/paymentPanel.tpl +++ b/ifthenpay/views/templates/hook/_partials/paymentPanel.tpl @@ -24,101 +24,132 @@ *}
-
{l s='Pay by %s' mod='ifthenpay' sprintf=[$paymentMethod]}
+
{l s='Pay by %s' mod='ifthenpay' sprintf=[$paymentMethod]}
- -
- {if $paymentMethod == 'multibanco'} + +
+ {if $paymentMethod == 'multibanco'} - {* a table with 2 columns and three rows *} + {* a table with 2 columns and three rows *} - - - - - - - - - - - - - - - {if $validade != ''} - - - - - {/if} - -
{l s='Entity:' mod='ifthenpay'}{$entidade}
{l s='Reference:' mod='ifthenpay'}{$referencia}
{l s='Total to Pay:' mod='ifthenpay'}{$totalToPay}
{l s='Deadline:' mod='ifthenpay'}{$validade}
-

{l s='Processed by ifthenpay' mod='ifthenpay'}

+ + + + + + + + + + + + + + + {if $validade != ''} + + + + + {/if} + +
{l s='Entity:' mod='ifthenpay'}{$entidade}
{l s='Reference:' mod='ifthenpay'}{$referencia}
{l s='Total to Pay:' mod='ifthenpay'}{$totalToPay}
{l s='Deadline:' mod='ifthenpay'}{$validade}
+

{l s='Processed by ifthenpay' mod='ifthenpay'}

- {elseif $paymentMethod == 'mbway'} + {elseif $paymentMethod == 'mbway'} - - - - - - - - - - - - - - - -
{l s='Phone:' mod='ifthenpay'}{$telemovel}
{l s='Order:' mod='ifthenpay'}{$orderId}
{l s='Total to Pay:' mod='ifthenpay'}{$totalToPay}
+ + + + + + + + + + + + + + + +
{l s='Phone:' mod='ifthenpay'}{$telemovel}
{l s='Order:' mod='ifthenpay'}{$orderId}
{l s='Total to Pay:' mod='ifthenpay'}{$totalToPay}
- {if $resendMbwayNotificationControllerUrl != ''} -
-
{l s='Did not receive MB WAY notification?' mod='ifthenpay'}
- {l s='Resend MB WAY notification' mod='ifthenpay'} -
- {/if} - {elseif $paymentMethod == 'payshop'} + {if $resendMbwayNotificationControllerUrl != ''} +
+
{l s='Did not receive MB WAY notification?' mod='ifthenpay'}
+ {l s='Resend MB WAY notification' mod='ifthenpay'} +
+ {/if} + {elseif $paymentMethod == 'payshop'} - - - - - - - {if $validade != ''} - - - - - {/if} - - - - - -
{l s='Reference:' mod='ifthenpay'}{$referencia}
{l s='Deadline:' mod='ifthenpay'}{$validade}
{l s='Total to Pay:' mod='ifthenpay'}{$totalToPay}
+ + + + + + + {if $validade != ''} + + + + + {/if} + + + + + +
{l s='Reference:' mod='ifthenpay'}{$referencia}
{l s='Deadline:' mod='ifthenpay'}{$validade}
{l s='Total to Pay:' mod='ifthenpay'}{$totalToPay}
- {else} + {elseif $paymentMethod == 'ifthenpaygateway'} + {if $status == 'error'} +
    +
  • {l s='Payment Error' mod='ifthenpay'}
  • +
+ {elseif $status == 'cancel'} +
    +
  • {l s='Payment Canceled' mod='ifthenpay'}
  • +
+ {else} - - - - - - - -
{l s='Total to Pay:' mod='ifthenpay'}{$totalToPay}
- {/if} -
-
\ No newline at end of file + + + + + + + {if $deadline != ''} + + + + + {/if} + + + + + +
{l s='Payment Gateway Link:' mod='ifthenpay'}{$paymentUrl}
{l s='Deadline:' mod='ifthenpay'}{$deadline}
{l s='Total to Pay:' mod='ifthenpay'}{$totalToPay}
+ {/if} + + {else} + + + + + + + + +
{l s='Total to Pay:' mod='ifthenpay'}{$totalToPay}
+ {/if} +
+
diff --git a/ifthenpay/views/templates/hook/admin.tpl b/ifthenpay/views/templates/hook/admin.tpl index 513fbab..b7021ac 100755 --- a/ifthenpay/views/templates/hook/admin.tpl +++ b/ifthenpay/views/templates/hook/admin.tpl @@ -25,7 +25,7 @@

- Ifthenpay + Ifthenpay

@@ -101,6 +101,23 @@ {$totalToPay} + {elseif $paymentMethod == 'ifthenpaygateway'} +
    +
  • + {l s='Payment Gateway Link:' mod='ifthenpay'} + {$paymentUrl} +
  • + {if $deadline != ''} +
  • + {l s='Deadline:' mod='ifthenpay'} + {$deadline} +
  • + {/if} +
  • + {l s='Total to Pay:' mod='ifthenpay'} + {$totalToPay} +
  • +
{else}
  • @@ -156,94 +173,80 @@
- \ No newline at end of file +