From 2e994c7db94716f6a463d8be7b1bd29d69439690 Mon Sep 17 00:00:00 2001 From: Nabil Berhouche Date: Thu, 27 May 2021 15:56:03 +0100 Subject: [PATCH] [BOT] Migrate hotfix 2.5.6 to GitHub. --- .../Config/Form/Field/ContactSupport.php | 143 ++++++++++++++++++ Block/Payment/Info.php | 18 +++ CHANGELOG.md | 6 + Controller/Adminhtml/Payment/Redirect.php | 8 +- Controller/Adminhtml/Payment/Response.php | 6 +- .../Adminhtml/System/Config/Support.php | 80 ++++++++++ Controller/Payment/Iframe/Loader.php | 4 +- Controller/Payment/Redirect.php | 9 +- Controller/Payment/Response.php | 6 +- Controller/Payment/Rest/Token.php | 4 + Controller/Processor/CheckProcessor.php | 4 +- Controller/Processor/ResponseProcessor.php | 2 +- Helper/Data.php | 102 ++++++++++++- Helper/Payment.php | 13 ++ Model/Api/PayzenApi.php | 16 ++ Model/Method/Multi.php | 3 - Model/Method/Oney.php | 3 - Model/Method/Payzen.php | 25 +-- Model/Method/Sepa.php | 3 - Model/Method/Standard.php | 16 +- Observer/BackendPaymentRedirectObserver.php | 3 + composer.json | 2 +- etc/adminhtml/di.xml | 6 + etc/adminhtml/system/general.xml | 52 ++++--- etc/adminhtml/system/multi.xml | 2 +- etc/config.xml | 2 +- i18n/de_DE.csv | 17 ++- i18n/en_US.csv | 18 ++- i18n/es_ES.csv | 20 ++- i18n/fr_FR.csv | 17 ++- view/adminhtml/requirejs-config.js | 16 ++ view/adminhtml/templates/payment/info.phtml | 72 +++++++++ .../config/form/field/contact_support.phtml | 53 +++++++ view/adminhtml/web/js/support.js | 11 ++ .../templates/payment/iframe/response.phtml | 4 +- .../web/template/payment/cc-type.html | 2 +- 36 files changed, 658 insertions(+), 110 deletions(-) create mode 100644 Block/Adminhtml/System/Config/Form/Field/ContactSupport.php create mode 100644 Controller/Adminhtml/System/Config/Support.php create mode 100644 view/adminhtml/requirejs-config.js create mode 100644 view/adminhtml/templates/system/config/form/field/contact_support.phtml create mode 100644 view/adminhtml/web/js/support.js diff --git a/Block/Adminhtml/System/Config/Form/Field/ContactSupport.php b/Block/Adminhtml/System/Config/Form/Field/ContactSupport.php new file mode 100644 index 00000000..28eb6202 --- /dev/null +++ b/Block/Adminhtml/System/Config/Form/Field/ContactSupport.php @@ -0,0 +1,143 @@ +dataHelper = $dataHelper; + $this->localeResolver = $localeResolver; + $this->fullModuleList = $fullModuleList; + $this->authSession = $authSession; + } + + public function getStoreInfo($order = null) + { + $info = []; + + $storeId = $order ? $order->getStore()->getId() : null; + + $info['shop-id'] = $this->dataHelper->getCommonConfigData('site_id', $storeId); + $info['context-mode'] = $this->dataHelper->getCommonConfigData('ctx_mode', $storeId); + $info['sign-algo'] = $this->dataHelper->getCommonConfigData('sign_algo', $storeId); + + $info['contrib'] = $this->dataHelper->getContribParam(); + $info['integration-mode'] = $this->dataHelper->getCardDataEntryMode($storeId); + + $modulesList = $this->fullModuleList->getNames(); + foreach ($modulesList as $id => $module) { + // Do not include Magento default modules. + if (strpos($module, 'Magento_') === 0) { + unset($modulesList[$id]); + } + } + + $info['plugins'] = implode(' / ', $modulesList); + $info['first-name'] = $this->authSession->getUser()->getFirstName(); + $info['last-name'] = $this->authSession->getUser()->getLastName(); + $info['from-email'] = $this->authSession->getUser()->getEmail(); + $info['to-email'] = $this->dataHelper->getCommonConfigData('support_email'); + $info['language'] = strtolower(substr($this->localeResolver->getLocale(), 0, 2)); + + return $info; + } + + /** + * Set template to itself. + */ + protected function _prepareLayout() + { + parent::_prepareLayout(); + + if (! $this->getTemplate()) { + $this->setTemplate('Lyranetwork_Payzen::system/config/form/field/contact_support.phtml'); + } + + return $this; + } + + /** + * Unset some non-related element parameters. + * + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * @return string + */ + public function render(\Magento\Framework\Data\Form\Element\AbstractElement $element) + { + $element->unsScope() + ->unsCanUseWebsiteValue() + ->unsCanUseDefaultValue(); + return parent::render($element); + } + + /** + * Get the button and scripts contents. + * + * @param \Magento\Framework\Data\Form\Element\AbstractElement $element + * @return string + */ + protected function _getElementHtml(\Magento\Framework\Data\Form\Element\AbstractElement $element) + { + $fieldConfig = $element->getFieldConfig(); + + $this->addData( + [ + 'button_label' => __($fieldConfig['button_label']), + 'button_url' => $this->getUrl( + $fieldConfig['button_url'], + [ + '_nosid' => true + ] + ), + 'html_id' => $element->getHtmlId() + ] + ); + + return $this->_toHtml(); + } + + public function sendMailUrl() + { + return $this->getUrl('payzen/system_config/support', ['_nosid' => true]); + } +} diff --git a/Block/Payment/Info.php b/Block/Payment/Info.php index c8baa5d1..b02d810c 100644 --- a/Block/Payment/Info.php +++ b/Block/Payment/Info.php @@ -28,20 +28,28 @@ class Info extends \Magento\Payment\Block\Info */ protected $trsCollectionFactory; + /** + * @var \Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\ContactSupport + */ + protected $supportBlock; + /** * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param \Magento\Sales\Model\ResourceModel\Order\Payment\Transaction\CollectionFactory $trsCollectionFactory + * @param \Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\ContactSupport $supportBlock * @param array $data */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Magento\Framework\Locale\ResolverInterface $localeResolver, \Magento\Sales\Model\ResourceModel\Order\Payment\Transaction\CollectionFactory $trsCollectionFactory, + \Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\ContactSupport $supportBlock, array $data = [] ) { $this->localeResolver = $localeResolver; $this->trsCollectionFactory = $trsCollectionFactory; + $this->supportBlock = $supportBlock; parent::__construct($context, $data); } @@ -174,4 +182,14 @@ public function translate($code, $type, $appendCode = false) $lang = strtolower(substr($this->localeResolver->getLocale(), 0, 2)); return PayzenResponse::translate($code, $type, $lang, $appendCode); } + + public function getStoreInfo($order) + { + return $this->supportBlock->getStoreInfo($order); + } + + public function sendMailUrl() + { + return $this->supportBlock->sendMailUrl(); + } } diff --git a/CHANGELOG.md b/CHANGELOG.md index e3e901ca..82995a19 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +2.5.6, 2021-05-27: +- Possibility to open support issue from the plugin configuration panel or an order details page. +- Update 3DS management option description. +- Improve REST API keys configuration display. +- Improve plugin logs. + 2.5.5, 2021-03-09: - Use online payment means logos. - [franfinance] Send cart details for FranFinance payments. diff --git a/Controller/Adminhtml/Payment/Redirect.php b/Controller/Adminhtml/Payment/Redirect.php index 45817d57..aae4de20 100644 --- a/Controller/Adminhtml/Payment/Redirect.php +++ b/Controller/Adminhtml/Payment/Redirect.php @@ -81,21 +81,19 @@ private function getAndCheckOrder() $order = $this->orderRepository->get($id); } catch (\Exception $e) { $this->dataHelper->log("No order to pay. It may be a direct access to redirection page." - . " [Order = {$id}] [IP = {$this->dataHelper->getIpAddress()}]."); + . " [Order = {$id}]."); throw new OrderException('Order not found in session.'); } // Check that there is products in cart. if (! $order->getTotalDue()) { - $this->dataHelper->log("Payment attempt with no amount. [Order = {$order->getIncrementId()}]" - . " [IP = {$this->dataHelper->getIpAddress()}]."); + $this->dataHelper->log("Payment attempt with no amount. [Order = {$order->getIncrementId()}]."); throw new OrderException('Order total is empty.'); } // Check that order is not processed yet. if (! $this->dataHelper->getCheckout()->getLastSuccessQuoteId()) { - $this->dataHelper->log("Payment attempt with a quote already processed. [Order = {$order->getIncrementId()}]" - . " [IP = {$this->dataHelper->getIpAddress()}]."); + $this->dataHelper->log("Payment attempt with a quote already processed. [Order = {$order->getIncrementId()}]."); throw new OrderException('Order payment already processed.'); } diff --git a/Controller/Adminhtml/Payment/Response.php b/Controller/Adminhtml/Payment/Response.php index 27279cb7..8b5a7706 100644 --- a/Controller/Adminhtml/Payment/Response.php +++ b/Controller/Adminhtml/Payment/Response.php @@ -102,7 +102,7 @@ private function redirectResponse($order, $case, $checkUrlWarn = false) $features = \Lyranetwork\Payzen\Helper\Data::$pluginFeatures; if ($features['prodfaq']) { // Display going to production message. - $message = __('

GOING INTO PRODUCTION:

You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module.'); + $message = __('GOING INTO PRODUCTION: You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module.'); $this->messageManager->addNoticeMessage($message); } @@ -113,8 +113,8 @@ private function redirectResponse($order, $case, $checkUrlWarn = false) $message = __('The shop is in maintenance mode.The automatic notification cannot work.'); } else { $message = __('The automatic validation has not worked. Have you correctly set up the notification URL in your PayZen Back Office?'); - $message .= ' 

'; - $message .= __('For understanding the problem, please read the documentation of the module:
   - Chapter « To read carefully before going further »
   - Chapter « Notification URL settings »'); + $message .= ' '; + $message .= __('For understanding the problem, please read the documentation of the module:   - Chapter « To read carefully before going further »   - Chapter « Notification URL settings »'); } $this->messageManager->addErrorMessage($message); diff --git a/Controller/Adminhtml/System/Config/Support.php b/Controller/Adminhtml/System/Config/Support.php new file mode 100644 index 00000000..99bbbad7 --- /dev/null +++ b/Controller/Adminhtml/System/Config/Support.php @@ -0,0 +1,80 @@ +dataHelper = $dataHelper; + $this->resultJsonFactory = $resultJsonFactory; + } + + public function execute() + { + // Clear all messages in session. + $this->messageManager->getMessages(true); + + $params = $this->getRequest()->getPost(); + + if (isset($params['submitter']) && $params['submitter'] === 'payzen_send_support') { + if (isset($params['sender']) && isset($params['subject']) && isset($params['message'])) { + $recipient = $this->dataHelper->getCommonConfigData('support_email'); + $subject = $params['subject']; + $content = $params['message']; + + try { + $email = new \Zend_Mail('UTF-8'); + $email->setSubject($subject); + $email->setBodyHtml($content); + $email->setFrom($params['sender']); + $email->addTo($recipient); + + $email->send(); + $this->messageManager->addSuccessMessage(__('Thank you for contacting us. Your email has been successfully sent.')); + } catch (\Exception $e) { + $this->dataHelper->log('An error occurred when trying to send email to Support: ' . $e->getMessage()); + $this->messageManager->addErrorMessage(__('An error has occurred. Your email was not sent.')); + } + } else { + $this->messageManager->addWarningMessage(__('Please make sure to configure all required fields.')); + } + } + + $result = $this->resultJsonFactory->create(); + + $data = new DataObject(); + $data->setData('success', true); + + return $result->setData($data->getData()); + } +} diff --git a/Controller/Payment/Iframe/Loader.php b/Controller/Payment/Iframe/Loader.php index 1ee75876..264d6c11 100644 --- a/Controller/Payment/Iframe/Loader.php +++ b/Controller/Payment/Iframe/Loader.php @@ -39,13 +39,13 @@ public function __construct( public function execute() { - // Check if it is a canceled order. + // Check if it is a cancelled order. if ($this->getRequest()->getParam('mode', false) === 'cancel') { // Load order. $checkout = $this->dataHelper->getCheckout(); $lastIncrementId = $checkout->getData('payzen_last_real_id'); - $this->dataHelper->log("Payment within iframe is canceled for order #{$lastIncrementId}."); + $this->dataHelper->log("Payment within iframe is cancelled for order #{$lastIncrementId}."); $lastIncrementId = $checkout->getData('payzen_last_real_id'); $order = $this->orderFactory->create(); diff --git a/Controller/Payment/Redirect.php b/Controller/Payment/Redirect.php index cf0e982a..027be6f2 100644 --- a/Controller/Payment/Redirect.php +++ b/Controller/Payment/Redirect.php @@ -81,8 +81,7 @@ private function getAndCheckOrder() // Check that there is an order to pay. if (empty($lastIncrementId)) { - $this->dataHelper->log("No order to pay. It may be a direct access to redirection page." . - " [IP = {$this->dataHelper->getIpAddress()}]."); + $this->dataHelper->log("No order to pay. It may be a direct access to redirection page."); throw new OrderException('Order not found in session.'); } @@ -91,15 +90,13 @@ private function getAndCheckOrder() // Check that there is products in cart. if (! $order->getTotalDue()) { - $this->dataHelper->log("Payment attempt with no amount. [Order = {$order->getIncrementId()}]" . - " [IP = {$this->dataHelper->getIpAddress()}]."); + $this->dataHelper->log("Payment attempt with no amount. [Order = {$order->getIncrementId()}]."); throw new OrderException('Order total is empty.'); } // Check that order is not processed yet. if (! $checkout->getLastSuccessQuoteId()) { - $this->dataHelper->log("Payment attempt with a quote already processed. [Order = {$order->getIncrementId()}]" . - " [IP = {$this->dataHelper->getIpAddress()}]."); + $this->dataHelper->log("Payment attempt with a quote already processed. [Order = {$order->getIncrementId()}]."); throw new OrderException('Order payment already processed.'); } diff --git a/Controller/Payment/Response.php b/Controller/Payment/Response.php index ea95537e..aff692d5 100644 --- a/Controller/Payment/Response.php +++ b/Controller/Payment/Response.php @@ -121,7 +121,7 @@ protected function redirectResponse($order, $case, $checkUrlWarn = false) $features = \Lyranetwork\Payzen\Helper\Data::$pluginFeatures; if ($features['prodfaq']) { // Display going to production message. - $message = __('

GOING INTO PRODUCTION:

You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module.'); + $message = __('GOING INTO PRODUCTION: You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module.'); $this->messageManager->addNoticeMessage($message); } @@ -132,8 +132,8 @@ protected function redirectResponse($order, $case, $checkUrlWarn = false) $message = __('The shop is in maintenance mode.The automatic notification cannot work.'); } else { $message = __('The automatic validation has not worked. Have you correctly set up the notification URL in your PayZen Back Office?'); - $message .= ' 

'; - $message .= __('For understanding the problem, please read the documentation of the module:
   - Chapter « To read carefully before going further »
   - Chapter « Notification URL settings »'); + $message .= ' '; + $message .= __('For understanding the problem, please read the documentation of the module:   - Chapter « To read carefully before going further »   - Chapter « Notification URL settings »'); } $this->messageManager->addErrorMessage($message); diff --git a/Controller/Payment/Rest/Token.php b/Controller/Payment/Rest/Token.php index 23273779..b4d260b4 100644 --- a/Controller/Payment/Rest/Token.php +++ b/Controller/Payment/Rest/Token.php @@ -105,6 +105,8 @@ public function execute() $quote->collectTotals(); $this->quoteRepository->save($quote); + $this->dataHelper->log("Updating form token for quote #{$quote->getId()}, reserved order ID: #{$quote->getReservedOrderId()}."); + $token = $quote->getPayment()->getMethodInstance()->getRestApiFormToken(); if (! $token) { @@ -115,6 +117,8 @@ public function execute() $data->setData('success', true); $data->setData('token', $token); + $this->dataHelper->log("Form token updated for quote #{$quote->getId()}, reserved order ID: #{$quote->getReservedOrderId()}."); + return $this->resultJsonFactory->create()->setData($data->getData()); } diff --git a/Controller/Processor/CheckProcessor.php b/Controller/Processor/CheckProcessor.php index e5596d92..bf7a6ccc 100644 --- a/Controller/Processor/CheckProcessor.php +++ b/Controller/Processor/CheckProcessor.php @@ -176,11 +176,13 @@ public function execute( $this->paymentHelper->updatePaymentInfo($order, $response); } + $this->dataHelper->log("Saving confirmed order #{$order->getIncrementId()}."); $order->save(); + $this->dataHelper->log("Confirmed order #{$order->getIncrementId()} has been saved."); return 'payment_ok_already_done'; } elseif ($order->isCanceled() && ! $response->isAcceptedPayment()) { - $this->dataHelper->log("Order #{$order->getIncrementId()} cancelation is confirmed."); + $this->dataHelper->log("Order #{$order->getIncrementId()} cancellation is confirmed."); return 'payment_ko_already_done'; } else { // Error case, the payment result and the order status do not match. diff --git a/Controller/Processor/ResponseProcessor.php b/Controller/Processor/ResponseProcessor.php index 743e376d..7ec4f987 100644 --- a/Controller/Processor/ResponseProcessor.php +++ b/Controller/Processor/ResponseProcessor.php @@ -111,7 +111,7 @@ public function execute( 'warn' => false ]; } elseif ($order->isCanceled() && ! $response->isAcceptedPayment()) { - $this->dataHelper->log("Order #{$order->getIncrementId()} cancelation is confirmed."); + $this->dataHelper->log("Order #{$order->getIncrementId()} cancellation is confirmed."); $case = $response->isCancelledPayment() ? Payment::CANCEL : Payment::FAILURE; return [ diff --git a/Helper/Data.php b/Helper/Data.php index 5a581046..89462a2b 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -9,11 +9,10 @@ */ namespace Lyranetwork\Payzen\Helper; +use Lyranetwork\Payzen\Model\Api\PayzenApi; use Magento\Store\Model\ScopeInterface; use Magento\Framework\App\Config\ScopeConfigInterface; use Magento\Framework\App\Filesystem\DirectoryList; -use Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Gift\AddedCards; -use Lyranetwork\Payzen\Model\Method\Gift; class Data extends \Magento\Framework\App\Helper\AbstractHelper { @@ -110,6 +109,11 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper */ protected $paymentHelper; + /** + * @var \Magento\Framework\App\ProductMetadataInterface + */ + protected $productMetadata; + /** * @param \Lyranetwork\Payzen\Helper\Context $context * @param \Magento\Framework\ObjectManagerInterface $objectManager @@ -123,6 +127,7 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param \Magento\Framework\Filesystem\Io\File $file * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Payment\Helper\Data $paymentHelper + * @param \Magento\Framework\App\ProductMetadataInterface $productMetadata */ public function __construct( \Lyranetwork\Payzen\Helper\Context $context, @@ -136,7 +141,8 @@ public function __construct( \Zend\Http\PhpEnvironment\RemoteAddress $remoteAddress, \Magento\Framework\Filesystem\Io\File $file, \Magento\Framework\View\Asset\Repository $assetRepo, - \Magento\Payment\Helper\Data $paymentHelper + \Magento\Payment\Helper\Data $paymentHelper, + \Magento\Framework\App\ProductMetadataInterface $productMetadata ) { parent::__construct($context); @@ -151,6 +157,7 @@ public function __construct( $this->file = $file; $this->assetRepo = $assetRepo; $this->paymentHelper = $paymentHelper; + $this->productMetadata = $productMetadata; } /** @@ -163,10 +170,28 @@ public function __construct( public function getCommonConfigData($field, $storeId = null) { if ($storeId === null && $this->isBackend()) { - $storeId = $this->getCheckoutStoreId(); + if ($this->_request->getParam('section', null) === 'payment') { + $configWebsiteId = $this->_request->getParam('website', null); + $configStoreId = $this->_request->getParam('store', null); + + if ($configWebsiteId !== null) { + $scope = ScopeInterface::SCOPE_WEBSITE; + $storeId = $configWebsiteId; + } elseif ($configStoreId !== null) { + $scope = ScopeInterface::SCOPE_STORE; + $storeId = $configWebsiteId; + } else { + $scope = 'default'; + } + } else { + $scope = ScopeInterface::SCOPE_STORE; + $storeId = $this->getCheckoutStoreId(); + } + } else { + $scope = ScopeInterface::SCOPE_STORE; } - $value = $this->scopeConfig->getValue('payzen/general/' . $field, ScopeInterface::SCOPE_STORE, $storeId); + $value = $this->scopeConfig->getValue('payzen/general/' . $field, $scope, $storeId); return is_string($value) ? trim($value) : $value; } @@ -429,11 +454,13 @@ public function log($message, $level = \Psr\Log\LogLevel::INFO) $currentMethod = $this->getCallerMethod(); $version = $this->getCommonConfigData('plugin_version'); + $ipAddress = "[IP = {$this->getIpAddress()}]"; $log = ''; $log .= 'payzen ' . $version; $log .= ' - ' . $currentMethod; $log .= ' : ' . $message; + $log .= ' ' . $ipAddress; $this->logger->log($level, $log); } @@ -541,4 +568,69 @@ public function isOneClickActive() return $standardMethod->isOneClickActive() || $sepaMethod->isOneClickActive(); } + + private function convertCardDataEntryMode($code) { + switch ($code) { + case '1': + return 'REDIRECT'; + + case '2': + return 'MERCHANT'; + + case '3': + return 'IFRAME'; + + case '4': + return'REST'; + + case '5': + return 'POPIN'; + + default: + return 'REDIRECT'; + } + } + + public function getCardDataEntryMode($storeId = null) + { + if (! $this->isBackend()) { + // Only backend is managed by this function. + throw \BadMethodCallException('Call this function only from backend code.'); + } + + if ($storeId === null) { + if ($this->_request->getParam('section', null) === 'payment') { + $configWebsiteId = $this->_request->getParam('website', null); + $configStoreId = $this->_request->getParam('store', null); + + if ($configWebsiteId !== null) { + $scope = ScopeInterface::SCOPE_WEBSITE; + $storeId = $configWebsiteId; + } elseif ($configStoreId !== null) { + $scope = ScopeInterface::SCOPE_STORE; + $storeId = $configWebsiteId; + } else { + $scope = 'default'; + } + } else { + $scope = ScopeInterface::SCOPE_STORE; + $storeId = $this->getCheckoutStoreId(); + } + } else { + $scope = ScopeInterface::SCOPE_STORE; + } + + $value = $this->scopeConfig->getValue('payment/payzen_standard/card_info_mode', $scope, $storeId); + return $this->convertCardDataEntryMode($value); + } + + public function getContribParam() { + $cmsParam = $this->getCommonConfigData('cms_identifier') . '_' + . $this->getCommonConfigData('plugin_version'); + + // Will return the Magento version. + $cmsVersion = $this->productMetadata->getVersion(); + + return $cmsParam . '/' . $cmsVersion . '/' . PayzenApi::phpVersion(); + } } diff --git a/Helper/Payment.php b/Helper/Payment.php index 81f6a4d7..f389131d 100644 --- a/Helper/Payment.php +++ b/Helper/Payment.php @@ -190,9 +190,12 @@ public function registerOrder( $this->dataHelper->log("Saving confirmed order #{$order->getIncrementId()} and sending e-mail if not disabled."); $order->save(); + $this->dataHelper->log("Confirmed order #{$order->getIncrementId()} has been saved."); if ($order->getSendEmail() === null /* not set */ || $order->getSendEmail() /* set to true */) { + $this->dataHelper->log("Sending e-mail for order #{$order->getIncrementId()}."); $this->orderSender->send($order); + $this->dataHelper->log("E-mail for order #{$order->getIncrementId()} has been sent."); } } @@ -251,6 +254,8 @@ public function nextOrderState( public function updatePaymentInfo(\Magento\Sales\Model\Order $order, \Lyranetwork\Payzen\Model\Api\PayzenResponse $response) { + $this->dataHelper->log("Updating payment information for order #{$order->getIncrementId()}."); + // Set common payment information. $order->getPayment() ->setCcTransId($response->get('trans_id')) @@ -509,6 +514,8 @@ public function updatePaymentInfo(\Magento\Sales\Model\Order $order, \Lyranetwor $order->getPayment() ->setTransactionId(null) ->setSkipTransactionCreation(true); + + $this->dataHelper->log("Payment information updated for order #{$order->getIncrementId()}."); } private function getThreedsStatus($status) @@ -724,6 +731,7 @@ public function createInvoice(\Magento\Sales\Model\Order $order) if (! $autoCapture || ($order->getStatus() !== 'processing') || ! $order->canInvoice()) { // Creating invoice not allowed. + $this->dataHelper->log("Creating invoice not allowed for order #{$order->getIncrementId()}."); return; } @@ -757,6 +765,8 @@ public function createInvoice(\Magento\Sales\Model\Order $order) // Add history entry. $order->addStatusHistoryComment(__('Invoice %1 was created.', $invoice->getIncrementId())); + + $this->dataHelper->log("Invoice created for order #{$order->getIncrementId()}."); } /** @@ -775,7 +785,10 @@ public function cancelOrder( // Save gateway responses. $this->updatePaymentInfo($order, $response); + + $this->dataHelper->log("Saving cancelled order #{$order->getIncrementId()}."); $order->save(); + $this->dataHelper->log("Order #{$order->getIncrementId()} has been cancelled."); $this->eventManager->dispatch('order_cancel_after', [ 'order' => $order diff --git a/Model/Api/PayzenApi.php b/Model/Api/PayzenApi.php index b20feacc..aec85ac8 100644 --- a/Model/Api/PayzenApi.php +++ b/Model/Api/PayzenApi.php @@ -326,5 +326,21 @@ public static function sign($parameters, $key, $algo, $hashed = true) throw new \InvalidArgumentException("Unsupported algorithm passed : {$algo}."); } } + + /** + * Get current PHP version without build info. + * @return string + */ + public static function phpVersion() + { + $version = PHP_VERSION; + + $match = array(); + if (preg_match('#^\d+(\.\d+)*#', $version, $match) === 1) { + $version = $match[0]; + } + + return $version; + } } } diff --git a/Model/Method/Multi.php b/Model/Method/Multi.php index 5d9f6e66..dbe40dc7 100644 --- a/Model/Method/Multi.php +++ b/Model/Method/Multi.php @@ -42,7 +42,6 @@ class Multi extends Payzen * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param \Lyranetwork\Payzen\Helper\Payment $paymentHelper * @param \Lyranetwork\Payzen\Helper\Checkout $checkoutHelper - * @param \Magento\Framework\App\ProductMetadataInterface $productMetadata * @param \Magento\Framework\Message\ManagerInterface $messageManager * @param \Magento\Framework\Module\Dir\Reader $dirReader * @param \Magento\Framework\DataObject\Factory $dataObjectFactory @@ -71,7 +70,6 @@ public function __construct( \Lyranetwork\Payzen\Helper\Payment $paymentHelper, \Lyranetwork\Payzen\Helper\Checkout $checkoutHelper, \Lyranetwork\Payzen\Helper\Rest $restHelper, - \Magento\Framework\App\ProductMetadataInterface $productMetadata, \Magento\Framework\Message\ManagerInterface $messageManager, \Magento\Framework\Module\Dir\Reader $dirReader, \Magento\Framework\DataObject\Factory $dataObjectFactory, @@ -102,7 +100,6 @@ public function __construct( $paymentHelper, $checkoutHelper, $restHelper, - $productMetadata, $messageManager, $dirReader, $dataObjectFactory, diff --git a/Model/Method/Oney.php b/Model/Method/Oney.php index 36b4f7a7..a6cf30a1 100644 --- a/Model/Method/Oney.php +++ b/Model/Method/Oney.php @@ -44,7 +44,6 @@ class Oney extends Payzen * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param \Lyranetwork\Payzen\Helper\Payment $paymentHelper * @param \Lyranetwork\Payzen\Helper\Checkout $checkoutHelper - * @param \Magento\Framework\App\ProductMetadataInterface $productMetadata * @param \Magento\Framework\Message\ManagerInterface $messageManager * @param \Magento\Framework\Module\Dir\Reader $dirReader * @param \Magento\Framework\DataObject\Factory $dataObjectFactory @@ -73,7 +72,6 @@ public function __construct( \Lyranetwork\Payzen\Helper\Payment $paymentHelper, \Lyranetwork\Payzen\Helper\Checkout $checkoutHelper, \Lyranetwork\Payzen\Helper\Rest $restHelper, - \Magento\Framework\App\ProductMetadataInterface $productMetadata, \Magento\Framework\Message\ManagerInterface $messageManager, \Magento\Framework\Module\Dir\Reader $dirReader, \Magento\Framework\DataObject\Factory $dataObjectFactory, @@ -104,7 +102,6 @@ public function __construct( $paymentHelper, $checkoutHelper, $restHelper, - $productMetadata, $messageManager, $dirReader, $dataObjectFactory, diff --git a/Model/Method/Payzen.php b/Model/Method/Payzen.php index 9737d639..ca038487 100644 --- a/Model/Method/Payzen.php +++ b/Model/Method/Payzen.php @@ -90,11 +90,6 @@ abstract class Payzen extends \Magento\Payment\Model\Method\AbstractMethod */ protected $restHelper; - /** - * @var \Magento\Framework\App\ProductMetadataInterface - */ - protected $productMetadata; - /** * @var \Magento\Framework\Message\ManagerInterface */ @@ -134,7 +129,6 @@ abstract class Payzen extends \Magento\Payment\Model\Method\AbstractMethod * @param \Lyranetwork\Payzen\Helper\Payment $paymentHelper * @param \Lyranetwork\Payzen\Helper\Checkout $checkoutHelper * @param \Lyranetwork\Payzen\Helper\Rest $restHelper - * @param \Magento\Framework\App\ProductMetadataInterface $productMetadata * @param \Magento\Framework\Message\ManagerInterface $messageManager * @param \Magento\Framework\Module\Dir\Reader $dirReader * @param \Magento\Framework\DataObject\Factory $dataObjectFactory @@ -162,7 +156,6 @@ public function __construct( \Lyranetwork\Payzen\Helper\Payment $paymentHelper, \Lyranetwork\Payzen\Helper\Checkout $checkoutHelper, \Lyranetwork\Payzen\Helper\Rest $restHelper, - \Magento\Framework\App\ProductMetadataInterface $productMetadata, \Magento\Framework\Message\ManagerInterface $messageManager, \Magento\Framework\Module\Dir\Reader $dirReader, \Magento\Framework\DataObject\Factory $dataObjectFactory, @@ -182,7 +175,6 @@ public function __construct( $this->paymentHelper = $paymentHelper; $this->checkoutHelper = $checkoutHelper; $this->restHelper = $restHelper; - $this->productMetadata = $productMetadata; $this->messageManager = $messageManager; $this->dirReader = $dirReader; $this->dataObjectFactory = $dataObjectFactory; @@ -230,10 +222,7 @@ public function getFormFields($order) $this->payzenRequest->set('amount', $currency->convertAmountToInteger($amount)); // Contrib info. - $cmsParam = $this->dataHelper->getCommonConfigData('cms_identifier') . '_' - . $this->dataHelper->getCommonConfigData('plugin_version'); - $cmsVersion = $this->productMetadata->getVersion(); // Will return the Magento version. - $this->payzenRequest->set('contrib', $cmsParam . '/' . $cmsVersion . '/' . PHP_VERSION); + $this->payzenRequest->set('contrib', $this->dataHelper->getContribParam()); // Set config parameters. $configFields = [ @@ -543,7 +532,10 @@ public function acceptPayment(\Magento\Payment\Model\InfoInterface $payment) // Try to create invoice. $this->paymentHelper->createInvoice($order); + $this->dataHelper->log("Saving accepted order #{$order->getIncrementId()}."); $order->save(); + $this->dataHelper->log("Accepted order #{$order->getIncrementId()} has been saved."); + $this->messageManager->addSuccessMessage(__('The payment has been accepted.')); $redirectUrl = $this->urlBuilder->getUrl( @@ -804,7 +796,10 @@ public function validatePayment(\Magento\Payment\Model\InfoInterface $payment) // Try to create invoice. $this->paymentHelper->createInvoice($order); + + $this->dataHelper->log("Saving validated order #{$order->getIncrementId()}."); $order->save(); + $this->dataHelper->log("Valdiated order #{$order->getIncrementId()} has been saved."); $this->dataHelper->log("Payment information updated for validated order #{$order->getIncrementId()}."); $this->messageManager->addSuccessMessage(__('Payment validated successfully.')); @@ -882,7 +877,10 @@ protected function validatePaymentOffline($order) // Try to create invoice. $this->paymentHelper->createInvoice($order); + + $this->dataHelper->log("Saving validated order #{$order->getIncrementId()}."); $order->save(); + $this->dataHelper->log("Validated order #{$order->getIncrementId()} has been saved.");; $this->dataHelper->log("Payment information updated for validated order #{$order->getIncrementId()}."); } @@ -1159,7 +1157,10 @@ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount) } } + $this->dataHelper->log("Saving refunded order #{$order->getIncrementId()}."); $order->save(); + $this->dataHelper->log("Refunded order #{$order->getIncrementId()} has been saved."); + return $this; } diff --git a/Model/Method/Sepa.php b/Model/Method/Sepa.php index 5d8d5fae..fe7121aa 100644 --- a/Model/Method/Sepa.php +++ b/Model/Method/Sepa.php @@ -51,7 +51,6 @@ class Sepa extends Payzen * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param \Lyranetwork\Payzen\Helper\Payment $paymentHelper * @param \Lyranetwork\Payzen\Helper\Checkout $checkoutHelper - * @param \Magento\Framework\App\ProductMetadataInterface $productMetadata * @param \Magento\Framework\Message\ManagerInterface $messageManager * @param \Magento\Framework\Module\Dir\Reader $dirReader * @param \Magento\Framework\DataObject\Factory $dataObjectFactory @@ -82,7 +81,6 @@ public function __construct( \Lyranetwork\Payzen\Helper\Payment $paymentHelper, \Lyranetwork\Payzen\Helper\Checkout $checkoutHelper, \Lyranetwork\Payzen\Helper\Rest $restHelper, - \Magento\Framework\App\ProductMetadataInterface $productMetadata, \Magento\Framework\Message\ManagerInterface $messageManager, \Magento\Framework\Module\Dir\Reader $dirReader, \Magento\Framework\DataObject\Factory $dataObjectFactory, @@ -117,7 +115,6 @@ public function __construct( $paymentHelper, $checkoutHelper, $restHelper, - $productMetadata, $messageManager, $dirReader, $dataObjectFactory, diff --git a/Model/Method/Standard.php b/Model/Method/Standard.php index 4b54c69d..7292187a 100644 --- a/Model/Method/Standard.php +++ b/Model/Method/Standard.php @@ -45,7 +45,6 @@ class Standard extends Payzen * @param \Lyranetwork\Payzen\Helper\Payment $paymentHelper * @param \Lyranetwork\Payzen\Helper\Checkout $checkoutHelper * @param \Lyranetwork\Payzen\Helper\Rest $restHelper - * @param \Magento\Framework\App\ProductMetadataInterface $productMetadata * @param \Magento\Framework\Message\ManagerInterface $messageManager * @param \Magento\Framework\Module\Dir\Reader $dirReader * @param \Magento\Framework\DataObject\Factory $dataObjectFactory @@ -75,7 +74,6 @@ public function __construct( \Lyranetwork\Payzen\Helper\Payment $paymentHelper, \Lyranetwork\Payzen\Helper\Checkout $checkoutHelper, \Lyranetwork\Payzen\Helper\Rest $restHelper, - \Magento\Framework\App\ProductMetadataInterface $productMetadata, \Magento\Framework\Message\ManagerInterface $messageManager, \Magento\Framework\Module\Dir\Reader $dirReader, \Magento\Framework\DataObject\Factory $dataObjectFactory, @@ -108,7 +106,6 @@ public function __construct( $paymentHelper, $checkoutHelper, $restHelper, - $productMetadata, $messageManager, $dirReader, $dataObjectFactory, @@ -365,11 +362,6 @@ public function getRestApiFormToken() $strongAuth = 'DISABLED'; } - // Version. - $cmsParam = $this->dataHelper->getCommonConfigData('cms_identifier') . '_' - . $this->dataHelper->getCommonConfigData('plugin_version'); - $cmsVersion = $this->productMetadata->getVersion(); // Will return the Magento version. - $billingAddress = $quote->getBillingAddress(); if (! $quote->getReservedOrderId()) { @@ -403,7 +395,7 @@ public function getRestApiFormToken() 'paymentSource' => 'EC' ] ], - 'contrib' => $cmsParam . '/' . $cmsVersion . '/' . PHP_VERSION, + 'contrib' => $this->dataHelper->getContribParam(), 'strongAuthentication' => $strongAuth, 'currency' => $currency->getAlpha3(), 'amount' => $currency->convertAmountToInteger($amount), @@ -432,6 +424,10 @@ public function getRestApiFormToken() $data['transactionOptions']['cardOptions']['retry'] = $this->getConfigData('rest_attempts'); } + $params = json_encode($data); + $this->dataHelper->log("Creating form token for quote #{$quote->getId()}, reserved order ID: #{$quote->getReservedOrderId()}" + . " with parameters: {$params}"); + try { // Perform our request. $client = new \Lyranetwork\Payzen\Model\Api\PayzenRest( @@ -440,7 +436,7 @@ public function getRestApiFormToken() $this->restHelper->getPrivateKey() ); - $response = $client->post('V4/Charge/CreatePayment', json_encode($data)); + $response = $client->post('V4/Charge/CreatePayment', $params); if ($response['status'] !== 'SUCCESS') { $msg = "Error while creating payment form token for quote #{$quote->getId()}, reserved order ID: #{$quote->getReservedOrderId()}: " diff --git a/Observer/BackendPaymentRedirectObserver.php b/Observer/BackendPaymentRedirectObserver.php index adbca765..cd265a58 100644 --- a/Observer/BackendPaymentRedirectObserver.php +++ b/Observer/BackendPaymentRedirectObserver.php @@ -81,7 +81,10 @@ public function execute(Observer $observer) if (! $flag) { $order->setSendEmail($flag); + + $this->dataHelper->log("Saving backend order #{$order->getIncrementId()}."); $order->save(); + $this->dataHelper->log("Backend order #{$order->getIncrementId()} has been saved."); } $redirectUrl = $this->urlBuilder->getUrl( diff --git a/composer.json b/composer.json index b0cf385e..bc15908f 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "php" : "~5.5.0|~5.6.0|~7" }, "type" : "magento2-module", - "version" : "2.5.5", + "version" : "2.5.6", "license" : "OSL-3.0", "autoload" : { "files" : [ diff --git a/etc/adminhtml/di.xml b/etc/adminhtml/di.xml index 1a95d721..d0c0062e 100644 --- a/etc/adminhtml/di.xml +++ b/etc/adminhtml/di.xml @@ -17,6 +17,12 @@ + + + Magento\Framework\App\Cache\Type\Config + + + Lyranetwork\Payzen\Model\AdminOrder\EmailSender diff --git a/etc/adminhtml/system/general.xml b/etc/adminhtml/system/general.xml index c7a665d9..1196684e 100644 --- a/etc/adminhtml/system/general.xml +++ b/etc/adminhtml/system/general.xml @@ -60,6 +60,12 @@ Magento\Config\Model\Config\Source\Enabledisable payzen/general/enable_logs + + + Contact support + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\ContactSupport + @@ -120,59 +126,71 @@ - REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys).]]> + Shops > REST API keys).]]> 0 Magento\Config\Block\System\Config\Form\Fieldset - + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Label + + payzen/general/rest_descr + + + Magento\Config\Model\Config\Backend\Encrypted payzen/general/rest_private_key_test - + Magento\Config\Model\Config\Backend\Encrypted payzen/general/rest_private_key_prod - + + + payzen/general/rest_url + + + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Label + + payzen/general/rest_embedded_descr + + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Sensitive payzen/general/rest_public_key_test - + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Sensitive payzen/general/rest_public_key_prod - + Magento\Config\Model\Config\Backend\Encrypted payzen/general/rest_return_key_test - + Magento\Config\Model\Config\Backend\Encrypted payzen/general/rest_return_key_prod - + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\NotifyUrl Settings > Notification rules.
In multistore mode, notification URL is the same for all the stores.]]>
payzen/general/rest_notify_url
- - - payzen/general/rest_url - - - + payzen/general/static_url @@ -240,13 +258,13 @@
- + 0 Magento\Config\Block\System\Config\Form\Fieldset - - + + payzen/general/threeds_min_amount diff --git a/etc/adminhtml/system/multi.xml b/etc/adminhtml/system/multi.xml index 2d43eac4..c7b15cba 100644 --- a/etc/adminhtml/system/multi.xml +++ b/etc/adminhtml/system/multi.xml @@ -130,7 +130,7 @@ Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Multi\MultiPaymentOptions Lyranetwork\Payzen\Model\System\Config\Backend\Multi\MultiPaymentOptions payment/payzen_multi/multi_payment_options - Label: The option label to display on the frontend.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Contract: ID of the contract to use with the option.
Count: Total number of installments.
Period: Delay (in days) between installments.
1st installment: Amount of first installment, in percentage of total amount. If empty, all installments will have the same amount.]]>
+ Label: The option label to display on the frontend.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Contract: ID of the contract to use with the option (leave blank preferably).
Count: Total number of installments.
Period: Delay (in days) between installments.
1st installment: Amount of first installment, in percentage of total amount. If empty, all installments will have the same amount.]]>
diff --git a/etc/config.xml b/etc/config.xml index e9f685af..0603cdac 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -15,7 +15,7 @@ support@payzen.eu - 2.5.5 + 2.5.6 V2 Magento_2.x 1 diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index 6fab253d..bde7fe1c 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -38,7 +38,9 @@ "Instant Payment Notification URL","Benachrichtigung-URL" "URL to copy into your PayZen Back Office > Settings > Notification rules.
In multistore mode, notification URL is the same for all the stores.","URL, die Sie in Ihre PayZen Back Office kopieren sollen > Einstellung > Regeln der Benachrichtigungen.
Unter Multistore Modus, die URL Bestätigung ist die gleiche für alle Geschäfte." "REST API KEYS","REST API SCHLÛSSEL" -"Configure this section if you are using order operations from Magento backend or if you are using « Embedded payment fields » mode.
REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys).","Configure this section if you are using order operations from Magento backend or if you are using « Embedded payment fields » mode.
REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys).""Test password","Testpasswort" +"REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys).","REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys)." +"Configure this section if you are using order operations from Magento Back Office or if you are using embedded payment fields or popin modes.","Configure this section if you are using order operations from Magento Back Office or if you are using embedded payment fields or popin modes." +"Configure this section only if you are using embedded payment fields or popin modes.","Configure this section only if you are using embedded payment fields or popin modes." "Test password","Testpasswort" "Production password","Passwort Produktion" "Public test key","Öffentlicher Schlüssel (Test)" @@ -106,9 +108,9 @@ "Shop name to display on the payment page. Leave blank to use gateway configuration.","Shopbezeichnung zur Anzeige auf der Zahlungsseite. Feld leer lassen, um Schnittstellenkonfiguration zu verwenden." "Shop URL","Shop-URL" "Shop URL to display on the payment page. Leave blank to use gateway configuration.","Shop-URL zur Anzeige auf der Zahlungsseite. Feld leer lassen, um Schnittstellenkonfiguration zu verwenden." -"SELECTIVE 3DS","SELEKTIVES 3DS" -"Disable 3DS","3DS deaktivieren" -"Amount below which 3DS will be disabled. Needs subscription to selective 3DS option. For more information, refer to the module documentation.","Betrag, unter dem 3DS deaktiviert wird. Muss für die Option Selektives 3DS freigeschaltet sein. Weitere Informationen finden Sie in der Moduldokumentation." +"CUSTOM 3DS","CUSTOM 3DS" +"Manage 3DS","Manage 3DS" +"Amount below which customer could be exempt from strong authentication. Needs subscription to « Selective 3DS1 » or « Frictionless 3DS2 » options. For more information, refer to the module documentation.", "Amount below which customer could be exempt from strong authentication. Needs subscription to « Selective 3DS1 » or « Frictionless 3DS2 » options. For more information, refer to the module documentation." "RETURN TO SHOP","RÜCKKEHR ZUM LADEN" "Automatic redirection","Automatische Weiterleitung" "If enabled, the buyer is automatically redirected to your site at the end of the payment.","Ist diese Einstellung aktiviert, wird der Kunde am Ende des Bezahlvorgangs automatisch auf Ihre Seite weitergeleitet." @@ -196,7 +198,7 @@ "ATTENTION: The payment in installments feature activation is subject to the prior agreement of Société Générale.
If you enable this feature while you have not the associated option, an error 10000 – INSTALLMENTS_NOT_ALLOWED or 07 - PAYMENT_CONFIG will occur and the buyer will not be able to pay.","ATTENTION: The payment in installments feature activation is subject to the prior agreement of Société Générale.
If you enable this feature while you have not the associated option, an error 10000 – INSTALLMENTS_NOT_ALLOWED or 07 - PAYMENT_CONFIG will occur and the buyer will not be able to pay." "PAYMENT OPTIONS","ZAHLUNGSOPTIONEN" "Payment options","Zahlungsoptionen" -"Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Contract: ID of the contract to use with the option.
Count: Total number of installments.
Period: Delay (in days) between installments.
1st installment: Amount of first installment, in percentage of total amount. If empty, all installments will have the same amount.","Klicken Sie auf die Schaltfläche « Hinzufügen » um eine oder mehrere Zahlungsoptionen einzustellen.
Name: Beschreibung der Mehrfachzahlung.
Mindestbetrag: Mindestbetrag um die Option anzubieten.
Höchstbetrag: Höchstbetrag um die Option anzubieten.
Vertrag: Vertrags ID um die Option zu benutzen.
Anzahl: Gesamtanzahl der Raten.
Zeitraum: Zeitraum zwischen zwei Raten (in Tagen).
1. Rate: Betrag der ersten Rate insgesamtes Prozent. Falls dies nicht angegeben ist, haben alle Raten den gleichen Betrag." +"Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Contract: ID of the contract to use with the option (leave blank preferably).
Count: Total number of installments.
Period: Delay (in days) between installments.
1st installment: Amount of first installment, in percentage of total amount. If empty, all installments will have the same amount.","Klicken Sie auf die Schaltfläche « Hinzufügen » um eine oder mehrere Zahlungsoptionen einzustellen.
Name: Beschreibung der Mehrfachzahlung.
Mindestbetrag: Mindestbetrag um die Option anzubieten.
Höchstbetrag: Höchstbetrag um die Option anzubieten.
Vertrag: Vertrags ID um die Option zu benutzen (vorzugsweise leer lassen).
Anzahl: Gesamtanzahl der Raten.
Zeitraum: Zeitraum zwischen zwei Raten (in Tagen).
1. Rate: Betrag der ersten Rate insgesamtes Prozent. Falls dies nicht angegeben ist, haben alle Raten den gleichen Betrag." "Add","Hinzufügen" "Delete","Löschen" "Label","Kennzeichnung" @@ -251,6 +253,7 @@ "Click on Add button to configure one or more payment options.
Label: The option label to display on the frontend (the %c and %r patterns will be respectively replaced by payments count and option rate).
Code: The option code as defined in your Oney contract.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Count: Total number of payments.
Rate: The interest rate in percentage.","Klicken Sie auf Hinzufügen, um eine oder mehrere Zahlungsoptionen zu konfigurieren.
Kennzeichnung: Die Option Etikett auf dem Frontend (die %c und %r Muster ersetzt werden angezeigt durch Zahlungen zählen und Option Geschwindigkeit).
Code: Der Optionscode wie in Ihrem Oney Vertrag definiert.
Mindestbetrag: Mindest Betrag die Zahlung Option zu aktivieren.
Höchstbetrag: die maximale Menge, die Zahlung Option zu aktivieren.
Anzahl: Gesamtzahl der Zahlungen.
Preis: Der Zinssatz in Prozent." "The configuration of the PayZen module has been successfully reset.","Der Reset der Einstellungen des PayZen Moduls wurde erfolgreich durchgeführt." +"Thank you for contacting us. Your email has been successfully sent.","Thank you for contacting us. Your email has been successfully sent." "The field « %1 » is invalid: please check column « %2 » of the option %3 in section « %4 ».","Das Feld « %1 » ist ungültig: bitte überprüfen Sie die Spalte « %2 » der Option %3 in Abschnitt « %4 »." "Invalid value for field « %1 » in section « %2 ».","Ungültiger Wert für Feld « %1 » in Abschnitt « %2 »." "The field « %1 » is required for section « %2 ».","Das Feld « %1 » ist für Abschnitt « %2 » Pflichtfeld." @@ -377,10 +380,10 @@ "Fees :","Gebühren :" "Total amount :","Gesamtbetrag :" -"

GOING INTO PRODUCTION:

You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module.","

UMSTELLUNG AUF PRODUKTIONSUMFELD:

Sie möchten wissen, wie Sie auf Produktionsumfeld umstellen können, bitte lesen Sie die Kapitel « Weiter zur Testphase » und « Verschieben des Shops in den Produktionsumfeld » in der Dokumentation des Moduls." +"GOING INTO PRODUCTION: You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module.","UMSTELLUNG AUF PRODUKTIONSUMFELD: Sie möchten wissen, wie Sie auf Produktionsumfeld umstellen können, bitte lesen Sie die Kapitel « Weiter zur Testphase » und « Verschieben des Shops in den Produktionsumfeld » in der Dokumentation des Moduls." "The shop is in maintenance mode.The automatic notification cannot work.","Dieser Shop befindet sich im Wartungsmodus. Es kann keine automatische Benachrichtigung erstellt werden." "The automatic validation has not worked. Have you correctly set up the notification URL in your PayZen Back Office?","Es konnte keine automatische Benachrichtigung erstellt werden. Bitte prüfen Sie, ob die Benachrichtigung-URL in Ihr PayZen Back Office korrekt eingerichtet ist." -"For understanding the problem, please read the documentation of the module:
   - Chapter « To read carefully before going further »
   - Chapter « Notification URL settings »","Nähere Informationen zu diesem Problem entnehmen Sie bitte der Moduldokumentation:
   - Kapitel « Bitte vor dem Weiterlesen aufmerksam lesen »
   - Kapitel « Benachrichtigung-URL Einstellungen »" +"For understanding the problem, please read the documentation of the module:   - Chapter « To read carefully before going further »   - Chapter « Notification URL settings »","Nähere Informationen zu diesem Problem entnehmen Sie bitte der Moduldokumentation:   - Kapitel « Bitte vor dem Weiterlesen aufmerksam lesen »   - Kapitel « Benachrichtigung-URL Einstellungen »" "Invoice %1 was created.","Die Rechnung %1 wurde erstellt." "Transaction %1 was created.","Die Transaktion %1 wurde erstellt." "Transaction %1 was updated.","Die Transaktion %1 wurde aktualisiert." diff --git a/i18n/en_US.csv b/i18n/en_US.csv index 832d3e80..0dac4ad1 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -36,8 +36,11 @@ "Payment page URL","Payment page URL" "Link to the payment page.","Link to the payment page." "Instant Payment Notification URL","Instant Payment Notification URL" +"URL to copy into your PayZen Back Office > Settings > Notification rules.
In multistore mode, notification URL is the same for all the stores.","URL to copy into your PayZen Back Office > Settings > Notification rules.
In multistore mode, notification URL is the same for all the stores." "REST API KEYS","REST API KEYS" -"Configure this section if you are using order operations from Magento backend or if you are using « Embedded payment fields » mode.
REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys).","Configure this section if you are using order operations from Magento backend or if you are using « Embedded payment fields » mode.
REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys)." +"REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys).","REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys)." +"Configure this section if you are using order operations from Magento Back Office or if you are using embedded payment fields or popin modes.","Configure this section if you are using order operations from Magento Back Office or if you are using embedded payment fields or popin modes." +"Configure this section only if you are using embedded payment fields or popin modes.","Configure this section only if you are using embedded payment fields or popin modes." "Test password","Test password" "Production password","Production password" "Public test key","Public test key" @@ -106,9 +109,9 @@ "Shop name to display on the payment page. Leave blank to use gateway configuration.","Shop name to display on the payment page. Leave blank to use gateway configuration." "Shop URL","Shop URL" "Shop URL to display on the payment page. Leave blank to use gateway configuration.","Shop URL to display on the payment page. Leave blank to use gateway configuration." -"SELECTIVE 3DS","SELECTIVE 3DS" -"Disable 3DS","Disable 3DS" -"Amount below which 3DS will be disabled. Needs subscription to selective 3DS option. For more information, refer to the module documentation.","Amount below which 3DS will be disabled. Needs subscription to selective 3DS option. For more information, refer to the module documentation." +"CUSTOM 3DS","CUSTOM 3DS" +"Manage 3DS","Manage 3DS" +"Amount below which customer could be exempt from strong authentication. Needs subscription to « Selective 3DS1 » or « Frictionless 3DS2 » options. For more information, refer to the module documentation.", "Amount below which customer could be exempt from strong authentication. Needs subscription to « Selective 3DS1 » or « Frictionless 3DS2 » options. For more information, refer to the module documentation." "RETURN TO SHOP","RETURN TO SHOP" "Automatic redirection","Automatic redirection" "If enabled, the buyer is automatically redirected to your site at the end of the payment.","If enabled, the buyer is automatically redirected to your site at the end of the payment." @@ -195,7 +198,7 @@ "ATTENTION: The payment in installments feature activation is subject to the prior agreement of Société Générale.
If you enable this feature while you have not the associated option, an error 10000 – INSTALLMENTS_NOT_ALLOWED or 07 - PAYMENT_CONFIG will occur and the buyer will not be able to pay.","ATTENTION: The payment in installments feature activation is subject to the prior agreement of Société Générale.
If you enable this feature while you have not the associated option, an error 10000 – INSTALLMENTS_NOT_ALLOWED or 07 - PAYMENT_CONFIG will occur and the buyer will not be able to pay." "PAYMENT OPTIONS","PAYMENT OPTIONS" "Payment options","Payment options" -"Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Contract: ID of the contract to use with the option.
Count: Total number of installments.
Period: Delay (in days) between installments.
1st installment: Amount of first installment, in percentage of total amount. If empty, all installments will have the same amount.","Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Contract: ID of the contract to use with the option.
Count: Total number of installments.
Period: Delay (in days) between installments.
1st installment: Amount of first installment, in percentage of total amount. If empty, all installments will have the same amount." +"Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Contract: ID of the contract to use with the option (leave blank preferably).
Count: Total number of installments.
Period: Delay (in days) between installments.
1st installment: Amount of first installment, in percentage of total amount. If empty, all installments will have the same amount.","Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Contract: ID of the contract to use with the option (leave blank preferably).
Count: Total number of installments.
Period: Delay (in days) between installments.
1st installment: Amount of first installment, in percentage of total amount. If empty, all installments will have the same amount." "Add","Add" "Delete","Delete" "Label","Label" @@ -250,6 +253,7 @@ "Click on Add button to configure one or more payment options.
Label: The option label to display on the frontend (the %c and %r patterns will be respectively replaced by payments count and option rate).
Code: The option code as defined in your Oney contract.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Count: Total number of payments.
Rate: The interest rate in percentage.","Click on Add button to configure one or more payment options.
Label: The option label to display on the frontend (the %c and %r patterns will be respectively replaced by payments count and option rate).
Code: The option code as defined in your Oney contract.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Count: Total number of payments.
Rate: The interest rate in percentage." "The configuration of the PayZen module has been successfully reset.","The configuration of the PayZen module has been successfully reset." +"Thank you for contacting us. Your email has been successfully sent.","Thank you for contacting us. Your email has been successfully sent." "The field « %1 » is invalid: please check column « %2 » of the option %3 in section « %4 ».","The field « %1 » is invalid: please check column « %2 » of the option %3 in section « %4 »." "Invalid value for field « %1 » in section « %2 ».","Invalid value for field « %1 » in section « %2 »." "The field « %1 » is required for section « %2 ».","The field « %1 » is required for section « %2 »." @@ -376,10 +380,10 @@ "Fees :","Fees :" "Total amount :","Total amount :" -"

GOING INTO PRODUCTION:

You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module.","

GOING INTO PRODUCTION :

You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module." +"GOING INTO PRODUCTION: You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module.","GOING INTO PRODUCTION : You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module." "The shop is in maintenance mode.The automatic notification cannot work.","La boutique est en mode maintenance. La validation automatique ne peut fonctionner." "The automatic validation has not worked. Have you correctly set up the notification URL in your PayZen Back Office?","The automatic validation has not worked. Have you correctly set up the notification URL in your PayZen Back Office?" -"For understanding the problem, please read the documentation of the module:
   - Chapter « To read carefully before going further »
   - Chapter « Notification URL settings »","For understanding the problem, please read the documentation of the module:
   - Chapter « To read carefully before going further »
   - Chapter « Notification URL settings »" +"For understanding the problem, please read the documentation of the module:   - Chapter « To read carefully before going further »   - Chapter « Notification URL settings »","For understanding the problem, please read the documentation of the module:   - Chapter « To read carefully before going further »   - Chapter « Notification URL settings »" "Invoice %1 was created.","Invoice %1 was created." "Transaction %1 was created.","Transaction %1 was created." "Transaction %1 was updated.","Transaction %1 was updated." diff --git a/i18n/es_ES.csv b/i18n/es_ES.csv index b604c28a..1bb3cd68 100644 --- a/i18n/es_ES.csv +++ b/i18n/es_ES.csv @@ -38,7 +38,9 @@ "Instant Payment Notification URL","URL de notificación de pago instantáneo" "URL to copy into your PayZen Back Office > Settings > Notification rules.
In multistore mode, notification URL is the same for all the stores.","URL a copiar en el Back Office PayZen > Configuración > Reglas de notificación.
En modo multitienda, la URL de notificación es la misma para todas las tiendas." "REST API KEYS","CLAVES DE API REST" -"Configure this section if you are using order operations from Magento backend or if you are using « Embedded payment fields » mode.
REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys).","Configure esta sección si está utilizando operaciones de pedido desde el backend de Magento o si está utilizando el modo « Campos de pago incrustados ».
Las claves de API REST están disponibles en el Back Office PayZen (menú: Configuración > Tiendas > Claves de API REST)." +"REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys).","Las claves de API REST están disponibles en el Back Office PayZen (menú: Configuración > Tiendas > Claves de API REST)." +"Configure this section if you are using order operations from Magento Back Office or if you are using embedded payment fields or popin modes.","Configure esta sección si está utilizando operaciones de pedido desde el Back Office de Magento o si está utilizando los modos campos de pago incrustados o popin." +"Configure this section only if you are using embedded payment fields or popin modes.","Configure esta sección solo si está utilizando los modos campos de pago incrustados o popin." "Test password","Contraseña de test" "Production password","Contraseña de producción" "Public test key","Clave pública de test" @@ -106,9 +108,9 @@ "Shop name to display on the payment page. Leave blank to use gateway configuration.","Nombre de la tienda a mostrar en la página de pago. Deje en blanco para usar la configuración del portal." "Shop URL","URL de la tienda" "Shop URL to display on the payment page. Leave blank to use gateway configuration.","URL de la tienda a mostrar en la página de pago. Deje en blanco para usar la configuración del portal." -"SELECTIVE 3DS","3DS SELECTIVO" -"Disable 3DS","Deshabilitar 3DS" -"Amount below which 3DS will be disabled. Needs subscription to selective 3DS option. For more information, refer to the module documentation.","Monto por debajo del cual se deshabilitará 3DS. Requiere suscripción a la opción 3DS selectivo. Para más información, consulte la documentación del módulo." +"CUSTOM 3DS"," 3DS PERSONALIZADO" +"Manage 3DS","Gestionar el 3DS" +"Amount below which customer could be exempt from strong authentication. Needs subscription to « Selective 3DS1 » or « Frictionless 3DS2 » options. For more information, refer to the module documentation.", "Monto por debajo del cual el comprador podría estar exento de de la autenticación fuerte. Requiere suscripción a la opción « Selective 3DS1 » o a la opción « Frictionless 3DS2 ». Para más información, consulte la documentación del módulo." "RETURN TO SHOP","VOLVER A LA TIENDA" "Automatic redirection","Redirección automática" "If enabled, the buyer is automatically redirected to your site at the end of the payment.","Si está habilitada, el comprador es redirigido automáticamente a su sitio al final del pago." @@ -196,7 +198,7 @@ "ATTENTION: The payment in installments feature activation is subject to the prior agreement of Société Générale.
If you enable this feature while you have not the associated option, an error 10000 – INSTALLMENTS_NOT_ALLOWED or 07 - PAYMENT_CONFIG will occur and the buyer will not be able to pay.","ATENCIÓN: La activación de la función de pago en N vencimientos está sujeta al acuerdo previo de Societé Générale.
Si habilita esta función cuando no tiene la opción asociada, ocurrirá un error 10000 – INSTALLMENTS_NOT_ALLOWED o 07 - PAYMENT_CONFIG y el comprador no podrá pagar." "PAYMENT OPTIONS","OPCIONES DE PAGO" "Payment options","Opciones de pago" -"Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Contract: ID of the contract to use with the option.
Count: Total number of installments.
Period: Delay (in days) between installments.
1st installment: Amount of first installment, in percentage of total amount. If empty, all installments will have the same amount.","Haga clic en el botón « Agregar » para configurar una o más opciones de pago.
Etiqueta: La etiqueta de opción a mostrar en el frontend.
Monto mínimo: Monto mínimo para habilitar la opción de pago.
Monto máximo: Monto máximo para habilitar la opción de pago.
Afiliación: ID de la afiliación a usar con la opción.
Conteo: Número total de vencimientos.
Periodo: Plazo (en días) entre vencimientos.
Primer vencimiento: Monto del primer vencimiento, en porcentaje del monto total. Si está vacío, todos los vencimientos tendrán el mismo monto." +"Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Contract: ID of the contract to use with the option (leave blank preferably).
Count: Total number of installments.
Period: Delay (in days) between installments.
1st installment: Amount of first installment, in percentage of total amount. If empty, all installments will have the same amount.","Haga clic en el botón « Agregar » para configurar una o más opciones de pago.
Etiqueta: La etiqueta de opción a mostrar en el frontend.
Monto mínimo: Monto mínimo para habilitar la opción de pago.
Monto máximo: Monto máximo para habilitar la opción de pago.
Afiliación: ID de la afiliación a usar con la opción (dejar en blanco preferiblemente).
Conteo: Número total de vencimientos.
Periodo: Plazo (en días) entre vencimientos.
Primer vencimiento: Monto del primer vencimiento, en porcentaje del monto total. Si está vacío, todos los vencimientos tendrán el mismo monto." "Add","Agregar" "Delete","Eliminar" "Label","Etiqueta" @@ -246,9 +248,11 @@ "If this option is enabled, all the payment means added in this section will be displayed within the same payment submodule.", "i esta opción está habilitada, los medios de pago agregados en esta sección se mostrarán dentro del mismo submódulo de pago." "Payment means","Medios de pago" "Countries","Países" -"Click on « Add » button to configure one or more payment means.
Label: The label of the means of payment to display on your site.
Means of payment: Choose the means of payment you want to propose.
Countries: Countries where the means of payment will be available. Leave blank to authorize all countries.
Min. amount: Minimum amount to enable the means of payment.
Max. amount: Maximum amount to enable the means of payment.
Capture delay: The number of days before the bank capture. Enter value only if different from PayZen general configuration.
Validation mode: If manual is selected, you will have to confirm payments manually in your PayZen Back Office.
Cart data: If you disable this option, the shopping cart details will not be sent to the gateway. Attention, in some cases, this option has to be enabled. For more information, refer to the module documentation.","Haga clic en el botón « Agregar » para configurar un o más medios de pago.
Etiqueta: La etiqueta del medio de pago a mostrar en su sitio.
Medio de pago: Elija el medio de pago que desea ofrecer.
Países: Países donde estarán disponibles los medios de pago. Deje en blanco para permitir todos los países.
Monto mínimo: Monto mínimo para habilitar el medio de pago.
Monto máximo: Monto máximo para habilitar el medio de pago.
Plazo de captura: El número de días antes de la captura por el adquirente. Ingrese el valor solo si es diferente a la configuración general de PayZen.
Modo de validación: Si se selecciona manual, deberá confirmar los pagos manualmente en su Back Office PayZen.
Datos del carrito: Si deshabilita esta opción, los detalles del carrito de la compra no se enviarán a la puerta de enlace. Atención, en algunos casos, esta opción tiene que estar habilitada. Para más información, consulte la documentación del módulo.""The configuration of the PayZen module has been successfully reset.","La configuración del módulo PayZen se restableció correctamente." +"Click on « Add » button to configure one or more payment means.
Label: The label of the means of payment to display on your site.
Means of payment: Choose the means of payment you want to propose.
Countries: Countries where the means of payment will be available. Leave blank to authorize all countries.
Min. amount: Minimum amount to enable the means of payment.
Max. amount: Maximum amount to enable the means of payment.
Capture delay: The number of days before the bank capture. Enter value only if different from PayZen general configuration.
Validation mode: If manual is selected, you will have to confirm payments manually in your PayZen Back Office.
Cart data: If you disable this option, the shopping cart details will not be sent to the gateway. Attention, in some cases, this option has to be enabled. For more information, refer to the module documentation.","Haga clic en el botón « Agregar » para configurar un o más medios de pago.
Etiqueta: La etiqueta del medio de pago a mostrar en su sitio.
Medio de pago: Elija el medio de pago que desea ofrecer.
Países: Países donde estarán disponibles los medios de pago. Deje en blanco para permitir todos los países.
Monto mínimo: Monto mínimo para habilitar el medio de pago.
Monto máximo: Monto máximo para habilitar el medio de pago.
Plazo de captura: El número de días antes de la captura por el adquirente. Ingrese el valor solo si es diferente a la configuración general de PayZen.
Modo de validación: Si se selecciona manual, deberá confirmar los pagos manualmente en su Back Office PayZen.
Datos del carrito: Si deshabilita esta opción, los detalles del carrito de la compra no se enviarán a la puerta de enlace. Atención, en algunos casos, esta opción tiene que estar habilitada. Para más información, consulte la documentación del módulo." "Click on Add button to configure one or more payment options.
Label: The option label to display on the frontend (the %c and %r patterns will be respectively replaced by payments count and option rate).
Code: The option code as defined in your Oney contract.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Count: Total number of payments.
Rate: The interest rate in percentage.","Haga clic en el botón Agregar para configurar una o más opciones de pago.
Etiqueta: La etiqueta de opción a mostrar en el frontend (los patrones %c y %r se reemplazarán respectivamente por conteo de pagos y tasa de opción).
Código: El código de opción como se define en su afiliación de Oney.
Monto mínimo: Monto mínimo para habilitar la opción de pago.
Monto máximo: Monto máximo para habilitar la opción de pago.
Conteo: Número total de pagos.
Tasa: La tasa de interés en porcentaje." +"The configuration of the PayZen module has been successfully reset.","La configuración del módulo PayZen se restableció correctamente." +"Thank you for contacting us. Your email has been successfully sent.","Gracias por contactarnos. Su correo electrónico ha sido enviado con éxito." "The field « %1 » is invalid: please check column « %2 » of the option %3 in section « %4 ».","El campo « %1 » no es válido: verifique la columna « %2 » de la opción %3 en la sección « %4 »." "Invalid value for field « %1 » in section « %2 ».","Valor no válido para el campo « %1 » en la sección « %2 »." "The field « %1 » is required for section « %2 ».","El campo « %1 » se requiere para la sección « %2 »." @@ -375,10 +379,10 @@ "Fees :","Gastos :" "Total amount :","Monto total:" -"

GOING INTO PRODUCTION:

You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module.","

IR A PRODUCTION:

Si desea saber cómo poner su tienda en modo production, lea los capítulos « Proceder a la fase de prueba » y « Paso de una tienda al modo producción » en la documentación del módulo." +"GOING INTO PRODUCTION: You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module.","IR A PRODUCTION: Si desea saber cómo poner su tienda en modo production, lea los capítulos « Proceder a la fase de prueba » y « Paso de una tienda al modo producción » en la documentación del módulo." "The shop is in maintenance mode.The automatic notification cannot work.","La tienda está en modo de mantenimiento. La notificación automática no puede funcionar." "The automatic validation has not worked. Have you correctly set up the notification URL in your PayZen Back Office?","La validación automática no ha funcionado. ¿Configuró correctamente la URL de notificación en su Back Office PayZen?" -"For understanding the problem, please read the documentation of the module:
   - Chapter « To read carefully before going further »
   - Chapter « Notification URL settings »","Para entender el problema, lea la documentación del módulo:
   - Capítulo « Leer detenidamente antes de continuar »
   - Capítulo « Configuración de la URL de notificación »" +"For understanding the problem, please read the documentation of the module:   - Chapter « To read carefully before going further »   - Chapter « Notification URL settings »","Para entender el problema, lea la documentación del módulo:   - Capítulo « Leer detenidamente antes de continuar »   - Capítulo « Configuración de la URL de notificación »" "Invoice %1 was created.","Se creó la factura %1." "Transaction %1 was created.","Se creó la transacción %1." "Transaction %1 was updated.","Se actualizó la transacción %1." diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index 4a2201d5..509de216 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -38,7 +38,9 @@ "Instant Payment Notification URL","URL de notification" "URL to copy into your PayZen Back Office > Settings > Notification rules.
In multistore mode, notification URL is the same for all the stores.","URL à copier dans le Back Office PayZen > Paramétrage > Règles de notifications.
En mode multi-boutique, l'URL de notification est la même pour toutes les boutiques." "REST API KEYS","CLÉS D'API REST" -"Configure this section if you are using order operations from Magento backend or if you are using « Embedded payment fields » mode.
REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys).","Configurez cette section si vous utiliser les opérations sur les commandes depuis le Backend Magento ou si vous utilisez le mode « Champs de paiement embarqués ».
Les clés de l'API REST sont disponibles dans votre Back Office PayZen (menu: Paramétrage > Boutiques > Clés d'API REST)." +"REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys).","Les clés de l'API REST sont disponibles dans votre Back Office PayZen (menu: Paramétrage > Boutiques > Clés d'API REST)." +"Configure this section if you are using order operations from Magento Back Office or if you are using embedded payment fields or popin modes.","Configurez cette section si vous utiliser les opérations sur les commandes depuis le Back Office Magento ou si vous utilisez les modes champs de paiement embarqués ou popin." +"Configure this section only if you are using embedded payment fields or popin modes.","Configurez cette section uniquement si vous utilisez les modes champs de paiement embarqués ou popin." "Test password","Mot de passe de test" "Production password","Mot de passe de production" "Public test key","Clé publique de test" @@ -106,9 +108,9 @@ "Shop name to display on the payment page. Leave blank to use gateway configuration.","Nom affiché sur la page de paiement. Laisser vide pour utiliser la configuration de la plateforme." "Shop URL","URL de la boutique" "Shop URL to display on the payment page. Leave blank to use gateway configuration.","URL affichée sur la page de paiement. Laisser vide pour utiliser la configuration de la plateforme." -"SELECTIVE 3DS","3DS SÉLECTIF" -"Disable 3DS","Désactiver 3DS" -"Amount below which 3DS will be disabled. Needs subscription to selective 3DS option. For more information, refer to the module documentation.","Montant en dessous duquel 3DS sera désactivé. Nécessite la souscription à l'option 3DS sélectif. Pour plus d'informations, reportez-vous à la documentation du module." +"CUSTOM 3DS","3DS PERSONNALISÉ" +"Manage 3DS","Gérer le 3DS" +"Amount below which customer could be exempt from strong authentication. Needs subscription to « Selective 3DS1 » or « Frictionless 3DS2 » options. For more information, refer to the module documentation.", "Montant en dessous duquel l'acheteur pourrait être exempté de l'authentification forte. Nécessite la souscription à l'option « Selective 3DS1 » ou l'option « Frictionless 3DS2 ». Pour plus d'informations, reportez-vous à la documentation du module." "RETURN TO SHOP","RETOUR À LA BOUTIQUE" "Automatic redirection","Redirection automatique" "If enabled, the buyer is automatically redirected to your site at the end of the payment.","Si activée, l'acheteur sera redirigé automatiquement vers votre site à la fin du paiement." @@ -196,7 +198,7 @@ "ATTENTION: The payment in installments feature activation is subject to the prior agreement of Société Générale.
If you enable this feature while you have not the associated option, an error 10000 – INSTALLMENTS_NOT_ALLOWED or 07 - PAYMENT_CONFIG will occur and the buyer will not be able to pay.","ATTENTION: L'activation de la fonctionnalité de paiement en nfois est soumise à accord préalable de Société Générale.
Si vous activez cette fonctionnalité alors que vous ne disposez pas de cette option, une erreur 10000 – INSTALLMENTS_NOT_ALLOWED ou 07 - PAYMENT_CONFIG sera générée et l'acheteur sera dans l'incapacité de payer." "PAYMENT OPTIONS","OPTIONS DE PAIEMENT" "Payment options","Options de paiement" -"Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Contract: ID of the contract to use with the option.
Count: Total number of installments.
Period: Delay (in days) between installments.
1st installment: Amount of first installment, in percentage of total amount. If empty, all installments will have the same amount.","Cliquer sur le bouton Ajouter pour configurer une ou plusieurs options de paiement.
Libellé: Texte décrivant l'option de paiement multiple.
Montant min.: Montant minimum pour proposer l'option.
Montant max.: Montant maximum pour proposer l'option.
Contrat: ID du contrat à utiliser avec l'option.
Nombre: Nombre total d'échéances.
Période: Délai entre deux échéances (en jours).
1ére échéance: Montant de la première échéance en pourcentage du total. Si vide, toutes les échéances auront le même montant." +"Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Contract: ID of the contract to use with the option (leave blank preferably).
Count: Total number of installments.
Period: Delay (in days) between installments.
1st installment: Amount of first installment, in percentage of total amount. If empty, all installments will have the same amount.","Cliquer sur le bouton Ajouter pour configurer une ou plusieurs options de paiement.
Libellé: Texte décrivant l'option de paiement multiple.
Montant min.: Montant minimum pour proposer l'option.
Montant max.: Montant maximum pour proposer l'option.
Contrat: ID du contrat à utiliser avec l'option (laisser vide de préférence).
Nombre: Nombre total d'échéances.
Période: Délai entre deux échéances (en jours).
1ére échéance: Montant de la première échéance en pourcentage du total. Si vide, toutes les échéances auront le même montant." "Add","Ajouter" "Delete","Supprimer" "Label","Libellé" @@ -251,6 +253,7 @@ "Click on Add button to configure one or more payment options.
Label: The option label to display on the frontend (the %c and %r patterns will be respectively replaced by payments count and option rate).
Code: The option code as defined in your Oney contract.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.
Count: Total number of payments.
Rate: The interest rate in percentage.","Cliquer sur le bouton Ajouter pour configurer une ou plusieurs options de paiement.
Libellé: Texte décrivant l'option de paiement (les codes %c et %r seront remplacés respectivement par le nombre paiements et le taux d'intérêt).
Code: Le code de l'option tel que défini dans votre contrat Oney.
Montant min.: Montant minimum pour proposer l'option.
Montant max.: Montant maximum pour proposer l'option.
Nombre: Nombre total de paiements.
Taux: Le taux d'intérêt pour l'option." "The configuration of the PayZen module has been successfully reset.","La configuration du module PayZen a été réinitialisée avec succès." +"Thank you for contacting us. Your email has been successfully sent.","Merci de nous contacter. Votre e-mail a été envoyé avec succès." "The field « %1 » is invalid: please check column « %2 » of the option %3 in section « %4 ».","Le champ « %1 » est invalide: veuillez vérifier la colonne « %2 » de l'option %3 dans la section « %4 »." "Invalid value for field « %1 » in section « %2 ».","Valeur invalide pour le champ « %1 » dans la section « %2 »." "The field « %1 » is required for section « %2 ».","Le champ « %1 » est obligatoire pour la section « %2 »." @@ -377,10 +380,10 @@ "Fees :","Frais de dossier :" "Total amount :","Montant total :" -"

GOING INTO PRODUCTION:

You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module.","

PASSAGE EN PRODUCTION:

Vous souhaitez savoir comment passer votre boutique en production, merci de consulter les chapitres « Procéder à la phase des tests » et « Passage d'une boutique en mode production » de la documentation du module." +"GOING INTO PRODUCTION: You want to know how to put your shop into production mode, please read chapters « Proceeding to test phase » and « Shifting the shop to production mode » in the documentation of the module.","PASSAGE EN PRODUCTION: Vous souhaitez savoir comment passer votre boutique en production, merci de consulter les chapitres « Procéder à la phase des tests » et « Passage d'une boutique en mode production » de la documentation du module." "The shop is in maintenance mode.The automatic notification cannot work.","La boutique est en mode maintenance. La validation automatique ne peut fonctionner." "The automatic validation has not worked. Have you correctly set up the notification URL in your PayZen Back Office?","La commande a été validée mais la confirmation automatique n'a pas fonctionné. Avez-vous correctement configuré l'URL de notification dans le Back Office PayZen?" -"For understanding the problem, please read the documentation of the module:
   - Chapter « To read carefully before going further »
   - Chapter « Notification URL settings »","Afin de comprendre la problématique, reportez vous à la documentation du module :
   - Chapitre « A lire attentivement avant d'aller loin »
   - Chapitre « Paramétrage de l'URL de notification »" +"For understanding the problem, please read the documentation of the module:   - Chapter « To read carefully before going further »   - Chapter « Notification URL settings »","Afin de comprendre la problématique, reportez vous à la documentation du module :   - Chapitre « A lire attentivement avant d'aller loin »   - Chapitre « Paramétrage de l'URL de notification »" "Invoice %1 was created.","La facture %1 a bien été créée." "Transaction %1 was created.","La transaction %1 a bien été créée." "Transaction %1 was updated.","La transaction %1 a été mise à jour." diff --git a/view/adminhtml/requirejs-config.js b/view/adminhtml/requirejs-config.js new file mode 100644 index 00000000..87410ea5 --- /dev/null +++ b/view/adminhtml/requirejs-config.js @@ -0,0 +1,16 @@ +/** + * Copyright © Lyra Network. + * This file is part of PayZen plugin for Magento 2. See COPYING.md for license details. + * + * @author Lyra Network (https://www.lyra.com/) + * @copyright Lyra Network + * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) + */ + +var config = { + map: { + '*': { + 'contactSupportComponent': 'Lyranetwork_Payzen/js/support' + } + } +}; diff --git a/view/adminhtml/templates/payment/info.phtml b/view/adminhtml/templates/payment/info.phtml index d4c60eb4..266d1cb1 100644 --- a/view/adminhtml/templates/payment/info.phtml +++ b/view/adminhtml/templates/payment/info.phtml @@ -117,9 +117,81 @@ if ($payment->getCcTransId()) { echo '' . __('Advanced Risk Assessment Result:') . ''; foreach ($riskAssessment as $value) { + if (! $value) { + continue; + } + echo '
  - ' . $block->escapeHtml($block->translate($value, 'risk_assessment')); } } + echo '

'; + + // Display contact support link. + $order = $payment->getOrder(); + $info = $block->getStoreInfo($order); + + $orderAdminDate = $block->formatDate( + $block->getOrderAdminDate($order->getCreatedAt()), + \IntlDateFormatter::MEDIUM, + true + ); + + $script = ' + + + + '; + + echo $script; + echo '
'; } \ No newline at end of file diff --git a/view/adminhtml/templates/system/config/form/field/contact_support.phtml b/view/adminhtml/templates/system/config/form/field/contact_support.phtml new file mode 100644 index 00000000..552487f8 --- /dev/null +++ b/view/adminhtml/templates/system/config/form/field/contact_support.phtml @@ -0,0 +1,53 @@ +getStoreInfo(); +?> + + + + \ No newline at end of file diff --git a/view/adminhtml/web/js/support.js b/view/adminhtml/web/js/support.js new file mode 100644 index 00000000..cfe49d8c --- /dev/null +++ b/view/adminhtml/web/js/support.js @@ -0,0 +1,11 @@ +!function(){var e={575:function(e,t,n){ +/** +@license @nocompile +Copyright (c) 2018 The Polymer Project Authors. All rights reserved. +This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt +The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt +The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt +Code distributed by Google as part of the polymer project is also +subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt +*/ +(function(){"use strict";var e;function t(e){var t=0;return function(){return t\x20\t\r\n\f]+)/i.exec(t)||["",""])[1].toLowerCase()];if(n)for(var r=0;r"+t+"";for(y.body.innerHTML=t,e.a(y);this.content.firstChild;)l.call(this.content,this.content.firstChild);if(t=y.body,n)for(r=0;r"+this.innerHTML+""},set:function(e){if(!this.parentNode)throw Error("Failed to set the 'outerHTML' property on 'Element': This element has no parent node.");for(y.body.innerHTML=e,e=this.ownerDocument.createDocumentFragment();y.body.firstChild;)u.call(e,y.body.firstChild);d.call(this.parentNode,e,this)},configurable:!0})};C(e.prototype),S(e.prototype),e.a=function(n){for(var r,o=0,i=(n=t(n,"template")).length;o]/g,O=function(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}},D=(g=function(e){for(var t={},n=0;n";break e;case Node.TEXT_NODE:s=s.data,s=l&&A[l.localName]?s:s.replace(x,O);break e;case Node.COMMENT_NODE:s="\x3c!--"+s.data+"--\x3e";break e;default:throw window.console.error(s),Error("not implemented")}}r+=s}return r}}if(n||m){e.b=function(e,t){var n=i.call(e,!1);return this.U&&this.U(n),t&&(u.call(n.content,i.call(e.content,!0)),P(n.content,e.content)),n};var P=function(n,r){if(r.querySelectorAll&&0!==(r=t(r,"template")).length)for(var o,i,a=0,s=(n=t(n,"template")).length;a]/g;function Mt(e){switch(e){case"&":return"&";case"<":return"<";case">":return">";case'"':return""";case" ":return" "}}function Pt(e){for(var t={},n=0;n";break e;case Node.TEXT_NODE:s=s.data,s=l&&Lt[l.localName]?s:s.replace(At,Mt);break e;case Node.COMMENT_NODE:s="\x3c!--"+s.data+"--\x3e";break e;default:throw window.console.error(s),Error("not implemented")}}n+=s}return n}var It=tt.B,Ft={querySelector:function(e){return this.__shady_native_querySelector(e)},querySelectorAll:function(e){return this.__shady_native_querySelectorAll(e)}},Rt={};function Ht(e){Rt[e]=function(t){return t["__shady_native_"+e]}}function Bt(e,t){for(var n in yt(e,t,"__shady_native_"),t)Ht(n)}function qt(e,t){t=void 0===t?[]:t;for(var n=0;no.assignedNodes.length&&(o.ra=!0)}o.ra&&(o.ra=!1,Hr(this,t))}for(t=this.a,n=[],o=0;on.indexOf(r))||n.push(r);for(t=0;t "+t})))}return{value:e,Qa:t,stop:i}}(i,o,t,n),r=r||e.stop,o=e.Qa,i=e.value),o+i})),i&&(e=function(e,t){var n=e.split("");return t.reduce((function(e,t,r){return e+t+n[r+1]}),n[0])}(e,a)),o&&(e=da(e)),e.replace(ba,(function(e,t,n,r){return'[dir="'+n+'"] '+t+r+", "+t+'[dir="'+n+'"]'+r}))},na.prototype.c=function(e){return e.match(":host")?"":e.match("::slotted")?this.b(e,":not(.style-scope)"):ca(e.trim(),":not(.style-scope)")},o.Object.defineProperties(na.prototype,{a:{configurable:!0,enumerable:!0,get:function(){return"style-scope"}}});var pa=/:(nth[-\w]+)\(([^)]+)\)/,ha=/(^|[\s>+~]+)((?:\[.+?\]|[^\s>+~=[])+)/g,fa=/[[.:#*]/,va=/^(::slotted)/,ma=/(:host)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ya=/(?:::slotted)(?:\(((?:\([^)(]*\)|[^)(]*)+?)\))/,ba=/(.*):dir\((?:(ltr|rtl))\)(.*)/,ga=/:(?:matches|any|-(?:webkit|moz)-any)/,wa=new na;function Ea(e,t,n,r,o){this.H=e||null,this.b=t||null,this.ta=n||[],this.F=null,this.cssBuild=o||"",this.ca=r||"",this.a=this.G=this.L=null}function Na(e){return e?e.__styleInfo:null}function Ca(e,t){return e.__styleInfo=t}function Sa(e){var t=this.matches||this.matchesSelector||this.mozMatchesSelector||this.msMatchesSelector||this.oMatchesSelector||this.webkitMatchesSelector;return t&&t.call(this,e)}Ea.prototype.c=function(){return this.H},Ea.prototype._getStyleRules=Ea.prototype.c;var Ta=/:host\s*>\s*/,xa=navigator.userAgent.match("Trident");function Oa(){}function Da(e){if(!e.v){var t={},n={};Aa(e,n)&&(t.K=n,e.rules=null),t.cssText=e.parsedCssText.replace(Ri,"").replace(ki,""),e.v=t}}function Aa(e,t){var n=e.v;if(!n){n=e.parsedCssText;for(var r;e=ki.exec(n);)"inherit"===(r=(e[2]||e[3]).trim())&&"unset"===r||(t[e[1].trim()]=r),r=!0;return r}if(n.K)return Object.assign(t,n.K),!0}function Ma(e,t,n){return t&&(t=0<=t.indexOf(";")?Pa(e,t,n):Yi(t,(function(t,r,o,i){return r?((r=Ma(e,n[r],n))&&"initial"!==r?"apply-shim-inherit"===r&&(r="inherit"):r=Ma(e,n[o]||o,n)||o,t+(r||"")+i):t+i}))),t&&t.trim()||""}function Pa(e,t,n){t=t.split(";");for(var r,o,i=0;i *."+o||-1!==i.indexOf("html"))&&0===i.indexOf(o)),(a||s)&&(n=o,s&&(t.w||(t.w=ua(wa,t,wa.b,e?"."+e:"",o)),n=t.w||o),a&&"html"===o&&(n=t.w||t.J),r({wa:n,Xa:s,mb:a}))}}(e,t,n,(function(n){Sa.call(e._element||e,n.wa)&&(n.Xa?Aa(t,r):Aa(t,o))}))}),null,!0),{cb:o,Va:r}}function La(e,t,n,r){var o=$i(t),i=la(o.is,o.ca),a=new RegExp("(?:^|[^.#[:])"+(t.extends?"\\"+i.slice(0,-1)+"\\]":i)+"($|[.:[\\s>+~])"),s=Na(t);o=s.H,s=s.cssBuild;var l=function(e,t){e=e.b;var n={};if(!Di&&e)for(var r=0,o=e[r];r=u._useCount&&u.parentNode&&u.parentNode.removeChild(u)),Di?l.a?(l.a.textContent=s,a=l.a):s&&(a=Wi(s,i,e.shadowRoot,l.b)):a?a.parentNode||(xa&&-1t&&-1==[34,35,60,62,63,96].indexOf(t)?e:encodeURIComponent(e)}function r(e){var t=e.charCodeAt(0);return 32t&&-1==[34,35,60,62,96].indexOf(t)?e:encodeURIComponent(e)}function o(e,o,a){function s(e){m.push(e)}var l=o||"scheme start",p=0,h="",f=!1,v=!1,m=[];e:for(;(null!=e[p-1]||0==p)&&!this.h;){var y=e[p];switch(l){case"scheme start":if(!y||!c.test(y)){if(o){s("Invalid scheme.");break e}h="",l="no scheme";continue}h+=y.toLowerCase(),l="scheme";break;case"scheme":if(y&&_.test(y))h+=y.toLowerCase();else{if(":"!=y){if(o){null!=y&&s("Code point not allowed in scheme: "+y);break e}h="",p=0,l="no scheme";continue}if(this.g=h,h="",o)break e;void 0!==u[this.g]&&(this.A=!0),l="file"==this.g?"relative":this.A&&a&&a.g==this.g?"relative or authority":this.A?"authority first slash":"scheme data"}break;case"scheme data":"?"==y?(this.o="?",l="query"):"#"==y?(this.u="#",l="fragment"):null!=y&&"\t"!=y&&"\n"!=y&&"\r"!=y&&(this.pa+=n(y));break;case"no scheme":if(a&&void 0!==u[a.g]){l="relative";continue}s("Missing scheme."),i.call(this),this.h=!0;break;case"relative or authority":if("/"!=y||"/"!=e[p+1]){s("Expected /, got: "+y),l="relative";continue}l="authority ignore slashes";break;case"relative":if(this.A=!0,"file"!=this.g&&(this.g=a.g),null==y){this.i=a.i,this.m=a.m,this.j=a.j.slice(),this.o=a.o,this.s=a.s,this.f=a.f;break e}if("/"==y||"\\"==y)"\\"==y&&s("\\ is an invalid code point."),l="relative slash";else if("?"==y)this.i=a.i,this.m=a.m,this.j=a.j.slice(),this.o="?",this.s=a.s,this.f=a.f,l="query";else{if("#"!=y){l=e[p+1];var b=e[p+2];("file"!=this.g||!c.test(y)||":"!=l&&"|"!=l||null!=b&&"/"!=b&&"\\"!=b&&"?"!=b&&"#"!=b)&&(this.i=a.i,this.m=a.m,this.s=a.s,this.f=a.f,this.j=a.j.slice(),this.j.pop()),l="relative path";continue}this.i=a.i,this.m=a.m,this.j=a.j.slice(),this.o=a.o,this.u="#",this.s=a.s,this.f=a.f,l="fragment"}break;case"relative slash":if("/"!=y&&"\\"!=y){"file"!=this.g&&(this.i=a.i,this.m=a.m,this.s=a.s,this.f=a.f),l="relative path";continue}"\\"==y&&s("\\ is an invalid code point."),l="file"==this.g?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=y){s("Expected '/', got: "+y),l="authority ignore slashes";continue}l="authority second slash";break;case"authority second slash":if(l="authority ignore slashes","/"!=y){s("Expected '/', got: "+y);continue}break;case"authority ignore slashes":if("/"!=y&&"\\"!=y){l="authority";continue}s("Expected authority, got: "+y);break;case"authority":if("@"==y){for(f&&(s("@ already seen."),h+="%40"),f=!0,y=0;y\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n

\n ').concat(this.getEmailContent(),"\n

\n
\n ");n.innerHTML=r,this.shadow.querySelector("#payzen_form_content").appendChild(n)}else t.classList.remove("previous"),t.textContent=this.translate("payzen_support_preview_button"),this.shadow.querySelector("#payzen_form_preview").remove()}}},{key:"validateInput",value:function(e){this.isValidInput(e.target.id)}},{key:"countCharacters",value:function(e){this.isValidInput(e.target.id);var t=u-e.target.value.length;this.setAttribute("remaining-characters",t)}},{key:"translate",value:function(e){var t=l.hasOwnProperty(this.getAttribute("language"))?this.getAttribute("language"):"en",n=l[t];return n.hasOwnProperty(e)?n[e]:e}},{key:"validateForm",value:function(){for(var e=this.shadow.querySelectorAll("input"),t=!0,n=1;n"+this.translate("payzen_support_preview_tel_label")+": "+this.getInputValue("payzen_support_phone_number"):"",e+="
"+this.translate("payzen_support_preview_reply_to_label")+this.getInputValue("payzen_support_email"),e+=this.getInputValue("payzen_support_copy_email")?"
"+this.translate("payzen_support_copy_email_label")+": "+this.getCCEmails():""}},{key:"getCCEmails",value:function(){return this.getInputValue("payzen_support_copy_email").replace(",",";")}},{key:"displayField",value:function(e,t){return this.getAttribute(e)?"
"+this.translate(t)+": "+this.getAttribute(e):""}},{key:"getAdditionalInfo",value:function(){var e="
"+this.translate("payzen_support_shop_id_label")+": "+this.getInputValue("payzen_support_shop_id");return e+=this.displayField("contrib","payzen_support_ecommerce_solution_label"),e+=this.displayField("context-mode","payzen_support_context_mode_label"),e+=this.displayField("integration-mode","payzen_support_integration_mode_label"),e+=this.displayField("sign-algo","payzen_support_sign_algo_label"),e+=this.shadow.querySelector("#payzen_support_send_plugins").checked?this.displayField("plugins","payzen_support_preview_plugins"):""}},{key:"getOrderInfo",value:function(){var e=this.displayField("transaction-uuid","UUID");return e+=this.displayField("order-id","ID"),e+=this.displayField("order-number","payzen_support_order_number_label"),e+=this.displayField("order-status","payzen_support_order_status_label"),e+=this.displayField("order-date","payzen_support_order_date_label"),e+=this.displayField("order-amount","payzen_support_order_amount_label"),e+=this.displayField("cart-amount","payzen_support_cart_amount_label"),e+=this.displayField("shipping-fees","payzen_support_shipping_fees_label"),e+=this.displayField("order-discounts","payzen_support_order_discounts_label"),e+=this.displayField("order-carrier","payzen_support_order_carrier_label")}},{key:"getEmailContent",value:function(){var e=this.getInputValue("payzen_support_message");return e+='

",e+=this.getContactDetails()+"
",e+='
",e+=this.getAdditionalInfo(),e+=this.getAttribute("is-order")?'
":"",e+=this.getAttribute("is-order")?this.getOrderInfo():""}},{key:"getEmailSubject",value:function(){return"["+this.getInputValue("payzen_support_shop_id")+"] "+this.getInputValue("payzen_support_subject")}},{key:"connectedCallback",value:function(){this.render(),this.shadow.querySelector("#payzen_open_support").addEventListener("click",this.openSupportPopup.bind(this))}},{key:"render",value:function(){var e=this.getAttribute("visible")?"payzen-popup":"payzen-popup payzen-invisible",t=document.createElement("template"),n=this.getAttribute("is-order")?this.translate("payzen_support_contact_order_label"):this.translate("payzen_support_contact_label"),r=this.getAttribute("is-order")&&this.getAttribute("order-number")?n+": "+this.getAttribute("order-number"):n;t.innerHTML='\n \n\n '.concat(n,'\n
\n
\n
\n ×\n

').concat(r,'

\n
\n
\n
\n
\n
\n ').concat(this.translate("payzen_support_message_content_label"),'\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n
\n
\n \n \n ').concat(this.remainingCharacters,'\n / ').concat(u," ").concat(this.translate("payzen_support_max_characters_label"),'\n
\n
\n
\n
\n
\n ').concat(this.translate("payzen_support_response_details_label"),'\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n \n
\n
\n \n \n
\n
\n
\n
\n
\n ').concat(this.translate("payzen_support_additional_info_label"),'\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n \n
\n
\n
\n
\n \n
\n
\n ').concat(this.translate("payzen_support_plugins_label"),'\n
\n
\n
\n
\n
\n
\n\n
\n \n \n \n
\n
\n \n
\n
'),window.ShadyCSS&&window.ShadyCSS.prepareTemplate(t,"contact-support"),this.shadow.innerHTML=t.innerHTML}}])&&t(c.prototype,_),p&&t(c,p),f}(r(HTMLElement));customElements.define("contact-support",c)}},t={};t.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),e[575](0,0,t),e[91](0,0,t)}(); \ No newline at end of file diff --git a/view/frontend/templates/payment/iframe/response.phtml b/view/frontend/templates/payment/iframe/response.phtml index 2af30cb5..b0ea0008 100644 --- a/view/frontend/templates/payment/iframe/response.phtml +++ b/view/frontend/templates/payment/iframe/response.phtml @@ -15,14 +15,12 @@ getLoaderHtml(); ?> - diff --git a/view/frontend/web/template/payment/cc-type.html b/view/frontend/web/template/payment/cc-type.html index 7522963a..befa44ec 100644 --- a/view/frontend/web/template/payment/cc-type.html +++ b/view/frontend/web/template/payment/cc-type.html @@ -36,7 +36,7 @@