From ce4f85cb42f45e5a2a7e960cd1a3b0dc09ef921d Mon Sep 17 00:00:00 2001 From: Nabil Berhouche Date: Mon, 20 Jul 2020 18:13:58 +0100 Subject: [PATCH 1/2] New plugin version 2.4.8 --- Block/Payment/Info.php | 8 +++++ CHANGELOG.md | 6 ++++ CONTRIBUTING.md | 0 Controller/Adminhtml/Payment/Redirect.php | 4 +-- Controller/Adminhtml/Payment/Response.php | 4 +-- Controller/Payment/Iframe/Loader.php | 8 +++-- Controller/Payment/Redirect.php | 4 +-- Controller/Payment/Response.php | 8 ++--- Controller/Payment/Rest/Check.php | 19 ++++++------ Controller/Payment/Rest/Response.php | 4 +-- Controller/Processor/CheckProcessor.php | 16 +++++----- Controller/Processor/RedirectProcessor.php | 2 +- Controller/Processor/ResponseProcessor.php | 18 +++++------ Helper/Payment.php | 31 +++++++++++++------ Helper/Rest.php | 20 +++++++++++- Model/Method/Multi.php | 3 +- Model/Method/Payzen.php | 26 ++++++++-------- Model/Method/Standard.php | 20 +++++------- composer.json | 2 +- etc/config.xml | 2 +- view/base/web/images/cc/codensa.png | Bin 0 -> 3378 bytes view/base/web/images/cc/efecty.png | Bin 0 -> 6089 bytes view/base/web/images/cc/mastercard_debit.png | Bin 0 -> 1090 bytes view/base/web/images/cc/pse.png | Bin 0 -> 7460 bytes view/base/web/images/cc/visa_debit.png | Bin 0 -> 5857 bytes 25 files changed, 124 insertions(+), 81 deletions(-) mode change 100755 => 100644 CONTRIBUTING.md create mode 100644 view/base/web/images/cc/codensa.png create mode 100644 view/base/web/images/cc/efecty.png create mode 100644 view/base/web/images/cc/mastercard_debit.png create mode 100644 view/base/web/images/cc/pse.png create mode 100644 view/base/web/images/cc/visa_debit.png diff --git a/Block/Payment/Info.php b/Block/Payment/Info.php index 984c8088..cc9b26de 100644 --- a/Block/Payment/Info.php +++ b/Block/Payment/Info.php @@ -68,8 +68,16 @@ public function getResultDescHtml() ]; $labels = []; + + $restError = $this->getInfo()->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::REST_ERROR_MESSAGE); + if ($restError) { + $labels[] = $restError; + unset($keys[0]); + } + foreach ($keys as $key) { $label = $this->translate($allResults[$key], $key, true); + if (! $label) { continue; } diff --git a/CHANGELOG.md b/CHANGELOG.md index de8da440..f018adc6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +2.4.8, 2020-07-20: +- [embedded] Bug fix: Error due to strongAuthentication field renaming in REST token creation. +- [embedded] Bug fix: Do not cancel orders in status "Fraud suspected" when new failed IPN calls are made. +- Update payment means logos. +- Improve logged information. + 2.4.7, 2020-06-19: - [embedded] Bug fix: Amount did not include shipping fees when using embedded payment fields in some cases. - [embedded] Bug fix: Compatibility of payment with embedded fields with Internet Explorer 11. diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md old mode 100755 new mode 100644 diff --git a/Controller/Adminhtml/Payment/Redirect.php b/Controller/Adminhtml/Payment/Redirect.php index 9a2ae87f..b4ca95ff 100644 --- a/Controller/Adminhtml/Payment/Redirect.php +++ b/Controller/Adminhtml/Payment/Redirect.php @@ -87,14 +87,14 @@ private function getAndCheckOrder() // Check that there is products in cart. if (! $order->getTotalDue()) { - $this->dataHelper->log("Payment attempt with no amount. [Order = {$order->getId()}]" + $this->dataHelper->log("Payment attempt with no amount. [Order = {$order->getIncrementId()}]" . " [IP = {$this->dataHelper->getIpAddress()}]."); 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->getId()}]" + $this->dataHelper->log("Payment attempt with a quote already processed. [Order = {$order->getIncrementId()}]" . " [IP = {$this->dataHelper->getIpAddress()}]."); throw new OrderException('Order payment already processed.'); } diff --git a/Controller/Adminhtml/Payment/Response.php b/Controller/Adminhtml/Payment/Response.php index 9a0bd66f..1cecc725 100644 --- a/Controller/Adminhtml/Payment/Response.php +++ b/Controller/Adminhtml/Payment/Response.php @@ -70,7 +70,7 @@ private function redirectError($order = null) $this->messageManager->getMessages(true); $this->messageManager->addError(__('An error has occurred during the payment process.')); - $this->dataHelper->log('Redirecting to order creation page.' . ($order ? " Order #{$order->getId()}." : '')); + $this->dataHelper->log('Redirecting to order creation page.' . ($order ? " Order #{$order->getIncrementId()}." : '')); /** * @var \Magento\Framework\Controller\Result\Redirect $resultRedirect @@ -131,7 +131,7 @@ private function redirectResponse($order, $case, $checkUrlWarn = false) $this->messageManager->addWarning(__('Your payment was not accepted. Please, try to re-order.')); } - $this->dataHelper->log("Redirecting to order view or order index page for order #{$order->getId()}."); + $this->dataHelper->log("Redirecting to order view or order index page for order #{$order->getIncrementId()}."); /** * @var \Magento\Framework\Controller\Result\Redirect $resultRedirect diff --git a/Controller/Payment/Iframe/Loader.php b/Controller/Payment/Iframe/Loader.php index 3c7dcf4d..04a73978 100644 --- a/Controller/Payment/Iframe/Loader.php +++ b/Controller/Payment/Iframe/Loader.php @@ -43,10 +43,12 @@ public function execute() { // Check if it is a canceled order. if ($this->getRequest()->getParam('mode', false) === 'cancel') { - $this->dataHelper->log('Payment within iframe is canceled.'); - // Load order. $checkout = $this->dataHelper->getCheckout(); + $lastIncrementId = $checkout->getData('payzen_last_real_id'); + + $this->dataHelper->log("Payment within iframe is canceled for order #{$lastIncrementId}."); + $lastIncrementId = $checkout->getData('payzen_last_real_id'); $order = $this->orderFactory->create(); $order->loadByIncrementId($lastIncrementId); @@ -55,7 +57,7 @@ public function execute() $order->registerCancellation(__('Payment cancelled.'))->save(); $checkout->setData('payzen_last_real_id', null); - $this->dataHelper->log("Restore cart for order #{$order->getId()} to allow re-order quicker."); + $this->dataHelper->log("Restore cart for order #{$order->getIncrementId()} to allow re-order quicker."); $quote = $this->quoteRepository->get($order->getQuoteId()); if ($quote->getId()) { diff --git a/Controller/Payment/Redirect.php b/Controller/Payment/Redirect.php index dc00b246..fe16e273 100644 --- a/Controller/Payment/Redirect.php +++ b/Controller/Payment/Redirect.php @@ -97,14 +97,14 @@ private function getAndCheckOrder() // Check that there is products in cart. if (! $order->getTotalDue()) { - $this->dataHelper->log("Payment attempt with no amount. [Order = {$order->getId()}]" . + $this->dataHelper->log("Payment attempt with no amount. [Order = {$order->getIncrementId()}]" . " [IP = {$this->dataHelper->getIpAddress()}]."); 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->getId()}]" . + $this->dataHelper->log("Payment attempt with a quote already processed. [Order = {$order->getIncrementId()}]" . " [IP = {$this->dataHelper->getIpAddress()}]."); throw new OrderException('Order payment already processed.'); } diff --git a/Controller/Payment/Response.php b/Controller/Payment/Response.php index 3ddbe9d9..5f91752e 100644 --- a/Controller/Payment/Response.php +++ b/Controller/Payment/Response.php @@ -101,7 +101,7 @@ protected function redirectError($order = null) ->setLastOrderId($order->getId()); } - $this->dataHelper->log('Redirecting to one page checkout failure page.' . ($order ? " Order #{$order->getId()}." : '')); + $this->dataHelper->log('Redirecting to one page checkout failure page.' . ($order ? " Order #{$order->getIncrementId()}." : '')); return $this->createResult('checkout/onepage/failure', ['_scope' => $this->dataHelper->getCheckoutStoreId()]); } @@ -155,14 +155,14 @@ protected function redirectResponse($order, $case, $checkUrlWarn = false) ->setLastRealOrderId($order->getIncrementId()) ->setLastOrderStatus($order->getStatus()); - $this->dataHelper->log("Redirecting to one page checkout success page for order #{$order->getId()}."); + $this->dataHelper->log("Redirecting to one page checkout success page for order #{$order->getIncrementId()}."); $resultRedirect = $this->createResult('checkout/onepage/success', ['_scope' => $storeId]); } else { if ($case === Payment::FAILURE) { $this->messageManager->addWarning(__('Your payment was not accepted. Please, try to re-order.')); } - $this->dataHelper->log("Restore cart for order #{$order->getId()} to allow re-order quicker."); + $this->dataHelper->log("Restore cart for order #{$order->getIncrementId()} to allow re-order quicker."); $quote = $this->quoteRepository->get($order->getQuoteId()); if ($quote->getId()) { $quote->setIsActive(true)->setReservedOrderId(null); @@ -171,7 +171,7 @@ protected function redirectResponse($order, $case, $checkUrlWarn = false) $checkout->replaceQuote($quote); } - $this->dataHelper->log("Redirecting to cart page for order #{$order->getId()}."); + $this->dataHelper->log("Redirecting to cart page for order #{$order->getIncrementId()}."); $resultRedirect = $this->createResult('checkout/cart', ['_scope' => $storeId]); } diff --git a/Controller/Payment/Rest/Check.php b/Controller/Payment/Rest/Check.php index ed44de30..5be8d22b 100644 --- a/Controller/Payment/Rest/Check.php +++ b/Controller/Payment/Rest/Check.php @@ -118,16 +118,17 @@ protected function prepareResponse($params) throw new ResponseException($response->getOutputForGateway('order_not_found')); } + // Case of failure or expiration when retries are enabled, do nothing before last attempt. + if (! $response->isAcceptedPayment() && ($answer['orderCycle'] !== 'CLOSED')) { + $this->dataHelper->log("Payment is not accepted but buyer can try to re-order. Do not create order at this time. + Quote ID: #{$quoteId}, reserved order ID: #{$quote->getReservedOrderId()}."); + throw new ResponseException($response->getOutputForGateway('payment_ko_bis')); + } + // Token is created before order creation, search order by quote. $order = $this->orderFactory->create(); $order->loadByIncrementId($quote->getReservedOrderId()); if (! $order->getId()) { - // Case of failure when retries are enabled, do nothing before last attempt. - if (! $response->isAcceptedPayment() && ($answer['orderCycle'] !== 'CLOSED')) { - $this->dataHelper->log("Payment is not accepted but buyer can try to re-order. Do not create order at this time. Quote ID: #{$quoteId}."); - throw new ResponseException($response->getOutputForGateway('payment_ko_bis')); - } - $this->getOnepageForQuote($quote)->saveOrder(); // Dispatch save order event. @@ -146,13 +147,13 @@ protected function prepareResponse($params) // Load newly created order. $order->loadByIncrementId($quote->getReservedOrderId()); if (! $order->getId()) { - $this->dataHelper->log("Order cannot be created for quote #{$quoteId}.", \Psr\Log\LogLevel::ERROR); + $this->dataHelper->log("Order cannot be created. Quote ID: #{$quoteId}, reserved order ID: #{$quote->getReservedOrderId()}.", \Psr\Log\LogLevel::ERROR); throw new ResponseException($response->getOutputForGateway('ko', 'Error when trying to create order.')); } - $this->dataHelper->log("Order #{$order->getId()} has been created for quote #{$quoteId}."); + $this->dataHelper->log("Order #{$order->getIncrementId()} has been created for quote #{$quoteId}."); } else { - $this->dataHelper->log("Found order #{$order->getId()} for quote #{$quoteId}."); + $this->dataHelper->log("Found order #{$order->getIncrementId()} for quote #{$quoteId}."); } // Get store id from order. diff --git a/Controller/Payment/Rest/Response.php b/Controller/Payment/Rest/Response.php index 357db112..94e5d90a 100644 --- a/Controller/Payment/Rest/Response.php +++ b/Controller/Payment/Rest/Response.php @@ -130,9 +130,9 @@ protected function prepareResponse($params) throw new ResponseException("Order cannot be created for quote #{$quoteId}."); } - $this->dataHelper->log("Order #{$order->getId()} has been created for quote #{$quoteId}."); + $this->dataHelper->log("Order #{$order->getIncrementId()} has been created for quote #{$quoteId}."); } else { - $this->dataHelper->log("Found order #{$order->getId()} for quote #{$quoteId}."); + $this->dataHelper->log("Found order #{$order->getIncrementId()} for quote #{$quoteId}."); } $storeId = $order->getStore()->getId(); diff --git a/Controller/Processor/CheckProcessor.php b/Controller/Processor/CheckProcessor.php index 2b7ffaee..88f636f7 100644 --- a/Controller/Processor/CheckProcessor.php +++ b/Controller/Processor/CheckProcessor.php @@ -79,7 +79,7 @@ public function execute( \Magento\Sales\Model\Order $order, \Lyranetwork\Payzen\Model\Api\PayzenResponse $response ) { - $this->dataHelper->log("Request authenticated for order #{$order->getId()}."); + $this->dataHelper->log("Request authenticated for order #{$order->getIncrementId()}."); $reviewStatuses = [ 'payment_review', @@ -90,11 +90,11 @@ public function execute( if ($order->getStatus() == 'pending_payment' || in_array($order->getStatus(), $reviewStatuses)) { // Order waiting for payment. - $this->dataHelper->log("Order #{$order->getId()} is waiting payment update."); - $this->dataHelper->log("Payment result for order #{$order->getId()}: " . $response->getLogMessage()); + $this->dataHelper->log("Order #{$order->getIncrementId()} is waiting payment update."); + $this->dataHelper->log("Payment result for order #{$order->getIncrementId()}: " . ($response->get('error_message') ?: $response->getLogMessage())); if ($response->isAcceptedPayment()) { - $this->dataHelper->log("Payment for order #{$order->getId()} has been confirmed by notification URL."); + $this->dataHelper->log("Payment for order #{$order->getIncrementId()} has been confirmed by notification URL."); $stateObject = $this->paymentHelper->nextOrderState($order, $response); if ($order->getStatus() == $stateObject->getStatus()) { @@ -108,7 +108,7 @@ public function execute( return 'payment_ok'; } } else { - $this->dataHelper->log("Payment for order #{$order->getId()} has been invalidated by notification URL."); + $this->dataHelper->log("Payment for order #{$order->getIncrementId()} has been invalidated by notification URL."); // Cancel order. $this->paymentHelper->cancelOrder($order, $response); @@ -126,7 +126,7 @@ public function execute( ]; if ($response->isAcceptedPayment() && in_array($order->getStatus(), $successStatuses)) { - $this->dataHelper->log("Order #{$order->getId()} is confirmed."); + $this->dataHelper->log("Order #{$order->getIncrementId()} is confirmed."); if ($response->get('operation_type') == 'CREDIT') { // This is a refund: create credit memo? @@ -189,11 +189,11 @@ public function execute( return 'payment_ok_already_done'; } elseif ($order->isCanceled() && ! $response->isAcceptedPayment()) { - $this->dataHelper->log("Order #{$order->getId()} cancelation is confirmed."); + $this->dataHelper->log("Order #{$order->getIncrementId()} cancelation is confirmed."); return 'payment_ko_already_done'; } else { // Error case, the payment result and the order status do not match. - $msg = "Invalid payment result received for already saved order #{$order->getId()}."; + $msg = "Invalid payment result received for already saved order #{$order->getIncrementId()}."; $msg .= " Payment result: {$response->getTransStatus()}, order status : {$order->getStatus()}."; $this->dataHelper->log($msg, \Psr\Log\LogLevel::ERROR); diff --git a/Controller/Processor/RedirectProcessor.php b/Controller/Processor/RedirectProcessor.php index 6b4cb602..db07730d 100644 --- a/Controller/Processor/RedirectProcessor.php +++ b/Controller/Processor/RedirectProcessor.php @@ -55,7 +55,7 @@ public function execute(\Magento\Sales\Model\Order $order) ); // Log action before redirect. - $this->dataHelper->log("Client {$order->getCustomerEmail()} sent to payment page for order #{$order->getId()}."); + $this->dataHelper->log("Client {$order->getCustomerEmail()} sent to payment page for order #{$order->getIncrementId()}."); } public function getDataHelper() diff --git a/Controller/Processor/ResponseProcessor.php b/Controller/Processor/ResponseProcessor.php index 05e67e39..88a88f0e 100644 --- a/Controller/Processor/ResponseProcessor.php +++ b/Controller/Processor/ResponseProcessor.php @@ -61,15 +61,15 @@ public function execute( \Magento\Sales\Model\Order $order, \Lyranetwork\Payzen\Model\Api\PayzenResponse $response ) { - $this->dataHelper->log("Request authenticated for order #{$order->getId()}."); + $this->dataHelper->log("Request authenticated for order #{$order->getIncrementId()}."); if ($order->getStatus() === 'pending_payment') { // Order waiting for payment. - $this->dataHelper->log("Order #{$order->getId()} is waiting payment."); - $this->dataHelper->log("Payment result for order #{$order->getId()}: " . $response->getLogMessage()); + $this->dataHelper->log("Order #{$order->getIncrementId()} is waiting payment."); + $this->dataHelper->log("Payment result for order #{$order->getIncrementId()}: " . ($response->get('error_message') ?: $response->getLogMessage())); if ($response->isAcceptedPayment()) { - $this->dataHelper->log("Payment for order #{$order->getId()} has been confirmed by client return !" . + $this->dataHelper->log("Payment for order #{$order->getIncrementId()} has been confirmed by client return !" . " This means the notification URL did not work.", \Psr\Log\LogLevel::WARNING); // Save order and optionally create invoice. @@ -81,7 +81,7 @@ public function execute( 'warn' => true // Notification URL warn in TEST mode. ]; } else { - $this->dataHelper->log("Payment for order #{$order->getId()} has failed."); + $this->dataHelper->log("Payment for order #{$order->getIncrementId()} has failed."); // Cancel order. $this->paymentHelper->cancelOrder($order, $response); @@ -95,7 +95,7 @@ public function execute( } } else { // Payment already processed. - $this->dataHelper->log("Order #{$order->getId()} has already been processed."); + $this->dataHelper->log("Order #{$order->getIncrementId()} has already been processed."); $storeId = $this->dataHelper->getCheckoutStoreId(); $acceptedStatus = $this->dataHelper->getCommonConfigData('registered_order_status', $storeId); @@ -109,14 +109,14 @@ public function execute( ]; if ($response->isAcceptedPayment() && in_array($order->getStatus(), $successStatuses)) { - $this->dataHelper->log("Order #{$order->getId()} is confirmed."); + $this->dataHelper->log("Order #{$order->getIncrementId()} is confirmed."); return [ 'case' => Payment::SUCCESS, 'warn' => false ]; } elseif ($order->isCanceled() && ! $response->isAcceptedPayment()) { - $this->dataHelper->log("Order #{$order->getId()} cancelation is confirmed."); + $this->dataHelper->log("Order #{$order->getIncrementId()} cancelation is confirmed."); $case = $response->isCancelledPayment() ? Payment::CANCEL : Payment::FAILURE; return [ @@ -125,7 +125,7 @@ public function execute( ]; } else { // Error case, the payment result and the order status do not match. - $msg = "Invalid payment result received for already saved order #{$order->getId()}."; + $msg = "Invalid payment result received for already saved order #{$order->getIncrementId()}."; $msg .= " Payment result: {$response->getTransStatus()}, order status : {$order->getStatus()}."; throw new ResponseException($msg); diff --git a/Helper/Payment.php b/Helper/Payment.php index 5ab2ea24..10b64840 100644 --- a/Helper/Payment.php +++ b/Helper/Payment.php @@ -31,9 +31,12 @@ class Payment // Key to save risk assessment results. const RISK_ASSESSMENT = 'payzen_risk_assessment'; - // Key to save risk assessment results. + // Key to save payment results. const ALL_RESULTS = 'payzen_all_results'; + // Key to save Rest Api error message. + const REST_ERROR_MESSAGE = 'payzen_rest_error'; + const TRANS_UUID = 'payzen_trans_uuid'; const BRAND_USER_CHOICE = 'payzen_brand_user_choice'; @@ -153,7 +156,7 @@ public function registerOrder( \Lyranetwork\Payzen\Model\Api\PayzenResponse $response ) { - $this->dataHelper->log("Saving payment for order #{$order->getId()}."); + $this->dataHelper->log("Saving payment for order #{$order->getIncrementId()}."); // Update authorized amount. $order->getPayment()->setAmountAuthorized($order->getTotalDue()); @@ -162,11 +165,11 @@ public function registerOrder( // Retrieve new order state and status. $stateObject = $this->nextOrderState($order, $response); - $this->dataHelper->log("Order #{$order->getId()}, new state: {$stateObject->getState()}," . + $this->dataHelper->log("Order #{$order->getIncrementId()}, new state: {$stateObject->getState()}," . " new status: {$stateObject->getStatus()}."); $order->setState($stateObject->getState()) ->setStatus($stateObject->getStatus()) - ->addStatusHistoryComment($response->getMessage()); + ->addStatusHistoryComment($response->get('error_message') ?: $response->getMessage()); // Save gateway responses. $this->updatePaymentInfo($order, $response); @@ -182,7 +185,7 @@ public function registerOrder( // Try to create invoice. $this->createInvoice($order); - $this->dataHelper->log("Saving confirmed order #{$order->getId()} and sending e-mail if not disabled."); + $this->dataHelper->log("Saving confirmed order #{$order->getIncrementId()} and sending e-mail if not disabled."); $order->save(); if ($order->getSendEmail() === null /* not set */ || $order->getSendEmail() /* set to true */) { @@ -251,10 +254,20 @@ public function updatePaymentInfo(\Magento\Sales\Model\Order $order, \Lyranetwor ->setCcTransId($response->get('trans_id')) ->setCcType($response->get('card_brand')) ->setCcStatus($response->getResult()) - ->setCcStatusDescription($response->getMessage()) + ->setCcStatusDescription($response->get('error_message') ?: $response->getMessage()) ->setAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::ALL_RESULTS, serialize($response->getAllResults())) ->setAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::TRANS_UUID, $response->get('trans_uuid')); + $restErrorMsg = $response->get('error_message'); + if ($restErrorMsg) { + if ($response->get('detailed_error_message')) { + $restErrorMsg .= ' ' . $response->get('detailed_error_message'); + } + + $order->getPayment()->setAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::REST_ERROR_MESSAGE, $restErrorMsg); + } + + if ($response->isCancelledPayment()) { // No more data to save. return; @@ -600,7 +613,7 @@ public function createInvoice(\Magento\Sales\Model\Order $order) return; } - $this->dataHelper->log("Creating invoice for order #{$order->getId()}."); + $this->dataHelper->log("Creating invoice for order #{$order->getIncrementId()}."); // Convert order to invoice. $invoice = $order->prepareInvoice(); @@ -624,9 +637,9 @@ public function cancelOrder( \Lyranetwork\Payzen\Model\Api\PayzenResponse $response ) { - $this->dataHelper->log("Canceling order #{$order->getId()}."); + $this->dataHelper->log("Canceling order #{$order->getIncrementId()}."); - $order->registerCancellation($response->getMessage()); + $order->registerCancellation($response->get('error_message') ?: $response->getMessage()); // Save gateway responses. $this->updatePaymentInfo($order, $response); diff --git a/Helper/Rest.php b/Helper/Rest.php index 0e110dc5..bfde55e7 100644 --- a/Helper/Rest.php +++ b/Helper/Rest.php @@ -57,6 +57,10 @@ public function convertRestResult($answer) $response['vads_result'] = $this->getProperty($transaction, 'errorCode') ? $this->getProperty($transaction, 'errorCode') : '00'; $response['vads_extra_result'] = $this->getProperty($transaction, 'detailedErrorCode'); + if ($errorMessage = $this->getErrorMessage($transaction)) { + $response['vads_error_message'] = $errorMessage; + } + $response['vads_trans_status'] = $this->getProperty($transaction, 'detailedStatus'); $response['vads_trans_uuid'] = $this->getProperty($transaction, 'uuid'); $response['vads_operation_type'] = $this->getProperty($transaction, 'operationType'); @@ -110,7 +114,11 @@ public function convertRestResult($answer) if ($riskControl = $this->getProperty($fraudManagement, 'riskControl')) { $response['vads_risk_control'] = ''; - foreach ($riskControl as $key => $value) { + foreach ($riskControl as $value) { + if (! isset($value['name']) || ! isset($value['result'])) { + continue; + } + $response['vads_risk_control'] .= "{$value['name']}={$value['result']};"; } } @@ -124,6 +132,16 @@ public function convertRestResult($answer) return $response; } + private function getErrorMessage($transaction) + { + $code = $this->getProperty($transaction, 'errorCode'); + if ($code) { + return ucfirst($this->getProperty($transaction, 'errorMessage')) . ' (' . $code . ').'; + } else { + return null; + } + } + private function getProperty($restResult, $key) { if (isset($restResult[$key])) { diff --git a/Model/Method/Multi.php b/Model/Method/Multi.php index 1a39cba5..77cfc87c 100644 --- a/Model/Method/Multi.php +++ b/Model/Method/Multi.php @@ -139,7 +139,8 @@ protected function setExtraFields($order) $this->payzenRequest->setMultiPayment($amount, $first, $option['count'], $option['period']); $this->payzenRequest->set('contracts', ($option['contract']) ? 'CB=' . $option['contract'] : null); - $this->dataHelper->log('Multiple payment configuration is ' . $this->payzenRequest->get('payment_config')); + $this->dataHelper->log('Multiple payment configuration is ' . $this->payzenRequest->get('payment_config') + . ', order ID: #' . $order->getIncrementId()); } /** diff --git a/Model/Method/Payzen.php b/Model/Method/Payzen.php index 1154f363..d71d26e8 100644 --- a/Model/Method/Payzen.php +++ b/Model/Method/Payzen.php @@ -344,7 +344,7 @@ public function getFormFields($order) } $paramsToLog = $this->payzenRequest->getRequestFieldsArray(true); - $this->dataHelper->log('Payment parameters: ' . json_encode($paramsToLog), \Psr\Log\LogLevel::DEBUG); + $this->dataHelper->log('Payment parameters: ' . json_encode($paramsToLog)); return $this->payzenRequest->getRequestFieldsArray(false, false); } @@ -482,7 +482,7 @@ public function acceptPayment(\Magento\Payment\Model\InfoInterface $payment) $order = $payment->getOrder(); $storeId = $order->getStore()->getId(); - $this->dataHelper->log("Get payment information online for order #{$order->getId()}."); + $this->dataHelper->log("Get payment information online for order #{$order->getIncrementId()}."); $requestId = ''; @@ -548,7 +548,7 @@ public function acceptPayment(\Magento\Payment\Model\InfoInterface $payment) throw new \Exception("Unexpected transaction type returned ($transType)."); } - $this->dataHelper->log("Updating payment information for accepted order #{$order->getId()}."); + $this->dataHelper->log("Updating payment information for accepted order #{$order->getIncrementId()}."); // Payment is accepted by merchant. $payment->setIsFraudDetected(false); @@ -573,7 +573,7 @@ public function acceptPayment(\Magento\Payment\Model\InfoInterface $payment) ); $stateObject = $this->paymentHelper->nextOrderState($order, $response, true); - $this->dataHelper->log("Order #{$order->getId()}, new state : {$stateObject->getState()}, new status : {$stateObject->getStatus()}."); + $this->dataHelper->log("Order #{$order->getIncrementId()}, new state : {$stateObject->getState()}, new status : {$stateObject->getStatus()}."); $order->setState($stateObject->getState()) ->setStatus($stateObject->getStatus()) ->addStatusHistoryComment(__('The payment has been accepted.')); @@ -650,7 +650,7 @@ public function denyPayment(\Magento\Payment\Model\InfoInterface $payment) $order = $payment->getOrder(); $storeId = $order->getStore()->getId(); - $this->dataHelper->log("Cancel payment online for order #{$order->getId()}."); + $this->dataHelper->log("Cancel payment online for order #{$order->getIncrementId()}."); $requestId = ''; @@ -707,7 +707,7 @@ public function denyPayment(\Magento\Payment\Model\InfoInterface $payment) ['CANCELLED'] ); - $this->dataHelper->log("Payment cancelled successfully online for order #{$order->getId()}."); + $this->dataHelper->log("Payment cancelled successfully online for order #{$order->getIncrementId()}."); $transactionId = $payment->getCcTransId() . '-1'; $additionalInfo = []; @@ -788,7 +788,7 @@ public function validatePayment(\Magento\Payment\Model\InfoInterface $payment) $order = $payment->getOrder(); $storeId = $order->getStore()->getId(); - $this->dataHelper->log("Validate payment online for order #{$order->getId()}."); + $this->dataHelper->log("Validate payment online for order #{$order->getIncrementId()}."); $requestId = ''; @@ -868,7 +868,7 @@ public function validatePayment(\Magento\Payment\Model\InfoInterface $payment) if ($i === 1) { // Single payment or first transaction for payment in installments. $stateObject = $this->paymentHelper->nextOrderState($order, $response, true); - $this->dataHelper->log("Order #{$order->getId()}, new state : {$stateObject->getState()}, new status : {$stateObject->getStatus()}."); + $this->dataHelper->log("Order #{$order->getIncrementId()}, new state : {$stateObject->getState()}, new status : {$stateObject->getStatus()}."); $order->setState($stateObject->getState()) ->setStatus($stateObject->getStatus()); } @@ -892,7 +892,7 @@ public function validatePayment(\Magento\Payment\Model\InfoInterface $payment) } } - $this->dataHelper->log("Updating payment information for validated order #{$order->getId()}."); + $this->dataHelper->log("Updating payment information for validated order #{$order->getIncrementId()}."); // Try to create invoice. $this->paymentHelper->createInvoice($order); @@ -1076,7 +1076,7 @@ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount) $requestId = ''; $this->dataHelper->log("Start refund of {$amount} {$order->getOrderCurrencyCode()} for order " . - "#{$order->getId()} with {$this->_code} payment method."); + "#{$order->getIncrementId()} with {$this->_code} payment method."); try { $wsApi = $this->checkAndGetWsApi($storeId); @@ -1215,7 +1215,7 @@ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount) $refurndPaymentResponse->getRefundPaymentResult()->getCardResponse() ); - $this->dataHelper->log("Online money refund for order #{$order->getId()} is successful."); + $this->dataHelper->log("Online money refund for order #{$order->getIncrementId()} is successful."); } else { $transAmount = $getPaymentDetailsResponse->getGetPaymentDetailsResult() ->getPaymentResponse() @@ -1236,7 +1236,7 @@ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount) ); $order->cancel(); - $this->dataHelper->log("Online payment cancel for order #{$order->getId()} is successful."); + $this->dataHelper->log("Online payment cancel for order #{$order->getIncrementId()} is successful."); } else { // Partial transaction refund, call updatePayment WS. $paymentRequest = new \Lyranetwork\Payzen\Model\Api\Ws\PaymentRequest(); $paymentRequest->setAmount($transAmount - $amountInCents); @@ -1259,7 +1259,7 @@ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount) 'WAITING_AUTHORISATION_TO_VALIDATE' ] ); - $this->dataHelper->log("Online payment update for order #{$order->getId()} is successful."); + $this->dataHelper->log("Online payment update for order #{$order->getIncrementId()} is successful."); } } } catch (\Lyranetwork\Payzen\Model\WsException $e) { diff --git a/Model/Method/Standard.php b/Model/Method/Standard.php index 9440f2bc..839ea02d 100644 --- a/Model/Method/Standard.php +++ b/Model/Method/Standard.php @@ -170,7 +170,7 @@ protected function setExtraFields($order) } else { // Bank data acquisition on payment page, let's ask customer for data registration. $this->dataHelper->log('Customer ' . $customer->getEmail() . - ' will be asked for card data registration on payment page.'); + " will be asked for card data registration on payment page for order #{$order->getIncrementId()}."); $this->payzenRequest->set('page_action', 'ASK_REGISTER_PAY'); } } @@ -413,7 +413,7 @@ public function getRestApiFormToken() ] ], 'contrib' => $cmsParam . '/' . $cmsVersion . '/' . PHP_VERSION, - 'strongAuthenticationState' => $strongAuth, + 'strongAuthentication' => $strongAuth, 'currency' => $currency->getAlpha3(), 'amount' => $currency->convertAmountToInteger($amount), 'metadata' => [ @@ -452,23 +452,17 @@ public function getRestApiFormToken() $response = $client->post('V4/Charge/CreatePayment', json_encode($data)); if ($response['status'] !== 'SUCCESS') { - $this->dataHelper->log( - "Error while creating payment form token for quote #{$quote->getId()}: " - . $response['answer']['errorMessage'] . ' (' . $response['answer']['errorCode'] . ').', - \Psr\Log\LogLevel::WARNING - ); + $msg = "Error while creating payment form token for quote #{$quote->getId()}, reserved order ID: #{$quote->getReservedOrderId()}: " + . $response['answer']['errorMessage'] . ' (' . $response['answer']['errorCode'] . ').'; if (isset($response['answer']['detailedErrorMessage']) && ! empty($response['answer']['detailedErrorMessage'])) { - $this->dataHelper->log( - 'Detailed message: ' . $response['answer']['detailedErrorMessage'] - .' ('.$response['answer']['detailedErrorCode'].').', - \Psr\Log\LogLevel::WARNING - ); + $msg .= ' Detailed message: ' . $response['answer']['detailedErrorMessage'] .' (' . $response['answer']['detailedErrorCode'] . ').'; } + $this->dataHelper->log($msg, \Psr\Log\LogLevel::WARNING); return false; } else { - $this->dataHelper->log("Form token created successfully for quote #{$quote->getId()}."); + $this->dataHelper->log("Form token created successfully for quote #{$quote->getId()}, reserved order ID: #{$quote->getReservedOrderId()}."); // Payment form token created successfully. return $response['answer']['formToken']; diff --git a/composer.json b/composer.json index a0feb6e6..12064d9d 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "php" : "~5.5.0|~5.6.0|~7" }, "type" : "magento2-module", - "version" : "2.4.7", + "version" : "2.4.8", "license" : "OSL-3.0", "autoload" : { "files" : [ diff --git a/etc/config.xml b/etc/config.xml index 2b70b92e..448d019b 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -15,7 +15,7 @@ support@payzen.eu - 2.4.7 + 2.4.8 V2 Magento_2.x 1 diff --git a/view/base/web/images/cc/codensa.png b/view/base/web/images/cc/codensa.png new file mode 100644 index 0000000000000000000000000000000000000000..4beb85b0c75e58c19902dc95fff6af6c5b15d303 GIT binary patch literal 3378 zcmai%Wmppo`^A-ZFgk_tPyzyuQVBQ80pesR<&c=jCfyAqB?M$hcY~A&l0(t~G9)BK zi2>3j{frvI>;LQj{qSDrI=}PjT-SYnJTZ?Ex%Ax-2|ZpBIfUN1XvU7YXdzuM(j=swsdJ_53?Y-2wQ-b3Frf z3E3(insY$-6nn6H(4&^lqdEt29S&uh&Onwh$JQLKvB!i7q%x3P*!>#gHF$JGSqFWt z`bSV{$rnaEhD~m0VQ`FGFa0~(P-2~H*JeXeSkslUc92#=2zzBYLK|1!{n+})Kozr3 zLbuP*CY|GY#<5xFiDxW2pV8spKH1HTZBrs;6>o4YM`QbhrjAb96C>esbMoX}l&!=@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BmZL P00000NkvXXu0mjfCse{h literal 0 HcmV?d00001 diff --git a/view/base/web/images/cc/mastercard_debit.png b/view/base/web/images/cc/mastercard_debit.png new file mode 100644 index 0000000000000000000000000000000000000000..dcda910545688b71e462ea8e644fe0b8408b2887 GIT binary patch literal 1090 zcmeAS@N?(olHy`uVBq!ia0vp^6+j%o!3-pyx;pL#QqKc?LR^6~5WHrP{ytBdZVX%& zyIRxB!4<`{Ol9?IZ5o7JNvIT z!Czg%zkOMM*Yo{u;{Q|4^Ea6JZ$A6qVvc{2O#jlE|7ElOk7xLw%=B8URS0OSZb^_| zFoS@AfP#X8fq{X8gF`?-Kte)7K|w)7LqmUm|NQy$*RNl{fB*jT=kMRY|Ni}Z!zW2U z85o%Edb&7==vA$rs|zp(38h`?AEuW`yyNxHIG<6rp#Xa{7&Ip|Cv>i(x?~rBt{^?)gNrm$Mhu>zzoKBjgFZ5~i*{vr#D|R1xuy5aH8QYq)3H)a^ z+?m4oFJtYOX2yB4VWGKf-%s6oG0Slpztwt)J4eI$|8z5&c^{Dcd+pXG-JG=N&pz^` z&CYp}=za1N=e8wmJRhpzeX@%m-Qms``L(;L?|L_A0nc;YY{;Ta6D#SE^i>46&R${}kgP8>9Ds?y#Rwo?I=u{C(%U zx?|PNk&gSmG*53(?0ZpDmsk9s;k(@$ue$BL`xx_HJ)XsrTkt0Dy;x0G;CA}-CcG+8X1n^T@o{iU+I1^s zx6_|L{HasuzFNX4xTi}dT&n#Hzkzw|S6SX08KoO<+-Q_Dx6lx^-gmn(bNQpUp}URm z>oQ!}JMXyI?PkHy=rt_gS52~6CUr{4!1VIxfSqE_PyciNu?b!AQ!cx8%Ylv`a-31? zf7type_(X+O}V3o?3*gt$6pTiO=9@G%CBTefWi73-mS|Mj{cmcxA6dH#C5}C8{R!r zXHlLiz%@_cYFyCcH|e6jCytozYct_h3}OCO*saFT%6(2~;xgaMFFltEB|iPi5@UOD zPQTqk{VFpv%}$Lza}RqLaC6sEW&LsawU0tx&74TeVa~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=QtyZio`5y4{={Z1nISo1{k({Qu@@QJ?hlNT-8TvJ=$OLi9j z3;g}%Wgoosmv>%T^4|OJf7K4IkM?|1TC#TT(;E&QLV3Xb`%hG#t=qosP|2LN`vR~3 z9XV3D@3Uj<{nqUVi;BxGpp&-Oe4YnQS&QG_>W}_ms_X27wY2iM7}+0qd-DIW{9?(m z&eJ?y7Ul%6j~7+=9^^tmzp>%?YnM;GaJllO%O_uHtb92t-7BYFZan#X!w;Jf@B95{ zYS#5>*ucBEi3gvTqSDRMu#wlWj#sm5FpK{A+D)+yTX_v{^BSXaePj#o$KCg{=-1S4 z<|Fj~#%qkq^^pqRj~@+-q8~*+ihe^y6#X7UKQ4-X527C*ML(+hzYbwN&X0yN==;uI z*vM;yP^*I1RDq@?D%~wjn|QUm?qboes(OD|?al!;9}KSj;Lck3+&LJ1hTpW4o&U~F rv~2sELA5&uocqGo8vQ%WJ$wBNP6`*Yn@--b00000NkvXXu0mjff!eVr literal 0 HcmV?d00001 From 24ba51018f367b18512b18e26bbd6779bcb6ed6b Mon Sep 17 00:00:00 2001 From: Nabil Berhouche Date: Thu, 26 Nov 2020 16:28:55 +0100 Subject: [PATCH 2/2] [BOT] Migrate release 2.5.0 to GitHub. --- Block/Adminhtml/Payment/Redirect.php | 2 +- Block/Adminhtml/Payment/Redirect/Form.php | 6 +- .../Config/Form/Field/CategoryMapping.php | 4 - .../Field/Choozeo/ChoozeoPaymentOptions.php | 2 +- .../Config/Form/Field/CustgroupOptions.php | 4 - .../Field/FieldArray/ConfigFieldArray.php | 61 +- .../Franfinance/FranfinancePaymentOptions.php | 135 +++ .../Field/Fullcb/FullcbCustgroupOptions.php | 4 +- .../Field/Fullcb/FullcbPaymentOptions.php | 2 +- .../System/Config/Form/Field/Logo.php | 2 - .../Form/Field/Multi/MultiPaymentOptions.php | 6 +- .../System/Config/Form/Field/NotifyUrl.php | 1 - .../Form/Field/Oney/OneyCustgroupOptions.php | 26 + .../Form/Field/Oney/OneyPaymentOptions.php | 69 ++ .../Form/Field/Other/AddedPaymentMeans.php | 68 ++ .../Form/Field/Other/OtherPaymentMeans.php | 198 ++++ .../Form/Field/Renderer/ColumnMultiselect.php | 36 + .../Field/Renderer/ColumnUploadButton.php | 2 - .../System/Config/Form/Field/Sensitive.php | 1 - .../System/Config/Form/Field/ShipOptions.php | 87 +- .../Form/Field/Standard/RestPlaceholders.php | 2 - Block/Customer/Index.php | 112 +++ Block/Customer/Tab.php | 54 ++ Block/Payment/Form/Franfinance.php | 24 + Block/Payment/Form/Gift.php | 12 - Block/Payment/Form/Multi.php | 12 - Block/Payment/Form/Oney.php | 24 + Block/Payment/Form/Other.php | 34 + Block/Payment/Form/Payzen.php | 19 +- Block/Payment/Form/Sepa.php | 6 + Block/Payment/Form/Standard.php | 21 +- Block/Payment/Iframe/Response.php | 1 - Block/Payment/Info.php | 4 - Block/Payment/Redirect.php | 6 +- Block/Payment/Rest/Head.php | 13 +- CHANGELOG.md | 25 +- Controller/Adminhtml/Payment/Validate.php | 3 - Controller/Customer/AbstractAction.php | 52 ++ Controller/Customer/Cancel.php | 59 ++ Controller/Customer/Index.php | 42 + Controller/Payment/Check.php | 3 - Controller/Payment/Iframe/Loader.php | 2 - Controller/Payment/Redirect.php | 6 - Controller/Payment/Response.php | 9 +- Controller/Payment/Rest/Check.php | 16 +- Controller/Payment/Rest/Response.php | 11 +- Controller/Payment/Rest/Token.php | 1 - Controller/Plugin/CsrfValidator.php | 3 +- Controller/Processor/CheckProcessor.php | 8 - Controller/Processor/RedirectProcessor.php | 3 - Controller/Processor/ResponseProcessor.php | 5 - Helper/Checkout.php | 172 ++-- Helper/Data.php | 165 +++- Helper/Payment.php | 119 ++- Helper/Payment/Data.php | 18 +- Helper/Rest.php | 118 ++- Model/Api/PayzenRest.php | 1 - Model/Api/Ws/AuthenticationRequestData.php | 153 --- Model/Api/Ws/AuthenticationResultData.php | 222 ----- Model/Api/Ws/AuthorizationResponse.php | 188 ---- Model/Api/Ws/BillingDetailsRequest.php | 452 --------- Model/Api/Ws/BillingDetailsResponse.php | 406 -------- Model/Api/Ws/CancelCapturedPayment.php | 61 -- .../Api/Ws/CancelCapturedPaymentResponse.php | 38 - Model/Api/Ws/CancelCapturedPaymentResult.php | 38 - Model/Api/Ws/CancelPayment.php | 61 -- Model/Api/Ws/CancelPaymentResponse.php | 38 - Model/Api/Ws/CancelPaymentResult.php | 38 - Model/Api/Ws/CancelRefund.php | 61 -- Model/Api/Ws/CancelRefundResponse.php | 38 - Model/Api/Ws/CancelRefundResult.php | 38 - Model/Api/Ws/CancelSubscription.php | 61 -- Model/Api/Ws/CancelSubscriptionResponse.php | 38 - Model/Api/Ws/CancelSubscriptionResult.php | 38 - Model/Api/Ws/CancelToken.php | 61 -- Model/Api/Ws/CancelTokenResponse.php | 38 - Model/Api/Ws/CancelTokenResult.php | 38 - Model/Api/Ws/CapturePayment.php | 38 - Model/Api/Ws/CapturePaymentResponse.php | 38 - Model/Api/Ws/CapturePaymentResult.php | 38 - Model/Api/Ws/CaptureResponse.php | 165 ---- Model/Api/Ws/CardRequest.php | 280 ------ Model/Api/Ws/CardResponse.php | 291 ------ Model/Api/Ws/CartItemInfo.php | 176 ---- Model/Api/Ws/CheckThreeDSAuthentication.php | 61 -- .../Ws/CheckThreeDSAuthenticationResponse.php | 38 - .../Ws/CheckThreeDSAuthenticationResult.php | 61 -- Model/Api/Ws/CommonRequest.php | 119 --- Model/Api/Ws/CommonResponse.php | 211 ----- Model/Api/Ws/CreatePayment.php | 222 ----- Model/Api/Ws/CreatePaymentResponse.php | 38 - Model/Api/Ws/CreatePaymentResult.php | 314 ------- Model/Api/Ws/CreateSubscription.php | 107 --- Model/Api/Ws/CreateSubscriptionResponse.php | 38 - Model/Api/Ws/CreateSubscriptionResult.php | 314 ------- Model/Api/Ws/CreateToken.php | 107 --- Model/Api/Ws/CreateTokenByIban.php | 84 -- Model/Api/Ws/CreateTokenByIbanResponse.php | 38 - Model/Api/Ws/CreateTokenByIbanResult.php | 314 ------- Model/Api/Ws/CreateTokenFromTransaction.php | 84 -- .../Ws/CreateTokenFromTransactionResponse.php | 38 - .../Ws/CreateTokenFromTransactionResult.php | 314 ------- Model/Api/Ws/CreateTokenResponse.php | 38 - Model/Api/Ws/CreateTokenResult.php | 314 ------- Model/Api/Ws/CustStatus.php | 18 - Model/Api/Ws/CustomerRequest.php | 84 -- Model/Api/Ws/CustomerResponse.php | 84 -- Model/Api/Ws/DeliverySpeed.php | 19 - Model/Api/Ws/DeliveryType.php | 21 - Model/Api/Ws/DuplicatePayment.php | 107 --- Model/Api/Ws/DuplicatePaymentResponse.php | 38 - Model/Api/Ws/DuplicatePaymentResult.php | 268 ------ Model/Api/Ws/ExtInfo.php | 61 -- Model/Api/Ws/ExtendedResponseRequest.php | 84 -- Model/Api/Ws/ExtraDetailsRequest.php | 61 -- Model/Api/Ws/ExtraDetailsResponse.php | 38 - Model/Api/Ws/ExtraResponse.php | 84 -- Model/Api/Ws/FindPayments.php | 38 - Model/Api/Ws/FindPaymentsResponse.php | 38 - Model/Api/Ws/FindPaymentsResult.php | 84 -- Model/Api/Ws/FraudManagementResponse.php | 84 -- Model/Api/Ws/GetPaymentDetails.php | 61 -- Model/Api/Ws/GetPaymentDetailsResponse.php | 38 - Model/Api/Ws/GetPaymentDetailsResult.php | 314 ------- Model/Api/Ws/GetPaymentUuid.php | 38 - Model/Api/Ws/GetPaymentUuidResponse.php | 38 - Model/Api/Ws/GetSubscriptionDetails.php | 38 - .../Api/Ws/GetSubscriptionDetailsResponse.php | 38 - Model/Api/Ws/GetSubscriptionDetailsResult.php | 314 ------- Model/Api/Ws/GetTokenDetails.php | 38 - Model/Api/Ws/GetTokenDetailsResponse.php | 38 - Model/Api/Ws/GetTokenDetailsResult.php | 314 ------- Model/Api/Ws/IbanRequest.php | 107 --- Model/Api/Ws/LegacyTransactionKeyRequest.php | 96 -- Model/Api/Ws/LegacyTransactionKeyResult.php | 61 -- Model/Api/Ws/MarkResponse.php | 142 --- Model/Api/Ws/MpiExtensionRequest.php | 38 - Model/Api/Ws/OrderRequest.php | 61 -- Model/Api/Ws/OrderResponse.php | 61 -- Model/Api/Ws/PaymentRequest.php | 303 ------ Model/Api/Ws/PaymentResponse.php | 499 ---------- Model/Api/Ws/PaymentType.php | 21 - Model/Api/Ws/ProductType.php | 32 - Model/Api/Ws/QueryRequest.php | 107 --- Model/Api/Ws/ReactivateToken.php | 38 - Model/Api/Ws/ReactivateTokenResponse.php | 38 - Model/Api/Ws/ReactivateTokenResult.php | 38 - Model/Api/Ws/RefundPayment.php | 84 -- Model/Api/Ws/RefundPaymentResponse.php | 38 - Model/Api/Ws/RefundPaymentResult.php | 268 ------ Model/Api/Ws/ResultWrapper.php | 76 -- Model/Api/Ws/RiskAnalysis.php | 153 --- Model/Api/Ws/RiskAnalysisProcessingStatus.php | 23 - Model/Api/Ws/RiskAssessments.php | 38 - Model/Api/Ws/RiskControl.php | 61 -- Model/Api/Ws/SettlementRequest.php | 96 -- Model/Api/Ws/ShippingDetailsRequest.php | 406 -------- Model/Api/Ws/ShippingDetailsResponse.php | 406 -------- Model/Api/Ws/ShoppingCartRequest.php | 107 --- Model/Api/Ws/ShoppingCartResponse.php | 38 - Model/Api/Ws/SubscriptionRequest.php | 211 ----- Model/Api/Ws/SubscriptionResponse.php | 292 ------ Model/Api/Ws/TechRequest.php | 84 -- Model/Api/Ws/ThreeDSMode.php | 20 - Model/Api/Ws/ThreeDSRequest.php | 268 ------ Model/Api/Ws/ThreeDSResponse.php | 61 -- Model/Api/Ws/TokenRequest.php | 38 - Model/Api/Ws/TokenResponse.php | 85 -- Model/Api/Ws/TransactionItem.php | 142 --- Model/Api/Ws/UpdatePayment.php | 84 -- Model/Api/Ws/UpdatePaymentDetails.php | 61 -- Model/Api/Ws/UpdatePaymentDetailsResponse.php | 38 - Model/Api/Ws/UpdatePaymentDetailsResult.php | 314 ------- Model/Api/Ws/UpdatePaymentResponse.php | 38 - Model/Api/Ws/UpdatePaymentResult.php | 291 ------ Model/Api/Ws/UpdateRefund.php | 84 -- Model/Api/Ws/UpdateRefundResponse.php | 38 - Model/Api/Ws/UpdateRefundResult.php | 291 ------ Model/Api/Ws/UpdateSubscription.php | 84 -- Model/Api/Ws/UpdateSubscriptionResponse.php | 38 - Model/Api/Ws/UpdateSubscriptionResult.php | 291 ------ Model/Api/Ws/UpdateToken.php | 130 --- Model/Api/Ws/UpdateTokenResponse.php | 38 - Model/Api/Ws/UpdateTokenResult.php | 291 ------ Model/Api/Ws/ValidatePayment.php | 61 -- Model/Api/Ws/ValidatePaymentResponse.php | 38 - Model/Api/Ws/ValidatePaymentResult.php | 38 - Model/Api/Ws/VerifyThreeDSEnrollment.php | 130 --- .../Ws/VerifyThreeDSEnrollmentResponse.php | 38 - .../Api/Ws/VerifyThreeDSEnrollmentResult.php | 61 -- Model/Api/Ws/WsApi.php | 575 ------------ Model/Api/Ws/WsApiClassLoader.php | 55 -- Model/Api/Ws/WsResponse.php | 38 - Model/ChoozeoConfigProvider.php | 14 +- Model/FranfinanceConfigProvider.php | 67 ++ Model/FullcbConfigProvider.php | 14 - Model/GiftConfigProvider.php | 10 - Model/Logger/Handler/Payzen.php | 2 - Model/Method/Franfinance.php | 133 +++ Model/Method/Fullcb.php | 9 +- Model/Method/Multi.php | 10 +- Model/Method/Oney.php | 285 ++++++ Model/Method/Other.php | 176 ++++ Model/Method/Payzen.php | 871 +++++++----------- Model/Method/Sepa.php | 125 ++- Model/Method/Standard.php | 110 ++- Model/MultiConfigProvider.php | 12 - Model/OneyConfigProvider.php | 84 ++ Model/OtherConfigProvider.php | 68 ++ Model/PaypalConfigProvider.php | 10 - Model/PayzenConfigProvider.php | 95 +- Model/SepaConfigProvider.php | 30 +- Model/StandardConfigProvider.php | 17 +- .../Backend/Choozeo/ChoozeoPaymentOptions.php | 10 +- .../Config/Backend/CustgroupOptions.php | 2 +- .../Franfinance/FranfinancePaymentOptions.php | 40 + .../Backend/Fullcb/FullcbPaymentOptions.php | 21 +- .../System/Config/Backend/Gift/AddedCards.php | 8 +- .../Backend/Multi/MultiPaymentOptions.php | 24 +- Model/System/Config/Backend/Oney/Active.php | 76 ++ .../Backend/Oney/OneyPaymentOptions.php | 72 ++ .../Backend/Other/AddedPaymentMeans.php | 105 +++ .../Backend/Other/OtherPaymentMeans.php | 94 ++ Model/System/Config/Backend/PaymentCards.php | 46 +- .../ArraySerialized/ConfigArraySerialized.php | 32 +- Model/System/Config/Backend/ShopUrl.php | 2 - Model/System/Config/Backend/ThemeConfig.php | 2 - Model/System/Config/Source/CardInfoMode.php | 7 +- Model/System/Config/Source/ChoozeoCountry.php | 3 +- Model/System/Config/Source/CountryList.php | 54 ++ .../Config/Source/OneyAvailableCountry.php | 48 + Model/System/Config/Source/RestTheme.php | 8 +- .../BackendPaymentPerformRedirectObserver.php | 3 - Observer/BackendPaymentRedirectObserver.php | 5 - Observer/UpdateOtherPaymentObserver.php | 40 + README.md | 5 +- Setup/InstallData.php | 4 - Setup/UpgradeData.php | 4 - composer.json | 2 +- etc/adminhtml/events.xml | 4 +- etc/adminhtml/system.xml | 3 + etc/adminhtml/system/franfinance.xml | 85 ++ etc/adminhtml/system/fullcb.xml | 24 +- etc/adminhtml/system/general.xml | 121 ++- etc/adminhtml/system/oney.xml | 115 +++ etc/adminhtml/system/other.xml | 112 +++ etc/adminhtml/system/paypal.xml | 26 +- etc/adminhtml/system/sepa.xml | 40 +- etc/adminhtml/system/standard.xml | 78 +- etc/config.xml | 67 +- etc/events.xml | 2 + etc/frontend/di.xml | 6 + etc/payment.xml | 9 + etc/ws.ini | 9 - i18n/de_DE.csv | 103 ++- i18n/en_US.csv | 98 +- i18n/es_ES.csv | 115 ++- i18n/fr_FR.csv | 101 +- view/adminhtml/templates/payment/info.phtml | 11 + view/base/web/images/cc/oney.png | Bin 20861 -> 0 bytes view/base/web/images/cc/oney_sandbox.png | Bin 3650 -> 0 bytes view/base/web/images/franfinance-logo.png | Bin 0 -> 3503 bytes view/base/web/images/oney-logo.png | Bin 0 -> 2191 bytes view/frontend/layout/checkout_index_index.xml | 9 + view/frontend/layout/customer_account.xml | 25 + .../frontend/layout/payzen_customer_index.xml | 29 + .../templates/customer/payment_means.phtml | 66 ++ .../templates/payment/form/franfinance.phtml | 44 + .../templates/payment/form/gift.phtml | 11 +- .../templates/payment/form/multi.phtml | 16 +- .../templates/payment/form/oney.phtml | 44 + .../templates/payment/form/other.phtml | 67 ++ .../templates/payment/form/sepa.phtml | 54 +- .../templates/payment/form/standard.phtml | 24 +- view/frontend/templates/payment/info.phtml | 11 + view/frontend/templates/payment/logo.phtml | 2 +- view/frontend/web/css/payzen.css | 51 +- .../frontend/web/js/customer/delete-widget.js | 37 + .../method-renderer/payzen-abstract.js | 54 +- .../method-renderer/payzen-franfinance.js | 47 + .../payment/method-renderer/payzen-gift.js | 6 +- .../payment/method-renderer/payzen-multi.js | 2 +- .../payment/method-renderer/payzen-oney.js | 60 ++ .../payment/method-renderer/payzen-other.js | 86 ++ .../payment/method-renderer/payzen-paypal.js | 6 +- .../payment/method-renderer/payzen-sepa.js | 36 +- .../method-renderer/payzen-standard.js | 26 +- .../web/js/view/payment/payzen-payments.js | 15 +- .../web/template/payment/payzen-choozeo.html | 13 +- .../template/payment/payzen-franfinance.html | 87 ++ .../web/template/payment/payzen-fullcb.html | 25 +- .../web/template/payment/payzen-gift.html | 13 +- .../web/template/payment/payzen-multi.html | 17 +- .../web/template/payment/payzen-oney.html | 88 ++ .../payment/payzen-other-grouped.html | 92 ++ .../payment/payzen-other-separated.html | 71 ++ .../web/template/payment/payzen-other.html | 18 + .../web/template/payment/payzen-paypal.html | 13 +- .../web/template/payment/payzen-sepa.html | 56 +- .../web/template/payment/payzen-standard.html | 30 +- view/frontend/web/template/payment/rest.html | 15 +- 301 files changed, 5710 insertions(+), 17793 deletions(-) create mode 100644 Block/Adminhtml/System/Config/Form/Field/Franfinance/FranfinancePaymentOptions.php create mode 100644 Block/Adminhtml/System/Config/Form/Field/Oney/OneyCustgroupOptions.php create mode 100644 Block/Adminhtml/System/Config/Form/Field/Oney/OneyPaymentOptions.php create mode 100644 Block/Adminhtml/System/Config/Form/Field/Other/AddedPaymentMeans.php create mode 100644 Block/Adminhtml/System/Config/Form/Field/Other/OtherPaymentMeans.php create mode 100644 Block/Adminhtml/System/Config/Form/Field/Renderer/ColumnMultiselect.php create mode 100644 Block/Customer/Index.php create mode 100644 Block/Customer/Tab.php create mode 100644 Block/Payment/Form/Franfinance.php create mode 100644 Block/Payment/Form/Oney.php create mode 100644 Block/Payment/Form/Other.php create mode 100644 Controller/Customer/AbstractAction.php create mode 100644 Controller/Customer/Cancel.php create mode 100644 Controller/Customer/Index.php delete mode 100644 Model/Api/Ws/AuthenticationRequestData.php delete mode 100644 Model/Api/Ws/AuthenticationResultData.php delete mode 100644 Model/Api/Ws/AuthorizationResponse.php delete mode 100644 Model/Api/Ws/BillingDetailsRequest.php delete mode 100644 Model/Api/Ws/BillingDetailsResponse.php delete mode 100644 Model/Api/Ws/CancelCapturedPayment.php delete mode 100644 Model/Api/Ws/CancelCapturedPaymentResponse.php delete mode 100644 Model/Api/Ws/CancelCapturedPaymentResult.php delete mode 100644 Model/Api/Ws/CancelPayment.php delete mode 100644 Model/Api/Ws/CancelPaymentResponse.php delete mode 100644 Model/Api/Ws/CancelPaymentResult.php delete mode 100644 Model/Api/Ws/CancelRefund.php delete mode 100644 Model/Api/Ws/CancelRefundResponse.php delete mode 100644 Model/Api/Ws/CancelRefundResult.php delete mode 100644 Model/Api/Ws/CancelSubscription.php delete mode 100644 Model/Api/Ws/CancelSubscriptionResponse.php delete mode 100644 Model/Api/Ws/CancelSubscriptionResult.php delete mode 100644 Model/Api/Ws/CancelToken.php delete mode 100644 Model/Api/Ws/CancelTokenResponse.php delete mode 100644 Model/Api/Ws/CancelTokenResult.php delete mode 100644 Model/Api/Ws/CapturePayment.php delete mode 100644 Model/Api/Ws/CapturePaymentResponse.php delete mode 100644 Model/Api/Ws/CapturePaymentResult.php delete mode 100644 Model/Api/Ws/CaptureResponse.php delete mode 100644 Model/Api/Ws/CardRequest.php delete mode 100644 Model/Api/Ws/CardResponse.php delete mode 100644 Model/Api/Ws/CartItemInfo.php delete mode 100644 Model/Api/Ws/CheckThreeDSAuthentication.php delete mode 100644 Model/Api/Ws/CheckThreeDSAuthenticationResponse.php delete mode 100644 Model/Api/Ws/CheckThreeDSAuthenticationResult.php delete mode 100644 Model/Api/Ws/CommonRequest.php delete mode 100644 Model/Api/Ws/CommonResponse.php delete mode 100644 Model/Api/Ws/CreatePayment.php delete mode 100644 Model/Api/Ws/CreatePaymentResponse.php delete mode 100644 Model/Api/Ws/CreatePaymentResult.php delete mode 100644 Model/Api/Ws/CreateSubscription.php delete mode 100644 Model/Api/Ws/CreateSubscriptionResponse.php delete mode 100644 Model/Api/Ws/CreateSubscriptionResult.php delete mode 100644 Model/Api/Ws/CreateToken.php delete mode 100644 Model/Api/Ws/CreateTokenByIban.php delete mode 100644 Model/Api/Ws/CreateTokenByIbanResponse.php delete mode 100644 Model/Api/Ws/CreateTokenByIbanResult.php delete mode 100644 Model/Api/Ws/CreateTokenFromTransaction.php delete mode 100644 Model/Api/Ws/CreateTokenFromTransactionResponse.php delete mode 100644 Model/Api/Ws/CreateTokenFromTransactionResult.php delete mode 100644 Model/Api/Ws/CreateTokenResponse.php delete mode 100644 Model/Api/Ws/CreateTokenResult.php delete mode 100644 Model/Api/Ws/CustStatus.php delete mode 100644 Model/Api/Ws/CustomerRequest.php delete mode 100644 Model/Api/Ws/CustomerResponse.php delete mode 100644 Model/Api/Ws/DeliverySpeed.php delete mode 100644 Model/Api/Ws/DeliveryType.php delete mode 100644 Model/Api/Ws/DuplicatePayment.php delete mode 100644 Model/Api/Ws/DuplicatePaymentResponse.php delete mode 100644 Model/Api/Ws/DuplicatePaymentResult.php delete mode 100644 Model/Api/Ws/ExtInfo.php delete mode 100644 Model/Api/Ws/ExtendedResponseRequest.php delete mode 100644 Model/Api/Ws/ExtraDetailsRequest.php delete mode 100644 Model/Api/Ws/ExtraDetailsResponse.php delete mode 100644 Model/Api/Ws/ExtraResponse.php delete mode 100644 Model/Api/Ws/FindPayments.php delete mode 100644 Model/Api/Ws/FindPaymentsResponse.php delete mode 100644 Model/Api/Ws/FindPaymentsResult.php delete mode 100644 Model/Api/Ws/FraudManagementResponse.php delete mode 100644 Model/Api/Ws/GetPaymentDetails.php delete mode 100644 Model/Api/Ws/GetPaymentDetailsResponse.php delete mode 100644 Model/Api/Ws/GetPaymentDetailsResult.php delete mode 100644 Model/Api/Ws/GetPaymentUuid.php delete mode 100644 Model/Api/Ws/GetPaymentUuidResponse.php delete mode 100644 Model/Api/Ws/GetSubscriptionDetails.php delete mode 100644 Model/Api/Ws/GetSubscriptionDetailsResponse.php delete mode 100644 Model/Api/Ws/GetSubscriptionDetailsResult.php delete mode 100644 Model/Api/Ws/GetTokenDetails.php delete mode 100644 Model/Api/Ws/GetTokenDetailsResponse.php delete mode 100644 Model/Api/Ws/GetTokenDetailsResult.php delete mode 100644 Model/Api/Ws/IbanRequest.php delete mode 100644 Model/Api/Ws/LegacyTransactionKeyRequest.php delete mode 100644 Model/Api/Ws/LegacyTransactionKeyResult.php delete mode 100644 Model/Api/Ws/MarkResponse.php delete mode 100644 Model/Api/Ws/MpiExtensionRequest.php delete mode 100644 Model/Api/Ws/OrderRequest.php delete mode 100644 Model/Api/Ws/OrderResponse.php delete mode 100644 Model/Api/Ws/PaymentRequest.php delete mode 100644 Model/Api/Ws/PaymentResponse.php delete mode 100644 Model/Api/Ws/PaymentType.php delete mode 100644 Model/Api/Ws/ProductType.php delete mode 100644 Model/Api/Ws/QueryRequest.php delete mode 100644 Model/Api/Ws/ReactivateToken.php delete mode 100644 Model/Api/Ws/ReactivateTokenResponse.php delete mode 100644 Model/Api/Ws/ReactivateTokenResult.php delete mode 100644 Model/Api/Ws/RefundPayment.php delete mode 100644 Model/Api/Ws/RefundPaymentResponse.php delete mode 100644 Model/Api/Ws/RefundPaymentResult.php delete mode 100644 Model/Api/Ws/ResultWrapper.php delete mode 100644 Model/Api/Ws/RiskAnalysis.php delete mode 100644 Model/Api/Ws/RiskAnalysisProcessingStatus.php delete mode 100644 Model/Api/Ws/RiskAssessments.php delete mode 100644 Model/Api/Ws/RiskControl.php delete mode 100644 Model/Api/Ws/SettlementRequest.php delete mode 100644 Model/Api/Ws/ShippingDetailsRequest.php delete mode 100644 Model/Api/Ws/ShippingDetailsResponse.php delete mode 100644 Model/Api/Ws/ShoppingCartRequest.php delete mode 100644 Model/Api/Ws/ShoppingCartResponse.php delete mode 100644 Model/Api/Ws/SubscriptionRequest.php delete mode 100644 Model/Api/Ws/SubscriptionResponse.php delete mode 100644 Model/Api/Ws/TechRequest.php delete mode 100644 Model/Api/Ws/ThreeDSMode.php delete mode 100644 Model/Api/Ws/ThreeDSRequest.php delete mode 100644 Model/Api/Ws/ThreeDSResponse.php delete mode 100644 Model/Api/Ws/TokenRequest.php delete mode 100644 Model/Api/Ws/TokenResponse.php delete mode 100644 Model/Api/Ws/TransactionItem.php delete mode 100644 Model/Api/Ws/UpdatePayment.php delete mode 100644 Model/Api/Ws/UpdatePaymentDetails.php delete mode 100644 Model/Api/Ws/UpdatePaymentDetailsResponse.php delete mode 100644 Model/Api/Ws/UpdatePaymentDetailsResult.php delete mode 100644 Model/Api/Ws/UpdatePaymentResponse.php delete mode 100644 Model/Api/Ws/UpdatePaymentResult.php delete mode 100644 Model/Api/Ws/UpdateRefund.php delete mode 100644 Model/Api/Ws/UpdateRefundResponse.php delete mode 100644 Model/Api/Ws/UpdateRefundResult.php delete mode 100644 Model/Api/Ws/UpdateSubscription.php delete mode 100644 Model/Api/Ws/UpdateSubscriptionResponse.php delete mode 100644 Model/Api/Ws/UpdateSubscriptionResult.php delete mode 100644 Model/Api/Ws/UpdateToken.php delete mode 100644 Model/Api/Ws/UpdateTokenResponse.php delete mode 100644 Model/Api/Ws/UpdateTokenResult.php delete mode 100644 Model/Api/Ws/ValidatePayment.php delete mode 100644 Model/Api/Ws/ValidatePaymentResponse.php delete mode 100644 Model/Api/Ws/ValidatePaymentResult.php delete mode 100644 Model/Api/Ws/VerifyThreeDSEnrollment.php delete mode 100644 Model/Api/Ws/VerifyThreeDSEnrollmentResponse.php delete mode 100644 Model/Api/Ws/VerifyThreeDSEnrollmentResult.php delete mode 100644 Model/Api/Ws/WsApi.php delete mode 100644 Model/Api/Ws/WsApiClassLoader.php delete mode 100644 Model/Api/Ws/WsResponse.php create mode 100644 Model/FranfinanceConfigProvider.php create mode 100644 Model/Method/Franfinance.php create mode 100644 Model/Method/Oney.php create mode 100644 Model/Method/Other.php create mode 100644 Model/OneyConfigProvider.php create mode 100644 Model/OtherConfigProvider.php create mode 100644 Model/System/Config/Backend/Franfinance/FranfinancePaymentOptions.php create mode 100644 Model/System/Config/Backend/Oney/Active.php create mode 100644 Model/System/Config/Backend/Oney/OneyPaymentOptions.php create mode 100644 Model/System/Config/Backend/Other/AddedPaymentMeans.php create mode 100644 Model/System/Config/Backend/Other/OtherPaymentMeans.php create mode 100644 Model/System/Config/Source/CountryList.php create mode 100644 Model/System/Config/Source/OneyAvailableCountry.php create mode 100644 Observer/UpdateOtherPaymentObserver.php create mode 100644 etc/adminhtml/system/franfinance.xml create mode 100644 etc/adminhtml/system/oney.xml create mode 100644 etc/adminhtml/system/other.xml delete mode 100644 etc/ws.ini delete mode 100644 view/base/web/images/cc/oney.png delete mode 100644 view/base/web/images/cc/oney_sandbox.png create mode 100644 view/base/web/images/franfinance-logo.png create mode 100644 view/base/web/images/oney-logo.png create mode 100644 view/frontend/layout/customer_account.xml create mode 100644 view/frontend/layout/payzen_customer_index.xml create mode 100644 view/frontend/templates/customer/payment_means.phtml create mode 100644 view/frontend/templates/payment/form/franfinance.phtml create mode 100644 view/frontend/templates/payment/form/oney.phtml create mode 100644 view/frontend/templates/payment/form/other.phtml create mode 100644 view/frontend/web/js/customer/delete-widget.js create mode 100644 view/frontend/web/js/view/payment/method-renderer/payzen-franfinance.js create mode 100644 view/frontend/web/js/view/payment/method-renderer/payzen-oney.js create mode 100644 view/frontend/web/js/view/payment/method-renderer/payzen-other.js create mode 100644 view/frontend/web/template/payment/payzen-franfinance.html create mode 100644 view/frontend/web/template/payment/payzen-oney.html create mode 100644 view/frontend/web/template/payment/payzen-other-grouped.html create mode 100644 view/frontend/web/template/payment/payzen-other-separated.html create mode 100644 view/frontend/web/template/payment/payzen-other.html diff --git a/Block/Adminhtml/Payment/Redirect.php b/Block/Adminhtml/Payment/Redirect.php index 4a55281a..d8822f24 100644 --- a/Block/Adminhtml/Payment/Redirect.php +++ b/Block/Adminhtml/Payment/Redirect.php @@ -25,7 +25,7 @@ protected function _construct() } /** - * Get URL for back (reset) button + * Get URL for back (reset) button. * * @return string */ diff --git a/Block/Adminhtml/Payment/Redirect/Form.php b/Block/Adminhtml/Payment/Redirect/Form.php index 4803294e..ce01efba 100644 --- a/Block/Adminhtml/Payment/Redirect/Form.php +++ b/Block/Adminhtml/Payment/Redirect/Form.php @@ -12,13 +12,11 @@ class Form extends \Magento\Backend\Block\Widget { /** - * * @var \Magento\Framework\Registry */ protected $coreRegistry; /** - * * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Framework\Registry $coreRegistry * @param array $data @@ -34,7 +32,7 @@ public function __construct( } /** - * Get Form data by using ops payment api + * Get Form data by using ops payment api. * * @return array */ @@ -44,7 +42,7 @@ public function getFormFields() } /** - * Getting gateway url + * Getting gateway url. * * @return string */ diff --git a/Block/Adminhtml/System/Config/Form/Field/CategoryMapping.php b/Block/Adminhtml/System/Config/Form/Field/CategoryMapping.php index 311dec89..282d9fc1 100644 --- a/Block/Adminhtml/System/Config/Form/Field/CategoryMapping.php +++ b/Block/Adminhtml/System/Config/Form/Field/CategoryMapping.php @@ -15,25 +15,21 @@ class CategoryMapping extends \Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\FieldArray\ConfigFieldArray { /** - * * @var \Lyranetwork\Payzen\Model\System\Config\Source\CategoryFactory */ protected $payzenCategoryFactory; /** - * * @var \Magento\Catalog\Model\CategoryFactory */ protected $categoryFactory; /** - * * @var bool */ protected $staticTable = true; /** - * * @param \Magento\Backend\Block\Template\Context $context * @param \Lyranetwork\Payzen\Model\System\Config\Source\CategoryFactory $payzenCategoryFactory * @param \Magento\Catalog\Model\CategoryFactory $categoryFactory diff --git a/Block/Adminhtml/System/Config/Form/Field/Choozeo/ChoozeoPaymentOptions.php b/Block/Adminhtml/System/Config/Form/Field/Choozeo/ChoozeoPaymentOptions.php index 63874ab1..28f719e7 100644 --- a/Block/Adminhtml/System/Config/Form/Field/Choozeo/ChoozeoPaymentOptions.php +++ b/Block/Adminhtml/System/Config/Form/Field/Choozeo/ChoozeoPaymentOptions.php @@ -52,7 +52,7 @@ public function _prepareToRender() /** * Obtain existing data from form element. * - * Each row will be instance of Varien_Object + * Each row will be instance of Varien_Object. * * @return array */ diff --git a/Block/Adminhtml/System/Config/Form/Field/CustgroupOptions.php b/Block/Adminhtml/System/Config/Form/Field/CustgroupOptions.php index e52dc8d6..0bae5d4b 100644 --- a/Block/Adminhtml/System/Config/Form/Field/CustgroupOptions.php +++ b/Block/Adminhtml/System/Config/Form/Field/CustgroupOptions.php @@ -15,25 +15,21 @@ class CustgroupOptions extends \Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\FieldArray\ConfigFieldArray { /** - * * @var \Magento\Customer\Model\GroupFactory */ protected $customerGroupFactory; /** - * * @var bool */ protected $staticTable = true; /** - * * @var array */ protected $_default = []; /** - * * @param \Magento\Backend\Block\Template\Context $context * @param \Magento\Customer\Model\GroupFactory $customerGroupFactory * @param array $data diff --git a/Block/Adminhtml/System/Config/Form/Field/FieldArray/ConfigFieldArray.php b/Block/Adminhtml/System/Config/Form/Field/FieldArray/ConfigFieldArray.php index 764656c1..f4c652cf 100644 --- a/Block/Adminhtml/System/Config/Form/Field/FieldArray/ConfigFieldArray.php +++ b/Block/Adminhtml/System/Config/Form/Field/FieldArray/ConfigFieldArray.php @@ -15,7 +15,6 @@ abstract class ConfigFieldArray extends \Magento\Config\Block\System\Config\Form\Field\FieldArray\AbstractFieldArray { /** - * * @var bool */ protected $staticTable = false; @@ -101,6 +100,29 @@ protected function getUploadButtonRenderer($columnName) return $this->$columnName; } + /** + * Retrieve list type column renderer. + * + * @return Customergroup + */ + protected function getMultiselectRenderer($columnName, $options) + { + if (! isset($this->$columnName) || ! $this->$columnName) { + $this->$columnName = $this->getLayout()->createBlock( + \Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Renderer\ColumnMultiselect::class, + '', + [ + 'data' => [ + 'is_render_to_js_template' => false, + 'options' => $options + ] + ] + ); + } + + return $this->$columnName; + } + /** * Retrieve HTML markup for given form element. * @@ -121,40 +143,53 @@ public function render(\Magento\Framework\Data\Form\Element\AbstractElement $ele } /** - * Render HTML block. + * Render element JavaScript code. * * @return string */ - protected function _toHtml() + protected function renderScript() { $thisEltId = $this->getElement()->getId(); - $script = ''; if ($this->_isInheritCheckboxRequired($this->getElement())) { - $script .= ' + $script = ' - '; + }); + '; } - return '
' . parent::_toHtml() . "\n$script" . '
'; + return $script; + } + + + /** + * Render HTML block. + * + * @return string + */ + protected function _toHtml() + { + return '
' + . parent::_toHtml() . "\n" . $this->renderScript() . '
'; } } diff --git a/Block/Adminhtml/System/Config/Form/Field/Franfinance/FranfinancePaymentOptions.php b/Block/Adminhtml/System/Config/Form/Field/Franfinance/FranfinancePaymentOptions.php new file mode 100644 index 00000000..3fdf54c1 --- /dev/null +++ b/Block/Adminhtml/System/Config/Form/Field/Franfinance/FranfinancePaymentOptions.php @@ -0,0 +1,135 @@ +addColumn( + 'label', + [ + 'label' => __('Label'), + 'style' => 'width: 220px;', + ] + ); + $this->addColumn( + 'payment_means', + [ + 'label' => __('Count'), + 'style' => 'width: 70px;', + 'renderer' => $this->getListRenderer('payment_means', $this->getPaymentMeans()) + ] + ); + $this->addColumn( + 'fees', + [ + 'label' => __('Fees'), + 'style' => 'width: 120px;', + 'renderer' => $this->getListRenderer('fees', $this->getFeeOptions()) + ] + ); + $this->addColumn( + 'amount_min', + [ + 'label' => __('Min. amount'), + 'style' => 'width: 100px;' + ] + ); + $this->addColumn( + 'amount_max', + [ + 'label' => __('Max. amount'), + 'style' => 'width: 100px;' + ] + ); + + parent::_prepareToRender(); + } + + public function getPaymentMeans() + { + /** @var array[string][string] $options */ + $options = [ + 'FRANFINANCE_3X' => '3x', + 'FRANFINANCE_4X' => '4x' + ]; + + return $options; + } + + public function getFeeOptions() + { + /** @var array[string][string] $options */ + $options = [ + '0' => __('Without fees'), + '1' => __('With fees') + ]; + + return $options; + } + + /** + * Obtain existing data from form element. + * + * Each row will be instance of Varien_Object + * + * @return array + */ + public function getArrayRows() + { + /** @var array[string][array] $defaultOptions */ + $defaultOptions = [ + 'FRANFINANCE_3X' => [ + 'label' => sprintf(__('Payment in %s times'), '3'), + 'amount_max' => '3000' + ], + 'FRANFINANCE_4X' => [ + 'label' => sprintf(__('Payment in %s times'), '4'), + 'amount_max' => '4000' + ] + ]; + + $savedOptions = $this->getElement()->getValue(); + if (! is_array($savedOptions)) { + $savedOptions = []; + } + + foreach ($savedOptions as $code => $option) { + if (key_exists($code, $defaultOptions)) { + unset($defaultOptions[$code]); + } + } + + // Add not saved yet options. + foreach ($defaultOptions as $code => $defaultOption) { + $option = [ + 'label' => $defaultOption['label'], + 'payment_means' => $code, + 'fees' => '0', + 'amount_min' => '100', + 'amount_max' => $defaultOption['amount_max'], + ]; + + $savedOptions[$code] = $option; + } + + $this->getElement()->setValue($savedOptions); + return parent::getArrayRows(); + } +} diff --git a/Block/Adminhtml/System/Config/Form/Field/Fullcb/FullcbCustgroupOptions.php b/Block/Adminhtml/System/Config/Form/Field/Fullcb/FullcbCustgroupOptions.php index b94442fe..760a7962 100644 --- a/Block/Adminhtml/System/Config/Form/Field/Fullcb/FullcbCustgroupOptions.php +++ b/Block/Adminhtml/System/Config/Form/Field/Fullcb/FullcbCustgroupOptions.php @@ -7,13 +7,11 @@ * @copyright Lyra Network * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +namespace Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Fullcb; /** * Custom renderer for the Full CB customer group options field. */ - -namespace Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Fullcb; - class FullcbCustgroupOptions extends \Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\CustgroupOptions { public function __construct( diff --git a/Block/Adminhtml/System/Config/Form/Field/Fullcb/FullcbPaymentOptions.php b/Block/Adminhtml/System/Config/Form/Field/Fullcb/FullcbPaymentOptions.php index 7b4c52d9..63289506 100644 --- a/Block/Adminhtml/System/Config/Form/Field/Fullcb/FullcbPaymentOptions.php +++ b/Block/Adminhtml/System/Config/Form/Field/Fullcb/FullcbPaymentOptions.php @@ -65,7 +65,7 @@ public function _prepareToRender() /** * Obtain existing data from form element. * - * Each row will be instance of Varien_Object + * Each row will be instance of Varien_Object. * * @return array */ diff --git a/Block/Adminhtml/System/Config/Form/Field/Logo.php b/Block/Adminhtml/System/Config/Form/Field/Logo.php index 98743035..d506133d 100644 --- a/Block/Adminhtml/System/Config/Form/Field/Logo.php +++ b/Block/Adminhtml/System/Config/Form/Field/Logo.php @@ -15,13 +15,11 @@ class Logo extends \Magento\Config\Block\System\Config\Form\Field { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @param \Magento\Backend\Block\Template\Context $context * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param array $data diff --git a/Block/Adminhtml/System/Config/Form/Field/Multi/MultiPaymentOptions.php b/Block/Adminhtml/System/Config/Form/Field/Multi/MultiPaymentOptions.php index a6e87c41..94e1e9f8 100644 --- a/Block/Adminhtml/System/Config/Form/Field/Multi/MultiPaymentOptions.php +++ b/Block/Adminhtml/System/Config/Form/Field/Multi/MultiPaymentOptions.php @@ -24,7 +24,7 @@ public function _prepareToRender() $this->addColumn( 'label', [ - 'label' => __('Label') . '*', + 'label' => __('Label'), 'style' => 'width: 150px;' ] ); @@ -52,14 +52,14 @@ public function _prepareToRender() $this->addColumn( 'count', [ - 'label' => __('Count') . '*', + 'label' => __('Count'), 'style' => 'width: 65px;' ] ); $this->addColumn( 'period', [ - 'label' => __('Period') . '*', + 'label' => __('Period'), 'style' => 'width: 65px;' ] ); diff --git a/Block/Adminhtml/System/Config/Form/Field/NotifyUrl.php b/Block/Adminhtml/System/Config/Form/Field/NotifyUrl.php index cf76d15d..21d8327a 100644 --- a/Block/Adminhtml/System/Config/Form/Field/NotifyUrl.php +++ b/Block/Adminhtml/System/Config/Form/Field/NotifyUrl.php @@ -15,7 +15,6 @@ class NotifyUrl extends Label { /** - * * @param \Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Context $context * @param array $data */ diff --git a/Block/Adminhtml/System/Config/Form/Field/Oney/OneyCustgroupOptions.php b/Block/Adminhtml/System/Config/Form/Field/Oney/OneyCustgroupOptions.php new file mode 100644 index 00000000..114ad402 --- /dev/null +++ b/Block/Adminhtml/System/Config/Form/Field/Oney/OneyCustgroupOptions.php @@ -0,0 +1,26 @@ +_default = ['amount_min' => '100', 'amount_max' => '1000']; + } +} diff --git a/Block/Adminhtml/System/Config/Form/Field/Oney/OneyPaymentOptions.php b/Block/Adminhtml/System/Config/Form/Field/Oney/OneyPaymentOptions.php new file mode 100644 index 00000000..ceaf870d --- /dev/null +++ b/Block/Adminhtml/System/Config/Form/Field/Oney/OneyPaymentOptions.php @@ -0,0 +1,69 @@ +addColumn( + 'label', + [ + 'label' => __('Label'), + 'style' => 'width: 150px;' + ] + ); + $this->addColumn( + 'code', + [ + 'label' => __('Code'), + 'style' => 'width: 65px;' + ] + ); + $this->addColumn( + 'minimum', + [ + 'label' => __('Min. amount'), + 'style' => 'width: 80px;' + ] + ); + $this->addColumn( + 'maximum', + [ + 'label' => __('Max. amount'), + 'style' => 'width: 80px;' + ] + ); + $this->addColumn( + 'count', + [ + 'label' => __('Count'), + 'style' => 'width: 65px;' + ] + ); + $this->addColumn( + 'rate', + [ + 'label' => __('Rate'), + 'style' => 'width: 70px;' + ] + ); + + parent::_prepareToRender(); + } +} diff --git a/Block/Adminhtml/System/Config/Form/Field/Other/AddedPaymentMeans.php b/Block/Adminhtml/System/Config/Form/Field/Other/AddedPaymentMeans.php new file mode 100644 index 00000000..608ebe30 --- /dev/null +++ b/Block/Adminhtml/System/Config/Form/Field/Other/AddedPaymentMeans.php @@ -0,0 +1,68 @@ +addColumn( + 'meanCode', + [ + 'label' => __('Code'), + 'style' => 'width: 100px;' + ] + ); + $this->addColumn( + 'meanName', + [ + 'label' => __('Label'), + 'style' => 'width: 180px;' + ] + ); + + parent::_prepareToRender(); + } + + /** + * Obtain existing data from form element. + * + * Each row will be instance of Varien_Object. + * + * @return array + */ + public function getArrayRows() + { + $supportedCards = \Lyranetwork\Payzen\Model\Api\PayzenApi::getSupportedCardTypes(); + + // Get Added payment means. + $addedCards = $this->getElement()->getValue(); + if (! is_array($addedCards)) { + $addedCards = []; + } + + foreach ($addedCards as $key => $card) { + if (isset($supportedCards[$card['meanCode']])) { + unset($addedCards[$key]); + } + } + + $this->getElement()->setValue($addedCards); + return parent::getArrayRows(); + } +} diff --git a/Block/Adminhtml/System/Config/Form/Field/Other/OtherPaymentMeans.php b/Block/Adminhtml/System/Config/Form/Field/Other/OtherPaymentMeans.php new file mode 100644 index 00000000..7337e910 --- /dev/null +++ b/Block/Adminhtml/System/Config/Form/Field/Other/OtherPaymentMeans.php @@ -0,0 +1,198 @@ +_countryCollectionFactory = $countryCollectionFactory; + $this->_translate = $translate; + $this->_validationModes = $validationModes; + $this->method = $method; + + parent::__construct($context, $data); + } + + /** + * Prepare to render. + * + * @return void + */ + public function _prepareToRender() + { + $this->addColumn( + 'label', + [ + 'label' => __('Label'), + 'style' => 'width: 120px;' + ] + ); + + // Get supported payment means including added ones. + $cards = $this->method->getSupportedPaymentMeans(); + + foreach ($cards as $key => $value) { + $cards[$key] = $key . " - " . $value; + } + + $this->addColumn( + 'means', + [ + 'label' => __('Means of payment'), + 'renderer' => $this->getListRenderer('means', $cards) + ] + ); + $this->addColumn( + 'minimum', + [ + 'label' => __('Min. amount'), + 'style' => 'width: 60px;' + ] + ); + $this->addColumn( + 'maximum', + [ + 'label' => __('Max. amount'), + 'style' => 'width: 60px;' + ] + ); + $this->addColumn( + 'countries', + [ + 'label' => __('Countries'), + 'style' => 'width: 120px;', + 'renderer' => $this->getMultiselectRenderer('countries', $this->getCountries()) + ] + ); + $this->addColumn( + 'validation_mode', + [ + 'label' => __('Validation mode'), + 'style' => 'width: 120px;', + 'renderer' => $this->getListRenderer('validation_mode', $this->getValidationModes()) + ] + ); + $this->addColumn( + 'capture_delay', + [ + 'label' => __('Capture delay column'), + ] + ); + $this->addColumn( + 'cart_data', + [ + 'label' => __('Cart data'), + 'renderer' => $this->getListRenderer('card_data', $this->yesno()) + ] + ); + + parent::_prepareToRender(); + } + + /** + * Obtain existing data from form element. + * + * Each row will be instance of Varien_Object. + * + * @return array + */ + public function getArrayRows() + { + $supportedCards = $this->method->getSupportedPaymentMeans(); + + // Get other payment options. + $savedOptions = $this->getElement()->getValue(); + if (! is_array($savedOptions)) { + $savedOptions = []; + } + + foreach ($savedOptions as $key => $option) { + if (! isset($supportedCards[$option['means']])) { + unset($savedOptions[$key]); + } + } + + $this->getElement()->setValue($savedOptions); + return parent::getArrayRows(); + } + + public function getCountries() + { + $countries = $this->_countryCollectionFactory->create(); + + $result = []; + foreach ($countries as $country) { + $code = $country->getCountryId(); + $name = $this->_translate->getCountryTranslation($code); + + if (empty($name)) { + $name = $code; + } + + $result[$code] = $name; + } + + return $result; + } + + public function getValidationModes() + { + $modes = []; + foreach ($this->_validationModes->toOptionArray(true) as $option) { + $modes[$option['value']] = $option['label']; + } + + return $modes; + } + + public function yesno() + { + return [ + '0' => __('No'), + '1' => __('Yes') + ]; + } +} diff --git a/Block/Adminhtml/System/Config/Form/Field/Renderer/ColumnMultiselect.php b/Block/Adminhtml/System/Config/Form/Field/Renderer/ColumnMultiselect.php new file mode 100644 index 00000000..81b19dc6 --- /dev/null +++ b/Block/Adminhtml/System/Config/Form/Field/Renderer/ColumnMultiselect.php @@ -0,0 +1,36 @@ +getColumn(); + + $html = ''; + return $html; + } +} diff --git a/Block/Adminhtml/System/Config/Form/Field/Renderer/ColumnUploadButton.php b/Block/Adminhtml/System/Config/Form/Field/Renderer/ColumnUploadButton.php index f3a49e15..f02f94cf 100644 --- a/Block/Adminhtml/System/Config/Form/Field/Renderer/ColumnUploadButton.php +++ b/Block/Adminhtml/System/Config/Form/Field/Renderer/ColumnUploadButton.php @@ -14,13 +14,11 @@ class ColumnUploadButton extends \Magento\Framework\View\Element\AbstractBlock { /** - * * @var\Magento\Store\Model\StoreManagerInterface */ protected $storeManager; /** - * * @param \Magento\Framework\View\Element\Context $context * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param array $data diff --git a/Block/Adminhtml/System/Config/Form/Field/Sensitive.php b/Block/Adminhtml/System/Config/Form/Field/Sensitive.php index bc070b8a..27177a70 100644 --- a/Block/Adminhtml/System/Config/Form/Field/Sensitive.php +++ b/Block/Adminhtml/System/Config/Form/Field/Sensitive.php @@ -15,7 +15,6 @@ class Sensitive extends \Magento\Config\Block\System\Config\Form\Field { /** - * * @param \Magento\Framework\Data\Form\Element\AbstractElement $element * @return string */ diff --git a/Block/Adminhtml/System/Config/Form/Field/ShipOptions.php b/Block/Adminhtml/System/Config/Form/Field/ShipOptions.php index fe0f2932..03bac229 100644 --- a/Block/Adminhtml/System/Config/Form/Field/ShipOptions.php +++ b/Block/Adminhtml/System/Config/Form/Field/ShipOptions.php @@ -10,30 +10,26 @@ namespace Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field; /** - * Custom renderer for the FacilyPay Oney shipping options field. + * Custom renderer for the Shipping options field. */ class ShipOptions extends \Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\FieldArray\ConfigFieldArray { /** - * * @var \Lyranetwork\Payzen\Helper\Checkout */ protected $checkoutHelper; /** - * * @var \Magento\Shipping\Model\Config */ protected $shippingConfig; /** - * * @var bool */ protected $staticTable = true; /** - * * @param \Magento\Backend\Block\Template\Context $context * @param \Lyranetwork\Payzen\Helper\Checkout $checkoutHelper * @param \Magento\Shipping\Model\Config $shippingConfig @@ -66,19 +62,13 @@ protected function _prepareToRender() 'renderer' => $this->getLabelRenderer('_title') ] ); - $this->addColumn( - 'oney_label', - [ - 'label' => __('FacilyPay Oney label'), - 'style' => 'width: 210px;' - ] - ); $this->addColumn( 'type', [ 'label' => __('Type'), 'style' => 'width: 130px;', + 'class' => 'payzen_list_type', 'renderer' => $this->getListRenderer( '_type', [ @@ -94,13 +84,33 @@ protected function _prepareToRender() $this->addColumn( 'speed', [ - 'label' => __('Speed'), + 'label' => __('Rapidity'), 'style' => 'width: 75px;', + 'class' => 'payzen_list_speed', 'renderer' => $this->getListRenderer( '_speed', [ 'STANDARD' => 'Standard', - 'EXPRESS' => 'Express' + 'EXPRESS' => 'Express', + 'PRIORITY' => 'Priority' + ] + ) + ] + ); + + $this->addColumn( + 'delay', + [ + 'label' => __('Delay'), + 'style' => 'width: 75px;', + 'class' => 'payzen_list_delay', + 'renderer' => $this->getListRenderer( + '_delay', + [ + 'INFERIOR_EQUALS' => __('<= 1 hour'), + 'SUPERIOR' => __('> 1 hour'), + 'IMMEDIATE' => __('Immediate'), + 'ALWAYS' => __('24/7') ] ) ] @@ -111,7 +121,7 @@ protected function _prepareToRender() /** * Obtain existing data from form element. - * Each row will be instance of \Magento\Framework\DataObject + * Each row will be instance of \Magento\Framework\DataObject. * * @return array */ @@ -140,7 +150,6 @@ public function getArrayRows() $value[uniqid('_' . $code . '_')] = [ 'code' => $code, 'title' => $name, - 'oney_label' => $this->checkoutHelper->cleanShippingMethod($name), // To match Oney restrictions. 'type' => 'PACKAGE_DELIVERY_COMPANY', 'speed' => 'STANDARD', 'mark' => true @@ -199,4 +208,50 @@ private function getAllShippingMethods() return $allMethods; } + + /** + * Render element JavaScript code. + * + * @return string + */ + protected function renderScript() + { + $script = parent::renderScript(); + + $script .= "\n" . ' + '; + + return $script; + } } diff --git a/Block/Adminhtml/System/Config/Form/Field/Standard/RestPlaceholders.php b/Block/Adminhtml/System/Config/Form/Field/Standard/RestPlaceholders.php index 5289a10d..155b9822 100644 --- a/Block/Adminhtml/System/Config/Form/Field/Standard/RestPlaceholders.php +++ b/Block/Adminhtml/System/Config/Form/Field/Standard/RestPlaceholders.php @@ -15,13 +15,11 @@ class RestPlaceholders extends \Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\FieldArray\ConfigFieldArray { /** - * * @var bool */ protected $staticTable = true; /** - * * @var array */ protected $_default = []; diff --git a/Block/Customer/Index.php b/Block/Customer/Index.php new file mode 100644 index 00000000..1aac4c40 --- /dev/null +++ b/Block/Customer/Index.php @@ -0,0 +1,112 @@ +customerSession = $customerSession; + $this->dataHelper = $dataHelper; + parent::__construct($context, $data); + } + + /** + * Get Form data by using ops payment api. + * + * @return array + */ + public function getStoredPaymentMeans() + { + $means = []; + + // Customer not logged in. + $customer = $this->dataHelper->getCurrentCustomer($this->customerSession); + if (! $customer) { + return $means; + } + + $aliasIds = [ + 'payzen_identifier' => 'payzen_masked_pan', + 'payzen_sepa_identifier' => 'payzen_sepa_iban_bic' + ]; + + foreach ($aliasIds as $aliasId => $maskedId) { + // Check if there is a saved alias. + if (! $customer->getCustomAttribute($aliasId)) { + continue; + } + + $card = []; + $card['alias'] = $aliasId; + $card['pm'] = $maskedId; + + $maskedPan = $customer->getCustomAttribute($maskedId)->getValue(); + $pos = strpos($maskedPan, '|'); + + if ($pos !== false) { + $card['brand'] = substr($maskedPan, 0, $pos); + $card['number'] = substr($maskedPan, $pos + 1); + } else { + $card['brand'] = ''; + $card['number'] = $maskedPan; + } + + $means[] = $card; + } + + return $means; + } + + public function getCustomerId() + { + $customer = $this->customerSession->getCustomer(); + return $customer->getId(); + } + + public function getCcTypeImageSrc($card) + { + return $this->dataHelper->getCcTypeImageSrc($card); + } + + /** + * Render block HTML. + * + * @return string + */ + protected function _toHtml() + { + if (! $this->dataHelper->isOneClickActive()) { + return ''; + } + + return parent::_toHtml(); + } +} diff --git a/Block/Customer/Tab.php b/Block/Customer/Tab.php new file mode 100644 index 00000000..0ec486c0 --- /dev/null +++ b/Block/Customer/Tab.php @@ -0,0 +1,54 @@ +dataHelper = $dataHelper; + + parent::__construct($context, $defaultPath, $data); + } + + /** + * Render block HTML. + * + * @return string + */ + protected function _toHtml() + { + if (! $this->dataHelper->isOneClickActive()) { + return ''; + } + + return parent::_toHtml(); + } +} diff --git a/Block/Payment/Form/Franfinance.php b/Block/Payment/Form/Franfinance.php new file mode 100644 index 00000000..894a1d99 --- /dev/null +++ b/Block/Payment/Form/Franfinance.php @@ -0,0 +1,24 @@ +getMethod() + ->getInfoInstance() + ->getQuote() + ->getBaseGrandTotal(); + return $this->getMethod()->getAvailableOptions($amount); + } +} diff --git a/Block/Payment/Form/Gift.php b/Block/Payment/Form/Gift.php index 02b56be0..afdc3550 100644 --- a/Block/Payment/Form/Gift.php +++ b/Block/Payment/Form/Gift.php @@ -17,16 +17,4 @@ public function getAvailableCcTypes() { return $this->getMethod()->getAvailableCcTypes(); } - - public function getCcTypeImageSrc($card) - { - $card = 'cc/' . strtolower($card) . '.png'; - - if ($this->dataHelper->isUploadFileImageExists($card)) { - return $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . - 'payzen/images/' . $card; - } else { - return $this->getViewFileUrl('Lyranetwork_Payzen::images/' . $card); - } - } } diff --git a/Block/Payment/Form/Multi.php b/Block/Payment/Form/Multi.php index 83011909..d35f19f5 100644 --- a/Block/Payment/Form/Multi.php +++ b/Block/Payment/Form/Multi.php @@ -18,18 +18,6 @@ public function getAvailableCcTypes() return $this->getMethod()->getAvailableCcTypes(); } - public function getCcTypeImageSrc($card) - { - $card = 'cc/' . strtolower($card) . '.png'; - - if ($this->dataHelper->isUploadFileImageExists($card)) { - return $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . - 'payzen/images/' . $card; - } else { - return $this->getViewFileUrl('Lyranetwork_Payzen::images/' . $card); - } - } - public function getAvailableOptions() { $amount = $this->getMethod() diff --git a/Block/Payment/Form/Oney.php b/Block/Payment/Form/Oney.php new file mode 100644 index 00000000..9d0a1a26 --- /dev/null +++ b/Block/Payment/Form/Oney.php @@ -0,0 +1,24 @@ +getMethod() + ->getInfoInstance() + ->getQuote() + ->getBaseGrandTotal(); + return $this->getMethod()->getAvailableOptions($amount); + } +} diff --git a/Block/Payment/Form/Other.php b/Block/Payment/Form/Other.php new file mode 100644 index 00000000..ff089616 --- /dev/null +++ b/Block/Payment/Form/Other.php @@ -0,0 +1,34 @@ +getConfigData('regroup_payment_means'); + } + + public function getAvailableCcTypes() + { + return $this->getMethod()->getAvailableCcTypes(); + } + + public function getAvailableMeans() + { + $amount = $this->getMethod() + ->getInfoInstance() + ->getQuote() + ->getBaseGrandTotal(); + return $this->getMethod()->getAvailableMeans($amount); + } +} diff --git a/Block/Payment/Form/Payzen.php b/Block/Payment/Form/Payzen.php index 4c0e3c49..c237cc93 100644 --- a/Block/Payment/Form/Payzen.php +++ b/Block/Payment/Form/Payzen.php @@ -12,13 +12,11 @@ abstract class Payzen extends \Magento\Payment\Block\Form { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @param \Magento\Framework\View\Element\Template\Context $context * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param array $data @@ -39,12 +37,7 @@ private function checkAndGetLogoUrl($fileName) return false; } - if ($this->dataHelper->isUploadFileImageExists($fileName)) { - return $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . - 'payzen/images/' . $fileName; - } else { - return $this->getViewFileUrl('Lyranetwork_Payzen::images/' . $fileName); - } + return $this->getCcTypeImageSrc($fileName, false); } public function getConfigData($name) @@ -75,4 +68,14 @@ protected function _toHtml() return parent::_toHtml(); } + + public function getCcTypeImageSrc($card, $cc = true) + { + return $this->dataHelper->getCcTypeImageSrc($card, $cc); + } + + public function getCurrentCustomer() + { + return $this->getMethod()->getCurrentCustomer(); + } } diff --git a/Block/Payment/Form/Sepa.php b/Block/Payment/Form/Sepa.php index 0e94b4f1..d8353c49 100644 --- a/Block/Payment/Form/Sepa.php +++ b/Block/Payment/Form/Sepa.php @@ -12,4 +12,10 @@ class Sepa extends Payzen { protected $_template = 'Lyranetwork_Payzen::payment/form/sepa.phtml'; + + // Check if the 1-click payment is active for SEPA. + public function isOneClickActive() + { + return $this->getMethod()->isOneClickActive(); + } } diff --git a/Block/Payment/Form/Standard.php b/Block/Payment/Form/Standard.php index 10a18dfd..8f6afa24 100644 --- a/Block/Payment/Form/Standard.php +++ b/Block/Payment/Form/Standard.php @@ -39,25 +39,14 @@ public function getCcTypeNetwork($code) } } - public function getCcTypeImageSrc($card) - { - $card = 'cc/' . strtolower($card) . '.png'; - - if ($this->dataHelper->isUploadFileImageExists($card)) { - return $this->_storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . - 'payzen/images/' . $card; - } else { - return $this->getViewFileUrl('Lyranetwork_Payzen::images/' . $card); - } - } - - public function getCurrentCustomer() + public function isLocalCcType() { - return $this->getMethod()->getCurrentCustomer(); + return $this->getMethod()->isLocalCcType(); } - public function isLocalCcType() + // Check if the 1-click payment is active for Standard. + public function isOneClickActive() { - return $this->getMethod()->isLocalCcType(); + return $this->getMethod()->isOneClickActive(); } } diff --git a/Block/Payment/Iframe/Response.php b/Block/Payment/Iframe/Response.php index 10aee716..63f30800 100644 --- a/Block/Payment/Iframe/Response.php +++ b/Block/Payment/Iframe/Response.php @@ -12,7 +12,6 @@ class Response extends \Magento\Framework\View\Element\Template { /** - * * @var string */ protected $forwardUrl; diff --git a/Block/Payment/Info.php b/Block/Payment/Info.php index 4e49ae57..c8baa5d1 100644 --- a/Block/Payment/Info.php +++ b/Block/Payment/Info.php @@ -14,25 +14,21 @@ class Info extends \Magento\Payment\Block\Info { /** - * * @var string */ protected $_template = 'Lyranetwork_Payzen::payment/info.phtml'; /** - * * @var \Magento\Framework\Locale\ResolverInterface */ protected $localeResolver; /** - * * @var \Magento\Sales\Model\ResourceModel\Order\Payment\Transaction\CollectionFactory */ protected $trsCollectionFactory; /** - * * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Framework\Locale\ResolverInterface $localeResolver * @param \Magento\Sales\Model\ResourceModel\Order\Payment\Transaction\CollectionFactory $trsCollectionFactory diff --git a/Block/Payment/Redirect.php b/Block/Payment/Redirect.php index c6c4e462..5002660b 100644 --- a/Block/Payment/Redirect.php +++ b/Block/Payment/Redirect.php @@ -12,13 +12,11 @@ class Redirect extends \Magento\Framework\View\Element\Template { /** - * * @var \Magento\Framework\Registry */ protected $coreRegistry; /** - * * @param \Magento\Framework\View\Element\Template\Context $context * @param \Magento\Framework\Registry $coreRegistry * @param array $data @@ -34,7 +32,7 @@ public function __construct( } /** - * Get Form data by using ops payment api + * Get Form data by using ops payment api. * * @return array */ @@ -44,7 +42,7 @@ public function getFormFields() } /** - * Getting gateway url + * Getting gateway url. * * @return string */ diff --git a/Block/Payment/Rest/Head.php b/Block/Payment/Rest/Head.php index 7b200c6c..4d30ed4f 100644 --- a/Block/Payment/Rest/Head.php +++ b/Block/Payment/Rest/Head.php @@ -14,19 +14,16 @@ class Head extends \Magento\Framework\View\Element\Template { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @var \Lyranetwork\Payzen\Model\Method\Payzen */ protected $method; /** - * * @var \Magento\Framework\Locale\ResolverInterface */ protected $localeResolver; @@ -34,19 +31,15 @@ class Head extends \Magento\Framework\View\Element\Template private $placeholders = null; /** - * * @param \Magento\Framework\View\Element\Template\Context $context * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param \Magento\Framework\Locale\ResolverInterface $localeResolver - * @param \Magento\Payment\Helper\Data $paymentHelper * @param array $data */ public function __construct( \Magento\Framework\View\Element\Template\Context $context, \Lyranetwork\Payzen\Helper\Data $dataHelper, \Magento\Framework\Locale\ResolverInterface $localeResolver, - \Magento\Payment\Helper\Data $paymentHelper, - array $data = [] ) { parent::__construct($context, $data); @@ -54,7 +47,7 @@ public function __construct( $this->dataHelper = $dataHelper; $this->localeResolver = $localeResolver; - $this->method = $paymentHelper->getMethodInstance(\Lyranetwork\Payzen\Helper\Data::METHOD_STANDARD); + $this->method = $this->dataHelper->getMethodInstance(\Lyranetwork\Payzen\Helper\Data::METHOD_STANDARD); $this->method->setStore($this->_storeManager->getStore()->getId()); } @@ -85,7 +78,7 @@ public function getPublicKey() $mode = $this->dataHelper->getCommonConfigData('ctx_mode'); $key = ($mode === 'PRODUCTION') ? 'rest_public_key_prod' : 'rest_public_key_test'; - return $this->method->getConfigData($key); + return $this->dataHelper->getCommonConfigData($key); } public function getTheme() @@ -122,7 +115,7 @@ public function getPlaceholder($name) */ protected function _toHtml() { - if ($this->method->getConfigData('card_info_mode') != 4) { + if (! $this->method->isRestMode()) { return ''; } diff --git a/CHANGELOG.md b/CHANGELOG.md index f423b9c4..6d90073c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,9 +1,26 @@ -2.4.11: 2020-11-02: +2.5.0, 2020-11-25: +- [embedded] Bug fix: Empty cart to avoid double payments with REST API. +- [franfinance] Added new FranFinance submodule. +- [oney] Added payment in 3 or 4 times Oney submodule. +- [sepa] Possibility to enable payment by alias in SEPA submodule. +- [embedded] Possibility to display embedded payment fields in a popin. +- [alias] Added link to delete stored means of payment. +- [alias] Display the brand of the stored means of payment if payment by alias is enabled. +- [alias] Check alias validity before proceeding to payment. +- Possibility to configure REST API URLs. +- Refund payments using REST API v4. +- Accept and deny payments using REST API v4. +- Validate payments using REST API v4. +- [other] Possibility to propose other payment means by redirection. +- Improve configuration fields validation messages. +- Fix some translations. + +2.4.11, 2020-11-02: - [embedded] Bug fix: Display 3DS result for REST API payments. - Bug fix: Do not re-create invoice if it already exists. - Some minor fixes relative to configuration screen. -2.4.10: 2020-10-06: +2.4.10, 2020-10-06: - [fullcb] Bug fix: Error when trying to pay with Full CB if payment options selection is disabled. - Update payment means list. @@ -34,7 +51,7 @@ 2.4.4, 2020-02-14: - Bug fix: NoSuchEntityException occurs when trying to retrieve a removed product category. - [embedded] Bug fix: Amount did not include shipping fees when using embedded payment fields if payment step is not refreshed. -- BUg fix: Payment information in order confirmation email was not correctly translated in some multistore cases. +- Bug fix: Payment information in order confirmation email was not correctly translated in some multistore cases. 2.4.3, 2020-01-20: - Bug fix: Manage formKey for compatibility with Magento 2.3.x versions @@ -135,4 +152,4 @@ - [multi] Do not delete virtual multi payment methods (\_\_vads\_multi\_Nx) to avoid errors when viewing orders paid with these methods. 2.0.0, 2016-03-10: -- New PayZen payment module for magento 2. +- New PayZen payment module for magento 2. \ No newline at end of file diff --git a/Controller/Adminhtml/Payment/Validate.php b/Controller/Adminhtml/Payment/Validate.php index 33a167fe..c1a286d1 100644 --- a/Controller/Adminhtml/Payment/Validate.php +++ b/Controller/Adminhtml/Payment/Validate.php @@ -17,14 +17,11 @@ class Validate extends \Magento\Backend\App\Action implements \Magento\Framework protected $dataHelper; /** - * * @var \Magento\Framework\Registry */ - protected $coreRegistry; /** - * * @var \Magento\Framework\View\Result\PageFactory */ protected $resultPageFactory; diff --git a/Controller/Customer/AbstractAction.php b/Controller/Customer/AbstractAction.php new file mode 100644 index 00000000..19e80045 --- /dev/null +++ b/Controller/Customer/AbstractAction.php @@ -0,0 +1,52 @@ +customerSession = $customerSession; + } + + /** + * Dispatch request + * + * @param RequestInterface $request + * @return ResponseInterface + * @throws NotFoundException + */ + public function dispatch(RequestInterface $request) + { + if (! $this->customerSession->authenticate()) { + $this->_actionFlag->set('', 'no-dispatch', true); + } + + return parent::dispatch($request); + } +} diff --git a/Controller/Customer/Cancel.php b/Controller/Customer/Cancel.php new file mode 100644 index 00000000..88b7e93a --- /dev/null +++ b/Controller/Customer/Cancel.php @@ -0,0 +1,59 @@ +paymentHelper = $paymentHelper; + + parent::__construct($context, $customerSession); + } + + public function execute() + { + // Clear all messages in session. + $this->messageManager->getMessages(true); + + $customerId = $this->customerSession->getCustomer()->getId(); + $attribute = $this->getRequest()->getPost('alias_attr', false); + $maskedAttribute = $this->getRequest()->getPost('pm_attr', false); + + if ($customerId && $attribute && $maskedAttribute) { + if ($this->paymentHelper->deleteIdentifier($customerId, $attribute, $maskedAttribute)) { + $this->messageManager->addSuccessMessage(__('The stored means of payment was successfully deleted.')); + } else { + $this->messageManager->addErrorMessage(__('The stored means of payment could not be deleted.')); + } + } + + /** @var \Magento\Framework\Controller\Result\Redirect $resultRedirect */ + $resultRedirect = $this->resultRedirectFactory->create(); + $resultRedirect->setPath('*/*/index', ['_secure' => true]); + return $resultRedirect; + } +} diff --git a/Controller/Customer/Index.php b/Controller/Customer/Index.php new file mode 100644 index 00000000..8ebfeb3c --- /dev/null +++ b/Controller/Customer/Index.php @@ -0,0 +1,42 @@ +resultPageFactory = $resultPageFactory; + + parent::__construct($context, $customerSession); + } + + public function execute() + { + return $this->resultPageFactory->create(); + } +} diff --git a/Controller/Payment/Check.php b/Controller/Payment/Check.php index 5e2fccb9..a23b051c 100644 --- a/Controller/Payment/Check.php +++ b/Controller/Payment/Check.php @@ -12,19 +12,16 @@ class Check extends \Magento\Framework\App\Action\Action { /** - * * @var \Lyranetwork\Payzen\Controller\Processor\CheckProcessor */ protected $checkProcessor; /** - * * @var \Magento\Framework\Controller\Result\RawFactory */ protected $rawResultFactory; /** - * * @param \Magento\Framework\App\Action\Context $context * @param \Lyranetwork\Payzen\Controller\Processor\CheckProcessor $checkProcessor * @param \Magento\Framework\Controller\Result\RawFactory $rawResultFactory diff --git a/Controller/Payment/Iframe/Loader.php b/Controller/Payment/Iframe/Loader.php index 04a73978..1ee75876 100644 --- a/Controller/Payment/Iframe/Loader.php +++ b/Controller/Payment/Iframe/Loader.php @@ -12,13 +12,11 @@ class Loader extends \Magento\Framework\App\Action\Action { /** - * * @var \Magento\Framework\View\Result\PageFactory */ protected $resultPageFactory; /** - * * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory * @param \Magento\Sales\Model\OrderFactory $orderFactory diff --git a/Controller/Payment/Redirect.php b/Controller/Payment/Redirect.php index fe16e273..cf0e982a 100644 --- a/Controller/Payment/Redirect.php +++ b/Controller/Payment/Redirect.php @@ -14,31 +14,26 @@ class Redirect extends \Magento\Framework\App\Action\Action { /** - * * @var \Magento\Sales\Model\OrderFactory */ protected $orderFactory; /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @var \Lyranetwork\Payzen\Controller\Processor\RedirectProcessor */ protected $redirectProcessor; /** - * * @var \Magento\Framework\View\Result\PageFactory */ protected $resultPageFactory; /** - * * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Sales\Model\OrderFactory $orderFactory * @param \Lyranetwork\Payzen\Controller\Processor\RedirectProcessor $redirectProcessor @@ -77,7 +72,6 @@ public function execute() private function getAndCheckOrder() { /** - * * @var Magento\Checkout\Model\Session $checkout */ $checkout = $this->dataHelper->getCheckout(); diff --git a/Controller/Payment/Response.php b/Controller/Payment/Response.php index 7b035eb5..7d3611ac 100644 --- a/Controller/Payment/Response.php +++ b/Controller/Payment/Response.php @@ -14,31 +14,26 @@ class Response extends \Magento\Framework\App\Action\Action { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @var \Magento\Quote\Api\CartRepositoryInterface */ protected $quoteRepository; /** - * * @var \Lyranetwork\Payzen\Controller\Processor\ResponseProcessor */ protected $responseProcessor; /** - * * @var \Magento\Framework\View\Result\PageFactory */ protected $resultPageFactory; /** - * * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Quote\Api\CartRepositoryInterface $quoteRepository * @param \Lyranetwork\Payzen\Controller\Processor\ResponseProcessor $responseProcessor @@ -114,7 +109,6 @@ protected function redirectError($order = null) protected function redirectResponse($order, $case, $checkUrlWarn = false) { /** - * * @var Magento\Checkout\Model\Session $checkout */ $checkout = $this->dataHelper->getCheckout(); @@ -132,7 +126,7 @@ protected function redirectResponse($order, $case, $checkUrlWarn = false) } if ($checkUrlWarn) { - // Order not validated by notification URL. In TEST mode, user is webmaster + // Order not validated by notification URL. In TEST mode, user is webmaster. // So display a warning about notification URL not working. if ($this->dataHelper->isMaintenanceMode()) { @@ -191,7 +185,6 @@ private function createResult($path, $params) return null; } else { /** - * * @var \Magento\Framework\Controller\Result\Redirect $result */ $result = $this->resultRedirectFactory->create(); diff --git a/Controller/Payment/Rest/Check.php b/Controller/Payment/Rest/Check.php index 5be8d22b..3467f9e6 100644 --- a/Controller/Payment/Rest/Check.php +++ b/Controller/Payment/Rest/Check.php @@ -15,19 +15,16 @@ class Check extends \Lyranetwork\Payzen\Controller\Payment\Check { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @var \Magento\Store\Model\StoreManagerInterface */ protected $storeManager; /** - * * @var \Magento\Sales\Model\OrderFactory */ protected $orderFactory; @@ -38,25 +35,21 @@ class Check extends \Lyranetwork\Payzen\Controller\Payment\Check protected $quoteManagement; /** - * * @var \Magento\Quote\Api\CartRepositoryInterface */ protected $quoteRepository; /** - * * @var \Lyranetwork\Payzen\Model\Api\PayzenResponseFactory */ protected $payzenResponseFactory; /** - * * @var \Lyranetwork\Payzen\Helper\Rest */ protected $restHelper; /** - * * @param \Magento\Framework\App\Action\Context $context * @param \Lyranetwork\Payzen\Controller\Processor\CheckProcessor $checkProcessor * @param \Magento\Framework\Controller\Result\RawFactory $rawResultFactory @@ -94,7 +87,7 @@ protected function prepareResponse($params) $answer = json_decode($params['kr-answer'], true); if (! is_array($answer)) { $this->dataHelper->log('Invalid response received. Content: ' . json_encode($params), \Psr\Log\LogLevel::ERROR); - throw new ResponseException('KO-Invalid IPN request received.'."\n".''); + throw new ResponseException('KO-Invalid IPN request received.' . "\n" . ''); } // Wrap payment result to use traditional order creation tunnel. @@ -118,6 +111,13 @@ protected function prepareResponse($params) throw new ResponseException($response->getOutputForGateway('order_not_found')); } + // Disable quote. + if ($quote->getIsActive()) { + $quote->setIsActive(false); + $this->quoteRepository->save($quote); + $this->dataHelper->log("Cleared quote, reserved order ID: #{$quote->getReservedOrderId()}."); + } + // Case of failure or expiration when retries are enabled, do nothing before last attempt. if (! $response->isAcceptedPayment() && ($answer['orderCycle'] !== 'CLOSED')) { $this->dataHelper->log("Payment is not accepted but buyer can try to re-order. Do not create order at this time. diff --git a/Controller/Payment/Rest/Response.php b/Controller/Payment/Rest/Response.php index 94e5d90a..c5a31dcb 100644 --- a/Controller/Payment/Rest/Response.php +++ b/Controller/Payment/Rest/Response.php @@ -15,19 +15,16 @@ class Response extends \Lyranetwork\Payzen\Controller\Payment\Response { /** - * * @var \Magento\Sales\Model\OrderFactory */ protected $orderFactory; /** - * * @var \Lyranetwork\Payzen\Model\Api\PayzenResponseFactory */ protected $payzenResponseFactory; /** - * * @var \Lyranetwork\Payzen\Helper\Rest */ protected $restHelper; @@ -38,7 +35,6 @@ class Response extends \Lyranetwork\Payzen\Controller\Payment\Response protected $quoteManagement; /** - * * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Quote\Api\CartRepositoryInterface $quoteRepository * @param \Lyranetwork\Payzen\Controller\Processor\ResponseProcessor $responseProcessor @@ -104,6 +100,13 @@ protected function prepareResponse($params) throw new ResponseException("Quote #{$quoteId} not found in database."); } + // Disable quote. + if ($quote->getIsActive()) { + $quote->setIsActive(false); + $this->quoteRepository->save($quote); + $this->dataHelper->log("Cleared quote, reserved order ID: #{$quote->getReservedOrderId()}."); + } + // Token is created before order creation, search order by quote. $order = $this->orderFactory->create(); $order->loadByIncrementId($quote->getReservedOrderId()); diff --git a/Controller/Payment/Rest/Token.php b/Controller/Payment/Rest/Token.php index 8b664347..23273779 100644 --- a/Controller/Payment/Rest/Token.php +++ b/Controller/Payment/Rest/Token.php @@ -54,7 +54,6 @@ class Token extends \Magento\Framework\App\Action\Action protected $resultJsonFactory; /** - * * @param \Magento\Framework\App\Action\Context $context * @param \Magento\Framework\Data\Form\FormKey\Validator $formKeyValidator, * @param \Magento\CheckoutAgreements\Model\AgreementsValidator $agreementsValidator diff --git a/Controller/Plugin/CsrfValidator.php b/Controller/Plugin/CsrfValidator.php index 32abf7da..8acf9e97 100644 --- a/Controller/Plugin/CsrfValidator.php +++ b/Controller/Plugin/CsrfValidator.php @@ -9,13 +9,12 @@ */ namespace Lyranetwork\Payzen\Controller\Plugin; -/* +/** * Class: CsrfValidator * * Bypass CSRF check for return and IPN URLs to avoid Form Key validation errors. Signature verification is used to check data integrity. * To insure backwards compatibility, CsrfAwareActionInterface cannot be used. */ - class CsrfValidator { /** diff --git a/Controller/Processor/CheckProcessor.php b/Controller/Processor/CheckProcessor.php index 88f636f7..463dbb88 100644 --- a/Controller/Processor/CheckProcessor.php +++ b/Controller/Processor/CheckProcessor.php @@ -15,43 +15,36 @@ class CheckProcessor { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @var \Lyranetwork\Payzen\Helper\Payment */ protected $paymentHelper; /** - * * @var \Magento\Store\Model\StoreManagerInterface */ protected $storeManager; /** - * * @var \Magento\Store\Model\App\Emulation */ protected $emulation; /** - * * @var \Magento\Sales\Model\OrderFactory */ protected $orderFactory; /** - * * @var \Lyranetwork\Payzen\Model\Api\PayzenResponseFactory */ protected $payzenResponseFactory; /** - * * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Magento\Store\Model\App\Emulation $emulation * @param \Lyranetwork\Payzen\Helper\Data $dataHelper @@ -118,7 +111,6 @@ public function execute( } } else { // Payment already processed. - $acceptedStatus = $this->dataHelper->getCommonConfigData('registered_order_status', $order->getStore()->getId()); $successStatuses = [ $acceptedStatus, diff --git a/Controller/Processor/RedirectProcessor.php b/Controller/Processor/RedirectProcessor.php index db07730d..567cba4b 100644 --- a/Controller/Processor/RedirectProcessor.php +++ b/Controller/Processor/RedirectProcessor.php @@ -12,19 +12,16 @@ class RedirectProcessor { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @var \Magento\Framework\Registry */ protected $coreRegistry; /** - * * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param \Magento\Framework\Registry $coreRegistry */ diff --git a/Controller/Processor/ResponseProcessor.php b/Controller/Processor/ResponseProcessor.php index 88a88f0e..743e376d 100644 --- a/Controller/Processor/ResponseProcessor.php +++ b/Controller/Processor/ResponseProcessor.php @@ -15,31 +15,26 @@ class ResponseProcessor { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @var \Lyranetwork\Payzen\Helper\Payment */ protected $paymentHelper; /** - * * @var \Magento\Sales\Model\OrderFactory */ protected $orderFactory; /** - * * @var \Lyranetwork\Payzen\Model\Api\PayzenResponseFactory */ protected $payzenResponseFactory; /** - * * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param \Lyranetwork\Payzen\Helper\Payment $paymentHelper * @param \Magento\Sales\Model\OrderFactory $orderFactory diff --git a/Helper/Checkout.php b/Helper/Checkout.php index 0178e2df..2d41ec0b 100644 --- a/Helper/Checkout.php +++ b/Helper/Checkout.php @@ -21,49 +21,60 @@ class Checkout const PRODUCT_REF_REGEX = '#^[a-zA-Z0-9]{1,64}$#'; /** - * * @var \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory */ protected $productCollectionFactory; /** - * * @var \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory */ protected $customerCollectionFactory; /** - * * @var \Magento\Catalog\Model\CategoryRepository */ protected $categoryRepository; /** - * * @var \Magento\Eav\Model\Config */ protected $eavConfig; /** - * * @var \Magento\Store\Model\StoreManagerInterface */ protected $storeManager; /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * + * @var \Magento\Shipping\Model\Config + */ + protected $shippingConfig; + + /** + * @var \Magento\Framework\Stdlib\CookieManagerInterface + */ + protected $cookieManager; + + /** + * @var \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory + */ + protected $cookieMetadataFactory; + + /** * @param \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory * @param \Magento\Customer\Model\ResourceModel\Customer\CollectionFactory $customerCollectionFactory * @param \Magento\Catalog\Model\CategoryRepository $categoryRepository * @param \Magento\Eav\Model\Config $eavConfig * @param \Magento\Store\Model\StoreManagerInterface $storeManager * @param \Lyranetwork\Payzen\Helper\Data $dataHelper + * @param \Magento\Shipping\Model\Config $shippingConfig + * @param \Magento\Framework\Stdlib\CookieManagerInterface $cookieManager + * @param \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory $cookieMetadataFactory */ public function __construct( \Magento\Catalog\Model\ResourceModel\Product\CollectionFactory $productCollectionFactory, @@ -71,7 +82,10 @@ public function __construct( \Magento\Catalog\Model\CategoryRepository $categoryRepository, \Magento\Eav\Model\Config $eavConfig, \Magento\Store\Model\StoreManagerInterface $storeManager, - \Lyranetwork\Payzen\Helper\Data $dataHelper + \Lyranetwork\Payzen\Helper\Data $dataHelper, + \Magento\Shipping\Model\Config $shippingConfig, + \Magento\Framework\Stdlib\CookieManagerInterface $cookieManager, + \Magento\Framework\Stdlib\Cookie\CookieMetadataFactory $cookieMetadataFactory ) { $this->productCollectionFactory = $productCollectionFactory; $this->customerCollectionFactory = $customerCollectionFactory; @@ -79,18 +93,9 @@ public function __construct( $this->eavConfig = $eavConfig; $this->storeManager = $storeManager; $this->dataHelper = $dataHelper; - } - - /** - * Normalize shipping method name. - * - * @param string $name - * @return string normalized name - */ - public function cleanShippingMethod($name) - { - $notAllowed = "#[^A-ZÇ0-9ÁÀÂÄÉÈÊËÍÌÎÏÓÒÔÖÚÙÛÜÇ /'-]#ui"; - return preg_replace($notAllowed, '', $name); + $this->shippingConfig = $shippingConfig; + $this->cookieManager = $cookieManager; + $this->cookieMetadataFactory = $cookieMetadataFactory; } public function checkCustormers($scope, $scopeId) @@ -311,65 +316,74 @@ public function setOneyData($order, &$payzenRequest) $payzenRequest->set('cust_status', 'PRIVATE'); $payzenRequest->set('ship_to_status', 'PRIVATE'); - $notAllowedCharsRegex = "#[^A-Z0-9ÁÀÂÄÉÈÊËÍÌÎÏÓÒÔÖÚÙÛÜÇ /'-]#ui"; - - if ($order->getIsVirtual() || ! $order->getShippingMethod()) { - // There is no shipping mean set store name after illegal characters replacement. - - $storeId = $this->dataHelper->getCheckoutStoreId(); - $payzenRequest->set( - 'ship_to_delivery_company_name', - preg_replace($notAllowedCharsRegex, ' ', $this->dataHelper->getStore($storeId)->getFrontendName()) - ); - + if ($order->getIsVirtual() || ! $order->getShippingMethod()) { // There is no shipping method. $payzenRequest->set('ship_to_type', 'ETICKET'); $payzenRequest->set('ship_to_speed', 'EXPRESS'); } else { $shippingMethod = $this->toOneyCarrier($order->getShippingMethod()); + $storeId = $this->dataHelper->getCheckoutStoreId(); + $carriers = $this->shippingConfig->getAllCarriers($storeId); + $carrierCode = substr($shippingMethod['code'], 0, strpos($shippingMethod['code'], '_')); + $carrierName = $carriers[$carrierCode]->getConfigData('title'); + + // Delivery point name. + $name = ''; switch ($shippingMethod['type']) { case 'RECLAIM_IN_SHOP': case 'RELAY_POINT': + $name = $order->getShippingDescription(); + + if ($carrierName) { + $name = str_replace($carrierName . ' - ', '', $name); + } + + if (strpos($name, '<')) { + $name = substr($name, 0, strpos($name, '<')); // Remove html elements. + } + + // Break intentionally omitted. case 'RECLAIM_IN_STATION': // It's recommended to put a specific logic here. - - $address = ''; // Initialize with selected SHOP/RELAY POINT/STATION name. - $address .= $order->getShippingAddress()->getStreet(1); - $address .= $order->getShippingAddress()->getStreet(2) ? ' ' . - $order->getShippingAddress()->getStreet(2) : ''; + $address = $order->getShippingAddress()->getStreetLine(1); + $address .= $order->getShippingAddress()->getStreetLine(2) ? ' ' . + $order->getShippingAddress()->getStreetLine(2) : ''; $payzenRequest->set('ship_to_street', $address); $payzenRequest->set('ship_to_zip', $order->getShippingAddress()->getPostcode()); $payzenRequest->set('ship_to_city', $order->getShippingAddress()->getCity()); - $payzenRequest->set('ship_to_country', 'FR'); - $payzenRequest->set('ship_to_street2', null); // Not sent to FacilyPay Oney. - $payzenRequest->set('ship_to_state', null); - $payzenRequest->set('ship_to_phone_num', null); - // Add postcode and city to send them in ship_to_delivery_company_name. - $address .= ' ' . $order->getShippingAddress()->getPostcode(); - $address .= ' ' . $order->getShippingAddress()->getCity(); + $street2 = ($shippingMethod['type'] == 'RELAY_POINT') ? $name : null; + $payzenRequest->set('ship_to_street2', $street2); + $payzenRequest->set('ship_to_state', null); - // Delete not allowed chars. - $address = preg_replace($notAllowedCharsRegex, ' ', $address); - $method = $shippingMethod['oney_label'] . ' ' . $address; + $method = $carrierName . ' ' . $address; $payzenRequest->set('ship_to_delivery_company_name', $method); break; + default: $address = ''; - $address .= $order->getShippingAddress()->getStreet(1); - $address .= $order->getShippingAddress()->getStreet(2) ? ' ' . - $order->getShippingAddress()->getStreet(2) : ''; + $address .= $order->getShippingAddress()->getStreetLine(1); + $address .= $order->getShippingAddress()->getStreetLine(2) ? ' ' . + $order->getShippingAddress()->getStreetLine(2) : ''; $payzenRequest->set('ship_to_street', $address); - $payzenRequest->set('ship_to_street2', null); // Not sent to FacilyPay Oney. + $payzenRequest->set('ship_to_street2', null); // Not sent to Oney. - $payzenRequest->set('ship_to_delivery_company_name', $shippingMethod['oney_label']); + $payzenRequest->set('ship_to_delivery_company_name', $carrierName); break; } + // Send FR even if address is in DOM-TOM, otherwise form is rejected. + $payzenRequest->set('cust_country', 'FR'); + $payzenRequest->set('ship_to_country', 'FR'); + $payzenRequest->set('ship_to_type', $shippingMethod['type']); $payzenRequest->set('ship_to_speed', $shippingMethod['speed']); + + if ($shippingMethod['speed'] === 'PRIORITY') { + $payzenRequest->set('ship_to_delay', $shippingMethod['delay']); + } } } @@ -384,7 +398,7 @@ public function checkAddressValidity($address) $phoneRegex = "#^[0-9]{10}$#"; $cityRegex = "#^[A-Z0-9ÁÀÂÄÉÈÊËÍÌÎÏÓÒÔÖÚÙÛÜÇ/ '-]{1,127}$#ui"; $streetRegex = "#^[A-Z0-9ÁÀÂÄÉÈÊËÍÌÎÏÓÒÔÖÚÙÛÜÇ/ '.,-]{1,127}$#ui"; - $countryRegex = "#^FR$#i"; + $countryRegex = "#^FR|GP|MQ|GF|RE|YT$#i"; $zipRegex = "#^[0-9]{5}$#"; // Address type. @@ -393,8 +407,8 @@ public function checkAddressValidity($address) $this->checkFieldValidity($address->getLastname(), $nameRegex, 'Last Name', $addressType); $this->checkFieldValidity($address->getFirstname(), $nameRegex, 'First Name', $addressType); $this->checkFieldValidity($address->getTelephone(), $phoneRegex, 'Telephone', $addressType, false); - $this->checkFieldValidity($address->getStreet(1), $streetRegex, 'Address', $addressType); - $this->checkFieldValidity($address->getStreet(2), $streetRegex, 'Address', $addressType, false); + $this->checkFieldValidity($address->getStreetLine(1), $streetRegex, 'Address', $addressType); + $this->checkFieldValidity($address->getStreetLine(2), $streetRegex, 'Address', $addressType, false); $this->checkFieldValidity($address->getPostcode(), $zipRegex, 'Postcode', $addressType); $this->checkFieldValidity($address->getCity(), $cityRegex, 'City', $addressType); $this->checkFieldValidity($address->getCountryId(), $countryRegex, 'Country', $addressType); @@ -407,20 +421,60 @@ private function checkFieldValidity($field, $regex, $fieldName, $addressType, $m $emptyMsg = 'The field %1 of your %2 is mandatory.'; if ($mandatory && ! $field) { - $this->throwException($emptyMsg, $fieldName, $addressType); + $this->setErrorMsg($emptyMsg, $fieldName, $addressType); } if ($field && ! preg_match($regex, $field)) { - $this->throwException($invalidMsg, $fieldName, $addressType); + // Delete valid characters to retrieve invalid ones. + $replaceRegex = preg_replace("/{(.*?)}/", '', $regex); + $replaceRegex = str_replace(array('^', '$'), '', $replaceRegex); + $invalidChars = preg_replace($replaceRegex, '', $field); + + $arr = str_split($invalidChars); + $invalidChars = ''; + foreach ($arr as $char) { + $invalidChars .= '' . $char . ' '; + } + + $this->setErrorMsg($invalidMsg, $fieldName, $addressType, $invalidChars); } } - private function throwException($msg, $field, $addressType) + private function setErrorMsg($msg, $fieldName, $addressType, $invalidChars = null) { // Translate. - $field = __($field); + $fieldName = __($fieldName); $addressType = __($addressType); - throw new \Magento\Framework\Exception\LocalizedException(__($msg, $field, $addressType)); + $translated = __($msg, $fieldName, $addressType)->render(); + + if ($invalidChars) { + $translated .= '
' . __('The following characters: %1 are not allowed for this field.', $invalidChars)->render(); + } + + // Store error message in a cookie. + $metadata = $this->cookieMetadataFactory + ->createPublicCookieMetadata() + ->setPath('/'); + + $this->cookieManager->setPublicCookie( + 'payzen_oney_error', + $translated, + $metadata + ); + } + + public function clearErrorMsg() + { + if ($this->cookieManager->getCookie('payzen_oney_error')) { + $metadata = $this->cookieMetadataFactory->createPublicCookieMetadata() + ->setPath('/'); + + $this->cookieManager->setPublicCookie( + 'payzen_oney_error', + null, + $metadata + ); + } } } diff --git a/Helper/Data.php b/Helper/Data.php index 3857eebc..39c5634e 100644 --- a/Helper/Data.php +++ b/Helper/Data.php @@ -16,27 +16,23 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper { const METHOD_STANDARD = 'payzen_standard'; - const METHOD_MULTI = 'payzen_multi'; - const METHOD_CHOOZEO = 'payzen_choozeo'; - const METHOD_SEPA = 'payzen_sepa'; - const METHOD_GIFT = 'payzen_gift'; - const METHOD_ONEY = 'payzen_oney'; - const METHOD_PAYPAL = 'payzen_paypal'; - const METHOD_FULLCB = 'payzen_fullcb'; + const METHOD_FRANFINANCE = 'payzen_franfinance'; + const METHOD_OTHER = 'payzen_other'; - const METHOD_SOFORT = 'payzen_sofort'; - - const METHOD_POSTFINANCE = 'payzen_postfinance'; + const MODE_FORM = 1; + const MODE_LOCAL_TYPE = 2; + const MODE_IFRAME = 3; + const MODE_EMBEDDED = 4; + const MODE_POPIN = 5; /** - * * @var array a global var to easily enable/disable features */ public static $pluginFeatures = [ @@ -49,73 +45,75 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper 'multi' => true, 'gift' => true, 'choozeo' => false, + 'oney' => true, 'fullcb' => true, 'sepa' => true, - 'paypal' => true + 'paypal' => true, + 'franfinance' => true, + 'other' => true ]; /** - * * @var \Magento\Framework\ObjectManagerInterface */ protected $objectManager; /** - * * @var \Magento\Store\Model\StoreManagerInterface */ protected $storeManager; /** - * * @var \Magento\Framework\App\MaintenanceMode */ protected $maintenanceMode; /** - * * @var \Magento\Config\Model\ResourceModel\Config */ protected $resourceConfig; /** - * * @var \Magento\Framework\Filesystem */ protected $filesystem; /** - * * @var \Magento\Config\Model\Config\Structure */ protected $configStructure; /** - * * @var \Lyranetwork\Payzen\Model\Logger\Payzen */ protected $logger; /** - * * @var \Magento\Framework\App\State */ protected $appState; /** - * * @var \Zend\Http\PhpEnvironment\RemoteAddress */ protected $remoteAddress; /** - * * @var \Magento\Framework\Filesystem\Io\File */ protected $file; /** - * + * @var \Magento\Framework\View\Asset\Repository $assetRepo + */ + protected $assetRepo; + + /** + * @var \Magento\Payment\Helper\Data + */ + protected $paymentHelper; + + /** * @param \Lyranetwork\Payzen\Helper\Context $context * @param \Magento\Framework\ObjectManagerInterface $objectManager * @param \Magento\Store\Model\StoreManagerInterface $storeManager @@ -127,6 +125,8 @@ class Data extends \Magento\Framework\App\Helper\AbstractHelper * @param \Magento\Framework\App\State $appState * @param \Zend\Http\PhpEnvironment\RemoteAddress $remoteAddress * @param \Magento\Framework\Filesystem\Io\File $file + * @param \Magento\Framework\View\Asset\Repository $assetRepo + * @param \Magento\Payment\Helper\Data $paymentHelper */ public function __construct( \Lyranetwork\Payzen\Helper\Context $context, @@ -139,7 +139,9 @@ public function __construct( \Lyranetwork\Payzen\Model\Logger\Payzen $logger, \Magento\Framework\App\State $appState, \Zend\Http\PhpEnvironment\RemoteAddress $remoteAddress, - \Magento\Framework\Filesystem\Io\File $file + \Magento\Framework\Filesystem\Io\File $file, + \Magento\Framework\View\Asset\Repository $assetRepo, + \Magento\Payment\Helper\Data $paymentHelper ) { parent::__construct($context); @@ -153,6 +155,8 @@ public function __construct( $this->appState = $appState; $this->remoteAddress = $remoteAddress; $this->file = $file; + $this->assetRepo = $assetRepo; + $this->paymentHelper = $paymentHelper; } /** @@ -168,7 +172,8 @@ public function getCommonConfigData($field, $storeId = null) $storeId = $this->getCheckoutStoreId(); } - return $this->scopeConfig->getValue('payzen/general/' . $field, ScopeInterface::SCOPE_STORE, $storeId); + $value = $this->scopeConfig->getValue('payzen/general/' . $field, ScopeInterface::SCOPE_STORE, $storeId); + return is_string($value) ? trim($value) : $value; } /** @@ -363,6 +368,40 @@ public function getMultiPaymentModelConfig() return $connection->fetchAll($select); } + /** + * Add a model config parameter for each of given $options (other payment options). + * + * @param array[string][mixed] $options + */ + public function updateOtherPaymentModelConfig($options) + { + foreach ($options as $option) { + $this->resourceConfig->saveConfig( + 'payment/payzen_other_' . $option['means'] . '/model', + \Lyranetwork\Payzen\Model\Method\Other::class, + ScopeConfigInterface::SCOPE_TYPE_DEFAULT, + 0 + ); + } + } + + /** + * Get other payment method models. + * + * @return array[int] $options + */ + public function getOtherPaymentModelConfig() + { + // Retrieve DB connection. + $connection = $this->resourceConfig->getConnection(); + + $select = $connection->select() + ->from($this->resourceConfig->getMainTable()) + ->where('path LIKE ?', 'payment/payzen\_other\_%/model'); + + return $connection->fetchAll($select); + } + /** * Check if server has requirements to do WS operations. * @@ -394,7 +433,7 @@ public function unserialize($string) $result = json_decode($string, true); if (json_last_error() !== JSON_ERROR_NONE) { - // Magento 2.1.x: try PHP serialization + // Magento 2.1.x: try PHP serialization. $result = @unserialize($string); } @@ -439,4 +478,78 @@ private function getCallerMethod() return null; } + + /** + * Return logged in customer model data. + * @param \Magento\Customer\Model\Session + * + * @return int + */ + public function getCurrentCustomer($customerSession) + { + // Customer not logged in. + if (! $customerSession->isLoggedIn()) { + return false; + } + + // Customer has not gateway identifier. + $customer = $customerSession->getCustomer(); + if (! $customer || ! $customer->getId()) { + return false; + } + + return $customer->getDataModel(); + } + + /** + * Return card logo source path if exists, else return false. + * @param string $card + * @param boolean $cc + * + * @return string|boolean + */ + public function getCcTypeImageSrc($card, $cc = true) + { + if ($cc) { + $card = 'cc/' . strtolower($card) . '.png'; + } + + if ($this->isUploadFileImageExists($card)) { + return $this->storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . + 'payzen/images/' . $card; + } else { + $asset = $this->assetRepo->createAsset('Lyranetwork_Payzen::images/' . $card); + + if ($this->isPublishFileImageExists($asset->getRelativeSourceFilePath())) { + return $this->getViewFileUrl('Lyranetwork_Payzen::images/' . $card); + } + } + + return false; + } + + public function getViewFileUrl($fileId, array $params = []) + { + try { + return $this->assetRepo->getUrlWithParams($fileId, $params); + } catch (\Magento\Framework\Exception\LocalizedException $e) { + $this->logger->critical($e); + return $this->_getUrl('', [ + '_direct' => 'core/index/notFound' + ]); + } + } + + public function getMethodInstance($methodCode) + { + return $this->paymentHelper->getMethodInstance($methodCode); + } + + public function isOneClickActive() + { + $standardMethod = $this->getMethodInstance(\Lyranetwork\Payzen\Helper\Data::METHOD_STANDARD); + $sepaMethod = $this->getMethodInstance(\Lyranetwork\Payzen\Helper\Data::METHOD_SEPA); + + return $standardMethod->isOneClickActive() || $sepaMethod->isOneClickActive(); + } } diff --git a/Helper/Payment.php b/Helper/Payment.php index 04b2479e..933e0b51 100644 --- a/Helper/Payment.php +++ b/Helper/Payment.php @@ -15,6 +15,7 @@ class Payment { // Key to save if payment is by identifier. const IDENTIFIER = 'payzen_identifier'; + const SEPA_IDENTIFIER = 'payzen_identifier'; // Key to save choosen multi option. const MULTI_OPTION = 'payzen_multi_option'; @@ -28,6 +29,12 @@ class Payment // Key to save choosen Full CB option. const FULLCB_OPTION = 'payzen_fullcb_option'; + // Key to save choosen FranFinance option. + const FRANFINANCE_OPTION = 'payzen_franfinance_option'; + + // Key to save choosen other payment means. + const OTHER_OPTION = 'payzen_other_option'; + // Key to save risk control results. const RISK_CONTROL = 'payzen_risk_control'; @@ -44,58 +51,50 @@ class Payment const BRAND_USER_CHOICE = 'payzen_brand_user_choice'; - const ONECLICK_LOCATION_CART = 'CART'; - - const ONECLICK_LOCATION_PRODUCT = 'PRODUCT'; - - const ONECLICK_LOCATION_BOTH = 'BOTH'; - const SUCCESS = 1; const FAILURE = 2; const CANCEL = 3; /** - * * @var \Magento\Framework\Event\ManagerInterface */ protected $eventManager; /** - * * @var \Magento\Sales\Model\Order\Payment\Transaction\ManagerInterface */ protected $transactionManager; /** - * * @var \Magento\Sales\Api\TransactionRepositoryInterface */ protected $transactionRepository; /** - * * @var \Magento\Customer\Model\CustomerFactory */ protected $customerFactory; /** - * * @var \Magento\Customer\Model\ResourceModel\CustomerFactory */ protected $customerResourceFactory; /** - * * @var \Magento\Sales\Model\Order\Email\Sender\OrderSender */ protected $orderSender; /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; + /** + * @var \Lyranetwork\Payzen\Helper\Rest + */ + protected $restHelper; + /** * \Magento\Framework\DataObject\Factory */ @@ -112,7 +111,6 @@ class Payment protected $timezone; /** - * * @param \Magento\Framework\Event\ManagerInterface $eventManager * @param \Magento\Sales\Api\TransactionRepositoryInterface $transactionRepository * @param \Magento\Sales\Model\Order\Payment\Transaction\ManagerInterface $transactionManager @@ -120,6 +118,7 @@ class Payment * @param \Magento\Customer\Model\ResourceModel\CustomerFactory $customerResourceFactory * @param \Magento\Sales\Model\Order\Email\Sender\OrderSender $orderSender * @param \Lyranetwork\Payzen\Helper\Data $dataHelper + * @param \Lyranetwork\Payzen\Helper\Rest $restHelper * @param \Magento\Framework\DataObject\Factory $dataObjectFactory * @param \Magento\Sales\Model\Order\Config $orderConfig * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezone @@ -132,6 +131,7 @@ public function __construct( \Magento\Customer\Model\ResourceModel\CustomerFactory $customerResourceFactory, \Magento\Sales\Model\Order\Email\Sender\OrderSender $orderSender, \Lyranetwork\Payzen\Helper\Data $dataHelper, + \Lyranetwork\Payzen\Helper\Rest $restHelper, \Magento\Framework\DataObject\Factory $dataObjectFactory, \Magento\Sales\Model\Order\Config $orderConfig, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezone @@ -143,6 +143,7 @@ public function __construct( $this->customerResourceFactory = $customerResourceFactory; $this->orderSender = $orderSender; $this->dataHelper = $dataHelper; + $this->restHelper = $restHelper; $this->dataObjectFactory = $dataObjectFactory; $this->orderConfig = $orderConfig; $this->timezone = $timezone; @@ -404,15 +405,15 @@ public function updatePaymentInfo(\Magento\Sales\Model\Order $order, \Lyranetwor $date->setTimestamp(strtotime("+$delay days", $timestamp)); switch (true) { - case ($i == 1): // first transaction + case ($i == 1): // First transaction. $amount = $firstAmount; break; - case ($i == $count): // last transaction + case ($i == $count): // Last transaction. $amount = $totalAmount - $firstAmount - $installmentAmount * ($i - 2); break; - default: // others + default: // Others. $amount = $installmentAmount; break; } @@ -609,6 +610,81 @@ public function saveSepaIdentifier( } } + public function deleteIdentifier($customerId, $attribute, $maskedAttribute) + { + $customer = $this->customerFactory->create()->load($customerId); + $customerData = $customer->getDataModel(); + $customerData->setId($customerId); + + if (! $customerData->getCustomAttribute($attribute)) { + $this->dataHelper->log("Customer {$customer->getEmail()} doesn't have a saved {$attribute} attribute."); + return false; + } + + $identifier = $customerData->getCustomAttribute($attribute)->getValue(); + + try { + if ($this->restHelper->getPrivateKey()) { + $requestData = ['paymentMethodToken' => $identifier]; + + // Perform REST request to cancel identifier. + $client = new \Lyranetwork\Payzen\Model\Api\PayzenRest( + $this->dataHelper->getCommonConfigData('rest_url'), + $this->dataHelper->getCommonConfigData('site_id'), + $this->restHelper->getPrivateKey() + ); + + $cancelIdentifierResponse = $client->post('V4/Token/Cancel', json_encode($requestData)); + $this->restHelper->checkResult($cancelIdentifierResponse); + } else { + // Client has not configured private key in module backend. + $this->dataHelper->log("Identifier for customer {$customer->getEmail()} cannot be deleted on gateway: private key is not configured. Let's just delete it from Magento."); + } + + // Delete identifier from Magento. + $this->deleteIdentifierAttribute($customer, $attribute, $maskedAttribute); + + return true; + } catch (\Exception $e) { + $invalidIdentCodes = ['PSP_030', 'PSP_031', 'PSP_561', 'PSP_607']; + + if (in_array($e->getCode(), $invalidIdentCodes)) { + // The identifier is invalid or doesn't exist. + $this->dataHelper->log( + "Identifier for customer {$customer->getEmail()} is invalid or doesn't exist. Let's delete it from Magento", + \Psr\Log\LogLevel::WARNING + ); + + // Delete identifier from Magento. + $this->deleteIdentifierAttribute($customer, $attribute, $maskedAttribute); + + return true; + } else { + $this->dataHelper->log( + "Identifier for customer {$customer->getEmail()} couldn't be deleted on gateway. Error occurred: {$e->getMessage()}", + \Psr\Log\LogLevel::ERROR + ); + + return false; + } + } + } + + private function deleteIdentifierAttribute($customer, $attribute, $maskedAttribute) + { + $customerData = $customer->getDataModel(); + $customerData->setId($customer->getId()); + $customerData->setCustomAttribute($attribute, null); + $customerData->setCustomAttribute($maskedAttribute, null); + $customer->updateData($customerData); + + $customerResource = $this->customerResourceFactory->create(); + $customerResource->saveAttribute($customer, $attribute); + $customerResource->saveAttribute($customer, $maskedAttribute); + + $this->dataHelper->log("Identifier for customer {$customer->getEmail()} successfully deleted."); + } + private function maskPan($response) { $number = $response->get('card_number'); @@ -617,24 +693,23 @@ private function maskPan($response) $matches = []; if (preg_match('#^([A-Z]{2}[0-9]{2}[A-Z0-9]{10,30})(_[A-Z0-9]{8,11})?$#i', $number, $matches)) { // IBAN(_BIC). - $masked .= isset($matches[2]) ? str_replace('_', '', $matches[2]) . ' / ' : ''; // BIC + $masked .= isset($matches[2]) ? str_replace('_', '', $matches[2]) . ' / ' : ''; // BIC. $iban = $matches[1]; $masked .= substr($iban, 0, 4) . str_repeat('X', strlen($iban) - 8) . substr($iban, -4); } elseif (strlen($number) > 4) { - $masked = str_repeat('X', strlen($number) - 4) . substr($number, -4); + $masked .= str_repeat('X', strlen($number) - 4) . substr($number, -4); if ($response->get('expiry_month') && $response->get('expiry_year')) { // Format card expiration data. - $masked .= ' ('; + $masked .= ' - '; $masked .= str_pad($response->get('expiry_month'), 2, '0', STR_PAD_LEFT); $masked .= '/'; $masked .= $response->get('expiry_year'); - $masked .= ')'; } } - return $masked; + return $response->get('card_brand') . '|' . $masked; } public function createInvoice(\Magento\Sales\Model\Order $order) diff --git a/Helper/Payment/Data.php b/Helper/Payment/Data.php index 0046c0f9..b799645e 100644 --- a/Helper/Payment/Data.php +++ b/Helper/Payment/Data.php @@ -14,13 +14,12 @@ class Data extends \Magento\Payment\Helper\Data { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * Construct + * Construct. * * @param \Magento\Framework\App\Helper\Context $context * @param LayoutFactory $layoutFactory @@ -75,6 +74,21 @@ public function getPaymentMethods() ]; } + $payzenOtherTitle = $methods['payzen_other']['title']; // Get multi payment general title. + unset($methods['payzen_other']); + + // Add other payment virtual methods to the list. + foreach ($this->dataHelper->getOtherPaymentModelConfig() as $config) { + $code = substr($config['path'], strlen('payment/'), - strlen('/model')); + $means = substr($code, strlen('payzen_other_')); + + $methods[$code] = [ + 'model' => $config['value'], + 'title' => $payzenOtherTitle . " ($means)", + 'group' => 'payzen' + ]; + } + return $methods; } } diff --git a/Helper/Rest.php b/Helper/Rest.php index ed8cbe7c..e2391d41 100644 --- a/Helper/Rest.php +++ b/Helper/Rest.php @@ -14,43 +14,36 @@ class Rest { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * - * @var \Lyranetwork\Payzen\Model\Method\Payzen - */ - protected $method; - - /** - * * @param \Lyranetwork\Payzen\Helper\Data $dataHelper - * @param \Magento\Payment\Helper\Data $magentoPaymentHelper */ public function __construct( - \Lyranetwork\Payzen\Helper\Data $dataHelper, - \Magento\Payment\Helper\Data $magentoPaymentHelper + \Lyranetwork\Payzen\Helper\Data $dataHelper ) { $this->dataHelper = $dataHelper; - $this->method = $magentoPaymentHelper->getMethodInstance(\Lyranetwork\Payzen\Helper\Data::METHOD_STANDARD); } - public function convertRestResult($answer) + public function convertRestResult($answer, $isTransaction = false) { - if (!is_array($answer) || empty($answer)) { + if (! is_array($answer) || empty($answer)) { return []; } - $transactions = $this->getProperty($answer, 'transactions'); + if ($isTransaction) { + $transaction = $answer; + } else { + $transactions = $this->getProperty($answer, 'transactions'); - if (! is_array($transactions) || empty($transactions)) { - return []; - } + if (! is_array($transactions) || empty($transactions)) { + return []; + } - $transaction = $transactions[0]; + $transaction = $transactions[0]; + } $response = []; @@ -67,8 +60,12 @@ public function convertRestResult($answer) $response['vads_effective_creation_date'] = $this->getProperty($transaction, 'creationDate'); $response['vads_payment_config'] = 'SINGLE'; // Only single payments are possible via REST API at this time. - if (($customer = $this->getProperty($answer, 'customer')) && ($billingDetails = $this->getProperty($customer, 'billingDetails'))) { - $response['vads_language'] = $this->getProperty($billingDetails, 'language'); + if (($customer = $this->getProperty($answer, 'customer'))) { + $response['vads_cust_email'] = $this->getProperty($customer, 'email'); + + if ($billingDetails = $this->getProperty($customer, 'billingDetails')) { + $response['vads_language'] = $this->getProperty($billingDetails, 'language'); + } } $response['vads_amount'] = $this->getProperty($transaction, 'amount'); @@ -86,8 +83,18 @@ public function convertRestResult($answer) if ($transactionDetails = $this->getProperty($transaction, 'transactionDetails')) { $response['vads_sequence_number'] = $this->getProperty($transactionDetails, 'sequenceNumber'); - $response['vads_effective_amount'] = $this->getProperty($transactionDetails, 'effectiveAmount'); - $response['vads_effective_currency'] = PayzenApi::getCurrencyNumCode($this->getProperty($transactionDetails, 'effectiveCurrency')); + + // Workarround to adapt to REST API behavior. + $effectiveAmount = $this->getProperty($transactionDetails, 'effectiveAmount'); + $effectiveCurrency = PayzenApi::getCurrencyNumCode($this->getProperty($transactionDetails, 'effectiveCurrency')); + + if ($effectiveAmount && $effectiveCurrency) { + $response['vads_effective_amount'] = $response['vads_amount']; + $response['vads_effective_currency'] = $response['vads_currency']; + $response['vads_amount'] = $effectiveAmount; + $response['vads_currency'] = $effectiveCurrency; + } + $response['vads_warranty_result'] = $this->getProperty($transactionDetails, 'liabilityShift'); if ($cardDetails = $this->getProperty($transactionDetails, 'cardDetails')) { @@ -150,6 +157,24 @@ private function getErrorMessage($transaction) } } + public function checkResult($response, $expectedStatuses = array()) + { + $answer = $response['answer']; + + if ($response['status'] !== 'SUCCESS') { + $msg = $answer['errorMessage'] . ' (' . $answer['errorCode'] . ').'; + if (isset($answer['detailedErrorMessage']) && ! empty($answer['detailedErrorMessage'])) { + $msg .= ' Detailed message: ' . $answer['detailedErrorMessage'] .' (' . $answer['detailedErrorCode'] . ').'; + } + + throw new \Exception($msg); + } elseif (! empty($expectedStatuses) && ! in_array($answer['detailedStatus'], $expectedStatuses)) { + throw new \UnexpectedValueException( + "Unexpected transaction status returned ({$answer['detailedStatus']})." + ); + } + } + private function getProperty($restResult, $key) { if (isset($restResult[$key])) { @@ -193,7 +218,7 @@ public function getReturnKey($storeId = null) $ctxMode = $this->dataHelper->getCommonConfigData('ctx_mode', $storeId); $field = ($ctxMode === 'TEST') ? 'rest_return_key_test' : 'rest_return_key_prod'; - return $this->method->getConfigData($field, $storeId); + return $this->dataHelper->getCommonConfigData($field, $storeId); } /** @@ -206,6 +231,49 @@ public function getPrivateKey($storeId = null) $ctxMode = $this->dataHelper->getCommonConfigData('ctx_mode', $storeId); $field = ($ctxMode === 'TEST') ? 'rest_private_key_test' : 'rest_private_key_prod'; - return $this->method->getConfigData($field, $storeId); + return $this->dataHelper->getCommonConfigData($field, $storeId); + } + + public function checkIdentifier($identifier, $customerEmail) + { + try { + $requestData = [ + 'paymentMethodToken' => $identifier + ]; + + // Perform REST request to check identifier. + $client = new \Lyranetwork\Payzen\Model\Api\PayzenRest( + $this->dataHelper->getCommonConfigData('rest_url'), + $this->dataHelper->getCommonConfigData('site_id'), + $this->getPrivateKey() + ); + + $checkIdentifierResponse = $client->post('V4/Token/Get', json_encode($requestData)); + $this->checkResult($checkIdentifierResponse); + + $cancellationDate = $this->getProperty($checkIdentifierResponse['answer'], 'cancellationDate'); + if ($cancellationDate && (strtotime($cancellationDate) <= time())) { + $this->dataHelper->log( + "Saved identifier for customer {$customerEmail} is expired on payment gateway in date of: {$cancellationDate}.", + \Psr\Log\LogLevel::WARNING + ); + return false; + } + + return true; + } catch (\Exception $e) { + $invalidIdentCodes = ['PSP_030', 'PSP_031', 'PSP_561', 'PSP_607']; + + if (in_array($e->getCode(), $invalidIdentCodes)) { + // The identifier is invalid or doesn't exist. + $this->dataHelper->log( + "Identifier for customer {$customerEmail} is invalid or doesn't exist: {$e->getMessage()}.", + \Psr\Log\LogLevel::WARNING + ); + return false; + } else { + throw $e; + } + } } } diff --git a/Model/Api/PayzenRest.php b/Model/Api/PayzenRest.php index f087ba6b..cc8c40cd 100644 --- a/Model/Api/PayzenRest.php +++ b/Model/Api/PayzenRest.php @@ -7,7 +7,6 @@ * @copyright Lyra Network * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ - namespace Lyranetwork\Payzen\Model\Api; diff --git a/Model/Api/Ws/AuthenticationRequestData.php b/Model/Api/Ws/AuthenticationRequestData.php deleted file mode 100644 index 60cf6d31..00000000 --- a/Model/Api/Ws/AuthenticationRequestData.php +++ /dev/null @@ -1,153 +0,0 @@ -threeDSAcctId; - } - - /** - * @param string $threeDSAcctId - * @return AuthenticationRequestData - */ - public function setThreeDSAcctId($threeDSAcctId) - { - $this->threeDSAcctId = $threeDSAcctId; - return $this; - } - - /** - * @return string - */ - public function getThreeDSAcsUrl() - { - return $this->threeDSAcsUrl; - } - - /** - * @param string $threeDSAcsUrl - * @return AuthenticationRequestData - */ - public function setThreeDSAcsUrl($threeDSAcsUrl) - { - $this->threeDSAcsUrl = $threeDSAcsUrl; - return $this; - } - - /** - * @return string - */ - public function getThreeDSBrand() - { - return $this->threeDSBrand; - } - - /** - * @param string $threeDSBrand - * @return AuthenticationRequestData - */ - public function setThreeDSBrand($threeDSBrand) - { - $this->threeDSBrand = $threeDSBrand; - return $this; - } - - /** - * @return string - */ - public function getThreeDSEncodedPareq() - { - return $this->threeDSEncodedPareq; - } - - /** - * @param string $threeDSEncodedPareq - * @return AuthenticationRequestData - */ - public function setThreeDSEncodedPareq($threeDSEncodedPareq) - { - $this->threeDSEncodedPareq = $threeDSEncodedPareq; - return $this; - } - - /** - * @return string - */ - public function getThreeDSEnrolled() - { - return $this->threeDSEnrolled; - } - - /** - * @param string $threeDSEnrolled - * @return AuthenticationRequestData - */ - public function setThreeDSEnrolled($threeDSEnrolled) - { - $this->threeDSEnrolled = $threeDSEnrolled; - return $this; - } - - /** - * @return string - */ - public function getThreeDSRequestId() - { - return $this->threeDSRequestId; - } - - /** - * @param string $threeDSRequestId - * @return AuthenticationRequestData - */ - public function setThreeDSRequestId($threeDSRequestId) - { - $this->threeDSRequestId = $threeDSRequestId; - return $this; - } -} diff --git a/Model/Api/Ws/AuthenticationResultData.php b/Model/Api/Ws/AuthenticationResultData.php deleted file mode 100644 index f5c647a7..00000000 --- a/Model/Api/Ws/AuthenticationResultData.php +++ /dev/null @@ -1,222 +0,0 @@ -brand; - } - - /** - * @param string $brand - * @return AuthenticationResultData - */ - public function setBrand($brand) - { - $this->brand = $brand; - return $this; - } - - /** - * @return string - */ - public function getEnrolled() - { - return $this->enrolled; - } - - /** - * @param string $enrolled - * @return AuthenticationResultData - */ - public function setEnrolled($enrolled) - { - $this->enrolled = $enrolled; - return $this; - } - - /** - * @return string - */ - public function getStatus() - { - return $this->status; - } - - /** - * @param string $status - * @return AuthenticationResultData - */ - public function setStatus($status) - { - $this->status = $status; - return $this; - } - - /** - * @return string - */ - public function getEci() - { - return $this->eci; - } - - /** - * @param string $eci - * @return AuthenticationResultData - */ - public function setEci($eci) - { - $this->eci = $eci; - return $this; - } - - /** - * @return string - */ - public function getXid() - { - return $this->xid; - } - - /** - * @param string $xid - * @return AuthenticationResultData - */ - public function setXid($xid) - { - $this->xid = $xid; - return $this; - } - - /** - * @return string - */ - public function getCavv() - { - return $this->cavv; - } - - /** - * @param string $cavv - * @return AuthenticationResultData - */ - public function setCavv($cavv) - { - $this->cavv = $cavv; - return $this; - } - - /** - * @return string - */ - public function getCavvAlgorithm() - { - return $this->cavvAlgorithm; - } - - /** - * @param string $cavvAlgorithm - * @return AuthenticationResultData - */ - public function setCavvAlgorithm($cavvAlgorithm) - { - $this->cavvAlgorithm = $cavvAlgorithm; - return $this; - } - - /** - * @return string - */ - public function getSignValid() - { - return $this->signValid; - } - - /** - * @param string $signValid - * @return AuthenticationResultData - */ - public function setSignValid($signValid) - { - $this->signValid = $signValid; - return $this; - } - - /** - * @return string - */ - public function getTransactionCondition() - { - return $this->transactionCondition; - } - - /** - * @param string $transactionCondition - * @return AuthenticationResultData - */ - public function setTransactionCondition($transactionCondition) - { - $this->transactionCondition = $transactionCondition; - return $this; - } -} diff --git a/Model/Api/Ws/AuthorizationResponse.php b/Model/Api/Ws/AuthorizationResponse.php deleted file mode 100644 index b7caecb7..00000000 --- a/Model/Api/Ws/AuthorizationResponse.php +++ /dev/null @@ -1,188 +0,0 @@ -mode; - } - - /** - * @param string $mode - * @return AuthorizationResponse - */ - public function setMode($mode) - { - $this->mode = $mode; - return $this; - } - - /** - * @return int - */ - public function getAmount() - { - return $this->amount; - } - - /** - * @param int $amount - * @return AuthorizationResponse - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return AuthorizationResponse - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * @return \DateTime - */ - public function getDate() - { - if ($this->date == null) { - return null; - } else { - try { - return new \DateTime($this->date); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $date - * @return AuthorizationResponse - */ - public function setDate(\DateTime $date = null) - { - if ($date == null) { - $this->date = null; - } else { - $this->date = $date->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return string - */ - public function getNumber() - { - return $this->number; - } - - /** - * @param string $number - * @return AuthorizationResponse - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * @return int - */ - public function getResult() - { - return $this->result; - } - - /** - * @param int $result - * @return AuthorizationResponse - */ - public function setResult($result) - { - $this->result = $result; - return $this; - } - - /** - * @return string - */ - public function getCardBalanceInfo() - { - return $this->cardBalanceInfo; - } - - /** - * @param string $cardBalanceInfo - * @return AuthorizationResponse - */ - public function setCardBalanceInfo($cardBalanceInfo) - { - $this->cardBalanceInfo = $cardBalanceInfo; - return $this; - } -} diff --git a/Model/Api/Ws/BillingDetailsRequest.php b/Model/Api/Ws/BillingDetailsRequest.php deleted file mode 100644 index e65004cf..00000000 --- a/Model/Api/Ws/BillingDetailsRequest.php +++ /dev/null @@ -1,452 +0,0 @@ -reference; - } - - /** - * @param string $reference - * @return BillingDetailsRequest - */ - public function setReference($reference) - { - $this->reference = $reference; - return $this; - } - - /** - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * @param string $title - * @return BillingDetailsRequest - */ - public function setTitle($title) - { - $this->title = $title; - return $this; - } - - /** - * @return CustStatus - */ - public function getType() - { - return $this->type; - } - - /** - * @param CustStatus $type - * @return BillingDetailsRequest - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * @return string - */ - public function getFirstName() - { - return $this->firstName; - } - - /** - * @param string $firstName - * @return BillingDetailsRequest - */ - public function setFirstName($firstName) - { - $this->firstName = $firstName; - return $this; - } - - /** - * @return string - */ - public function getLastName() - { - return $this->lastName; - } - - /** - * @param string $lastName - * @return BillingDetailsRequest - */ - public function setLastName($lastName) - { - $this->lastName = $lastName; - return $this; - } - - /** - * @return string - */ - public function getPhoneNumber() - { - return $this->phoneNumber; - } - - /** - * @param string $phoneNumber - * @return BillingDetailsRequest - */ - public function setPhoneNumber($phoneNumber) - { - $this->phoneNumber = $phoneNumber; - return $this; - } - - /** - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * @param string $email - * @return BillingDetailsRequest - */ - public function setEmail($email) - { - $this->email = $email; - return $this; - } - - /** - * @return string - */ - public function getStreetNumber() - { - return $this->streetNumber; - } - - /** - * @param string $streetNumber - * @return BillingDetailsRequest - */ - public function setStreetNumber($streetNumber) - { - $this->streetNumber = $streetNumber; - return $this; - } - - /** - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * @param string $address - * @return BillingDetailsRequest - */ - public function setAddress($address) - { - $this->address = $address; - return $this; - } - - /** - * @return string - */ - public function getAddress2() - { - return $this->address2; - } - - /** - * @param string $address2 - * @return BillingDetailsRequest - */ - public function setAddress2($address2) - { - $this->address2 = $address2; - return $this; - } - - /** - * @return string - */ - public function getDistrict() - { - return $this->district; - } - - /** - * @param string $district - * @return BillingDetailsRequest - */ - public function setDistrict($district) - { - $this->district = $district; - return $this; - } - - /** - * @return string - */ - public function getZipCode() - { - return $this->zipCode; - } - - /** - * @param string $zipCode - * @return BillingDetailsRequest - */ - public function setZipCode($zipCode) - { - $this->zipCode = $zipCode; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - * @return BillingDetailsRequest - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * @param string $state - * @return BillingDetailsRequest - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * @return string - */ - public function getCountry() - { - return $this->country; - } - - /** - * @param string $country - * @return BillingDetailsRequest - */ - public function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * @param string $language - * @return BillingDetailsRequest - */ - public function setLanguage($language) - { - $this->language = $language; - return $this; - } - - /** - * @return string - */ - public function getCellPhoneNumber() - { - return $this->cellPhoneNumber; - } - - /** - * @param string $cellPhoneNumber - * @return BillingDetailsRequest - */ - public function setCellPhoneNumber($cellPhoneNumber) - { - $this->cellPhoneNumber = $cellPhoneNumber; - return $this; - } - - /** - * @return string - */ - public function getLegalName() - { - return $this->legalName; - } - - /** - * @param string $legalName - * @return BillingDetailsRequest - */ - public function setLegalName($legalName) - { - $this->legalName = $legalName; - return $this; - } - - /** - * @return string - */ - public function getIdentityCode() - { - return $this->identityCode; - } - - /** - * @param string $identityCode - * @return BillingDetailsRequest - */ - public function setIdentityCode($identityCode) - { - $this->identityCode = $identityCode; - return $this; - } -} diff --git a/Model/Api/Ws/BillingDetailsResponse.php b/Model/Api/Ws/BillingDetailsResponse.php deleted file mode 100644 index fbd03c49..00000000 --- a/Model/Api/Ws/BillingDetailsResponse.php +++ /dev/null @@ -1,406 +0,0 @@ -reference; - } - - /** - * @param string $reference - * @return BillingDetailsResponse - */ - public function setReference($reference) - { - $this->reference = $reference; - return $this; - } - - /** - * @return string - */ - public function getTitle() - { - return $this->title; - } - - /** - * @param string $title - * @return BillingDetailsResponse - */ - public function setTitle($title) - { - $this->title = $title; - return $this; - } - - /** - * @return CustStatus - */ - public function getType() - { - return $this->type; - } - - /** - * @param CustStatus $type - * @return BillingDetailsResponse - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * @return string - */ - public function getFirstName() - { - return $this->firstName; - } - - /** - * @param string $firstName - * @return BillingDetailsResponse - */ - public function setFirstName($firstName) - { - $this->firstName = $firstName; - return $this; - } - - /** - * @return string - */ - public function getLastName() - { - return $this->lastName; - } - - /** - * @param string $lastName - * @return BillingDetailsResponse - */ - public function setLastName($lastName) - { - $this->lastName = $lastName; - return $this; - } - - /** - * @return string - */ - public function getPhoneNumber() - { - return $this->phoneNumber; - } - - /** - * @param string $phoneNumber - * @return BillingDetailsResponse - */ - public function setPhoneNumber($phoneNumber) - { - $this->phoneNumber = $phoneNumber; - return $this; - } - - /** - * @return string - */ - public function getEmail() - { - return $this->email; - } - - /** - * @param string $email - * @return BillingDetailsResponse - */ - public function setEmail($email) - { - $this->email = $email; - return $this; - } - - /** - * @return string - */ - public function getStreetNumber() - { - return $this->streetNumber; - } - - /** - * @param string $streetNumber - * @return BillingDetailsResponse - */ - public function setStreetNumber($streetNumber) - { - $this->streetNumber = $streetNumber; - return $this; - } - - /** - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * @param string $address - * @return BillingDetailsResponse - */ - public function setAddress($address) - { - $this->address = $address; - return $this; - } - - /** - * @return string - */ - public function getDistrict() - { - return $this->district; - } - - /** - * @param string $district - * @return BillingDetailsResponse - */ - public function setDistrict($district) - { - $this->district = $district; - return $this; - } - - /** - * @return string - */ - public function getZipCode() - { - return $this->zipCode; - } - - /** - * @param string $zipCode - * @return BillingDetailsResponse - */ - public function setZipCode($zipCode) - { - $this->zipCode = $zipCode; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - * @return BillingDetailsResponse - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * @param string $state - * @return BillingDetailsResponse - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * @return string - */ - public function getCountry() - { - return $this->country; - } - - /** - * @param string $country - * @return BillingDetailsResponse - */ - public function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * @return string - */ - public function getLanguage() - { - return $this->language; - } - - /** - * @param string $language - * @return BillingDetailsResponse - */ - public function setLanguage($language) - { - $this->language = $language; - return $this; - } - - /** - * @return string - */ - public function getCellPhoneNumber() - { - return $this->cellPhoneNumber; - } - - /** - * @param string $cellPhoneNumber - * @return BillingDetailsResponse - */ - public function setCellPhoneNumber($cellPhoneNumber) - { - $this->cellPhoneNumber = $cellPhoneNumber; - return $this; - } - - /** - * @return string - */ - public function getLegalName() - { - return $this->legalName; - } - - /** - * @param string $legalName - * @return BillingDetailsResponse - */ - public function setLegalName($legalName) - { - $this->legalName = $legalName; - return $this; - } -} diff --git a/Model/Api/Ws/CancelCapturedPayment.php b/Model/Api/Ws/CancelCapturedPayment.php deleted file mode 100644 index c9b72ae8..00000000 --- a/Model/Api/Ws/CancelCapturedPayment.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CancelCapturedPayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return CancelCapturedPayment - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/Model/Api/Ws/CancelCapturedPaymentResponse.php b/Model/Api/Ws/CancelCapturedPaymentResponse.php deleted file mode 100644 index 1b0fd9d4..00000000 --- a/Model/Api/Ws/CancelCapturedPaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -cancelCapturedPaymentResult; - } - - /** - * @param CancelCapturedPaymentResult $cancelCapturedPaymentResult - * @return CancelCapturedPaymentResponse - */ - public function setCancelCapturedPaymentResult($cancelCapturedPaymentResult) - { - $this->cancelCapturedPaymentResult = $cancelCapturedPaymentResult; - return $this; - } -} diff --git a/Model/Api/Ws/CancelCapturedPaymentResult.php b/Model/Api/Ws/CancelCapturedPaymentResult.php deleted file mode 100644 index 2423e695..00000000 --- a/Model/Api/Ws/CancelCapturedPaymentResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CancelCapturedPaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/Model/Api/Ws/CancelPayment.php b/Model/Api/Ws/CancelPayment.php deleted file mode 100644 index 0639cd0e..00000000 --- a/Model/Api/Ws/CancelPayment.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CancelPayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return CancelPayment - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/Model/Api/Ws/CancelPaymentResponse.php b/Model/Api/Ws/CancelPaymentResponse.php deleted file mode 100644 index afa744ca..00000000 --- a/Model/Api/Ws/CancelPaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -cancelPaymentResult; - } - - /** - * @param CancelPaymentResult $cancelPaymentResult - * @return CancelPaymentResponse - */ - public function setCancelPaymentResult($cancelPaymentResult) - { - $this->cancelPaymentResult = $cancelPaymentResult; - return $this; - } -} diff --git a/Model/Api/Ws/CancelPaymentResult.php b/Model/Api/Ws/CancelPaymentResult.php deleted file mode 100644 index 48c38b79..00000000 --- a/Model/Api/Ws/CancelPaymentResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CancelPaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/Model/Api/Ws/CancelRefund.php b/Model/Api/Ws/CancelRefund.php deleted file mode 100644 index 944f1240..00000000 --- a/Model/Api/Ws/CancelRefund.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CancelRefund - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return CancelRefund - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/Model/Api/Ws/CancelRefundResponse.php b/Model/Api/Ws/CancelRefundResponse.php deleted file mode 100644 index 37568eda..00000000 --- a/Model/Api/Ws/CancelRefundResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -cancelRefundResult; - } - - /** - * @param CancelRefundResult $cancelRefundResult - * @return CancelRefundResponse - */ - public function setCancelRefundResult($cancelRefundResult) - { - $this->cancelRefundResult = $cancelRefundResult; - return $this; - } -} diff --git a/Model/Api/Ws/CancelRefundResult.php b/Model/Api/Ws/CancelRefundResult.php deleted file mode 100644 index afdc0165..00000000 --- a/Model/Api/Ws/CancelRefundResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CancelRefundResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/Model/Api/Ws/CancelSubscription.php b/Model/Api/Ws/CancelSubscription.php deleted file mode 100644 index 183be529..00000000 --- a/Model/Api/Ws/CancelSubscription.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CancelSubscription - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return CancelSubscription - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/Model/Api/Ws/CancelSubscriptionResponse.php b/Model/Api/Ws/CancelSubscriptionResponse.php deleted file mode 100644 index cca3d9fa..00000000 --- a/Model/Api/Ws/CancelSubscriptionResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -cancelSubscriptionResult; - } - - /** - * @param CancelSubscriptionResult $cancelSubscriptionResult - * @return CancelSubscriptionResponse - */ - public function setCancelSubscriptionResult($cancelSubscriptionResult) - { - $this->cancelSubscriptionResult = $cancelSubscriptionResult; - return $this; - } -} diff --git a/Model/Api/Ws/CancelSubscriptionResult.php b/Model/Api/Ws/CancelSubscriptionResult.php deleted file mode 100644 index aa32e2f8..00000000 --- a/Model/Api/Ws/CancelSubscriptionResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CancelSubscriptionResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/Model/Api/Ws/CancelToken.php b/Model/Api/Ws/CancelToken.php deleted file mode 100644 index be6da190..00000000 --- a/Model/Api/Ws/CancelToken.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CancelToken - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return CancelToken - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/Model/Api/Ws/CancelTokenResponse.php b/Model/Api/Ws/CancelTokenResponse.php deleted file mode 100644 index a4d6898d..00000000 --- a/Model/Api/Ws/CancelTokenResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -cancelTokenResult; - } - - /** - * @param CancelTokenResult $cancelTokenResult - * @return CancelTokenResponse - */ - public function setCancelTokenResult($cancelTokenResult) - { - $this->cancelTokenResult = $cancelTokenResult; - return $this; - } -} diff --git a/Model/Api/Ws/CancelTokenResult.php b/Model/Api/Ws/CancelTokenResult.php deleted file mode 100644 index 13c168d9..00000000 --- a/Model/Api/Ws/CancelTokenResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CancelTokenResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/Model/Api/Ws/CapturePayment.php b/Model/Api/Ws/CapturePayment.php deleted file mode 100644 index efb2ad1c..00000000 --- a/Model/Api/Ws/CapturePayment.php +++ /dev/null @@ -1,38 +0,0 @@ -settlementRequest; - } - - /** - * @param SettlementRequest $settlementRequest - * @return CapturePayment - */ - public function setSettlementRequest($settlementRequest) - { - $this->settlementRequest = $settlementRequest; - return $this; - } -} diff --git a/Model/Api/Ws/CapturePaymentResponse.php b/Model/Api/Ws/CapturePaymentResponse.php deleted file mode 100644 index 5f691bba..00000000 --- a/Model/Api/Ws/CapturePaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -capturePaymentResult; - } - - /** - * @param CapturePaymentResult $capturePaymentResult - * @return CapturePaymentResponse - */ - public function setCapturePaymentResult($capturePaymentResult) - { - $this->capturePaymentResult = $capturePaymentResult; - return $this; - } -} diff --git a/Model/Api/Ws/CapturePaymentResult.php b/Model/Api/Ws/CapturePaymentResult.php deleted file mode 100644 index 55511834..00000000 --- a/Model/Api/Ws/CapturePaymentResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CapturePaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/Model/Api/Ws/CaptureResponse.php b/Model/Api/Ws/CaptureResponse.php deleted file mode 100644 index 81909bcf..00000000 --- a/Model/Api/Ws/CaptureResponse.php +++ /dev/null @@ -1,165 +0,0 @@ -date == null) { - return null; - } else { - try { - return new \DateTime($this->date); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $date - * @return CaptureResponse - */ - public function setDate(\DateTime $date = null) - { - if ($date == null) { - $this->date = null; - } else { - $this->date = $date->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return int - */ - public function getNumber() - { - return $this->number; - } - - /** - * @param int $number - * @return CaptureResponse - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * @return int - */ - public function getReconciliationStatus() - { - return $this->reconciliationStatus; - } - - /** - * @param int $reconciliationStatus - * @return CaptureResponse - */ - public function setReconciliationStatus($reconciliationStatus) - { - $this->reconciliationStatus = $reconciliationStatus; - return $this; - } - - /** - * @return int - */ - public function getRefundAmount() - { - return $this->refundAmount; - } - - /** - * @param int $refundAmount - * @return CaptureResponse - */ - public function setRefundAmount($refundAmount) - { - $this->refundAmount = $refundAmount; - return $this; - } - - /** - * @return int - */ - public function getRefundCurrency() - { - return $this->refundCurrency; - } - - /** - * @param int $refundCurrency - * @return CaptureResponse - */ - public function setRefundCurrency($refundCurrency) - { - $this->refundCurrency = $refundCurrency; - return $this; - } - - /** - * @return boolean - */ - public function getChargeback() - { - return $this->chargeback; - } - - /** - * @param boolean $chargeback - * @return CaptureResponse - */ - public function setChargeback($chargeback) - { - $this->chargeback = $chargeback; - return $this; - } -} diff --git a/Model/Api/Ws/CardRequest.php b/Model/Api/Ws/CardRequest.php deleted file mode 100644 index d5ce33ce..00000000 --- a/Model/Api/Ws/CardRequest.php +++ /dev/null @@ -1,280 +0,0 @@ -number; - } - - /** - * @param string $number - * @return CardRequest - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * @return string - */ - public function getScheme() - { - return $this->scheme; - } - - /** - * @param string $scheme - * @return CardRequest - */ - public function setScheme($scheme) - { - $this->scheme = $scheme; - return $this; - } - - /** - * @return int - */ - public function getExpiryMonth() - { - return $this->expiryMonth; - } - - /** - * @param int $expiryMonth - * @return CardRequest - */ - public function setExpiryMonth($expiryMonth) - { - $this->expiryMonth = $expiryMonth; - return $this; - } - - /** - * @return int - */ - public function getExpiryYear() - { - return $this->expiryYear; - } - - /** - * @param int $expiryYear - * @return CardRequest - */ - public function setExpiryYear($expiryYear) - { - $this->expiryYear = $expiryYear; - return $this; - } - - /** - * @return string - */ - public function getCardSecurityCode() - { - return $this->cardSecurityCode; - } - - /** - * @param string $cardSecurityCode - * @return CardRequest - */ - public function setCardSecurityCode($cardSecurityCode) - { - $this->cardSecurityCode = $cardSecurityCode; - return $this; - } - - /** - * @return \DateTime - */ - public function getCardHolderBirthDay() - { - if ($this->cardHolderBirthDay == null) { - return null; - } else { - try { - return new \DateTime($this->cardHolderBirthDay); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $cardHolderBirthDay - * @return CardRequest - */ - public function setCardHolderBirthDay(\DateTime $cardHolderBirthDay = null) - { - if ($cardHolderBirthDay == null) { - $this->cardHolderBirthDay = null; - } else { - $this->cardHolderBirthDay = $cardHolderBirthDay->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return string - */ - public function getPaymentToken() - { - return $this->paymentToken; - } - - /** - * @param string $paymentToken - * @return CardRequest - */ - public function setPaymentToken($paymentToken) - { - $this->paymentToken = $paymentToken; - return $this; - } - - /** - * @return string - */ - public function getCardHolderName() - { - return $this->cardHolderName; - } - - /** - * @param string $cardHolderName - * @return CardRequest - */ - public function setCardHolderName($cardHolderName) - { - $this->cardHolderName = $cardHolderName; - return $this; - } - - /** - * @return string - */ - public function getProofOfIdType() - { - return $this->proofOfIdType; - } - - /** - * @param string $proofOfIdType - * @return CardRequest - */ - public function setProofOfIdType($proofOfIdType) - { - $this->proofOfIdType = $proofOfIdType; - return $this; - } - - /** - * @return string - */ - public function getProofOfIdNumber() - { - return $this->proofOfIdNumber; - } - - /** - * @param string $proofOfIdNumber - * @return CardRequest - */ - public function setProofOfIdNumber($proofOfIdNumber) - { - $this->proofOfIdNumber = $proofOfIdNumber; - return $this; - } - - /** - * @return string - */ - public function getWalletPayload() - { - return $this->walletPayload; - } - - /** - * @param string $walletPayload - * @return CardRequest - */ - public function setWalletPayload($walletPayload) - { - $this->walletPayload = $walletPayload; - return $this; - } -} diff --git a/Model/Api/Ws/CardResponse.php b/Model/Api/Ws/CardResponse.php deleted file mode 100644 index 82894d38..00000000 --- a/Model/Api/Ws/CardResponse.php +++ /dev/null @@ -1,291 +0,0 @@ -number; - } - - /** - * @param string $number - * @return CardResponse - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * @return string - */ - public function getScheme() - { - return $this->scheme; - } - - /** - * @param string $scheme - * @return CardResponse - */ - public function setScheme($scheme) - { - $this->scheme = $scheme; - return $this; - } - - /** - * @return string - */ - public function getBrand() - { - return $this->brand; - } - - /** - * @param string $brand - * @return CardResponse - */ - public function setBrand($brand) - { - $this->brand = $brand; - return $this; - } - - /** - * @return string - */ - public function getCountry() - { - return $this->country; - } - - /** - * @param string $country - * @return CardResponse - */ - public function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * @return string - */ - public function getProductCode() - { - return $this->productCode; - } - - /** - * @param string $productCode - * @return CardResponse - */ - public function setProductCode($productCode) - { - $this->productCode = $productCode; - return $this; - } - - /** - * @return string - */ - public function getBankCode() - { - return $this->bankCode; - } - - /** - * @param string $bankCode - * @return CardResponse - */ - public function setBankCode($bankCode) - { - $this->bankCode = $bankCode; - return $this; - } - - /** - * @return string - */ - public function getBankLabel() - { - return $this->bankLabel; - } - - /** - * @param string $bankLabel - * @return CardResponse - */ - public function setBankLabel($bankLabel) - { - $this->bankLabel = $bankLabel; - return $this; - } - - /** - * @return int - */ - public function getExpiryMonth() - { - return $this->expiryMonth; - } - - /** - * @param int $expiryMonth - * @return CardResponse - */ - public function setExpiryMonth($expiryMonth) - { - $this->expiryMonth = $expiryMonth; - return $this; - } - - /** - * @return int - */ - public function getExpiryYear() - { - return $this->expiryYear; - } - - /** - * @param int $expiryYear - * @return CardResponse - */ - public function setExpiryYear($expiryYear) - { - $this->expiryYear = $expiryYear; - return $this; - } - - /** - * @return string - */ - public function getCardHolderName() - { - return $this->cardHolderName; - } - - /** - * @param string $cardHolderName - * @return CardResponse - */ - public function setCardHolderName($cardHolderName) - { - $this->cardHolderName = $cardHolderName; - return $this; - } - - /** - * @return string - */ - public function getProofOfIdType() - { - return $this->proofOfIdType; - } - - /** - * @param string $proofOfIdType - * @return CardResponse - */ - public function setProofOfIdType($proofOfIdType) - { - $this->proofOfIdType = $proofOfIdType; - return $this; - } - - /** - * @return string - */ - public function getProofOfIdNumber() - { - return $this->proofOfIdNumber; - } - - /** - * @param string $proofOfIdNumber - * @return CardResponse - */ - public function setProofOfIdNumber($proofOfIdNumber) - { - $this->proofOfIdNumber = $proofOfIdNumber; - return $this; - } -} diff --git a/Model/Api/Ws/CartItemInfo.php b/Model/Api/Ws/CartItemInfo.php deleted file mode 100644 index bb8f3b1a..00000000 --- a/Model/Api/Ws/CartItemInfo.php +++ /dev/null @@ -1,176 +0,0 @@ -productLabel; - } - - /** - * @param string $productLabel - * @return CartItemInfo - */ - public function setProductLabel($productLabel) - { - $this->productLabel = $productLabel; - return $this; - } - - /** - * @return ProductType - */ - public function getProductType() - { - return $this->productType; - } - - /** - * @param ProductType $productType - * @return CartItemInfo - */ - public function setProductType($productType) - { - $this->productType = $productType; - return $this; - } - - /** - * @return string - */ - public function getProductRef() - { - return $this->productRef; - } - - /** - * @param string $productRef - * @return CartItemInfo - */ - public function setProductRef($productRef) - { - $this->productRef = $productRef; - return $this; - } - - /** - * @return int - */ - public function getProductQty() - { - return $this->productQty; - } - - /** - * @param int $productQty - * @return CartItemInfo - */ - public function setProductQty($productQty) - { - $this->productQty = $productQty; - return $this; - } - - /** - * @return string - */ - public function getProductAmount() - { - return $this->productAmount; - } - - /** - * @param string $productAmount - * @return CartItemInfo - */ - public function setProductAmount($productAmount) - { - $this->productAmount = $productAmount; - return $this; - } - - /** - * @return string - */ - public function getProductVat() - { - return $this->productVat; - } - - /** - * @param string $productVat - * @return CartItemInfo - */ - public function setProductVat($productVat) - { - $this->productVat = $productVat; - return $this; - } - - /** - * @return string - */ - public function getProductExtId() - { - return $this->productExtId; - } - - /** - * @param string $productExtId - * @return CartItemInfo - */ - public function setProductExtId($productExtId) - { - $this->productExtId = $productExtId; - return $this; - } -} diff --git a/Model/Api/Ws/CheckThreeDSAuthentication.php b/Model/Api/Ws/CheckThreeDSAuthentication.php deleted file mode 100644 index 75eb194b..00000000 --- a/Model/Api/Ws/CheckThreeDSAuthentication.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CheckThreeDSAuthentication - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return ThreeDSRequest - */ - public function getThreeDSRequest() - { - return $this->threeDSRequest; - } - - /** - * @param ThreeDSRequest $threeDSRequest - * @return CheckThreeDSAuthentication - */ - public function setThreeDSRequest($threeDSRequest) - { - $this->threeDSRequest = $threeDSRequest; - return $this; - } -} diff --git a/Model/Api/Ws/CheckThreeDSAuthenticationResponse.php b/Model/Api/Ws/CheckThreeDSAuthenticationResponse.php deleted file mode 100644 index c966ef03..00000000 --- a/Model/Api/Ws/CheckThreeDSAuthenticationResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -checkThreeDSAuthenticationResult; - } - - /** - * @param CheckThreeDSAuthenticationResult $checkThreeDSAuthenticationResult - * @return CheckThreeDSAuthenticationResponse - */ - public function setCheckThreeDSAuthenticationResult($checkThreeDSAuthenticationResult) - { - $this->checkThreeDSAuthenticationResult = $checkThreeDSAuthenticationResult; - return $this; - } -} diff --git a/Model/Api/Ws/CheckThreeDSAuthenticationResult.php b/Model/Api/Ws/CheckThreeDSAuthenticationResult.php deleted file mode 100644 index 5ca1ee48..00000000 --- a/Model/Api/Ws/CheckThreeDSAuthenticationResult.php +++ /dev/null @@ -1,61 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CheckThreeDSAuthenticationResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return CheckThreeDSAuthenticationResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } -} diff --git a/Model/Api/Ws/CommonRequest.php b/Model/Api/Ws/CommonRequest.php deleted file mode 100644 index a965a2c8..00000000 --- a/Model/Api/Ws/CommonRequest.php +++ /dev/null @@ -1,119 +0,0 @@ -paymentSource; - } - - /** - * @param string $paymentSource - * @return CommonRequest - */ - public function setPaymentSource($paymentSource) - { - $this->paymentSource = $paymentSource; - return $this; - } - - /** - * @return \DateTime - */ - public function getSubmissionDate() - { - if ($this->submissionDate == null) { - return null; - } else { - try { - return new \DateTime($this->submissionDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $submissionDate - * @return CommonRequest - */ - public function setSubmissionDate(\DateTime $submissionDate = null) - { - if ($submissionDate == null) { - $this->submissionDate = null; - } else { - $this->submissionDate = $submissionDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return string - */ - public function getContractNumber() - { - return $this->contractNumber; - } - - /** - * @param string $contractNumber - * @return CommonRequest - */ - public function setContractNumber($contractNumber) - { - $this->contractNumber = $contractNumber; - return $this; - } - - /** - * @return string - */ - public function getComment() - { - return $this->comment; - } - - /** - * @param string $comment - * @return CommonRequest - */ - public function setComment($comment) - { - $this->comment = $comment; - return $this; - } -} diff --git a/Model/Api/Ws/CommonResponse.php b/Model/Api/Ws/CommonResponse.php deleted file mode 100644 index 0e684072..00000000 --- a/Model/Api/Ws/CommonResponse.php +++ /dev/null @@ -1,211 +0,0 @@ -responseCode; - } - - /** - * @param int $responseCode - * @return CommonResponse - */ - public function setResponseCode($responseCode) - { - $this->responseCode = $responseCode; - return $this; - } - - /** - * @return string - */ - public function getResponseCodeDetail() - { - return $this->responseCodeDetail; - } - - /** - * @param string $responseCodeDetail - * @return CommonResponse - */ - public function setResponseCodeDetail($responseCodeDetail) - { - $this->responseCodeDetail = $responseCodeDetail; - return $this; - } - - /** - * @return string - */ - public function getTransactionStatusLabel() - { - return $this->transactionStatusLabel; - } - - /** - * @param string $transactionStatusLabel - * @return CommonResponse - */ - public function setTransactionStatusLabel($transactionStatusLabel) - { - $this->transactionStatusLabel = $transactionStatusLabel; - return $this; - } - - /** - * @return string - */ - public function getShopId() - { - return $this->shopId; - } - - /** - * @param string $shopId - * @return CommonResponse - */ - public function setShopId($shopId) - { - $this->shopId = $shopId; - return $this; - } - - /** - * @return string - */ - public function getPaymentSource() - { - return $this->paymentSource; - } - - /** - * @param string $paymentSource - * @return CommonResponse - */ - public function setPaymentSource($paymentSource) - { - $this->paymentSource = $paymentSource; - return $this; - } - - /** - * @return \DateTime - */ - public function getSubmissionDate() - { - if ($this->submissionDate == null) { - return null; - } else { - try { - return new \DateTime($this->submissionDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $submissionDate - * @return CommonResponse - */ - public function setSubmissionDate(\DateTime $submissionDate = null) - { - if ($submissionDate == null) { - $this->submissionDate = null; - } else { - $this->submissionDate = $submissionDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return string - */ - public function getContractNumber() - { - return $this->contractNumber; - } - - /** - * @param string $contractNumber - * @return CommonResponse - */ - public function setContractNumber($contractNumber) - { - $this->contractNumber = $contractNumber; - return $this; - } - - /** - * @return string - */ - public function getPaymentToken() - { - return $this->paymentToken; - } - - /** - * @param string $paymentToken - * @return CommonResponse - */ - public function setPaymentToken($paymentToken) - { - $this->paymentToken = $paymentToken; - return $this; - } -} diff --git a/Model/Api/Ws/CreatePayment.php b/Model/Api/Ws/CreatePayment.php deleted file mode 100644 index 1a845780..00000000 --- a/Model/Api/Ws/CreatePayment.php +++ /dev/null @@ -1,222 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CreatePayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return ThreeDSRequest - */ - public function getThreeDSRequest() - { - return $this->threeDSRequest; - } - - /** - * @param ThreeDSRequest $threeDSRequest - * @return CreatePayment - */ - public function setThreeDSRequest($threeDSRequest) - { - $this->threeDSRequest = $threeDSRequest; - return $this; - } - - /** - * @return PaymentRequest - */ - public function getPaymentRequest() - { - return $this->paymentRequest; - } - - /** - * @param PaymentRequest $paymentRequest - * @return CreatePayment - */ - public function setPaymentRequest($paymentRequest) - { - $this->paymentRequest = $paymentRequest; - return $this; - } - - /** - * @return OrderRequest - */ - public function getOrderRequest() - { - return $this->orderRequest; - } - - /** - * @param OrderRequest $orderRequest - * @return CreatePayment - */ - public function setOrderRequest($orderRequest) - { - $this->orderRequest = $orderRequest; - return $this; - } - - /** - * @return CardRequest - */ - public function getCardRequest() - { - return $this->cardRequest; - } - - /** - * @param CardRequest $cardRequest - * @return CreatePayment - */ - public function setCardRequest($cardRequest) - { - $this->cardRequest = $cardRequest; - return $this; - } - - /** - * @return CustomerRequest - */ - public function getCustomerRequest() - { - return $this->customerRequest; - } - - /** - * @param CustomerRequest $customerRequest - * @return CreatePayment - */ - public function setCustomerRequest($customerRequest) - { - $this->customerRequest = $customerRequest; - return $this; - } - - /** - * @return TechRequest - */ - public function getTechRequest() - { - return $this->techRequest; - } - - /** - * @param TechRequest $techRequest - * @return CreatePayment - */ - public function setTechRequest($techRequest) - { - $this->techRequest = $techRequest; - return $this; - } - - /** - * @return ShoppingCartRequest - */ - public function getShoppingCartRequest() - { - return $this->shoppingCartRequest; - } - - /** - * @param ShoppingCartRequest $shoppingCartRequest - * @return CreatePayment - */ - public function setShoppingCartRequest($shoppingCartRequest) - { - $this->shoppingCartRequest = $shoppingCartRequest; - return $this; - } - - /** - * @return ExtendedResponseRequest - */ - public function getExtendedResponseRequest() - { - return $this->extendedResponseRequest; - } - - /** - * @param ExtendedResponseRequest $extendedResponseRequest - * @return CreatePayment - */ - public function setExtendedResponseRequest($extendedResponseRequest) - { - $this->extendedResponseRequest = $extendedResponseRequest; - return $this; - } -} diff --git a/Model/Api/Ws/CreatePaymentResponse.php b/Model/Api/Ws/CreatePaymentResponse.php deleted file mode 100644 index 499cd343..00000000 --- a/Model/Api/Ws/CreatePaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -createPaymentResult; - } - - /** - * @param CreatePaymentResult $createPaymentResult - * @return CreatePaymentResponse - */ - public function setCreatePaymentResult($createPaymentResult) - { - $this->createPaymentResult = $createPaymentResult; - return $this; - } -} diff --git a/Model/Api/Ws/CreatePaymentResult.php b/Model/Api/Ws/CreatePaymentResult.php deleted file mode 100644 index 122df65e..00000000 --- a/Model/Api/Ws/CreatePaymentResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CreatePaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return CreatePaymentResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return CreatePaymentResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return CreatePaymentResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return CreatePaymentResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return CreatePaymentResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return CreatePaymentResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return CreatePaymentResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return CreatePaymentResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return CreatePaymentResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return CreatePaymentResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return CreatePaymentResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ShoppingCartResponse - */ - public function getShoppingCartResponse() - { - return $this->shoppingCartResponse; - } - - /** - * @param ShoppingCartResponse $shoppingCartResponse - * @return CreatePaymentResult - */ - public function setShoppingCartResponse($shoppingCartResponse) - { - $this->shoppingCartResponse = $shoppingCartResponse; - return $this; - } -} diff --git a/Model/Api/Ws/CreateSubscription.php b/Model/Api/Ws/CreateSubscription.php deleted file mode 100644 index cf651d6c..00000000 --- a/Model/Api/Ws/CreateSubscription.php +++ /dev/null @@ -1,107 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CreateSubscription - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return OrderRequest - */ - public function getOrderRequest() - { - return $this->orderRequest; - } - - /** - * @param OrderRequest $orderRequest - * @return CreateSubscription - */ - public function setOrderRequest($orderRequest) - { - $this->orderRequest = $orderRequest; - return $this; - } - - /** - * @return SubscriptionRequest - */ - public function getSubscriptionRequest() - { - return $this->subscriptionRequest; - } - - /** - * @param SubscriptionRequest $subscriptionRequest - * @return CreateSubscription - */ - public function setSubscriptionRequest($subscriptionRequest) - { - $this->subscriptionRequest = $subscriptionRequest; - return $this; - } - - /** - * @return CardRequest - */ - public function getCardRequest() - { - return $this->cardRequest; - } - - /** - * @param CardRequest $cardRequest - * @return CreateSubscription - */ - public function setCardRequest($cardRequest) - { - $this->cardRequest = $cardRequest; - return $this; - } -} diff --git a/Model/Api/Ws/CreateSubscriptionResponse.php b/Model/Api/Ws/CreateSubscriptionResponse.php deleted file mode 100644 index 295367e0..00000000 --- a/Model/Api/Ws/CreateSubscriptionResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -createSubscriptionResult; - } - - /** - * @param CreateSubscriptionResult $createSubscriptionResult - * @return CreateSubscriptionResponse - */ - public function setCreateSubscriptionResult($createSubscriptionResult) - { - $this->createSubscriptionResult = $createSubscriptionResult; - return $this; - } -} diff --git a/Model/Api/Ws/CreateSubscriptionResult.php b/Model/Api/Ws/CreateSubscriptionResult.php deleted file mode 100644 index aeb645da..00000000 --- a/Model/Api/Ws/CreateSubscriptionResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CreateSubscriptionResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return CreateSubscriptionResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return CreateSubscriptionResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return CreateSubscriptionResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return CreateSubscriptionResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return CreateSubscriptionResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return CreateSubscriptionResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return CreateSubscriptionResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return CreateSubscriptionResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return CreateSubscriptionResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return CreateSubscriptionResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return CreateSubscriptionResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ShoppingCartResponse - */ - public function getShoppingCartResponse() - { - return $this->shoppingCartResponse; - } - - /** - * @param ShoppingCartResponse $shoppingCartResponse - * @return CreateSubscriptionResult - */ - public function setShoppingCartResponse($shoppingCartResponse) - { - $this->shoppingCartResponse = $shoppingCartResponse; - return $this; - } -} diff --git a/Model/Api/Ws/CreateToken.php b/Model/Api/Ws/CreateToken.php deleted file mode 100644 index 54bcafd8..00000000 --- a/Model/Api/Ws/CreateToken.php +++ /dev/null @@ -1,107 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CreateToken - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return CardRequest - */ - public function getCardRequest() - { - return $this->cardRequest; - } - - /** - * @param CardRequest $cardRequest - * @return CreateToken - */ - public function setCardRequest($cardRequest) - { - $this->cardRequest = $cardRequest; - return $this; - } - - /** - * @return CustomerRequest - */ - public function getCustomerRequest() - { - return $this->customerRequest; - } - - /** - * @param CustomerRequest $customerRequest - * @return CreateToken - */ - public function setCustomerRequest($customerRequest) - { - $this->customerRequest = $customerRequest; - return $this; - } - - /** - * @return TokenRequest - */ - public function getTokenRequest() - { - return $this->tokenRequest; - } - - /** - * @param TokenRequest $tokenRequest - * @return CreateToken - */ - public function setTokenRequest($tokenRequest) - { - $this->tokenRequest = $tokenRequest; - return $this; - } -} diff --git a/Model/Api/Ws/CreateTokenByIban.php b/Model/Api/Ws/CreateTokenByIban.php deleted file mode 100644 index 093dc193..00000000 --- a/Model/Api/Ws/CreateTokenByIban.php +++ /dev/null @@ -1,84 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CreateTokenByIban - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return IbanRequest - */ - public function getIbanRequest() - { - return $this->ibanRequest; - } - - /** - * @param IbanRequest $ibanRequest - * @return CreateTokenByIban - */ - public function setIbanRequest($ibanRequest) - { - $this->ibanRequest = $ibanRequest; - return $this; - } - - /** - * @return CustomerRequest - */ - public function getCustomerRequest() - { - return $this->customerRequest; - } - - /** - * @param CustomerRequest $customerRequest - * @return CreateTokenByIban - */ - public function setCustomerRequest($customerRequest) - { - $this->customerRequest = $customerRequest; - return $this; - } -} diff --git a/Model/Api/Ws/CreateTokenByIbanResponse.php b/Model/Api/Ws/CreateTokenByIbanResponse.php deleted file mode 100644 index 41b84d49..00000000 --- a/Model/Api/Ws/CreateTokenByIbanResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -createTokenByIbanResult; - } - - /** - * @param CreateTokenByIbanResult $createTokenByIbanResult - * @return CreateTokenByIbanResponse - */ - public function setCreateTokenByIbanResult($createTokenByIbanResult) - { - $this->createTokenByIbanResult = $createTokenByIbanResult; - return $this; - } -} diff --git a/Model/Api/Ws/CreateTokenByIbanResult.php b/Model/Api/Ws/CreateTokenByIbanResult.php deleted file mode 100644 index 231200d5..00000000 --- a/Model/Api/Ws/CreateTokenByIbanResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CreateTokenByIbanResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return CreateTokenByIbanResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return CreateTokenByIbanResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return CreateTokenByIbanResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return CreateTokenByIbanResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return CreateTokenByIbanResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return CreateTokenByIbanResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return CreateTokenByIbanResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return CreateTokenByIbanResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return CreateTokenByIbanResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return CreateTokenByIbanResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return CreateTokenByIbanResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ShoppingCartResponse - */ - public function getShoppingCartResponse() - { - return $this->shoppingCartResponse; - } - - /** - * @param ShoppingCartResponse $shoppingCartResponse - * @return CreateTokenByIbanResult - */ - public function setShoppingCartResponse($shoppingCartResponse) - { - $this->shoppingCartResponse = $shoppingCartResponse; - return $this; - } -} diff --git a/Model/Api/Ws/CreateTokenFromTransaction.php b/Model/Api/Ws/CreateTokenFromTransaction.php deleted file mode 100644 index f12f4725..00000000 --- a/Model/Api/Ws/CreateTokenFromTransaction.php +++ /dev/null @@ -1,84 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return CreateTokenFromTransaction - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return CardRequest - */ - public function getCardRequest() - { - return $this->cardRequest; - } - - /** - * @param CardRequest $cardRequest - * @return CreateTokenFromTransaction - */ - public function setCardRequest($cardRequest) - { - $this->cardRequest = $cardRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return CreateTokenFromTransaction - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/Model/Api/Ws/CreateTokenFromTransactionResponse.php b/Model/Api/Ws/CreateTokenFromTransactionResponse.php deleted file mode 100644 index 890010a9..00000000 --- a/Model/Api/Ws/CreateTokenFromTransactionResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -createTokenFromTransactionResult; - } - - /** - * @param CreateTokenFromTransactionResult $createTokenFromTransactionResult - * @return CreateTokenFromTransactionResponse - */ - public function setCreateTokenFromTransactionResult($createTokenFromTransactionResult) - { - $this->createTokenFromTransactionResult = $createTokenFromTransactionResult; - return $this; - } -} diff --git a/Model/Api/Ws/CreateTokenFromTransactionResult.php b/Model/Api/Ws/CreateTokenFromTransactionResult.php deleted file mode 100644 index 92e2b0df..00000000 --- a/Model/Api/Ws/CreateTokenFromTransactionResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CreateTokenFromTransactionResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return CreateTokenFromTransactionResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return CreateTokenFromTransactionResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return CreateTokenFromTransactionResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return CreateTokenFromTransactionResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return CreateTokenFromTransactionResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return CreateTokenFromTransactionResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return CreateTokenFromTransactionResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return CreateTokenFromTransactionResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return CreateTokenFromTransactionResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return CreateTokenFromTransactionResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return CreateTokenFromTransactionResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ShoppingCartResponse - */ - public function getShoppingCartResponse() - { - return $this->shoppingCartResponse; - } - - /** - * @param ShoppingCartResponse $shoppingCartResponse - * @return CreateTokenFromTransactionResult - */ - public function setShoppingCartResponse($shoppingCartResponse) - { - $this->shoppingCartResponse = $shoppingCartResponse; - return $this; - } -} diff --git a/Model/Api/Ws/CreateTokenResponse.php b/Model/Api/Ws/CreateTokenResponse.php deleted file mode 100644 index d90b3f59..00000000 --- a/Model/Api/Ws/CreateTokenResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -createTokenResult; - } - - /** - * @param CreateTokenResult $createTokenResult - * @return CreateTokenResponse - */ - public function setCreateTokenResult($createTokenResult) - { - $this->createTokenResult = $createTokenResult; - return $this; - } -} diff --git a/Model/Api/Ws/CreateTokenResult.php b/Model/Api/Ws/CreateTokenResult.php deleted file mode 100644 index 59c1821d..00000000 --- a/Model/Api/Ws/CreateTokenResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return CreateTokenResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return CreateTokenResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return CreateTokenResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return CreateTokenResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return CreateTokenResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return CreateTokenResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return CreateTokenResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return CreateTokenResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return CreateTokenResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return CreateTokenResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return CreateTokenResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return CreateTokenResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ShoppingCartResponse - */ - public function getShoppingCartResponse() - { - return $this->shoppingCartResponse; - } - - /** - * @param ShoppingCartResponse $shoppingCartResponse - * @return CreateTokenResult - */ - public function setShoppingCartResponse($shoppingCartResponse) - { - $this->shoppingCartResponse = $shoppingCartResponse; - return $this; - } -} diff --git a/Model/Api/Ws/CustStatus.php b/Model/Api/Ws/CustStatus.php deleted file mode 100644 index e66ad725..00000000 --- a/Model/Api/Ws/CustStatus.php +++ /dev/null @@ -1,18 +0,0 @@ -billingDetails; - } - - /** - * @param BillingDetailsRequest $billingDetails - * @return CustomerRequest - */ - public function setBillingDetails($billingDetails) - { - $this->billingDetails = $billingDetails; - return $this; - } - - /** - * @return ShippingDetailsRequest - */ - public function getShippingDetails() - { - return $this->shippingDetails; - } - - /** - * @param ShippingDetailsRequest $shippingDetails - * @return CustomerRequest - */ - public function setShippingDetails($shippingDetails) - { - $this->shippingDetails = $shippingDetails; - return $this; - } - - /** - * @return ExtraDetailsRequest - */ - public function getExtraDetails() - { - return $this->extraDetails; - } - - /** - * @param ExtraDetailsRequest $extraDetails - * @return CustomerRequest - */ - public function setExtraDetails($extraDetails) - { - $this->extraDetails = $extraDetails; - return $this; - } -} diff --git a/Model/Api/Ws/CustomerResponse.php b/Model/Api/Ws/CustomerResponse.php deleted file mode 100644 index d9a0be22..00000000 --- a/Model/Api/Ws/CustomerResponse.php +++ /dev/null @@ -1,84 +0,0 @@ -billingDetails; - } - - /** - * @param BillingDetailsResponse $billingDetails - * @return CustomerResponse - */ - public function setBillingDetails($billingDetails) - { - $this->billingDetails = $billingDetails; - return $this; - } - - /** - * @return ShippingDetailsResponse - */ - public function getShippingDetails() - { - return $this->shippingDetails; - } - - /** - * @param ShippingDetailsResponse $shippingDetails - * @return CustomerResponse - */ - public function setShippingDetails($shippingDetails) - { - $this->shippingDetails = $shippingDetails; - return $this; - } - - /** - * @return ExtraDetailsResponse - */ - public function getExtraDetails() - { - return $this->extraDetails; - } - - /** - * @param ExtraDetailsResponse $extraDetails - * @return CustomerResponse - */ - public function setExtraDetails($extraDetails) - { - $this->extraDetails = $extraDetails; - return $this; - } -} diff --git a/Model/Api/Ws/DeliverySpeed.php b/Model/Api/Ws/DeliverySpeed.php deleted file mode 100644 index 7a6ff459..00000000 --- a/Model/Api/Ws/DeliverySpeed.php +++ /dev/null @@ -1,19 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return DuplicatePayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return PaymentRequest - */ - public function getPaymentRequest() - { - return $this->paymentRequest; - } - - /** - * @param PaymentRequest $paymentRequest - * @return DuplicatePayment - */ - public function setPaymentRequest($paymentRequest) - { - $this->paymentRequest = $paymentRequest; - return $this; - } - - /** - * @return OrderRequest - */ - public function getOrderRequest() - { - return $this->orderRequest; - } - - /** - * @param OrderRequest $orderRequest - * @return DuplicatePayment - */ - public function setOrderRequest($orderRequest) - { - $this->orderRequest = $orderRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return DuplicatePayment - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/Model/Api/Ws/DuplicatePaymentResponse.php b/Model/Api/Ws/DuplicatePaymentResponse.php deleted file mode 100644 index d130f8b1..00000000 --- a/Model/Api/Ws/DuplicatePaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -duplicatePaymentResult; - } - - /** - * @param DuplicatePaymentResult $duplicatePaymentResult - * @return DuplicatePaymentResponse - */ - public function setDuplicatePaymentResult($duplicatePaymentResult) - { - $this->duplicatePaymentResult = $duplicatePaymentResult; - return $this; - } -} diff --git a/Model/Api/Ws/DuplicatePaymentResult.php b/Model/Api/Ws/DuplicatePaymentResult.php deleted file mode 100644 index 11e26d64..00000000 --- a/Model/Api/Ws/DuplicatePaymentResult.php +++ /dev/null @@ -1,268 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return DuplicatePaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return DuplicatePaymentResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return DuplicatePaymentResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return DuplicatePaymentResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return DuplicatePaymentResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return DuplicatePaymentResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return DuplicatePaymentResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return DuplicatePaymentResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return DuplicatePaymentResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return DuplicatePaymentResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return DuplicatePaymentResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } -} diff --git a/Model/Api/Ws/ExtInfo.php b/Model/Api/Ws/ExtInfo.php deleted file mode 100644 index 140d9da0..00000000 --- a/Model/Api/Ws/ExtInfo.php +++ /dev/null @@ -1,61 +0,0 @@ -key; - } - - /** - * @param string $key - * @return ExtInfo - */ - public function setKey($key) - { - $this->key = $key; - return $this; - } - - /** - * @return string - */ - public function getValue() - { - return $this->value; - } - - /** - * @param string $value - * @return ExtInfo - */ - public function setValue($value) - { - $this->value = $value; - return $this; - } -} diff --git a/Model/Api/Ws/ExtendedResponseRequest.php b/Model/Api/Ws/ExtendedResponseRequest.php deleted file mode 100644 index 59254559..00000000 --- a/Model/Api/Ws/ExtendedResponseRequest.php +++ /dev/null @@ -1,84 +0,0 @@ -isNsuRequested; - } - - /** - * @param boolean $isNsuRequested - * @return ExtendedResponseRequest - */ - public function setIsNsuRequested($isNsuRequested) - { - $this->isNsuRequested = $isNsuRequested; - return $this; - } - - /** - * @return boolean - */ - public function getIsWalletRequested() - { - return $this->isWalletRequested; - } - - /** - * @param boolean $isWalletRequested - * @return ExtendedResponseRequest - */ - public function setIsWalletRequested($isWalletRequested) - { - $this->isWalletRequested = $isWalletRequested; - return $this; - } - - /** - * @return boolean - */ - public function getIsBankLabelRequested() - { - return $this->isBankLabelRequested; - } - - /** - * @param boolean $isBankLabelRequested - * @return ExtendedResponseRequest - */ - public function setIsBankLabelRequested($isBankLabelRequested) - { - $this->isBankLabelRequested = $isBankLabelRequested; - return $this; - } -} diff --git a/Model/Api/Ws/ExtraDetailsRequest.php b/Model/Api/Ws/ExtraDetailsRequest.php deleted file mode 100644 index 12bf6e60..00000000 --- a/Model/Api/Ws/ExtraDetailsRequest.php +++ /dev/null @@ -1,61 +0,0 @@ -ipAddress; - } - - /** - * @param string $ipAddress - * @return ExtraDetailsRequest - */ - public function setIpAddress($ipAddress) - { - $this->ipAddress = $ipAddress; - return $this; - } - - /** - * @return string - */ - public function getFingerPrintId() - { - return $this->fingerPrintId; - } - - /** - * @param string $fingerPrintId - * @return ExtraDetailsRequest - */ - public function setFingerPrintId($fingerPrintId) - { - $this->fingerPrintId = $fingerPrintId; - return $this; - } -} diff --git a/Model/Api/Ws/ExtraDetailsResponse.php b/Model/Api/Ws/ExtraDetailsResponse.php deleted file mode 100644 index 544cdc19..00000000 --- a/Model/Api/Ws/ExtraDetailsResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -ipAddress; - } - - /** - * @param string $ipAddress - * @return ExtraDetailsResponse - */ - public function setIpAddress($ipAddress) - { - $this->ipAddress = $ipAddress; - return $this; - } -} diff --git a/Model/Api/Ws/ExtraResponse.php b/Model/Api/Ws/ExtraResponse.php deleted file mode 100644 index 2d290b36..00000000 --- a/Model/Api/Ws/ExtraResponse.php +++ /dev/null @@ -1,84 +0,0 @@ -paymentOptionCode; - } - - /** - * @param string $paymentOptionCode - * @return ExtraResponse - */ - public function setPaymentOptionCode($paymentOptionCode) - { - $this->paymentOptionCode = $paymentOptionCode; - return $this; - } - - /** - * @return int - */ - public function getPaymentOptionOccNumber() - { - return $this->paymentOptionOccNumber; - } - - /** - * @param int $paymentOptionOccNumber - * @return ExtraResponse - */ - public function setPaymentOptionOccNumber($paymentOptionOccNumber) - { - $this->paymentOptionOccNumber = $paymentOptionOccNumber; - return $this; - } - - /** - * @return string - */ - public function getBoletoPdfUrl() - { - return $this->boletoPdfUrl; - } - - /** - * @param string $boletoPdfUrl - * @return ExtraResponse - */ - public function setBoletoPdfUrl($boletoPdfUrl) - { - $this->boletoPdfUrl = $boletoPdfUrl; - return $this; - } -} diff --git a/Model/Api/Ws/FindPayments.php b/Model/Api/Ws/FindPayments.php deleted file mode 100644 index 06286568..00000000 --- a/Model/Api/Ws/FindPayments.php +++ /dev/null @@ -1,38 +0,0 @@ -queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return FindPayments - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/Model/Api/Ws/FindPaymentsResponse.php b/Model/Api/Ws/FindPaymentsResponse.php deleted file mode 100644 index 90a7dd1e..00000000 --- a/Model/Api/Ws/FindPaymentsResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -findPaymentsResult; - } - - /** - * @param FindPaymentsResult $findPaymentsResult - * @return FindPaymentsResponse - */ - public function setFindPaymentsResult($findPaymentsResult) - { - $this->findPaymentsResult = $findPaymentsResult; - return $this; - } -} diff --git a/Model/Api/Ws/FindPaymentsResult.php b/Model/Api/Ws/FindPaymentsResult.php deleted file mode 100644 index 441ff1c1..00000000 --- a/Model/Api/Ws/FindPaymentsResult.php +++ /dev/null @@ -1,84 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return FindPaymentsResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return FindPaymentsResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return TransactionItem - */ - public function getTransactionItem() - { - return $this->transactionItem; - } - - /** - * @param TransactionItem $transactionItem - * @return FindPaymentsResult - */ - public function setTransactionItem($transactionItem) - { - $this->transactionItem = $transactionItem; - return $this; - } -} diff --git a/Model/Api/Ws/FraudManagementResponse.php b/Model/Api/Ws/FraudManagementResponse.php deleted file mode 100644 index c0263061..00000000 --- a/Model/Api/Ws/FraudManagementResponse.php +++ /dev/null @@ -1,84 +0,0 @@ -riskControl; - } - - /** - * @param RiskControl[] $riskControl - * @return FraudManagementResponse - */ - public function setRiskControl(array $riskControl = null) - { - $this->riskControl = $riskControl; - return $this; - } - - /** - * @return RiskAnalysis[] - */ - public function getRiskAnalysis() - { - return $this->riskAnalysis; - } - - /** - * @param RiskAnalysis[] $riskAnalysis - * @return FraudManagementResponse - */ - public function setRiskAnalysis(array $riskAnalysis = null) - { - $this->riskAnalysis = $riskAnalysis; - return $this; - } - - /** - * @return RiskAssessments - */ - public function getRiskAssessments() - { - return $this->riskAssessments; - } - - /** - * @param RiskAssessments $riskAssessments - * @return FraudManagementResponse - */ - public function setRiskAssessments($riskAssessments) - { - $this->riskAssessments = $riskAssessments; - return $this; - } -} diff --git a/Model/Api/Ws/GetPaymentDetails.php b/Model/Api/Ws/GetPaymentDetails.php deleted file mode 100644 index cb6c3001..00000000 --- a/Model/Api/Ws/GetPaymentDetails.php +++ /dev/null @@ -1,61 +0,0 @@ -queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return GetPaymentDetails - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } - - /** - * @return ExtendedResponseRequest - */ - public function getExtendedResponseRequest() - { - return $this->extendedResponseRequest; - } - - /** - * @param ExtendedResponseRequest $extendedResponseRequest - * @return GetPaymentDetails - */ - public function setExtendedResponseRequest($extendedResponseRequest) - { - $this->extendedResponseRequest = $extendedResponseRequest; - return $this; - } -} diff --git a/Model/Api/Ws/GetPaymentDetailsResponse.php b/Model/Api/Ws/GetPaymentDetailsResponse.php deleted file mode 100644 index 58484ce5..00000000 --- a/Model/Api/Ws/GetPaymentDetailsResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -getPaymentDetailsResult; - } - - /** - * @param GetPaymentDetailsResult $getPaymentDetailsResult - * @return GetPaymentDetailsResponse - */ - public function setGetPaymentDetailsResult($getPaymentDetailsResult) - { - $this->getPaymentDetailsResult = $getPaymentDetailsResult; - return $this; - } -} diff --git a/Model/Api/Ws/GetPaymentDetailsResult.php b/Model/Api/Ws/GetPaymentDetailsResult.php deleted file mode 100644 index 216a5bbb..00000000 --- a/Model/Api/Ws/GetPaymentDetailsResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return GetPaymentDetailsResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return GetPaymentDetailsResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return GetPaymentDetailsResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return GetPaymentDetailsResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return GetPaymentDetailsResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return GetPaymentDetailsResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return GetPaymentDetailsResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return GetPaymentDetailsResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return GetPaymentDetailsResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return GetPaymentDetailsResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return GetPaymentDetailsResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return GetPaymentDetailsResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return TokenResponse - */ - public function getTokenResponse() - { - return $this->tokenResponse; - } - - /** - * @param TokenResponse $tokenResponse - * @return GetPaymentDetailsResult - */ - public function setTokenResponse($tokenResponse) - { - $this->tokenResponse = $tokenResponse; - return $this; - } -} diff --git a/Model/Api/Ws/GetPaymentUuid.php b/Model/Api/Ws/GetPaymentUuid.php deleted file mode 100644 index 4936e7f6..00000000 --- a/Model/Api/Ws/GetPaymentUuid.php +++ /dev/null @@ -1,38 +0,0 @@ -legacyTransactionKeyRequest; - } - - /** - * @param LegacyTransactionKeyRequest $legacyTransactionKeyRequest - * @return GetPaymentUuid - */ - public function setLegacyTransactionKeyRequest($legacyTransactionKeyRequest) - { - $this->legacyTransactionKeyRequest = $legacyTransactionKeyRequest; - return $this; - } -} diff --git a/Model/Api/Ws/GetPaymentUuidResponse.php b/Model/Api/Ws/GetPaymentUuidResponse.php deleted file mode 100644 index 2089cd17..00000000 --- a/Model/Api/Ws/GetPaymentUuidResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -legacyTransactionKeyResult; - } - - /** - * @param LegacyTransactionKeyResult $legacyTransactionKeyResult - * @return GetPaymentUuidResponse - */ - public function setLegacyTransactionKeyResult($legacyTransactionKeyResult) - { - $this->legacyTransactionKeyResult = $legacyTransactionKeyResult; - return $this; - } -} diff --git a/Model/Api/Ws/GetSubscriptionDetails.php b/Model/Api/Ws/GetSubscriptionDetails.php deleted file mode 100644 index 464928b8..00000000 --- a/Model/Api/Ws/GetSubscriptionDetails.php +++ /dev/null @@ -1,38 +0,0 @@ -queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return GetSubscriptionDetails - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/Model/Api/Ws/GetSubscriptionDetailsResponse.php b/Model/Api/Ws/GetSubscriptionDetailsResponse.php deleted file mode 100644 index 4bfdda0d..00000000 --- a/Model/Api/Ws/GetSubscriptionDetailsResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -getSubscriptionDetailsResult; - } - - /** - * @param GetSubscriptionDetailsResult $getSubscriptionDetailsResult - * @return GetSubscriptionDetailsResponse - */ - public function setGetSubscriptionDetailsResult($getSubscriptionDetailsResult) - { - $this->getSubscriptionDetailsResult = $getSubscriptionDetailsResult; - return $this; - } -} diff --git a/Model/Api/Ws/GetSubscriptionDetailsResult.php b/Model/Api/Ws/GetSubscriptionDetailsResult.php deleted file mode 100644 index 1a7f8a6f..00000000 --- a/Model/Api/Ws/GetSubscriptionDetailsResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return GetSubscriptionDetailsResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return GetSubscriptionDetailsResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return GetSubscriptionDetailsResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return GetSubscriptionDetailsResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return GetSubscriptionDetailsResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return GetSubscriptionDetailsResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return GetSubscriptionDetailsResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return GetSubscriptionDetailsResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return GetSubscriptionDetailsResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return GetSubscriptionDetailsResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return GetSubscriptionDetailsResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return GetSubscriptionDetailsResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return TokenResponse - */ - public function getTokenResponse() - { - return $this->tokenResponse; - } - - /** - * @param TokenResponse $tokenResponse - * @return GetSubscriptionDetailsResult - */ - public function setTokenResponse($tokenResponse) - { - $this->tokenResponse = $tokenResponse; - return $this; - } -} diff --git a/Model/Api/Ws/GetTokenDetails.php b/Model/Api/Ws/GetTokenDetails.php deleted file mode 100644 index a5ab08ed..00000000 --- a/Model/Api/Ws/GetTokenDetails.php +++ /dev/null @@ -1,38 +0,0 @@ -queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return GetTokenDetails - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/Model/Api/Ws/GetTokenDetailsResponse.php b/Model/Api/Ws/GetTokenDetailsResponse.php deleted file mode 100644 index fbfaec07..00000000 --- a/Model/Api/Ws/GetTokenDetailsResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -getTokenDetailsResult; - } - - /** - * @param GetTokenDetailsResult $getTokenDetailsResult - * @return GetTokenDetailsResponse - */ - public function setGetTokenDetailsResult($getTokenDetailsResult) - { - $this->getTokenDetailsResult = $getTokenDetailsResult; - return $this; - } -} diff --git a/Model/Api/Ws/GetTokenDetailsResult.php b/Model/Api/Ws/GetTokenDetailsResult.php deleted file mode 100644 index 62263795..00000000 --- a/Model/Api/Ws/GetTokenDetailsResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return GetTokenDetailsResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return GetTokenDetailsResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return GetTokenDetailsResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return GetTokenDetailsResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return GetTokenDetailsResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return GetTokenDetailsResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return GetTokenDetailsResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return GetTokenDetailsResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return GetTokenDetailsResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return GetTokenDetailsResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return GetTokenDetailsResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return GetTokenDetailsResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return TokenResponse - */ - public function getTokenResponse() - { - return $this->tokenResponse; - } - - /** - * @param TokenResponse $tokenResponse - * @return GetTokenDetailsResult - */ - public function setTokenResponse($tokenResponse) - { - $this->tokenResponse = $tokenResponse; - return $this; - } -} diff --git a/Model/Api/Ws/IbanRequest.php b/Model/Api/Ws/IbanRequest.php deleted file mode 100644 index 73125c2f..00000000 --- a/Model/Api/Ws/IbanRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -firstName; - } - - /** - * @param string $firstName - * @return IbanRequest - */ - public function setFirstName($firstName) - { - $this->firstName = $firstName; - return $this; - } - - /** - * @return string - */ - public function getLastName() - { - return $this->lastName; - } - - /** - * @param string $lastName - * @return IbanRequest - */ - public function setLastName($lastName) - { - $this->lastName = $lastName; - return $this; - } - - /** - * @return string - */ - public function getIban() - { - return $this->iban; - } - - /** - * @param string $iban - * @return IbanRequest - */ - public function setIban($iban) - { - $this->iban = $iban; - return $this; - } - - /** - * @return string - */ - public function getLegalName() - { - return $this->legalName; - } - - /** - * @param string $legalName - * @return IbanRequest - */ - public function setLegalName($legalName) - { - $this->legalName = $legalName; - return $this; - } -} diff --git a/Model/Api/Ws/LegacyTransactionKeyRequest.php b/Model/Api/Ws/LegacyTransactionKeyRequest.php deleted file mode 100644 index 58a3e99e..00000000 --- a/Model/Api/Ws/LegacyTransactionKeyRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -transactionId; - } - - /** - * @param string $transactionId - * @return LegacyTransactionKeyRequest - */ - public function setTransactionId($transactionId) - { - $this->transactionId = $transactionId; - return $this; - } - - /** - * @return int - */ - public function getSequenceNumber() - { - return $this->sequenceNumber; - } - - /** - * @param int $sequenceNumber - * @return LegacyTransactionKeyRequest - */ - public function setSequenceNumber($sequenceNumber) - { - $this->sequenceNumber = $sequenceNumber; - return $this; - } - - /** - * @return \DateTime - */ - public function getCreationDate() - { - if ($this->creationDate == null) { - return null; - } else { - try { - return new \DateTime($this->creationDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $creationDate - * @return LegacyTransactionKeyRequest - */ - public function setCreationDate(\DateTime $creationDate = null) - { - if ($creationDate == null) { - $this->creationDate = null; - } else { - $this->creationDate = $creationDate->format(\DateTime::ATOM); - } - return $this; - } -} diff --git a/Model/Api/Ws/LegacyTransactionKeyResult.php b/Model/Api/Ws/LegacyTransactionKeyResult.php deleted file mode 100644 index 6734fc7f..00000000 --- a/Model/Api/Ws/LegacyTransactionKeyResult.php +++ /dev/null @@ -1,61 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return LegacyTransactionKeyResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return LegacyTransactionKeyResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } -} diff --git a/Model/Api/Ws/MarkResponse.php b/Model/Api/Ws/MarkResponse.php deleted file mode 100644 index af9c48a0..00000000 --- a/Model/Api/Ws/MarkResponse.php +++ /dev/null @@ -1,142 +0,0 @@ -amount; - } - - /** - * @param int $amount - * @return MarkResponse - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return MarkResponse - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * @return \DateTime - */ - public function getDate() - { - if ($this->date == null) { - return null; - } else { - try { - return new \DateTime($this->date); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $date - * @return MarkResponse - */ - public function setDate(\DateTime $date = null) - { - if ($date == null) { - $this->date = null; - } else { - $this->date = $date->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return string - */ - public function getNumber() - { - return $this->number; - } - - /** - * @param string $number - * @return MarkResponse - */ - public function setNumber($number) - { - $this->number = $number; - return $this; - } - - /** - * @return int - */ - public function getResult() - { - return $this->result; - } - - /** - * @param int $result - * @return MarkResponse - */ - public function setResult($result) - { - $this->result = $result; - return $this; - } -} diff --git a/Model/Api/Ws/MpiExtensionRequest.php b/Model/Api/Ws/MpiExtensionRequest.php deleted file mode 100644 index 27e201f0..00000000 --- a/Model/Api/Ws/MpiExtensionRequest.php +++ /dev/null @@ -1,38 +0,0 @@ -extensionData; - } - - /** - * @param ExtInfo[] $extensionData - * @return MpiExtensionRequest - */ - public function setExtensionData(array $extensionData = null) - { - $this->extensionData = $extensionData; - return $this; - } -} diff --git a/Model/Api/Ws/OrderRequest.php b/Model/Api/Ws/OrderRequest.php deleted file mode 100644 index 7edd08ec..00000000 --- a/Model/Api/Ws/OrderRequest.php +++ /dev/null @@ -1,61 +0,0 @@ -orderId; - } - - /** - * @param string $orderId - * @return OrderRequest - */ - public function setOrderId($orderId) - { - $this->orderId = $orderId; - return $this; - } - - /** - * @return ExtInfo[] - */ - public function getExtInfo() - { - return $this->extInfo; - } - - /** - * @param ExtInfo[] $extInfo - * @return OrderRequest - */ - public function setExtInfo(array $extInfo = null) - { - $this->extInfo = $extInfo; - return $this; - } -} diff --git a/Model/Api/Ws/OrderResponse.php b/Model/Api/Ws/OrderResponse.php deleted file mode 100644 index 99f7578c..00000000 --- a/Model/Api/Ws/OrderResponse.php +++ /dev/null @@ -1,61 +0,0 @@ -orderId; - } - - /** - * @param string $orderId - * @return OrderResponse - */ - public function setOrderId($orderId) - { - $this->orderId = $orderId; - return $this; - } - - /** - * @return ExtInfo[] - */ - public function getExtInfo() - { - return $this->extInfo; - } - - /** - * @param ExtInfo[] $extInfo - * @return OrderResponse - */ - public function setExtInfo(array $extInfo = null) - { - $this->extInfo = $extInfo; - return $this; - } -} diff --git a/Model/Api/Ws/PaymentRequest.php b/Model/Api/Ws/PaymentRequest.php deleted file mode 100644 index f7c66f87..00000000 --- a/Model/Api/Ws/PaymentRequest.php +++ /dev/null @@ -1,303 +0,0 @@ -transactionId; - } - - /** - * @param string $transactionId - * @return PaymentRequest - */ - public function setTransactionId($transactionId) - { - $this->transactionId = $transactionId; - return $this; - } - - /** - * @return string - */ - public function getRetryUuid() - { - return $this->retryUuid; - } - - /** - * @param string $retryUuid - * @return PaymentRequest - */ - public function setRetryUuid($retryUuid) - { - $this->retryUuid = $retryUuid; - return $this; - } - - /** - * @return int - */ - public function getAmount() - { - return $this->amount; - } - - /** - * @param int $amount - * @return PaymentRequest - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return PaymentRequest - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * @return \DateTime - */ - public function getExpectedCaptureDate() - { - if ($this->expectedCaptureDate == null) { - return null; - } else { - try { - return new \DateTime($this->expectedCaptureDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $expectedCaptureDate - * @return PaymentRequest - */ - public function setExpectedCaptureDate(\DateTime $expectedCaptureDate = null) - { - if ($expectedCaptureDate == null) { - $this->expectedCaptureDate = null; - } else { - $this->expectedCaptureDate = $expectedCaptureDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return int - */ - public function getManualValidation() - { - return $this->manualValidation; - } - - /** - * @param int $manualValidation - * @return PaymentRequest - */ - public function setManualValidation($manualValidation) - { - $this->manualValidation = $manualValidation; - return $this; - } - - /** - * @return string - */ - public function getPaymentOptionCode() - { - return $this->paymentOptionCode; - } - - /** - * @param string $paymentOptionCode - * @return PaymentRequest - */ - public function setPaymentOptionCode($paymentOptionCode) - { - $this->paymentOptionCode = $paymentOptionCode; - return $this; - } - - /** - * @return string - */ - public function getAcquirerTransientData() - { - return $this->acquirerTransientData; - } - - /** - * @param string $acquirerTransientData - * @return PaymentRequest - */ - public function setAcquirerTransientData($acquirerTransientData) - { - $this->acquirerTransientData = $acquirerTransientData; - return $this; - } - - /** - * @return int - */ - public function getFirstInstallmentDelay() - { - return $this->firstInstallmentDelay; - } - - /** - * @param int $firstInstallmentDelay - * @return PaymentRequest - */ - public function setFirstInstallmentDelay($firstInstallmentDelay) - { - $this->firstInstallmentDelay = $firstInstallmentDelay; - return $this; - } - - /** - * @return string - */ - public function getOverridePaymentCinematic() - { - return $this->overridePaymentCinematic; - } - - /** - * @param string $overridePaymentCinematic - * @return PaymentRequest - */ - public function setOverridePaymentCinematic($overridePaymentCinematic) - { - $this->overridePaymentCinematic = $overridePaymentCinematic; - return $this; - } - - /** - * @return string - */ - public function getTaxRate() - { - return $this->taxRate; - } - - /** - * @param string $taxRate - * @return PaymentRequest - */ - public function setTaxRate($taxRate) - { - $this->taxRate = $taxRate; - return $this; - } - - /** - * @return int - */ - public function getTaxAmount() - { - return $this->taxAmount; - } - - /** - * @param int $taxAmount - * @return PaymentRequest - */ - public function setTaxAmount($taxAmount) - { - $this->taxAmount = $taxAmount; - return $this; - } -} diff --git a/Model/Api/Ws/PaymentResponse.php b/Model/Api/Ws/PaymentResponse.php deleted file mode 100644 index dbe4192c..00000000 --- a/Model/Api/Ws/PaymentResponse.php +++ /dev/null @@ -1,499 +0,0 @@ -transactionId; - } - - /** - * @param string $transactionId - * @return PaymentResponse - */ - public function setTransactionId($transactionId) - { - $this->transactionId = $transactionId; - return $this; - } - - /** - * @return int - */ - public function getAmount() - { - return $this->amount; - } - - /** - * @param int $amount - * @return PaymentResponse - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return PaymentResponse - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * @return int - */ - public function getEffectiveAmount() - { - return $this->effectiveAmount; - } - - /** - * @param int $effectiveAmount - * @return PaymentResponse - */ - public function setEffectiveAmount($effectiveAmount) - { - $this->effectiveAmount = $effectiveAmount; - return $this; - } - - /** - * @return int - */ - public function getEffectiveCurrency() - { - return $this->effectiveCurrency; - } - - /** - * @param int $effectiveCurrency - * @return PaymentResponse - */ - public function setEffectiveCurrency($effectiveCurrency) - { - $this->effectiveCurrency = $effectiveCurrency; - return $this; - } - - /** - * @return \DateTime - */ - public function getExpectedCaptureDate() - { - if ($this->expectedCaptureDate == null) { - return null; - } else { - try { - return new \DateTime($this->expectedCaptureDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $expectedCaptureDate - * @return PaymentResponse - */ - public function setExpectedCaptureDate(\DateTime $expectedCaptureDate = null) - { - if ($expectedCaptureDate == null) { - $this->expectedCaptureDate = null; - } else { - $this->expectedCaptureDate = $expectedCaptureDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return int - */ - public function getManualValidation() - { - return $this->manualValidation; - } - - /** - * @param int $manualValidation - * @return PaymentResponse - */ - public function setManualValidation($manualValidation) - { - $this->manualValidation = $manualValidation; - return $this; - } - - /** - * @return int - */ - public function getOperationType() - { - return $this->operationType; - } - - /** - * @param int $operationType - * @return PaymentResponse - */ - public function setOperationType($operationType) - { - $this->operationType = $operationType; - return $this; - } - - /** - * @return \DateTime - */ - public function getCreationDate() - { - if ($this->creationDate == null) { - return null; - } else { - try { - return new \DateTime($this->creationDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $creationDate - * @return PaymentResponse - */ - public function setCreationDate(\DateTime $creationDate = null) - { - if ($creationDate == null) { - $this->creationDate = null; - } else { - $this->creationDate = $creationDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return string - */ - public function getExternalTransactionId() - { - return $this->externalTransactionId; - } - - /** - * @param string $externalTransactionId - * @return PaymentResponse - */ - public function setExternalTransactionId($externalTransactionId) - { - $this->externalTransactionId = $externalTransactionId; - return $this; - } - - /** - * @return string - */ - public function getLiabilityShift() - { - return $this->liabilityShift; - } - - /** - * @param string $liabilityShift - * @return PaymentResponse - */ - public function setLiabilityShift($liabilityShift) - { - $this->liabilityShift = $liabilityShift; - return $this; - } - - /** - * @return string - */ - public function getTransactionUuid() - { - return $this->transactionUuid; - } - - /** - * @param string $transactionUuid - * @return PaymentResponse - */ - public function setTransactionUuid($transactionUuid) - { - $this->transactionUuid = $transactionUuid; - return $this; - } - - /** - * @return int - */ - public function getSequenceNumber() - { - return $this->sequenceNumber; - } - - /** - * @param int $sequenceNumber - * @return PaymentResponse - */ - public function setSequenceNumber($sequenceNumber) - { - $this->sequenceNumber = $sequenceNumber; - return $this; - } - - /** - * @return PaymentType - */ - public function getPaymentType() - { - return $this->paymentType; - } - - /** - * @param PaymentType $paymentType - * @return PaymentResponse - */ - public function setPaymentType($paymentType) - { - $this->paymentType = $paymentType; - return $this; - } - - /** - * @return string - */ - public function getNsu() - { - return $this->nsu; - } - - /** - * @param string $nsu - * @return PaymentResponse - */ - public function setNsu($nsu) - { - $this->nsu = $nsu; - return $this; - } - - /** - * @return int - */ - public function getPaymentError() - { - return $this->paymentError; - } - - /** - * @param int $paymentError - * @return PaymentResponse - */ - public function setPaymentError($paymentError) - { - $this->paymentError = $paymentError; - return $this; - } - - /** - * @return string - */ - public function getWallet() - { - return $this->wallet; - } - - /** - * @param string $wallet - * @return PaymentResponse - */ - public function setWallet($wallet) - { - $this->wallet = $wallet; - return $this; - } - - /** - * @return int - */ - public function getPreTaxAmount() - { - return $this->preTaxAmount; - } - - /** - * @param int $preTaxAmount - * @return PaymentResponse - */ - public function setPreTaxAmount($preTaxAmount) - { - $this->preTaxAmount = $preTaxAmount; - return $this; - } - - /** - * @return string - */ - public function getTaxRate() - { - return $this->taxRate; - } - - /** - * @param string $taxRate - * @return PaymentResponse - */ - public function setTaxRate($taxRate) - { - $this->taxRate = $taxRate; - return $this; - } - - /** - * @return int - */ - public function getTaxAmount() - { - return $this->taxAmount; - } - - /** - * @param int $taxAmount - * @return PaymentResponse - */ - public function setTaxAmount($taxAmount) - { - $this->taxAmount = $taxAmount; - return $this; - } -} diff --git a/Model/Api/Ws/PaymentType.php b/Model/Api/Ws/PaymentType.php deleted file mode 100644 index 6989a3ce..00000000 --- a/Model/Api/Ws/PaymentType.php +++ /dev/null @@ -1,21 +0,0 @@ -uuid; - } - - /** - * @param string $uuid - * @return QueryRequest - */ - public function setUuid($uuid) - { - $this->uuid = $uuid; - return $this; - } - - /** - * @return string - */ - public function getOrderId() - { - return $this->orderId; - } - - /** - * @param string $orderId - * @return QueryRequest - */ - public function setOrderId($orderId) - { - $this->orderId = $orderId; - return $this; - } - - /** - * @return string - */ - public function getSubscriptionId() - { - return $this->subscriptionId; - } - - /** - * @param string $subscriptionId - * @return QueryRequest - */ - public function setSubscriptionId($subscriptionId) - { - $this->subscriptionId = $subscriptionId; - return $this; - } - - /** - * @return string - */ - public function getPaymentToken() - { - return $this->paymentToken; - } - - /** - * @param string $paymentToken - * @return QueryRequest - */ - public function setPaymentToken($paymentToken) - { - $this->paymentToken = $paymentToken; - return $this; - } -} diff --git a/Model/Api/Ws/ReactivateToken.php b/Model/Api/Ws/ReactivateToken.php deleted file mode 100644 index 04326d13..00000000 --- a/Model/Api/Ws/ReactivateToken.php +++ /dev/null @@ -1,38 +0,0 @@ -queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return ReactivateToken - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/Model/Api/Ws/ReactivateTokenResponse.php b/Model/Api/Ws/ReactivateTokenResponse.php deleted file mode 100644 index b61801cc..00000000 --- a/Model/Api/Ws/ReactivateTokenResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -reactivateTokenResult; - } - - /** - * @param ReactivateTokenResult $reactivateTokenResult - * @return ReactivateTokenResponse - */ - public function setReactivateTokenResult($reactivateTokenResult) - { - $this->reactivateTokenResult = $reactivateTokenResult; - return $this; - } -} diff --git a/Model/Api/Ws/ReactivateTokenResult.php b/Model/Api/Ws/ReactivateTokenResult.php deleted file mode 100644 index 5d45d38e..00000000 --- a/Model/Api/Ws/ReactivateTokenResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return ReactivateTokenResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/Model/Api/Ws/RefundPayment.php b/Model/Api/Ws/RefundPayment.php deleted file mode 100644 index 38d892ed..00000000 --- a/Model/Api/Ws/RefundPayment.php +++ /dev/null @@ -1,84 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return RefundPayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return PaymentRequest - */ - public function getPaymentRequest() - { - return $this->paymentRequest; - } - - /** - * @param PaymentRequest $paymentRequest - * @return RefundPayment - */ - public function setPaymentRequest($paymentRequest) - { - $this->paymentRequest = $paymentRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return RefundPayment - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/Model/Api/Ws/RefundPaymentResponse.php b/Model/Api/Ws/RefundPaymentResponse.php deleted file mode 100644 index 15fad106..00000000 --- a/Model/Api/Ws/RefundPaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -refundPaymentResult; - } - - /** - * @param RefundPaymentResult $refundPaymentResult - * @return RefundPaymentResponse - */ - public function setRefundPaymentResult($refundPaymentResult) - { - $this->refundPaymentResult = $refundPaymentResult; - return $this; - } -} diff --git a/Model/Api/Ws/RefundPaymentResult.php b/Model/Api/Ws/RefundPaymentResult.php deleted file mode 100644 index cfc7468e..00000000 --- a/Model/Api/Ws/RefundPaymentResult.php +++ /dev/null @@ -1,268 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return RefundPaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return RefundPaymentResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return RefundPaymentResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return RefundPaymentResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return RefundPaymentResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return RefundPaymentResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return RefundPaymentResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return RefundPaymentResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return RefundPaymentResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return RefundPaymentResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return RefundPaymentResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } -} diff --git a/Model/Api/Ws/ResultWrapper.php b/Model/Api/Ws/ResultWrapper.php deleted file mode 100644 index 8ead946a..00000000 --- a/Model/Api/Ws/ResultWrapper.php +++ /dev/null @@ -1,76 +0,0 @@ -response['vads_result'] = sprintf('%02d', $commonResponse->getResponseCode()); - $this->response['vads_extra_result'] = ''; // It is directly returned in responseCodeDetail. - $this->response['vads_message'] = $commonResponse->getResponseCodeDetail(); - $this->response['vads_trans_status'] = $commonResponse->getTransactionStatusLabel(); - - if ($paymentResponse) { - $this->response['vads_warranty_result'] = $paymentResponse->getLiabilityShift(); - $this->response['vads_trans_id'] = $paymentResponse->getTransactionId(); - $this->response['vads_trans_uuid'] = $paymentResponse->getTransactionUuid(); - $this->response['vads_sequence_number'] = $paymentResponse->getSequenceNumber(); - $this->response['vads_operation_type'] = $paymentResponse->getOperationType() == 1 ? 'CREDIT' : 'DEBIT'; - - $this->response['vads_currency'] = $paymentResponse->getCurrency(); - $this->response['vads_amount'] = $paymentResponse->getAmount(); - $this->response['vads_effective_amount'] = $paymentResponse->getEffectiveAmount(); - - $date = $paymentResponse->getExpectedCaptureDate() ? - $paymentResponse->getExpectedCaptureDate()->getTimestamp() : time(); - $this->response['vads_presentation_date'] = date('YmdHis', $date); - } - - if ($authorizationResponse) { - $this->response['vads_auth_result'] = sprintf('%02d', $authorizationResponse->getResult()); - } - - if ($cardResponse) { - $this->response['vads_card_brand'] = $cardResponse->getBrand(); - $this->response['vads_card_number'] = $cardResponse->getNumber(); - $this->response['vads_expiry_month'] = $cardResponse->getExpiryMonth(); - $this->response['vads_expiry_year'] = $cardResponse->getExpiryYear(); - } - - if ($threeDSResponse) { - $this->response['vads_threeds_status'] = $threeDSResponse->getAuthenticationResultData()->getStatus(); - $this->response['vads_threeds_cavv'] = $threeDSResponse->getAuthenticationResultData()->getCavv(); - } - - if ($fraudManagementResponse) { - $this->response['vads_risk_control'] = $fraudManagementResponse->getRiskControl(); - $this->response['vads_risk_assessment_result'] = $fraudManagementResponse->getRiskAssessments() ? - $fraudManagementResponse->getRiskAssessments()->getResults() : ''; - } - } - - public function getResponseParams() - { - return $this->response; - } -} diff --git a/Model/Api/Ws/RiskAnalysis.php b/Model/Api/Ws/RiskAnalysis.php deleted file mode 100644 index 69714082..00000000 --- a/Model/Api/Ws/RiskAnalysis.php +++ /dev/null @@ -1,153 +0,0 @@ -score; - } - - /** - * @param string $score - * @return RiskAnalysis - */ - public function setScore($score) - { - $this->score = $score; - return $this; - } - - /** - * @return string - */ - public function getResultCode() - { - return $this->resultCode; - } - - /** - * @param string $resultCode - * @return RiskAnalysis - */ - public function setResultCode($resultCode) - { - $this->resultCode = $resultCode; - return $this; - } - - /** - * @return RiskAnalysisProcessingStatus - */ - public function getStatus() - { - return $this->status; - } - - /** - * @param RiskAnalysisProcessingStatus $status - * @return RiskAnalysis - */ - public function setStatus($status) - { - $this->status = $status; - return $this; - } - - /** - * @return string - */ - public function getRequestId() - { - return $this->requestId; - } - - /** - * @param string $requestId - * @return RiskAnalysis - */ - public function setRequestId($requestId) - { - $this->requestId = $requestId; - return $this; - } - - /** - * @return ExtInfo[] - */ - public function getExtraInfo() - { - return $this->extraInfo; - } - - /** - * @param ExtInfo[] $extraInfo - * @return RiskAnalysis - */ - public function setExtraInfo(array $extraInfo = null) - { - $this->extraInfo = $extraInfo; - return $this; - } - - /** - * @return string - */ - public function getFingerPrintId() - { - return $this->fingerPrintId; - } - - /** - * @param string $fingerPrintId - * @return RiskAnalysis - */ - public function setFingerPrintId($fingerPrintId) - { - $this->fingerPrintId = $fingerPrintId; - return $this; - } -} diff --git a/Model/Api/Ws/RiskAnalysisProcessingStatus.php b/Model/Api/Ws/RiskAnalysisProcessingStatus.php deleted file mode 100644 index 2f0c1125..00000000 --- a/Model/Api/Ws/RiskAnalysisProcessingStatus.php +++ /dev/null @@ -1,23 +0,0 @@ -results; - } - - /** - * @param string $results - * @return RiskAssessments - */ - public function setResults($results) - { - $this->results = $results; - return $this; - } -} diff --git a/Model/Api/Ws/RiskControl.php b/Model/Api/Ws/RiskControl.php deleted file mode 100644 index 9d720ff5..00000000 --- a/Model/Api/Ws/RiskControl.php +++ /dev/null @@ -1,61 +0,0 @@ -name; - } - - /** - * @param string $name - * @return RiskControl - */ - public function setName($name) - { - $this->name = $name; - return $this; - } - - /** - * @return string - */ - public function getResult() - { - return $this->result; - } - - /** - * @param string $result - * @return RiskControl - */ - public function setResult($result) - { - $this->result = $result; - return $this; - } -} diff --git a/Model/Api/Ws/SettlementRequest.php b/Model/Api/Ws/SettlementRequest.php deleted file mode 100644 index 65dbcee7..00000000 --- a/Model/Api/Ws/SettlementRequest.php +++ /dev/null @@ -1,96 +0,0 @@ -transactionUuids; - } - - /** - * @param string[] $transactionUuids - * @return SettlementRequest - */ - public function setTransactionUuids(array $transactionUuids = null) - { - $this->transactionUuids = $transactionUuids; - return $this; - } - - /** - * @return float - */ - public function getCommission() - { - return $this->commission; - } - - /** - * @param float $commission - * @return SettlementRequest - */ - public function setCommission($commission) - { - $this->commission = $commission; - return $this; - } - - /** - * @return \DateTime - */ - public function getDate() - { - if ($this->date == null) { - return null; - } else { - try { - return new \DateTime($this->date); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $date - * @return SettlementRequest - */ - public function setDate(\DateTime $date = null) - { - if ($date == null) { - $this->date = null; - } else { - $this->date = $date->format(\DateTime::ATOM); - } - return $this; - } -} diff --git a/Model/Api/Ws/ShippingDetailsRequest.php b/Model/Api/Ws/ShippingDetailsRequest.php deleted file mode 100644 index b2914469..00000000 --- a/Model/Api/Ws/ShippingDetailsRequest.php +++ /dev/null @@ -1,406 +0,0 @@ -type; - } - - /** - * @param CustStatus $type - * @return ShippingDetailsRequest - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * @return string - */ - public function getFirstName() - { - return $this->firstName; - } - - /** - * @param string $firstName - * @return ShippingDetailsRequest - */ - public function setFirstName($firstName) - { - $this->firstName = $firstName; - return $this; - } - - /** - * @return string - */ - public function getLastName() - { - return $this->lastName; - } - - /** - * @param string $lastName - * @return ShippingDetailsRequest - */ - public function setLastName($lastName) - { - $this->lastName = $lastName; - return $this; - } - - /** - * @return string - */ - public function getPhoneNumber() - { - return $this->phoneNumber; - } - - /** - * @param string $phoneNumber - * @return ShippingDetailsRequest - */ - public function setPhoneNumber($phoneNumber) - { - $this->phoneNumber = $phoneNumber; - return $this; - } - - /** - * @return string - */ - public function getStreetNumber() - { - return $this->streetNumber; - } - - /** - * @param string $streetNumber - * @return ShippingDetailsRequest - */ - public function setStreetNumber($streetNumber) - { - $this->streetNumber = $streetNumber; - return $this; - } - - /** - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * @param string $address - * @return ShippingDetailsRequest - */ - public function setAddress($address) - { - $this->address = $address; - return $this; - } - - /** - * @return string - */ - public function getAddress2() - { - return $this->address2; - } - - /** - * @param string $address2 - * @return ShippingDetailsRequest - */ - public function setAddress2($address2) - { - $this->address2 = $address2; - return $this; - } - - /** - * @return string - */ - public function getDistrict() - { - return $this->district; - } - - /** - * @param string $district - * @return ShippingDetailsRequest - */ - public function setDistrict($district) - { - $this->district = $district; - return $this; - } - - /** - * @return string - */ - public function getZipCode() - { - return $this->zipCode; - } - - /** - * @param string $zipCode - * @return ShippingDetailsRequest - */ - public function setZipCode($zipCode) - { - $this->zipCode = $zipCode; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - * @return ShippingDetailsRequest - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * @param string $state - * @return ShippingDetailsRequest - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * @return string - */ - public function getCountry() - { - return $this->country; - } - - /** - * @param string $country - * @return ShippingDetailsRequest - */ - public function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * @return string - */ - public function getDeliveryCompanyName() - { - return $this->deliveryCompanyName; - } - - /** - * @param string $deliveryCompanyName - * @return ShippingDetailsRequest - */ - public function setDeliveryCompanyName($deliveryCompanyName) - { - $this->deliveryCompanyName = $deliveryCompanyName; - return $this; - } - - /** - * @return DeliverySpeed - */ - public function getShippingSpeed() - { - return $this->shippingSpeed; - } - - /** - * @param DeliverySpeed $shippingSpeed - * @return ShippingDetailsRequest - */ - public function setShippingSpeed($shippingSpeed) - { - $this->shippingSpeed = $shippingSpeed; - return $this; - } - - /** - * @return DeliveryType - */ - public function getShippingMethod() - { - return $this->shippingMethod; - } - - /** - * @param DeliveryType $shippingMethod - * @return ShippingDetailsRequest - */ - public function setShippingMethod($shippingMethod) - { - $this->shippingMethod = $shippingMethod; - return $this; - } - - /** - * @return string - */ - public function getLegalName() - { - return $this->legalName; - } - - /** - * @param string $legalName - * @return ShippingDetailsRequest - */ - public function setLegalName($legalName) - { - $this->legalName = $legalName; - return $this; - } - - /** - * @return string - */ - public function getIdentityCode() - { - return $this->identityCode; - } - - /** - * @param string $identityCode - * @return ShippingDetailsRequest - */ - public function setIdentityCode($identityCode) - { - $this->identityCode = $identityCode; - return $this; - } -} diff --git a/Model/Api/Ws/ShippingDetailsResponse.php b/Model/Api/Ws/ShippingDetailsResponse.php deleted file mode 100644 index f65cab2e..00000000 --- a/Model/Api/Ws/ShippingDetailsResponse.php +++ /dev/null @@ -1,406 +0,0 @@ -type; - } - - /** - * @param CustStatus $type - * @return ShippingDetailsResponse - */ - public function setType($type) - { - $this->type = $type; - return $this; - } - - /** - * @return string - */ - public function getFirstName() - { - return $this->firstName; - } - - /** - * @param string $firstName - * @return ShippingDetailsResponse - */ - public function setFirstName($firstName) - { - $this->firstName = $firstName; - return $this; - } - - /** - * @return string - */ - public function getLastName() - { - return $this->lastName; - } - - /** - * @param string $lastName - * @return ShippingDetailsResponse - */ - public function setLastName($lastName) - { - $this->lastName = $lastName; - return $this; - } - - /** - * @return string - */ - public function getPhoneNumber() - { - return $this->phoneNumber; - } - - /** - * @param string $phoneNumber - * @return ShippingDetailsResponse - */ - public function setPhoneNumber($phoneNumber) - { - $this->phoneNumber = $phoneNumber; - return $this; - } - - /** - * @return string - */ - public function getStreetNumber() - { - return $this->streetNumber; - } - - /** - * @param string $streetNumber - * @return ShippingDetailsResponse - */ - public function setStreetNumber($streetNumber) - { - $this->streetNumber = $streetNumber; - return $this; - } - - /** - * @return string - */ - public function getAddress() - { - return $this->address; - } - - /** - * @param string $address - * @return ShippingDetailsResponse - */ - public function setAddress($address) - { - $this->address = $address; - return $this; - } - - /** - * @return string - */ - public function getAddress2() - { - return $this->address2; - } - - /** - * @param string $address2 - * @return ShippingDetailsResponse - */ - public function setAddress2($address2) - { - $this->address2 = $address2; - return $this; - } - - /** - * @return string - */ - public function getDistrict() - { - return $this->district; - } - - /** - * @param string $district - * @return ShippingDetailsResponse - */ - public function setDistrict($district) - { - $this->district = $district; - return $this; - } - - /** - * @return string - */ - public function getZipCode() - { - return $this->zipCode; - } - - /** - * @param string $zipCode - * @return ShippingDetailsResponse - */ - public function setZipCode($zipCode) - { - $this->zipCode = $zipCode; - return $this; - } - - /** - * @return string - */ - public function getCity() - { - return $this->city; - } - - /** - * @param string $city - * @return ShippingDetailsResponse - */ - public function setCity($city) - { - $this->city = $city; - return $this; - } - - /** - * @return string - */ - public function getState() - { - return $this->state; - } - - /** - * @param string $state - * @return ShippingDetailsResponse - */ - public function setState($state) - { - $this->state = $state; - return $this; - } - - /** - * @return string - */ - public function getCountry() - { - return $this->country; - } - - /** - * @param string $country - * @return ShippingDetailsResponse - */ - public function setCountry($country) - { - $this->country = $country; - return $this; - } - - /** - * @return string - */ - public function getDeliveryCompanyName() - { - return $this->deliveryCompanyName; - } - - /** - * @param string $deliveryCompanyName - * @return ShippingDetailsResponse - */ - public function setDeliveryCompanyName($deliveryCompanyName) - { - $this->deliveryCompanyName = $deliveryCompanyName; - return $this; - } - - /** - * @return DeliverySpeed - */ - public function getShippingSpeed() - { - return $this->shippingSpeed; - } - - /** - * @param DeliverySpeed $shippingSpeed - * @return ShippingDetailsResponse - */ - public function setShippingSpeed($shippingSpeed) - { - $this->shippingSpeed = $shippingSpeed; - return $this; - } - - /** - * @return DeliveryType - */ - public function getShippingMethod() - { - return $this->shippingMethod; - } - - /** - * @param DeliveryType $shippingMethod - * @return ShippingDetailsResponse - */ - public function setShippingMethod($shippingMethod) - { - $this->shippingMethod = $shippingMethod; - return $this; - } - - /** - * @return string - */ - public function getLegalName() - { - return $this->legalName; - } - - /** - * @param string $legalName - * @return ShippingDetailsResponse - */ - public function setLegalName($legalName) - { - $this->legalName = $legalName; - return $this; - } - - /** - * @return string - */ - public function getIdentityCode() - { - return $this->identityCode; - } - - /** - * @param string $identityCode - * @return ShippingDetailsResponse - */ - public function setIdentityCode($identityCode) - { - $this->identityCode = $identityCode; - return $this; - } -} diff --git a/Model/Api/Ws/ShoppingCartRequest.php b/Model/Api/Ws/ShoppingCartRequest.php deleted file mode 100644 index fe2013fb..00000000 --- a/Model/Api/Ws/ShoppingCartRequest.php +++ /dev/null @@ -1,107 +0,0 @@ -insuranceAmount; - } - - /** - * @param int $insuranceAmount - * @return ShoppingCartRequest - */ - public function setInsuranceAmount($insuranceAmount) - { - $this->insuranceAmount = $insuranceAmount; - return $this; - } - - /** - * @return int - */ - public function getShippingAmount() - { - return $this->shippingAmount; - } - - /** - * @param int $shippingAmount - * @return ShoppingCartRequest - */ - public function setShippingAmount($shippingAmount) - { - $this->shippingAmount = $shippingAmount; - return $this; - } - - /** - * @return int - */ - public function getTaxAmount() - { - return $this->taxAmount; - } - - /** - * @param int $taxAmount - * @return ShoppingCartRequest - */ - public function setTaxAmount($taxAmount) - { - $this->taxAmount = $taxAmount; - return $this; - } - - /** - * @return CartItemInfo[] - */ - public function getCartItemInfo() - { - return $this->cartItemInfo; - } - - /** - * @param CartItemInfo[] $cartItemInfo - * @return ShoppingCartRequest - */ - public function setCartItemInfo(array $cartItemInfo) - { - $this->cartItemInfo = $cartItemInfo; - return $this; - } -} diff --git a/Model/Api/Ws/ShoppingCartResponse.php b/Model/Api/Ws/ShoppingCartResponse.php deleted file mode 100644 index 15f4b83b..00000000 --- a/Model/Api/Ws/ShoppingCartResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -cartItemInfo; - } - - /** - * @param CartItemInfo[] $cartItemInfo - * @return ShoppingCartResponse - */ - public function setCartItemInfo(array $cartItemInfo = null) - { - $this->cartItemInfo = $cartItemInfo; - return $this; - } -} diff --git a/Model/Api/Ws/SubscriptionRequest.php b/Model/Api/Ws/SubscriptionRequest.php deleted file mode 100644 index 8706059f..00000000 --- a/Model/Api/Ws/SubscriptionRequest.php +++ /dev/null @@ -1,211 +0,0 @@ -subscriptionId; - } - - /** - * @param string $subscriptionId - * @return SubscriptionRequest - */ - public function setSubscriptionId($subscriptionId) - { - $this->subscriptionId = $subscriptionId; - return $this; - } - - /** - * @return \DateTime - */ - public function getEffectDate() - { - if ($this->effectDate == null) { - return null; - } else { - try { - return new \DateTime($this->effectDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $effectDate - * @return SubscriptionRequest - */ - public function setEffectDate(\DateTime $effectDate = null) - { - if ($effectDate == null) { - $this->effectDate = null; - } else { - $this->effectDate = $effectDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return int - */ - public function getAmount() - { - return $this->amount; - } - - /** - * @param int $amount - * @return SubscriptionRequest - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return SubscriptionRequest - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * @return int - */ - public function getInitialAmount() - { - return $this->initialAmount; - } - - /** - * @param int $initialAmount - * @return SubscriptionRequest - */ - public function setInitialAmount($initialAmount) - { - $this->initialAmount = $initialAmount; - return $this; - } - - /** - * @return int - */ - public function getInitialAmountNumber() - { - return $this->initialAmountNumber; - } - - /** - * @param int $initialAmountNumber - * @return SubscriptionRequest - */ - public function setInitialAmountNumber($initialAmountNumber) - { - $this->initialAmountNumber = $initialAmountNumber; - return $this; - } - - /** - * @return string - */ - public function getRrule() - { - return $this->rrule; - } - - /** - * @param string $rrule - * @return SubscriptionRequest - */ - public function setRrule($rrule) - { - $this->rrule = $rrule; - return $this; - } - - /** - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * @param string $description - * @return SubscriptionRequest - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } -} diff --git a/Model/Api/Ws/SubscriptionResponse.php b/Model/Api/Ws/SubscriptionResponse.php deleted file mode 100644 index b65b0ee3..00000000 --- a/Model/Api/Ws/SubscriptionResponse.php +++ /dev/null @@ -1,292 +0,0 @@ -subscriptionId; - } - - /** - * @param string $subscriptionId - * @return SubscriptionResponse - */ - public function setSubscriptionId($subscriptionId) - { - $this->subscriptionId = $subscriptionId; - return $this; - } - - /** - * @return \DateTime - */ - public function getEffectDate() - { - if ($this->effectDate == null) { - return null; - } else { - try { - return new \DateTime($this->effectDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $effectDate - * @return SubscriptionResponse - */ - public function setEffectDate(\DateTime $effectDate = null) - { - if ($effectDate == null) { - $this->effectDate = null; - } else { - $this->effectDate = $effectDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return \DateTime - */ - public function getCancelDate() - { - if ($this->cancelDate == null) { - return null; - } else { - try { - return new \DateTime($this->cancelDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $cancelDate - * @return SubscriptionResponse - */ - public function setCancelDate(\DateTime $cancelDate = null) - { - if ($cancelDate == null) { - $this->cancelDate = null; - } else { - $this->cancelDate = $cancelDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return int - */ - public function getInitialAmount() - { - return $this->initialAmount; - } - - /** - * @param int $initialAmount - * @return SubscriptionResponse - */ - public function setInitialAmount($initialAmount) - { - $this->initialAmount = $initialAmount; - return $this; - } - - /** - * @return string - */ - public function getRrule() - { - return $this->rrule; - } - - /** - * @param string $rrule - * @return SubscriptionResponse - */ - public function setRrule($rrule) - { - $this->rrule = $rrule; - return $this; - } - - /** - * @return string - */ - public function getDescription() - { - return $this->description; - } - - /** - * @param string $description - * @return SubscriptionResponse - */ - public function setDescription($description) - { - $this->description = $description; - return $this; - } - - /** - * @return int - */ - public function getInitialAmountNumber() - { - return $this->initialAmountNumber; - } - - /** - * @param int $initialAmountNumber - * @return SubscriptionResponse - */ - public function setInitialAmountNumber($initialAmountNumber) - { - $this->initialAmountNumber = $initialAmountNumber; - return $this; - } - - /** - * @return int - */ - public function getPastPaymentNumber() - { - return $this->pastPaymentNumber; - } - - /** - * @param int $pastPaymentNumber - * @return SubscriptionResponse - */ - public function setPastPaymentNumber($pastPaymentNumber) - { - $this->pastPaymentNumber = $pastPaymentNumber; - return $this; - } - - /** - * @return int - */ - public function getTotalPaymentNumber() - { - return $this->totalPaymentNumber; - } - - /** - * @param int $totalPaymentNumber - * @return SubscriptionResponse - */ - public function setTotalPaymentNumber($totalPaymentNumber) - { - $this->totalPaymentNumber = $totalPaymentNumber; - return $this; - } - - /** - * @return int - */ - public function getAmount() - { - return $this->amount; - } - - /** - * @param int $amount - * @return SubscriptionResponse - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return SubscriptionResponse - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } -} diff --git a/Model/Api/Ws/TechRequest.php b/Model/Api/Ws/TechRequest.php deleted file mode 100644 index 2ca73eb8..00000000 --- a/Model/Api/Ws/TechRequest.php +++ /dev/null @@ -1,84 +0,0 @@ -browserUserAgent; - } - - /** - * @param string $browserUserAgent - * @return TechRequest - */ - public function setBrowserUserAgent($browserUserAgent) - { - $this->browserUserAgent = $browserUserAgent; - return $this; - } - - /** - * @return string - */ - public function getBrowserAccept() - { - return $this->browserAccept; - } - - /** - * @param string $browserAccept - * @return TechRequest - */ - public function setBrowserAccept($browserAccept) - { - $this->browserAccept = $browserAccept; - return $this; - } - - /** - * @return string - */ - public function getIntegrationType() - { - return $this->integrationType; - } - - /** - * @param string $integrationType - * @return TechRequest - */ - public function setIntegrationType($integrationType) - { - $this->integrationType = $integrationType; - return $this; - } -} diff --git a/Model/Api/Ws/ThreeDSMode.php b/Model/Api/Ws/ThreeDSMode.php deleted file mode 100644 index 4a32de6e..00000000 --- a/Model/Api/Ws/ThreeDSMode.php +++ /dev/null @@ -1,20 +0,0 @@ -mode; - } - - /** - * @param ThreeDSMode $mode - * @return ThreeDSRequest - */ - public function setMode($mode) - { - $this->mode = $mode; - return $this; - } - - /** - * @return string - */ - public function getRequestId() - { - return $this->requestId; - } - - /** - * @param string $requestId - * @return ThreeDSRequest - */ - public function setRequestId($requestId) - { - $this->requestId = $requestId; - return $this; - } - - /** - * @return string - */ - public function getPares() - { - return $this->pares; - } - - /** - * @param string $pares - * @return ThreeDSRequest - */ - public function setPares($pares) - { - $this->pares = $pares; - return $this; - } - - /** - * @return string - */ - public function getBrand() - { - return $this->brand; - } - - /** - * @param string $brand - * @return ThreeDSRequest - */ - public function setBrand($brand) - { - $this->brand = $brand; - return $this; - } - - /** - * @return string - */ - public function getEnrolled() - { - return $this->enrolled; - } - - /** - * @param string $enrolled - * @return ThreeDSRequest - */ - public function setEnrolled($enrolled) - { - $this->enrolled = $enrolled; - return $this; - } - - /** - * @return string - */ - public function getStatus() - { - return $this->status; - } - - /** - * @param string $status - * @return ThreeDSRequest - */ - public function setStatus($status) - { - $this->status = $status; - return $this; - } - - /** - * @return string - */ - public function getEci() - { - return $this->eci; - } - - /** - * @param string $eci - * @return ThreeDSRequest - */ - public function setEci($eci) - { - $this->eci = $eci; - return $this; - } - - /** - * @return string - */ - public function getXid() - { - return $this->xid; - } - - /** - * @param string $xid - * @return ThreeDSRequest - */ - public function setXid($xid) - { - $this->xid = $xid; - return $this; - } - - /** - * @return string - */ - public function getCavv() - { - return $this->cavv; - } - - /** - * @param string $cavv - * @return ThreeDSRequest - */ - public function setCavv($cavv) - { - $this->cavv = $cavv; - return $this; - } - - /** - * @return string - */ - public function getAlgorithm() - { - return $this->algorithm; - } - - /** - * @param string $algorithm - * @return ThreeDSRequest - */ - public function setAlgorithm($algorithm) - { - $this->algorithm = $algorithm; - return $this; - } - - /** - * @return MpiExtensionRequest - */ - public function getMpiExtension() - { - return $this->mpiExtension; - } - - /** - * @param MpiExtensionRequest $mpiExtension - * @return ThreeDSRequest - */ - public function setMpiExtension($mpiExtension) - { - $this->mpiExtension = $mpiExtension; - return $this; - } -} diff --git a/Model/Api/Ws/ThreeDSResponse.php b/Model/Api/Ws/ThreeDSResponse.php deleted file mode 100644 index fda0619e..00000000 --- a/Model/Api/Ws/ThreeDSResponse.php +++ /dev/null @@ -1,61 +0,0 @@ -authenticationRequestData; - } - - /** - * @param AuthenticationRequestData $authenticationRequestData - * @return ThreeDSResponse - */ - public function setAuthenticationRequestData($authenticationRequestData) - { - $this->authenticationRequestData = $authenticationRequestData; - return $this; - } - - /** - * @return AuthenticationResultData - */ - public function getAuthenticationResultData() - { - return $this->authenticationResultData; - } - - /** - * @param AuthenticationResultData $authenticationResultData - * @return ThreeDSResponse - */ - public function setAuthenticationResultData($authenticationResultData) - { - $this->authenticationResultData = $authenticationResultData; - return $this; - } -} diff --git a/Model/Api/Ws/TokenRequest.php b/Model/Api/Ws/TokenRequest.php deleted file mode 100644 index f5c3b899..00000000 --- a/Model/Api/Ws/TokenRequest.php +++ /dev/null @@ -1,38 +0,0 @@ -currency; - } - - /** - * @param string $currency - * @return TokenRequest - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } -} diff --git a/Model/Api/Ws/TokenResponse.php b/Model/Api/Ws/TokenResponse.php deleted file mode 100644 index 2f9741df..00000000 --- a/Model/Api/Ws/TokenResponse.php +++ /dev/null @@ -1,85 +0,0 @@ -creationDate == null) { - return null; - } else { - try { - return new \DateTime($this->creationDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $creationDate - * @return TokenResponse - */ - public function setCreationDate(\DateTime $creationDate = null) - { - if ($creationDate == null) { - $this->creationDate = null; - } else { - $this->creationDate = $creationDate->format(\DateTime::ATOM); - } - return $this; - } - - /** - * @return \DateTime - */ - public function getCancellationDate() - { - if ($this->cancellationDate == null) { - return null; - } else { - try { - return new \DateTime($this->cancellationDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $cancellationDate - * @return TokenResponse - */ - public function setCancellationDate(\DateTime $cancellationDate = null) - { - if ($cancellationDate == null) { - $this->cancellationDate = null; - } else { - $this->cancellationDate = $cancellationDate->format(\DateTime::ATOM); - } - return $this; - } -} diff --git a/Model/Api/Ws/TransactionItem.php b/Model/Api/Ws/TransactionItem.php deleted file mode 100644 index b24c881b..00000000 --- a/Model/Api/Ws/TransactionItem.php +++ /dev/null @@ -1,142 +0,0 @@ -transactionUuid; - } - - /** - * @param string $transactionUuid - * @return TransactionItem - */ - public function setTransactionUuid($transactionUuid) - { - $this->transactionUuid = $transactionUuid; - return $this; - } - - /** - * @return string - */ - public function getTransactionStatusLabel() - { - return $this->transactionStatusLabel; - } - - /** - * @param string $transactionStatusLabel - * @return TransactionItem - */ - public function setTransactionStatusLabel($transactionStatusLabel) - { - $this->transactionStatusLabel = $transactionStatusLabel; - return $this; - } - - /** - * @return int - */ - public function getAmount() - { - return $this->amount; - } - - /** - * @param int $amount - * @return TransactionItem - */ - public function setAmount($amount) - { - $this->amount = $amount; - return $this; - } - - /** - * @return int - */ - public function getCurrency() - { - return $this->currency; - } - - /** - * @param int $currency - * @return TransactionItem - */ - public function setCurrency($currency) - { - $this->currency = $currency; - return $this; - } - - /** - * @return \DateTime - */ - public function getExpectedCaptureDate() - { - if ($this->expectedCaptureDate == null) { - return null; - } else { - try { - return new \DateTime($this->expectedCaptureDate); - } catch (\Exception $e) { - return false; - } - } - } - - /** - * @param \DateTime $expectedCaptureDate - * @return TransactionItem - */ - public function setExpectedCaptureDate(\DateTime $expectedCaptureDate = null) - { - if ($expectedCaptureDate == null) { - $this->expectedCaptureDate = null; - } else { - $this->expectedCaptureDate = $expectedCaptureDate->format(\DateTime::ATOM); - } - return $this; - } -} diff --git a/Model/Api/Ws/UpdatePayment.php b/Model/Api/Ws/UpdatePayment.php deleted file mode 100644 index 3d4e8fc7..00000000 --- a/Model/Api/Ws/UpdatePayment.php +++ /dev/null @@ -1,84 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return UpdatePayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return UpdatePayment - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } - - /** - * @return PaymentRequest - */ - public function getPaymentRequest() - { - return $this->paymentRequest; - } - - /** - * @param PaymentRequest $paymentRequest - * @return UpdatePayment - */ - public function setPaymentRequest($paymentRequest) - { - $this->paymentRequest = $paymentRequest; - return $this; - } -} diff --git a/Model/Api/Ws/UpdatePaymentDetails.php b/Model/Api/Ws/UpdatePaymentDetails.php deleted file mode 100644 index f1c9949a..00000000 --- a/Model/Api/Ws/UpdatePaymentDetails.php +++ /dev/null @@ -1,61 +0,0 @@ -queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return UpdatePaymentDetails - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } - - /** - * @return ShoppingCartRequest - */ - public function getShoppingCartRequest() - { - return $this->shoppingCartRequest; - } - - /** - * @param ShoppingCartRequest $shoppingCartRequest - * @return UpdatePaymentDetails - */ - public function setShoppingCartRequest($shoppingCartRequest) - { - $this->shoppingCartRequest = $shoppingCartRequest; - return $this; - } -} diff --git a/Model/Api/Ws/UpdatePaymentDetailsResponse.php b/Model/Api/Ws/UpdatePaymentDetailsResponse.php deleted file mode 100644 index 059b3304..00000000 --- a/Model/Api/Ws/UpdatePaymentDetailsResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -updatePaymentDetailsResult; - } - - /** - * @param UpdatePaymentDetailsResult $updatePaymentDetailsResult - * @return UpdatePaymentDetailsResponse - */ - public function setUpdatePaymentDetailsResult($updatePaymentDetailsResult) - { - $this->updatePaymentDetailsResult = $updatePaymentDetailsResult; - return $this; - } -} diff --git a/Model/Api/Ws/UpdatePaymentDetailsResult.php b/Model/Api/Ws/UpdatePaymentDetailsResult.php deleted file mode 100644 index 2967adaf..00000000 --- a/Model/Api/Ws/UpdatePaymentDetailsResult.php +++ /dev/null @@ -1,314 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return UpdatePaymentDetailsResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return UpdatePaymentDetailsResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return UpdatePaymentDetailsResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return UpdatePaymentDetailsResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return UpdatePaymentDetailsResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return UpdatePaymentDetailsResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return UpdatePaymentDetailsResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return UpdatePaymentDetailsResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return UpdatePaymentDetailsResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return UpdatePaymentDetailsResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return UpdatePaymentDetailsResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return UpdatePaymentDetailsResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } - - /** - * @return ShoppingCartResponse - */ - public function getShoppingCartResponse() - { - return $this->shoppingCartResponse; - } - - /** - * @param ShoppingCartResponse $shoppingCartResponse - * @return UpdatePaymentDetailsResult - */ - public function setShoppingCartResponse($shoppingCartResponse) - { - $this->shoppingCartResponse = $shoppingCartResponse; - return $this; - } -} diff --git a/Model/Api/Ws/UpdatePaymentResponse.php b/Model/Api/Ws/UpdatePaymentResponse.php deleted file mode 100644 index 161685f5..00000000 --- a/Model/Api/Ws/UpdatePaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -updatePaymentResult; - } - - /** - * @param UpdatePaymentResult $updatePaymentResult - * @return UpdatePaymentResponse - */ - public function setUpdatePaymentResult($updatePaymentResult) - { - $this->updatePaymentResult = $updatePaymentResult; - return $this; - } -} diff --git a/Model/Api/Ws/UpdatePaymentResult.php b/Model/Api/Ws/UpdatePaymentResult.php deleted file mode 100644 index 32c89ffb..00000000 --- a/Model/Api/Ws/UpdatePaymentResult.php +++ /dev/null @@ -1,291 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return UpdatePaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return UpdatePaymentResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return UpdatePaymentResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return UpdatePaymentResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return UpdatePaymentResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return UpdatePaymentResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return UpdatePaymentResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return UpdatePaymentResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return UpdatePaymentResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return UpdatePaymentResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return UpdatePaymentResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return UpdatePaymentResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } -} diff --git a/Model/Api/Ws/UpdateRefund.php b/Model/Api/Ws/UpdateRefund.php deleted file mode 100644 index 7f512e88..00000000 --- a/Model/Api/Ws/UpdateRefund.php +++ /dev/null @@ -1,84 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return UpdateRefund - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return UpdateRefund - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } - - /** - * @return PaymentRequest - */ - public function getPaymentRequest() - { - return $this->paymentRequest; - } - - /** - * @param PaymentRequest $paymentRequest - * @return UpdateRefund - */ - public function setPaymentRequest($paymentRequest) - { - $this->paymentRequest = $paymentRequest; - return $this; - } -} diff --git a/Model/Api/Ws/UpdateRefundResponse.php b/Model/Api/Ws/UpdateRefundResponse.php deleted file mode 100644 index 9c6decb5..00000000 --- a/Model/Api/Ws/UpdateRefundResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -updateRefundResult; - } - - /** - * @param UpdateRefundResult $updateRefundResult - * @return UpdateRefundResponse - */ - public function setUpdateRefundResult($updateRefundResult) - { - $this->updateRefundResult = $updateRefundResult; - return $this; - } -} diff --git a/Model/Api/Ws/UpdateRefundResult.php b/Model/Api/Ws/UpdateRefundResult.php deleted file mode 100644 index e5520b92..00000000 --- a/Model/Api/Ws/UpdateRefundResult.php +++ /dev/null @@ -1,291 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return UpdateRefundResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return UpdateRefundResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return UpdateRefundResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return UpdateRefundResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return UpdateRefundResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return UpdateRefundResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return UpdateRefundResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return UpdateRefundResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return UpdateRefundResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return UpdateRefundResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return UpdateRefundResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return UpdateRefundResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } -} diff --git a/Model/Api/Ws/UpdateSubscription.php b/Model/Api/Ws/UpdateSubscription.php deleted file mode 100644 index 5ae0b42d..00000000 --- a/Model/Api/Ws/UpdateSubscription.php +++ /dev/null @@ -1,84 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return UpdateSubscription - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return UpdateSubscription - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } - - /** - * @return SubscriptionRequest - */ - public function getSubscriptionRequest() - { - return $this->subscriptionRequest; - } - - /** - * @param SubscriptionRequest $subscriptionRequest - * @return UpdateSubscription - */ - public function setSubscriptionRequest($subscriptionRequest) - { - $this->subscriptionRequest = $subscriptionRequest; - return $this; - } -} diff --git a/Model/Api/Ws/UpdateSubscriptionResponse.php b/Model/Api/Ws/UpdateSubscriptionResponse.php deleted file mode 100644 index 97e17259..00000000 --- a/Model/Api/Ws/UpdateSubscriptionResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -updateSubscriptionResult; - } - - /** - * @param UpdateSubscriptionResult $updateSubscriptionResult - * @return UpdateSubscriptionResponse - */ - public function setUpdateSubscriptionResult($updateSubscriptionResult) - { - $this->updateSubscriptionResult = $updateSubscriptionResult; - return $this; - } -} diff --git a/Model/Api/Ws/UpdateSubscriptionResult.php b/Model/Api/Ws/UpdateSubscriptionResult.php deleted file mode 100644 index 2c4d300d..00000000 --- a/Model/Api/Ws/UpdateSubscriptionResult.php +++ /dev/null @@ -1,291 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return UpdateSubscriptionResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return UpdateSubscriptionResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return UpdateSubscriptionResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return UpdateSubscriptionResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return UpdateSubscriptionResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return UpdateSubscriptionResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return UpdateSubscriptionResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return UpdateSubscriptionResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return UpdateSubscriptionResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return UpdateSubscriptionResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return UpdateSubscriptionResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return UpdateSubscriptionResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } -} diff --git a/Model/Api/Ws/UpdateToken.php b/Model/Api/Ws/UpdateToken.php deleted file mode 100644 index 68120969..00000000 --- a/Model/Api/Ws/UpdateToken.php +++ /dev/null @@ -1,130 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return UpdateToken - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return UpdateToken - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } - - /** - * @return CardRequest - */ - public function getCardRequest() - { - return $this->cardRequest; - } - - /** - * @param CardRequest $cardRequest - * @return UpdateToken - */ - public function setCardRequest($cardRequest) - { - $this->cardRequest = $cardRequest; - return $this; - } - - /** - * @return CustomerRequest - */ - public function getCustomerRequest() - { - return $this->customerRequest; - } - - /** - * @param CustomerRequest $customerRequest - * @return UpdateToken - */ - public function setCustomerRequest($customerRequest) - { - $this->customerRequest = $customerRequest; - return $this; - } - - /** - * @return TokenRequest - */ - public function getTokenRequest() - { - return $this->tokenRequest; - } - - /** - * @param TokenRequest $tokenRequest - * @return UpdateToken - */ - public function setTokenRequest($tokenRequest) - { - $this->tokenRequest = $tokenRequest; - return $this; - } -} diff --git a/Model/Api/Ws/UpdateTokenResponse.php b/Model/Api/Ws/UpdateTokenResponse.php deleted file mode 100644 index 523b91b0..00000000 --- a/Model/Api/Ws/UpdateTokenResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -updateTokenResult; - } - - /** - * @param UpdateTokenResult $updateTokenResult - * @return UpdateTokenResponse - */ - public function setUpdateTokenResult($updateTokenResult) - { - $this->updateTokenResult = $updateTokenResult; - return $this; - } -} diff --git a/Model/Api/Ws/UpdateTokenResult.php b/Model/Api/Ws/UpdateTokenResult.php deleted file mode 100644 index 8cb29ff0..00000000 --- a/Model/Api/Ws/UpdateTokenResult.php +++ /dev/null @@ -1,291 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return UpdateTokenResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return PaymentResponse - */ - public function getPaymentResponse() - { - return $this->paymentResponse; - } - - /** - * @param PaymentResponse $paymentResponse - * @return UpdateTokenResult - */ - public function setPaymentResponse($paymentResponse) - { - $this->paymentResponse = $paymentResponse; - return $this; - } - - /** - * @return OrderResponse - */ - public function getOrderResponse() - { - return $this->orderResponse; - } - - /** - * @param OrderResponse $orderResponse - * @return UpdateTokenResult - */ - public function setOrderResponse($orderResponse) - { - $this->orderResponse = $orderResponse; - return $this; - } - - /** - * @return CardResponse - */ - public function getCardResponse() - { - return $this->cardResponse; - } - - /** - * @param CardResponse $cardResponse - * @return UpdateTokenResult - */ - public function setCardResponse($cardResponse) - { - $this->cardResponse = $cardResponse; - return $this; - } - - /** - * @return AuthorizationResponse - */ - public function getAuthorizationResponse() - { - return $this->authorizationResponse; - } - - /** - * @param AuthorizationResponse $authorizationResponse - * @return UpdateTokenResult - */ - public function setAuthorizationResponse($authorizationResponse) - { - $this->authorizationResponse = $authorizationResponse; - return $this; - } - - /** - * @return CaptureResponse - */ - public function getCaptureResponse() - { - return $this->captureResponse; - } - - /** - * @param CaptureResponse $captureResponse - * @return UpdateTokenResult - */ - public function setCaptureResponse($captureResponse) - { - $this->captureResponse = $captureResponse; - return $this; - } - - /** - * @return CustomerResponse - */ - public function getCustomerResponse() - { - return $this->customerResponse; - } - - /** - * @param CustomerResponse $customerResponse - * @return UpdateTokenResult - */ - public function setCustomerResponse($customerResponse) - { - $this->customerResponse = $customerResponse; - return $this; - } - - /** - * @return MarkResponse - */ - public function getMarkResponse() - { - return $this->markResponse; - } - - /** - * @param MarkResponse $markResponse - * @return UpdateTokenResult - */ - public function setMarkResponse($markResponse) - { - $this->markResponse = $markResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return UpdateTokenResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } - - /** - * @return ExtraResponse - */ - public function getExtraResponse() - { - return $this->extraResponse; - } - - /** - * @param ExtraResponse $extraResponse - * @return UpdateTokenResult - */ - public function setExtraResponse($extraResponse) - { - $this->extraResponse = $extraResponse; - return $this; - } - - /** - * @return SubscriptionResponse - */ - public function getSubscriptionResponse() - { - return $this->subscriptionResponse; - } - - /** - * @param SubscriptionResponse $subscriptionResponse - * @return UpdateTokenResult - */ - public function setSubscriptionResponse($subscriptionResponse) - { - $this->subscriptionResponse = $subscriptionResponse; - return $this; - } - - /** - * @return FraudManagementResponse - */ - public function getFraudManagementResponse() - { - return $this->fraudManagementResponse; - } - - /** - * @param FraudManagementResponse $fraudManagementResponse - * @return UpdateTokenResult - */ - public function setFraudManagementResponse($fraudManagementResponse) - { - $this->fraudManagementResponse = $fraudManagementResponse; - return $this; - } -} diff --git a/Model/Api/Ws/ValidatePayment.php b/Model/Api/Ws/ValidatePayment.php deleted file mode 100644 index 1c3786c7..00000000 --- a/Model/Api/Ws/ValidatePayment.php +++ /dev/null @@ -1,61 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return ValidatePayment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return QueryRequest - */ - public function getQueryRequest() - { - return $this->queryRequest; - } - - /** - * @param QueryRequest $queryRequest - * @return ValidatePayment - */ - public function setQueryRequest($queryRequest) - { - $this->queryRequest = $queryRequest; - return $this; - } -} diff --git a/Model/Api/Ws/ValidatePaymentResponse.php b/Model/Api/Ws/ValidatePaymentResponse.php deleted file mode 100644 index cb3fc2ff..00000000 --- a/Model/Api/Ws/ValidatePaymentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -validatePaymentResult; - } - - /** - * @param ValidatePaymentResult $validatePaymentResult - * @return ValidatePaymentResponse - */ - public function setValidatePaymentResult($validatePaymentResult) - { - $this->validatePaymentResult = $validatePaymentResult; - return $this; - } -} diff --git a/Model/Api/Ws/ValidatePaymentResult.php b/Model/Api/Ws/ValidatePaymentResult.php deleted file mode 100644 index 70f7da1c..00000000 --- a/Model/Api/Ws/ValidatePaymentResult.php +++ /dev/null @@ -1,38 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return ValidatePaymentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } -} diff --git a/Model/Api/Ws/VerifyThreeDSEnrollment.php b/Model/Api/Ws/VerifyThreeDSEnrollment.php deleted file mode 100644 index 36a638d7..00000000 --- a/Model/Api/Ws/VerifyThreeDSEnrollment.php +++ /dev/null @@ -1,130 +0,0 @@ -commonRequest; - } - - /** - * @param CommonRequest $commonRequest - * @return VerifyThreeDSEnrollment - */ - public function setCommonRequest($commonRequest) - { - $this->commonRequest = $commonRequest; - return $this; - } - - /** - * @return PaymentRequest - */ - public function getPaymentRequest() - { - return $this->paymentRequest; - } - - /** - * @param PaymentRequest $paymentRequest - * @return VerifyThreeDSEnrollment - */ - public function setPaymentRequest($paymentRequest) - { - $this->paymentRequest = $paymentRequest; - return $this; - } - - /** - * @return CardRequest - */ - public function getCardRequest() - { - return $this->cardRequest; - } - - /** - * @param CardRequest $cardRequest - * @return VerifyThreeDSEnrollment - */ - public function setCardRequest($cardRequest) - { - $this->cardRequest = $cardRequest; - return $this; - } - - /** - * @return TechRequest - */ - public function getTechRequest() - { - return $this->techRequest; - } - - /** - * @param TechRequest $techRequest - * @return VerifyThreeDSEnrollment - */ - public function setTechRequest($techRequest) - { - $this->techRequest = $techRequest; - return $this; - } - - /** - * @return ThreeDSRequest - */ - public function getThreeDSRequest() - { - return $this->threeDSRequest; - } - - /** - * @param ThreeDSRequest $threeDSRequest - * @return VerifyThreeDSEnrollment - */ - public function setThreeDSRequest($threeDSRequest) - { - $this->threeDSRequest = $threeDSRequest; - return $this; - } -} diff --git a/Model/Api/Ws/VerifyThreeDSEnrollmentResponse.php b/Model/Api/Ws/VerifyThreeDSEnrollmentResponse.php deleted file mode 100644 index 957c4f94..00000000 --- a/Model/Api/Ws/VerifyThreeDSEnrollmentResponse.php +++ /dev/null @@ -1,38 +0,0 @@ -verifyThreeDSEnrollmentResult; - } - - /** - * @param VerifyThreeDSEnrollmentResult $verifyThreeDSEnrollmentResult - * @return VerifyThreeDSEnrollmentResponse - */ - public function setVerifyThreeDSEnrollmentResult($verifyThreeDSEnrollmentResult) - { - $this->verifyThreeDSEnrollmentResult = $verifyThreeDSEnrollmentResult; - return $this; - } -} diff --git a/Model/Api/Ws/VerifyThreeDSEnrollmentResult.php b/Model/Api/Ws/VerifyThreeDSEnrollmentResult.php deleted file mode 100644 index 696a740b..00000000 --- a/Model/Api/Ws/VerifyThreeDSEnrollmentResult.php +++ /dev/null @@ -1,61 +0,0 @@ -commonResponse; - } - - /** - * @param CommonResponse $commonResponse - * @return VerifyThreeDSEnrollmentResult - */ - public function setCommonResponse($commonResponse) - { - $this->commonResponse = $commonResponse; - return $this; - } - - /** - * @return ThreeDSResponse - */ - public function getThreeDSResponse() - { - return $this->threeDSResponse; - } - - /** - * @param ThreeDSResponse $threeDSResponse - * @return VerifyThreeDSEnrollmentResult - */ - public function setThreeDSResponse($threeDSResponse) - { - $this->threeDSResponse = $threeDSResponse; - return $this; - } -} diff --git a/Model/Api/Ws/WsApi.php b/Model/Api/Ws/WsApi.php deleted file mode 100644 index 9ca56581..00000000 --- a/Model/Api/Ws/WsApi.php +++ /dev/null @@ -1,575 +0,0 @@ - true, 'SNI_server_name' => $url['host']); - - unset($options['sni.enabled']); - } - - $options = array_merge(array( - 'trace' => true, - 'exceptions' => true, - 'soapaction' => '', - 'cache_wsdl' => WSDL_CACHE_NONE, - 'features' => SOAP_SINGLE_ELEMENT_ARRAYS, - 'connection_timeout' => self::TIMEOUT, - 'encoding' => 'UTF-8', - 'soap_version' => SOAP_1_2, - 'stream_context' => stream_context_create( - array('ssl' => $ssl, 'http' => array('user_agent' => 'PHPSoapClient')) - ) - ), $options); - - parent::__construct($wsdl, $options); - } - - public function init($shopId, $mode, $keyTest, $keyProd) - { - $this->mode = $mode; - $this->shopId = $shopId; - $this->key = ($mode === 'PRODUCTION') ? $keyProd : $keyTest; - } - - public function getAuthToken($data1, $data2) - { - $authToken = base64_encode(hash_hmac('sha256', $data1 . $data2, $this->key, true)); - return $authToken; - } - - public function genUuid() - { - if ($data = $this->genRandomBytes()) { - $data[6] = chr(ord($data[6]) & 0x0f | 0x40); // Set version to 100. - $data[8] = chr(ord($data[8]) & 0x3f | 0x80); // Set bits 6 & 7 to 10. - - return vsprintf('%s%s-%s-%s-%s-%s%s%s', str_split(bin2hex($data), 4)); - } else { - return sprintf( - '%04x%04x-%04x-%04x-%04x-%04x%04x%04x', - mt_rand(0, 0xffff), - mt_rand(0, 0xffff), - mt_rand(0, 0xffff), - mt_rand(0, 0x0fff) | 0x4000, - mt_rand(0, 0x3fff) | 0x8000, - mt_rand(0, 0xffff), - mt_rand(0, 0xffff), - mt_rand(0, 0xffff) - ); - } - } - - private function genRandomBytes() - { - if (function_exists('random_bytes')) { - // PHP 7 code. - try { - return random_bytes(16); - } catch(\Exception $e) { - // Try something else below. - } - } - - if (function_exists('openssl_random_pseudo_bytes')) { - // PHP 5.3 code but needs OpenSSL library. - return openssl_random_pseudo_bytes(16); - } - - return null; - } - - public function setHeaders() - { - $this->__setSoapHeaders(null); - - $requestId = $this->genUuid(); - $timestamp = gmdate(self::DATE_FORMAT); - $authToken = $this->getAuthToken($requestId, $timestamp); - - // Create headers for shopId, requestId, timestamp, mode and authToken. - $headers = array(); - - $headers[] = new \SOAPHeader(self::HEADER_NAMESPACE, 'shopId', $this->shopId); - $headers[] = new \SOAPHeader(self::HEADER_NAMESPACE, 'requestId', $requestId); - $headers[] = new \SOAPHeader(self::HEADER_NAMESPACE, 'timestamp', $timestamp); - $headers[] = new \SOAPHeader(self::HEADER_NAMESPACE, 'mode', $this->mode); - $headers[] = new \SOAPHeader(self::HEADER_NAMESPACE, 'authToken', $authToken); - - // Set headers to soap client. - $this->__setSoapHeaders($headers); - - return $requestId; - } - - public function getJsessionId() - { - // Retrieve header of the last response. - $header = $this->__getLastResponseHeaders(); - - $matches = array(); - if (!preg_match('#JSESSIONID=([A-Za-z0-9\._]+)#', $header, $matches)) { - // No session created by gateway. - throw new \SoapFault('PayzenSID', 'No session ID returned by gateway.' . $header); - } - - return $matches[1]; - } - - public function setJsessionId($sid) - { - $this->__setCookie('JSESSIONID', $sid); - } - - public function checkAuthenticity() - { - // Retrieve SOAP header to check response authenticity. - $dom = new \DOMDocument(); - $dom->loadXML($this->__getLastResponse(), LIBXML_NOWARNING); - - $path = new \DOMXPath($dom); - $xmlHeaders = $path->query('//*[local-name()="Header"]/*'); - - $headers = array(); - foreach ($xmlHeaders as $xmlHeader) { - $headers[$xmlHeader->nodeName] = $xmlHeader->nodeValue; - } - - if ($this->shopId !== $headers['shopId']) { - throw new \UnexpectedValueException("Inconsistent returned shopId {$headers['shopId']}.", -1); - } - - if ($this->mode !== $headers['mode']) { - throw new \UnexpectedValueException("Inconsistent returned mode {$headers['mode']}.", -1); - } - - $authToken = $this->getAuthToken($headers['timestamp'], $headers['requestId']); - if ($authToken !== $headers['authToken']) { - throw new \UnexpectedValueException('Authentication failed.', -1); - } - } - - public function checkResult(CommonResponse $commonResponse, array $expectedStatuses = array()) - { - if ($commonResponse->getResponseCode() !== 0) { - throw new \UnexpectedValueException( - $commonResponse->getResponseCodeDetail(), - $commonResponse->getResponseCode() - ); - } - - if (!empty($expectedStatuses) && !in_array($commonResponse->getTransactionStatusLabel(), $expectedStatuses)) { - throw new \UnexpectedValueException( - "Unexpected transaction status returned ({$commonResponse->getTransactionStatusLabel()})." - ); - } - } - - /** - * @param CancelCapturedPayment $parameters - * @return CancelCapturedPaymentResponse - */ - public function cancelCapturedPayment(CancelCapturedPayment $parameters) - { - return $this->__soapCall('cancelCapturedPayment', array($parameters)); - } - - /** - * @param CapturePayment $parameters - * @return CapturePaymentResponse - */ - public function capturePayment(CapturePayment $parameters) - { - return $this->__soapCall('capturePayment', array($parameters)); - } - - /** - * @param CreateTokenByIban $parameters - * @return CreateTokenByIbanResponse - */ - public function createTokenByIban(CreateTokenByIban $parameters) - { - return $this->__soapCall('createTokenByIban', array($parameters)); - } - - /** - * @param ReactivateToken $parameters - * @return ReactivateTokenResponse - */ - public function reactivateToken(ReactivateToken $parameters) - { - return $this->__soapCall('reactivateToken', array($parameters)); - } - - /** - * @param DuplicatePayment $parameters - * @return DuplicatePaymentResponse - */ - public function duplicatePayment(DuplicatePayment $parameters) - { - return $this->__soapCall('duplicatePayment', array($parameters)); - } - - /** - * @param CancelPayment $parameters - * @return CancelPaymentResponse - */ - public function cancelPayment(CancelPayment $parameters) - { - return $this->__soapCall('cancelPayment', array($parameters)); - } - - /** - * @param CancelRefund $parameters - * @return CancelRefundResponse - */ - public function cancelRefund(CancelRefund $parameters) - { - return $this->__soapCall('cancelRefund', array($parameters)); - } - - /** - * @param CheckThreeDSAuthentication $parameters - * @return CheckThreeDSAuthenticationResponse - */ - public function checkThreeDSAuthentication(CheckThreeDSAuthentication $parameters) - { - return $this->__soapCall('checkThreeDSAuthentication', array($parameters)); - } - - /** - * @param UpdatePayment $parameters - * @return UpdatePaymentResponse - */ - public function updatePayment(UpdatePayment $parameters) - { - return $this->__soapCall('updatePayment', array($parameters)); - } - - /** - * @param UpdatePaymentDetails $parameters - * @return UpdatePaymentDetailsResponse - */ - public function updatePaymentDetails(UpdatePaymentDetails $parameters) - { - return $this->__soapCall('updatePaymentDetails', array($parameters)); - } - - /** - * @param GetPaymentDetails $parameters - * @return GetPaymentDetailsResponse - */ - public function getPaymentDetails(GetPaymentDetails $parameters) - { - return $this->__soapCall('getPaymentDetails', array($parameters)); - } - - /** - * @param UpdateToken $parameters - * @return UpdateTokenResponse - */ - public function updateToken(UpdateToken $parameters) - { - return $this->__soapCall('updateToken', array($parameters)); - } - - /** - * @param UpdateRefund $parameters - * @return UpdateRefundResponse - */ - public function updateRefund(UpdateRefund $parameters) - { - return $this->__soapCall('updateRefund', array($parameters)); - } - - /** - * @param CancelSubscription $parameters - * @return CancelSubscriptionResponse - */ - public function cancelSubscription(CancelSubscription $parameters) - { - return $this->__soapCall('cancelSubscription', array($parameters)); - } - - /** - * @param RefundPayment $parameters - * @return RefundPaymentResponse - */ - public function refundPayment(RefundPayment $parameters) - { - return $this->__soapCall('refundPayment', array($parameters)); - } - - /** - * @param CreateTokenFromTransaction $parameters - * @return CreateTokenFromTransactionResponse - */ - public function createTokenFromTransaction(CreateTokenFromTransaction $parameters) - { - return $this->__soapCall('createTokenFromTransaction', array($parameters)); - } - - /** - * @param VerifyThreeDSEnrollment $parameters - * @return VerifyThreeDSEnrollmentResponse - */ - public function verifyThreeDSEnrollment(VerifyThreeDSEnrollment $parameters) - { - return $this->__soapCall('verifyThreeDSEnrollment', array($parameters)); - } - - /** - * @param ValidatePayment $parameters - * @return ValidatePaymentResponse - */ - public function validatePayment(ValidatePayment $parameters) - { - return $this->__soapCall('validatePayment', array($parameters)); - } - - /** - * @param GetPaymentUuid $parameters - * @return GetPaymentUuidResponse - */ - public function getPaymentUuid(GetPaymentUuid $parameters) - { - return $this->__soapCall('getPaymentUuid', array($parameters)); - } - - /** - * @param CreatePayment $parameters - * @return CreatePaymentResponse - */ - public function createPayment(CreatePayment $parameters) - { - return $this->__soapCall('createPayment', array($parameters)); - } - - /** - * @param CreateSubscription $parameters - * @return CreateSubscriptionResponse - */ - public function createSubscription(CreateSubscription $parameters) - { - return $this->__soapCall('createSubscription', array($parameters)); - } - - /** - * @param GetSubscriptionDetails $parameters - * @return GetSubscriptionDetailsResponse - */ - public function getSubscriptionDetails(GetSubscriptionDetails $parameters) - { - return $this->__soapCall('getSubscriptionDetails', array($parameters)); - } - - /** - * @param UpdateSubscription $parameters - * @return UpdateSubscriptionResponse - */ - public function updateSubscription(UpdateSubscription $parameters) - { - return $this->__soapCall('updateSubscription', array($parameters)); - } - - /** - * @param CancelToken $parameters - * @return CancelTokenResponse - */ - public function cancelToken(CancelToken $parameters) - { - return $this->__soapCall('cancelToken', array($parameters)); - } - - /** - * @param CreateToken $parameters - * @return CreateTokenResponse - */ - public function createToken(CreateToken $parameters) - { - return $this->__soapCall('createToken', array($parameters)); - } - - /** - * @param FindPayments $parameters - * @return FindPaymentsResponse - */ - public function findPayments(FindPayments $parameters) - { - return $this->__soapCall('findPayments', array($parameters)); - } - - /** - * @param GetTokenDetails $parameters - * @return GetTokenDetailsResponse - */ - public function getTokenDetails(GetTokenDetails $parameters) - { - return $this->__soapCall('getTokenDetails', array($parameters)); - } -} diff --git a/Model/Api/Ws/WsApiClassLoader.php b/Model/Api/Ws/WsApiClassLoader.php deleted file mode 100644 index 44b56144..00000000 --- a/Model/Api/Ws/WsApiClassLoader.php +++ /dev/null @@ -1,55 +0,0 @@ -requestId; - } - - /** - * @param string $requestId - * @return WsResponse - */ - public function setRequestId($requestId) - { - $this->requestId = $requestId; - return $this; - } -} diff --git a/Model/ChoozeoConfigProvider.php b/Model/ChoozeoConfigProvider.php index cc51618b..28837d04 100644 --- a/Model/ChoozeoConfigProvider.php +++ b/Model/ChoozeoConfigProvider.php @@ -12,38 +12,26 @@ class ChoozeoConfigProvider extends \Lyranetwork\Payzen\Model\PayzenConfigProvider { /** - * * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\UrlInterface $urlBuilder - * @param \Psr\Log\LoggerInterface $logger - * @param \Magento\Payment\Helper\Data $paymentHelper * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param string $methodCode */ public function __construct( \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\UrlInterface $urlBuilder, - \Psr\Log\LoggerInterface $logger, - \Magento\Payment\Helper\Data $paymentHelper, \Lyranetwork\Payzen\Helper\Data $dataHelper ) { parent::__construct( $storeManager, - $assetRepo, $urlBuilder, - $logger, - $paymentHelper, $dataHelper, \Lyranetwork\Payzen\Helper\Data::METHOD_CHOOZEO ); } /** - * * {@inheritdoc} - * */ public function getConfig() { @@ -61,7 +49,7 @@ private function getAvailableOptions() $options = []; foreach ($this->method->getAvailableOptions($amount) as $option) { $card = $option['code']; - $icon = $this->assetRepo->getUrlWithParams('Lyranetwork_Payzen::images/cc/' . strtolower($card). '.png', []); + $icon = $this->getCcTypeImageSrc($card); $options[] = [ 'key' => $card, diff --git a/Model/FranfinanceConfigProvider.php b/Model/FranfinanceConfigProvider.php new file mode 100644 index 00000000..332cb1e0 --- /dev/null +++ b/Model/FranfinanceConfigProvider.php @@ -0,0 +1,67 @@ +method->getCode()]['availableOptions'] = $this->getAvailableOptions(); + + return $config; + } + + private function getAvailableOptions() + { + $quote = $this->dataHelper->getCheckoutQuote(); + $amount = ($quote && $quote->getId()) ? $quote->getBaseGrandTotal() : null; + + $options = []; + foreach ($this->method->getAvailableOptions($amount) as $key => $option) { + // Get final option description. + $count = substr($option['payment_means'], -2, 1); + $c = is_numeric($count) ? $count : 1; + + $search = array('%c'); + $replace = array($c); + $label = str_replace($search, $replace, $option['label']); // Label to display on payment page. + + $options[] = [ + 'key' => $key, + 'label' => $label + ]; + } + + return $options; + } +} diff --git a/Model/FullcbConfigProvider.php b/Model/FullcbConfigProvider.php index 89c38789..162d7c65 100644 --- a/Model/FullcbConfigProvider.php +++ b/Model/FullcbConfigProvider.php @@ -12,44 +12,32 @@ class FullcbConfigProvider extends \Lyranetwork\Payzen\Model\PayzenConfigProvider { /** - * * @var \Magento\Framework\Stdlib\DateTime\TimezoneInterface */ protected $timezone; /** - * * @var \Magento\Framework\Pricing\Helper\Data */ protected $pricingHelper; /** - * * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\UrlInterface $urlBuilder - * @param \Psr\Log\LoggerInterface $logger - * @param \Magento\Payment\Helper\Data $paymentHelper * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param \Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezone * @param \Magento\Framework\Pricing\Helper\Data $pricingHelper */ public function __construct( \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\UrlInterface $urlBuilder, - \Psr\Log\LoggerInterface $logger, - \Magento\Payment\Helper\Data $paymentHelper, \Lyranetwork\Payzen\Helper\Data $dataHelper, \Magento\Framework\Stdlib\DateTime\TimezoneInterface $timezone, \Magento\Framework\Pricing\Helper\Data $pricingHelper ) { parent::__construct( $storeManager, - $assetRepo, $urlBuilder, - $logger, - $paymentHelper, $dataHelper, \Lyranetwork\Payzen\Helper\Data::METHOD_FULLCB ); @@ -59,9 +47,7 @@ public function __construct( } /** - * * {@inheritdoc} - * */ public function getConfig() { diff --git a/Model/GiftConfigProvider.php b/Model/GiftConfigProvider.php index e23d948a..a370e527 100644 --- a/Model/GiftConfigProvider.php +++ b/Model/GiftConfigProvider.php @@ -12,29 +12,19 @@ class GiftConfigProvider extends \Lyranetwork\Payzen\Model\PayzenConfigProvider { /** - * * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\UrlInterface $urlBuilder - * @param \Psr\Log\LoggerInterface $logger - * @param \Magento\Payment\Helper\Data $paymentHelper * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param string $methodCode */ public function __construct( \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\UrlInterface $urlBuilder, - \Psr\Log\LoggerInterface $logger, - \Magento\Payment\Helper\Data $paymentHelper, \Lyranetwork\Payzen\Helper\Data $dataHelper ) { parent::__construct( $storeManager, - $assetRepo, $urlBuilder, - $logger, - $paymentHelper, $dataHelper, \Lyranetwork\Payzen\Helper\Data::METHOD_GIFT ); diff --git a/Model/Logger/Handler/Payzen.php b/Model/Logger/Handler/Payzen.php index 22d50792..2ca50f96 100644 --- a/Model/Logger/Handler/Payzen.php +++ b/Model/Logger/Handler/Payzen.php @@ -12,13 +12,11 @@ class Payzen extends \Magento\Framework\Logger\Handler\Base { /** - * * @var string */ protected $fileName = '/var/log/payzen.log'; /** - * * @var int */ protected $loggerType = \Monolog\Logger::INFO; diff --git a/Model/Method/Franfinance.php b/Model/Method/Franfinance.php new file mode 100644 index 00000000..15d374bd --- /dev/null +++ b/Model/Method/Franfinance.php @@ -0,0 +1,133 @@ +payzenRequest->set('validation_mode', '0'); + $this->payzenRequest->set('capture_delay', '0'); + + $info = $this->getInfoInstance(); + + // Override with selected FranFinance payment card. + $option = @unserialize($info->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::FRANFINANCE_OPTION)); + $this->payzenRequest->set('payment_cards', $option['payment_means']); + + $fees = $option['fees'] ? 'Y' : 'N'; + $code = substr($option['payment_means'], -2); + $this->payzenRequest->set('acquirer_transient_data', '{"FRANFINANCE":{"FEES_' . $code . '":"' . $fees . '"}}'); + } + + /** + * Assign data to info model instance. + * + * @param \Magento\Framework\DataObject $data + * @return $this + */ + public function assignData(\Magento\Framework\DataObject $data) + { + parent::assignData($data); + + $info = $this->getInfoInstance(); + + $payzenData = $this->extractPaymentData($data); + + // Load option information. + $option = $this->getOption($payzenData->getData('payzen_franfinance_option')); + $info->setAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::FRANFINANCE_OPTION, serialize($option)); + + return $this; + } + + /** + * Return true if the method can be used at this time. + * + * @param \Magento\Quote\Api\Data\CartInterface|null $quote + * @return bool + */ + public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null) + { + if (! parent::isAvailable($quote)) { + return false; + } + + $amount = $quote ? $quote->getBaseGrandTotal() : null; + if ($amount) { + $options = $this->getAvailableOptions($amount); + return ! empty($options); + } + + return true; + } + + + /** + * Return available payment options to be displayed on payment method list page. + * + * @param double $amount + * a given amount + * @return array[string][array] An array "$code => $option" of availables options + */ + public function getAvailableOptions($amount = null) + { + $configOptions = $this->dataHelper->unserialize($this->getConfigData('franfinance_payment_options')); + + $options = []; + if (is_array($configOptions) && ! empty($configOptions)) { + foreach ($configOptions as $code => $value) { + if (empty($value)) { + continue; + } + + if ((! $amount || ! $value['amount_min'] || $amount > $value['amount_min']) && + (! $amount || ! $value['amount_max'] || $amount < $value['amount_max'])) { + // Option will be available. + $options[$code] = $value; + } + } + } + + return $options; + } + + private function getOption($code) + { + $info = $this->getInfoInstance(); + if ($info instanceof \Mage\Sales\Model\Order\Payment) { + $amount = $info->getOrder()->getBaseGrandTotal(); + } else { + $amount = $info->getQuote()->getBaseGrandTotal(); + } + + $options = $this->getAvailableOptions($amount); + + if ($code && isset($options[$code])) { + return $options[$code]; + } else { + return false; + } + } + + public function canUseForCountry($country) + { + return in_array($country, $this->countries); + } +} diff --git a/Model/Method/Fullcb.php b/Model/Method/Fullcb.php index 59f6e6db..9aa103a6 100644 --- a/Model/Method/Fullcb.php +++ b/Model/Method/Fullcb.php @@ -11,6 +11,9 @@ class Fullcb extends Payzen { + const FULLCB_THREE_TIMES_MAX_FEES = 9; + const FULLCB_FOUR_TIMES_MAX_FEES = 12; + protected $_code = \Lyranetwork\Payzen\Helper\Data::METHOD_FULLCB; protected $_formBlockType = \Lyranetwork\Payzen\Block\Payment\Form\Fullcb::class; @@ -110,8 +113,8 @@ public function getAvailableOptions($amount = null) if ((! $amount || ! $option['amount_min'] || $amount > $option['amount_min']) && (! $amount || ! $option['amount_max'] || $amount < $option['amount_max'])) { // Compute some fields. - $count = (int)$optionCount[$code]; - $rate = (float)$option['rate']; + $count = (int) $optionCount[$code]; + $rate = (float) $option['rate']; $max_fees = $option['cap']; if (! $max_fees) { @@ -137,7 +140,7 @@ public function getAvailableOptions($amount = null) $first = $amount - ($payment * ($count - 1)) + $fees; - $option['order_amount'] = (float)$amount; + $option['order_amount'] = (float) $amount; $option['first_payment'] = $first; $option['monthly_payment'] = $payment; $option['total_amount'] = $amount + $fees; diff --git a/Model/Method/Multi.php b/Model/Method/Multi.php index 979dd8ff..d9c8966f 100644 --- a/Model/Method/Multi.php +++ b/Model/Method/Multi.php @@ -9,6 +9,8 @@ */ namespace Lyranetwork\Payzen\Model\Method; +use Lyranetwork\Payzen\Helper\Data; + class Multi extends Payzen { protected $_code = \Lyranetwork\Payzen\Helper\Data::METHOD_MULTI; @@ -18,13 +20,11 @@ class Multi extends Payzen protected $_canRefundInvoicePartial = false; /** - * * @var \Lyranetwork\Payzen\Model\System\Config\Source\MultiPaymentCard */ protected $multiCardPayment; /** - * * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory @@ -70,6 +70,7 @@ public function __construct( \Lyranetwork\Payzen\Helper\Data $dataHelper, \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, @@ -100,6 +101,7 @@ public function __construct( $dataHelper, $paymentHelper, $checkoutHelper, + $restHelper, $productMetadata, $messageManager, $dirReader, @@ -234,7 +236,7 @@ private function getOption($code) } /** - * Return available card types + * Return available card types. * * @return string */ @@ -276,7 +278,7 @@ public function isLocalCcType() return false; } - return $this->getEntryMode() == 2; + return $this->getEntryMode() == Data::MODE_LOCAL_TYPE; } /** diff --git a/Model/Method/Oney.php b/Model/Method/Oney.php new file mode 100644 index 00000000..cc5a731f --- /dev/null +++ b/Model/Method/Oney.php @@ -0,0 +1,285 @@ +oneyCountries = $oneyCountries; + + parent::__construct( + $context, + $registry, + $extensionFactory, + $customAttributeFactory, + $paymentData, + $scopeConfig, + $logger, + $localeResolver, + $payzenRequestFactory, + $payzenResponseFactory, + $transaction, + $transactionResource, + $urlBuilder, + $redirect, + $dataHelper, + $paymentHelper, + $checkoutHelper, + $restHelper, + $productMetadata, + $messageManager, + $dirReader, + $dataObjectFactory, + $authSession, + $resource, + $resourceCollection, + $data + ); + } + + protected function setExtraFields($order) + { + // Override with Oney payment card. + $this->payzenRequest->set('payment_cards', 'ONEY_3X_4X'); + + $info = $this->getInfoInstance(); + + // Set Oney payment option. + $option = @unserialize($info->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::ONEY_OPTION)); + $this->payzenRequest->set('payment_option_code', $option['code']); + + // Set other data specific to Oney payment. + $this->checkoutHelper->setOneyData($order, $this->payzenRequest); + } + + /** + * Assign data to info model instance. + * + * @param array|\Magento\Framework\DataObject $data + * @return $this + */ + public function assignData(\Magento\Framework\DataObject $data) + { + parent::assignData($data); + + $info = $this->getInfoInstance(); + + $payzenData = $this->extractPaymentData($data); + + // Load option informations. + $option = $this->getOption($payzenData->getData('payzen_oney_option')); + $info->setAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::ONEY_OPTION, serialize($option)); + + return $this; + } + + /** + * Return available payment options to be displayed on payment method list page. + * + * @param double $amount + * a given amount + * @return array[string][array] An array "$code => $option" of availables options + */ + public function getAvailableOptions($amount = null) + { + $configOptions = $this->dataHelper->unserialize($this->getConfigData('oney_payment_options')); + if (! is_array($configOptions) || empty($configOptions)) { + return []; + } + + $availableOptions = []; + foreach ($configOptions as $code => $option) { + if (empty($option)) { + continue; + } + + if ((! $amount || ! $option['minimum'] || $amount > $option['minimum']) && + (! $amount || ! $option['maximum'] || $amount < $option['maximum'])) { + // Option will be available. + $availableOptions[$code] = $option; + } + } + + return $availableOptions; + } + + private function getOption($code) + { + $info = $this->getInfoInstance(); + if ($info instanceof \Mage\Sales\Model\Order\Payment) { + $amount = $info->getOrder()->getBaseGrandTotal(); + } else { + $amount = $info->getQuote()->getBaseGrandTotal(); + } + + $options = $this->getAvailableOptions($amount); + + if ($code && isset($options[$code])) { + return $options[$code]; + } else { + return false; + } + } + + /** + * Check whether payment method can be used. + * + * @param Mage_Sales_Model_Quote|null $quote + * @return bool + */ + public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null) + { + $checkResult = parent::isAvailable($quote); + + if (! $checkResult || ! $quote) { + return $checkResult; + } + + // Check shipping country, billing country is checked in parent::isAvailable method. + if (! $this->canUseForCountry($quote->getShippingAddress()->getCountry())) { + return false; + } + + if ($quote->getCustomerId() && ! preg_match(Checkout::CUST_ID_REGEX, $quote->getCustomerId())) { + // Customer id doesn't match Oney rules. + + $msg = 'Customer ID "%s" does not match gateway specifications. The regular expression for this field is %s. Oney means of payment cannot be used.'; + $this->dataHelper->log(sprintf($msg, $quote->getCustomerId(), Checkout::CUST_ID_REGEX), Zend_Log::WARN); + return false; + } + + if (! $quote->getReservedOrderId()) { + $quote->reserveOrderId(); // Guess order id. + } + + if (! preg_match(Checkout::ORDER_ID_REGEX, $quote->getReservedOrderId())) { + // Order id doesn't match Oney rules. + + $msg = 'The order ID "%s" does not match gateway specifications. The regular expression for this field is %s. Oney means of payment cannot be used.'; + $this->dataHelper->log(sprintf($msg, $quote->getReservedOrderId(), Checkout::ORDER_ID_REGEX), Zend_Log::WARN); + return false; + } + + foreach ($quote->getAllItems() as $item) { + // Check to avoid sending the whole hierarchy of a configurable product. + if ($item->getParentItem()) { + continue; + } + + if (! preg_match(Checkout::PRODUCT_REF_REGEX, $item->getProductId())) { + // Product id doesn't match Oney rules. + + $msg = 'Product reference "%s" does not match gateway specifications. The regular expression for this field is %s. Oney means of payment cannot be used.'; + $this->dataHelper->log(sprintf($msg, $item->getProductId(), Checkout::PRODUCT_REF_REGEX), Zend_Log::WARN); + return false; + } + } + + if (! $quote->isVirtual() && $quote->getShippingAddress()->getShippingMethod()) { + $shippingMethod = $this->checkoutHelper->toOneyCarrier($quote->getShippingAddress()->getShippingMethod()); + if (! $shippingMethod) { + // Selected shipping method is not mapped in configuration panel. + + $this->dataHelper->log('Shipping method "' . $quote->getShippingAddress()->getShippingMethod() . '" is not correctly mapped in module configuration panel. Module is not displayed.', Zend_Log::WARN); + return false; + } + } + + // Clear error message. + $this->checkoutHelper->clearErrorMsg(); + + $this->checkoutHelper->checkAddressValidity($quote->getShippingAddress()); + $this->checkoutHelper->checkAddressValidity($quote->getBillingAddress()); + + return true; + } + + public function canUseForCountry($country) + { + $availableCountries = $this->oneyCountries->getCountryCodes(); + + if ($this->getConfigData('allowspecific') == 1) { + $availableCountries = explode(',', $this->getConfigData('specificcountry')); + } + + return in_array($country, $availableCountries); + } +} diff --git a/Model/Method/Other.php b/Model/Method/Other.php new file mode 100644 index 00000000..c7cd3f89 --- /dev/null +++ b/Model/Method/Other.php @@ -0,0 +1,176 @@ +getInfoInstance(); + $this->payzenRequest->set('payment_cards', $info->getCcType()); + + $option = @unserialize($info->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::OTHER_OPTION)); + + // Check if capture_delay and validation_mode are overriden. + if (is_numeric($option['capture_delay'])) { + $this->payzenRequest->set('capture_delay', $option['capture_delay']); + } + + if ($option['validation_mode'] !== '-1') { + $this->payzenRequest->set('validation_mode', $option['validation_mode']); + } + + // Add cart data. + if ($option['cart_data'] === '1') { + $this->checkoutHelper->setCartData($order, $this->payzenRequest, true); + } + } + + /** + * Assign data to info model instance. + * + * @param array|\Magento\Framework\DataObject $data + * @return $this + */ + public function assignData(\Magento\Framework\DataObject $data) + { + parent::assignData($data); + + $info = $this->getInfoInstance(); + $payzenData = $this->extractPaymentData($data); + + // Load option informations. + $option = $this->_getMeans($payzenData->getData('payzen_other_option')); + + $info->setCcType($option['means']) + ->setAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::OTHER_OPTION, serialize($option)); + return $this; + } + + /** + * Return true if the method can be used at this time. + * + * @param \Magento\Quote\Api\Data\CartInterface|null $quote + * @return bool + */ + public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null) + { + if (! parent::isAvailable($quote)) { + return false; + } + + if ($quote) { + $means = $this->getAvailableMeans($quote); + return ! empty($means); + } + + return true; + } + + /** + * Return available payment means to be displayed on payment method list page. + * + * @param double $amount a given amount + * @return array[string][array] An array "$code => $option" of availables means + */ + public function getAvailableMeans($quote = null) + { + $configMeans = $this->dataHelper->unserialize($this->getConfigData('other_payment_means')); + + $amount = $quote ? $quote->getBaseGrandTotal() : null; + $country = $quote ? $quote->getBillingAddress()->getCountryId() : null; + + $means = array(); + if (is_array($configMeans) && ! empty($configMeans)) { + foreach ($configMeans as $code => $value) { + if (empty($value)) { + continue; + } + + if ($country && isset($value['countries']) && ! empty($value['countries']) + && ! in_array($country, $value['countries'])) { + continue; + } + + if ((! $amount || ! $value['minimum'] || $amount > $value['minimum']) + && (! $amount || ! $value['maximum'] || $amount < $value['maximum'])) { + // Means will be available. + $means[$code] = $value; + } + } + } + + return $means; + } + + private function _getMeans($code) + { + $options = $this->getAvailableMeans(); + + if ($code && $options[$code]) { + return $options[$code]; + } else { + return false; + } + } + + /** + * Return added payment means. + * + * @return array[string][array] An array "$code => $option" of added payment means + */ + public function getAddedPaymentMeans() + { + $configAddedPaymentMeans = $this->dataHelper->unserialize($this->getConfigData('added_payment_means')); // The user-added payment means. + $addedPaymentMeans = array(); + if (is_array($configAddedPaymentMeans) && ! empty($configAddedPaymentMeans)) { + foreach ($configAddedPaymentMeans as $value) { + if (empty($value)) { + continue; + } + + $addedPaymentMeans[$value['meanCode']] = $value['meanName']; + } + } + + return $addedPaymentMeans; + } + + public function getSupportedPaymentMeans() + { + $supportedCards = \Lyranetwork\Payzen\Model\Api\PayzenApi::getSupportedCardTypes(); + + // Added payment means. + $addedCards = $this->getAddedPaymentMeans(); + foreach ($addedCards as $key => $label) { + if (! isset($supportedCards[$key])) { + $supportedCards[$key] = $label; + } + } + + return $supportedCards; + } + + /** + * Return grouping mode. + * + * @return int + */ + public function getRegroupMode() + { + return $this->getConfigData('regroup_payment_means'); + } +} diff --git a/Model/Method/Payzen.php b/Model/Method/Payzen.php index 6466f720..6a2ef745 100644 --- a/Model/Method/Payzen.php +++ b/Model/Method/Payzen.php @@ -10,6 +10,7 @@ namespace Lyranetwork\Payzen\Model\Method; use Lyranetwork\Payzen\Model\Api\PayzenApi; +use Lyranetwork\Payzen\Model\Api\PayzenRest; abstract class Payzen extends \Magento\Payment\Model\Method\AbstractMethod { @@ -35,97 +36,86 @@ abstract class Payzen extends \Magento\Payment\Model\Method\AbstractMethod protected $needsCartData = false; /** - * * @var \Magento\Framework\Locale\ResolverInterface */ protected $localeResolver; /** - * * @var \Lyranetwork\Payzen\Model\Api\PayzenRequest */ protected $payzenRequest; /** - * * @var \Lyranetwork\Payzen\Model\Api\PayzenResponse */ protected $payzenResponse; /** - * * @var \Magento\Sales\Model\Order\Payment\Transaction */ protected $transaction; /** - * * @var \Magento\Sales\Model\ResourceModel\Order\Payment\Transaction */ protected $transactionResource; /** - * * @var \Magento\Framework\UrlInterface */ protected $urlBuilder; /** - * * @var \Magento\Framework\App\Response\Http $ */ protected $redirect; /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @var \Lyranetwork\Payzen\Helper\Payment */ protected $paymentHelper; /** - * * @var \Lyranetwork\Payzen\Helper\Checkout */ protected $checkoutHelper; /** - * + * @var \Lyranetwork\Payzen\Helper\Rest + */ + protected $restHelper; + + /** * @var \Magento\Framework\App\ProductMetadataInterface */ protected $productMetadata; /** - * * @var \Magento\Framework\Message\ManagerInterface */ protected $messageManager; /** - * * @var \Magento\Framework\Module\Dir\Reader */ protected $dirReader; /** - * * @var \Magento\Framework\DataObject\Factory */ protected $dataObjectFactory; /** - * * @var \Magento\Backend\Model\Auth\Session */ protected $authSession; /** - * * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory @@ -143,6 +133,7 @@ abstract class Payzen extends \Magento\Payment\Model\Method\AbstractMethod * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @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 @@ -170,6 +161,7 @@ public function __construct( \Lyranetwork\Payzen\Helper\Data $dataHelper, \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, @@ -189,6 +181,7 @@ public function __construct( $this->dataHelper = $dataHelper; $this->paymentHelper = $paymentHelper; $this->checkoutHelper = $checkoutHelper; + $this->restHelper = $restHelper; $this->productMetadata = $productMetadata; $this->messageManager = $messageManager; $this->dirReader = $dirReader; @@ -210,7 +203,6 @@ public function __construct( } /** - * * @param \Magento\Sales\Model\Order $order * @return array of params as key=>value */ @@ -290,7 +282,7 @@ public function getFormFields($order) $availableLanguages = in_array('', $availableLanguages) ? '' : implode(';', $availableLanguages); $this->payzenRequest->set('available_languages', $availableLanguages); - // Activate 3ds ? + // Activate 3ds? $threedsMpi = null; $threedsMinAmount = $this->dataHelper->getCommonConfigData('threeds_min_amount'); if ($threedsMinAmount != '' && $order->getTotalDue() < $threedsMinAmount) { @@ -308,7 +300,7 @@ public function getFormFields($order) $this->payzenRequest->set('cust_address', implode(' ', $order->getBillingAddress()->getStreet())); $this->payzenRequest->set('cust_zip', $order->getBillingAddress()->getPostcode()); $this->payzenRequest->set('cust_city', $order->getBillingAddress()->getCity()); - $this->payzenRequest->set('cust_state', $order->getBillingAddress()->getRegion()); + $this->payzenRequest->set('cust_state', $order->getBillingAddress()->getRegionCode()); $this->payzenRequest->set('cust_country', $order->getBillingAddress()->getCountryId()); $this->payzenRequest->set('cust_phone', $order->getBillingAddress()->getTelephone()); $this->payzenRequest->set('cust_cell_phone', $order->getBillingAddress()->getTelephone()); @@ -320,7 +312,7 @@ public function getFormFields($order) $this->payzenRequest->set('ship_to_city', $address->getCity()); $this->payzenRequest->set('ship_to_street', $address->getStreetLine(1)); $this->payzenRequest->set('ship_to_street2', $address->getStreetLine(2)); - $this->payzenRequest->set('ship_to_state', $address->getRegion()); + $this->payzenRequest->set('ship_to_state', $address->getRegionCode()); $this->payzenRequest->set('ship_to_country', $address->getCountryId()); $this->payzenRequest->set('ship_to_phone_num', $address->getTelephone()); $this->payzenRequest->set('ship_to_zip', $address->getPostcode()); @@ -337,11 +329,6 @@ public function getFormFields($order) $this->checkoutHelper->setCartData($order, $this->payzenRequest); } - if ($this->sendOneyFields()) { - // Set other data specific to FacilyPay Oney payment. - $this->checkoutHelper->setOneyData($order, $this->payzenRequest); - } - $paramsToLog = $this->payzenRequest->getRequestFieldsArray(true); $this->dataHelper->log('Payment parameters: ' . json_encode($paramsToLog)); @@ -431,10 +418,12 @@ public function resetData() $keys = [ \Lyranetwork\Payzen\Helper\Payment::MULTI_OPTION, + \Lyranetwork\Payzen\Helper\Payment::OTHER_OPTION, \Lyranetwork\Payzen\Helper\Payment::CHOOZEO_OPTION, \Lyranetwork\Payzen\Helper\Payment::FULLCB_OPTION, \Lyranetwork\Payzen\Helper\Payment::ONEY_OPTION, - \Lyranetwork\Payzen\Helper\Payment::IDENTIFIER + \Lyranetwork\Payzen\Helper\Payment::IDENTIFIER, + \Lyranetwork\Payzen\Helper\Payment::SEPA_IDENTIFIER ]; foreach ($keys as $key) { @@ -479,72 +468,49 @@ public function acceptPayment(\Magento\Payment\Model\InfoInterface $payment) { parent::acceptPayment($payment); + // Clear all messages in session. + $this->messageManager->getMessages(true); + $order = $payment->getOrder(); $storeId = $order->getStore()->getId(); - $this->dataHelper->log("Get payment information online for order #{$order->getIncrementId()}."); - - $requestId = ''; + // Client has not configured private key in module backend, let Magento accept order offline. + if (! $this->restHelper->getPrivateKey($storeId)) { + $this->dataHelper->log("Cannot get online payment information for order #{$order->getIncrementId()}: private key is not configured, let Magento accepts the payment."); - try { - $wsApi = $this->checkAndGetWsApi($storeId); + return true; + } - $sid = false; + $this->dataHelper->log("Get payment information online for order #{$order->getIncrementId()}."); + try { // Retrieve transaction UUID. $uuid = $payment->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::TRANS_UUID); if (! $uuid) { // Retro compatibility. - $legacyTransactionKeyRequest = new \Lyranetwork\Payzen\Model\Api\Ws\LegacyTransactionKeyRequest(); - $legacyTransactionKeyRequest->setTransactionId($payment->getCcTransId()); - $legacyTransactionKeyRequest->setSequenceNumber('1'); - $legacyTransactionKeyRequest->setCreationDate(new \DateTime($order->getCreatedAt())); - - $getPaymentUuid = new \Lyranetwork\Payzen\Model\Api\Ws\GetPaymentUuid(); - $getPaymentUuid->setLegacyTransactionKeyRequest($legacyTransactionKeyRequest); - - $requestId = $wsApi->setHeaders(); - $getPaymentUuidResponse = $wsApi->getPaymentUuid($getPaymentUuid); - - $wsApi->checkAuthenticity(); - $wsApi->checkResult($getPaymentUuidResponse->getLegacyTransactionKeyResult()->getCommonResponse()); + $data = $this->getPaymentDetails($order, false); + $getPaymentDetails['answer'] = reset($data); + $getPaymentDetails['status'] = 'SUCCESS'; + } else { + $requestData = ['uuid' => $uuid]; - $uuid = $getPaymentUuidResponse->getLegacyTransactionKeyResult() - ->getPaymentResponse() - ->getTransactionUuid(); + // Perform our request. + $client = new PayzenRest( + $this->dataHelper->getCommonConfigData('rest_url', $storeId), + $this->dataHelper->getCommonConfigData('site_id', $storeId), + $this->restHelper->getPrivateKey($storeId) + ); - // Retrieve JSESSIONID created for getPaymentUuid call. - $sid = $wsApi->getJsessionId(); + $getPaymentDetails = $client->post('V4/Transaction/Get', json_encode($requestData)); } - // Common $queryRequest object to use in all operations. - $queryRequest = new \Lyranetwork\Payzen\Model\Api\Ws\QueryRequest(); - $queryRequest->setUuid($uuid); - - $getPaymentDetails = new \Lyranetwork\Payzen\Model\Api\Ws\GetPaymentDetails($queryRequest); - $getPaymentDetails->setQueryRequest($queryRequest); + // Pending or accepted payment. + $successStatuses = array_merge(PayzenApi::getSuccessStatuses(), PayzenApi::getPendingStatuses()); - $requestId = $wsApi->setHeaders(); - - // Set JSESSIONID if ws getPaymentUuid is called. - if ($sid) { - $wsApi->setJsessionId($sid); - } + $this->restHelper->checkResult($getPaymentDetails, $successStatuses); - $getPaymentDetailsResponse = $wsApi->getPaymentDetails($getPaymentDetails); - - $wsApi->checkAuthenticity(); - $wsApi->checkResult( - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getCommonResponse(), - [ - 'INITIAL', 'WAITING_AUTHORISATION', 'WAITING_AUTHORISATION_TO_VALIDATE', 'UNDER_VERIFICATION', - 'WAITING_FOR_PAYMENT', 'AUTHORISED', 'AUTHORISED_TO_VALIDATE', 'CAPTURED', 'CAPTURE_FAILED', - 'ACCEPTED' - ] // Pending or accepted payment. - ); - - // Check operation type (0: debit, 1 refund, 5: verification). - $transType = $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getPaymentResponse()->getOperationType(); - if (($transType !== 0) && ($transType !== 5)) { + // Check operation type. + $transType = $getPaymentDetails['answer']['operationType']; + if ($transType !== 'DEBIT') { throw new \Exception("Unexpected transaction type returned ($transType)."); } @@ -553,30 +519,25 @@ public function acceptPayment(\Magento\Payment\Model\InfoInterface $payment) // Payment is accepted by merchant. $payment->setIsFraudDetected(false); - $wrapper = new \Lyranetwork\Payzen\Model\Api\Ws\ResultWrapper( - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getCommonResponse(), - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getPaymentResponse(), - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getAuthorizationResponse(), - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getCardResponse(), - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getThreeDSResponse(), - $getPaymentDetailsResponse->getGetPaymentDetailsResult()->getFraudManagementResponse() - ); + // Wrap payment result to use traditional order creation tunnel. + $data = $this->restHelper->convertRestResult($getPaymentDetails['answer'], true); // Load API response. $response = $this->payzenResponseFactory->create( [ - 'params' => $wrapper->getResponseParams(), - 'ctx_mode' => $this->dataHelper->getCommonConfigData('ctx_mode', $storeId), - 'key_test' => $this->dataHelper->getCommonConfigData('key_test', $storeId), - 'key_prod' => $this->dataHelper->getCommonConfigData('key_prod', $storeId) + 'params' => $data, + 'ctx_mode' => null, + 'key_test' => null, + 'key_prod' => null, + 'algo' => null ] ); $stateObject = $this->paymentHelper->nextOrderState($order, $response, true); $this->dataHelper->log("Order #{$order->getIncrementId()}, new state : {$stateObject->getState()}, new status : {$stateObject->getStatus()}."); $order->setState($stateObject->getState()) - ->setStatus($stateObject->getStatus()) - ->addStatusHistoryComment(__('The payment has been accepted.')); + ->setStatus($stateObject->getStatus()) + ->addStatusHistoryComment(__('The payment has been accepted.')); // Try to create invoice. $this->paymentHelper->createInvoice($order); @@ -593,46 +554,27 @@ public function acceptPayment(\Magento\Payment\Model\InfoInterface $payment) $this->redirect->setRedirect($redirectUrl)->sendResponse(); exit; - } catch(\Lyranetwork\Payzen\Model\WsException $e) { - $this->dataHelper->log( - "[$requestId] {$e->getMessage()}", - \Psr\Log\LogLevel::WARNING - ); - - $this->messageManager->addWarning(__('Please fix this error to use PayZen web services.')); - $this->messageManager->addError(__($e->getMessage())); - - return true; - } catch(\SoapFault $f) { - $this->dataHelper->log( - "[$requestId] SoapFault with code {$f->faultcode}: {$f->faultstring}.", - \Psr\Log\LogLevel::WARNING - ); - - $this->messageManager->addWarning(__('Please fix this error to use PayZen web services.')); - $this->messageManager->addError($f->faultstring); - - return true; } catch(\UnexpectedValueException $e) { $this->dataHelper->log( - "[$requestId] getPaymentDetails error with code {$e->getCode()}: {$e->getMessage()}.", + "getPaymentDetails error with code {$e->getCode()}: {$e->getMessage()}.", \Psr\Log\LogLevel::ERROR ); - if ($e->getCode() === -1) { - throw new \Exception(__('Authentication error !')); - } elseif ($e->getCode() === 1) { - // Merchant does not subscribe to WS option, accept payment offline. - return true; - } else { - throw new \Exception($e->getMessage()); - } + throw new \Exception($e->getMessage()); } catch (\Exception $e) { $this->dataHelper->log( - "[$requestId] Exception with code {$e->getCode()}: {$e->getMessage()}", + "Exception with code {$e->getCode()}: {$e->getMessage()}", \Psr\Log\LogLevel::ERROR ); + if ($e->getCode() <= -1) { // Manage cUrl errors. + $message = __("Please consult the PayZen logs for more details."); + } else { + $message = $e->getMessage(); + } + + $this->messageManager->addError($message); + throw $e; } } @@ -647,69 +589,50 @@ public function denyPayment(\Magento\Payment\Model\InfoInterface $payment) { parent::denyPayment($payment); + // Clear all messages in session. + $this->messageManager->getMessages(true); + $order = $payment->getOrder(); $storeId = $order->getStore()->getId(); - $this->dataHelper->log("Cancel payment online for order #{$order->getIncrementId()}."); - - $requestId = ''; + // Client has not configured private key in module backend, let Magento accept order offline. + if (! $this->restHelper->getPrivateKey($storeId)) { + $this->dataHelper->log("Cannot cancel payment online for order #{$order->getIncrementId()}: private key is not configured, let Magento cancel the payment."); - try { - $wsApi = $this->checkAndGetWsApi($storeId); + $this->messageManager->addWarning(__('Payment is cancelled only in Magento. Please, consider cancelling the payment in PayZen Back Office.')); + return true; + } - $sid = false; + $this->dataHelper->log("Cancel payment online for order #{$order->getIncrementId()}."); + try { // Retrieve transaction UUID. $uuid = $payment->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::TRANS_UUID); if (! $uuid) { // Retro compatibility. - $legacyTransactionKeyRequest = new \Lyranetwork\Payzen\Model\Api\Ws\LegacyTransactionKeyRequest(); - $legacyTransactionKeyRequest->setTransactionId($payment->getCcTransId()); - $legacyTransactionKeyRequest->setSequenceNumber('1'); - $legacyTransactionKeyRequest->setCreationDate(new \DateTime($order->getCreatedAt())); - - $getPaymentUuid = new \Lyranetwork\Payzen\Model\Api\Ws\GetPaymentUuid(); - $getPaymentUuid->setLegacyTransactionKeyRequest($legacyTransactionKeyRequest); - - $requestId = $wsApi->setHeaders(); - $getPaymentUuidResponse = $wsApi->getPaymentUuid($getPaymentUuid); - - $wsApi->checkAuthenticity(); - $wsApi->checkResult($getPaymentUuidResponse->getLegacyTransactionKeyResult()->getCommonResponse()); - - $uuid = $getPaymentUuidResponse->getLegacyTransactionKeyResult() - ->getPaymentResponse() - ->getTransactionUuid(); - - // Retrieve JSESSIONID created for getPaymentUuid call. - $sid = $wsApi->getJsessionId(); + // Get UUID from Order. + $uuidArray = $this->getPaymentDetails($order); + $uuid = reset($uuidArray); } - // Common $queryRequest object to use in all operations. - $queryRequest = new \Lyranetwork\Payzen\Model\Api\Ws\QueryRequest(); - $queryRequest->setUuid($uuid); - - $cancelPayment = new \Lyranetwork\Payzen\Model\Api\Ws\CancelPayment(); - $cancelPayment->setCommonRequest(new \Lyranetwork\Payzen\Model\Api\Ws\CommonRequest()); - $cancelPayment->setQueryRequest($queryRequest); - - $requestId = $wsApi->setHeaders(); - - // Set JSESSIONID if ws getPaymentUuid is called. - if ($sid) { - $wsApi->setJsessionId($sid); - } - - $cancelPaymentResponse = $wsApi->cancelPayment($cancelPayment); - - $wsApi->checkAuthenticity(); - $wsApi->checkResult( - $cancelPaymentResponse->getCancelPaymentResult()->getCommonResponse(), - ['CANCELLED'] + $requestData = [ + 'uuid' => $uuid, + 'resolutionMode' => 'CANCELLATION_ONLY', + 'comment' => $this->getUserInfo() + ]; + + // Perform our request. + $client = new PayzenRest( + $this->dataHelper->getCommonConfigData('rest_url', $storeId), + $this->dataHelper->getCommonConfigData('site_id', $storeId), + $this->restHelper->getPrivateKey($storeId) ); + $cancelPaymentResponse = $client->post('V4/Transaction/CancelOrRefund', json_encode($requestData)); + $this->restHelper->checkResult($cancelPaymentResponse, ['CANCELLED']); + $this->dataHelper->log("Payment cancelled successfully online for order #{$order->getIncrementId()}."); - $transactionId = $payment->getCcTransId() . '-1'; + $transactionId = $payment->getCcTransId() . '-' . $cancelPaymentResponse['answer']['transactionDetails']['sequenceNumber']; $additionalInfo = []; $txn = $this->transactionResource->loadObjectByTxnId( @@ -720,7 +643,7 @@ public function denyPayment(\Magento\Payment\Model\InfoInterface $payment) ); if ($txn && $txn->getId()) { - $additionalInfo = $txn->getAdditionalInformation(\Magento\Sales\Model\Order\Payment\Transaction::RAW_DETAILS); + $additionalInfo = $txn->getAdditionalInformation(\Magento\Sales\Model\Order\Payment\Transaction::RAW_DETAILS); } // New transaction status. @@ -730,49 +653,27 @@ public function denyPayment(\Magento\Payment\Model\InfoInterface $payment) $this->paymentHelper->addTransaction($payment, $transactionType, $transactionId, $additionalInfo); return true; // Let Magento cancel order. - } catch(\Lyranetwork\Payzen\Model\WsException $e) { - $this->dataHelper->log( - "[$requestId] {$e->getMessage()}", - \Psr\Log\LogLevel::WARNING - ); - - $this->messageManager->addWarning(__('Please fix this error to use PayZen web services.')); - $this->messageManager->addError(__($e->getMessage())); - - return true; - } catch(\SoapFault $f) { - $this->dataHelper->log( - "[$requestId] SoapFault with code {$f->faultcode}: {$f->faultstring}.", - \Psr\Log\LogLevel::WARNING - ); - - $this->messageManager->addWarning(__('Please fix this error to use PayZen web services.')); - $this->messageManager->addError($f->faultstring); - - return true; } catch(\UnexpectedValueException $e) { $this->dataHelper->log( - "[$requestId] cancelPayment error with code {$e->getCode()}: {$e->getMessage()}.", + "cancelPayment error with code {$e->getCode()}: {$e->getMessage()}.", \Psr\Log\LogLevel::ERROR ); - if ($e->getCode() === -1) { - throw new \Exception(__('Authentication error !')); - } elseif ($e->getCode() === 1) { - // Merchant does not subscribe to WS option, cancel payment offline. - $notice = __('You are not authorized to do this action online. Please, do not forget to update payment in PayZen Back Office.'); - $this->messageManager->addNotice($notice); - - return true; - } else { - throw new \Exception($e->getMessage()); - } + throw new \Exception($e->getMessage()); } catch (\Exception $e) { $this->dataHelper->log( - "[$requestId] Exception with code {$e->getCode()}: {$e->getMessage()}", + "Exception with code {$e->getCode()}: {$e->getMessage()}", \Psr\Log\LogLevel::ERROR ); + if ($e->getCode() <= -1) { // Manage cUrl errors. + $message = __("Please consult the PayZen logs for more details."); + } else { + $message = $e->getMessage(); + } + + $this->messageManager->addError($message); + throw $e; } } @@ -785,111 +686,136 @@ public function denyPayment(\Magento\Payment\Model\InfoInterface $payment) */ public function validatePayment(\Magento\Payment\Model\InfoInterface $payment) { + // Clear all messages in session. + $this->messageManager->getMessages(true); + $order = $payment->getOrder(); $storeId = $order->getStore()->getId(); - $this->dataHelper->log("Validate payment online for order #{$order->getIncrementId()}."); + $uuidArray = []; + $onlineValidatePayment = true; - $requestId = ''; + if (! $this->restHelper->getPrivateKey($storeId)) { + // Client has not configured private key in module backend, let Magento validate payment offline. + $this->dataHelper->log("Cannot validate online payment for order #{$order->getIncrementId()}: private key is not configured, let Magento validate payment."); + $this->messageManager->addWarning(__('Payment is validated only in Magento. Please, consider validating the payment in PayZen Back Office.')); + $onlineValidatePayment = false; + } else { + $this->dataHelper->log("Validate payment online for order #{$order->getIncrementId()}."); + } try { - $wsApi = $this->checkAndGetWsApi($storeId); - - $sid = false; - // Get choosen payment option if any. $option = @unserialize($payment->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::MULTI_OPTION)); - $multi = (stripos($payment->getMethod(), 'payzen_multi') === 0) && is_array($option) && !empty($option); + $multi = (stripos($payment->getMethod(), 'payzen_multi') === 0) && is_array($option) && ! empty($option); $count = $multi ? (int) $option['count'] : 1; - // Retrieve saved transaction UUID. - $savedUuid = $payment->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::TRANS_UUID); + if ($onlineValidatePayment) { + // Retrieve saved transaction UUID. + $savedUuid = $payment->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::TRANS_UUID); - for ($i = 1; $i <= $count; $i++) { - if ($i == 1 && $savedUuid) { - $uuid = $savedUuid; + if (! $savedUuid || ($count > 1)) { + $uuidArray = $this->getPaymentDetails($order); } else { - $legacyTransactionKeyRequest = new \Lyranetwork\Payzen\Model\Api\Ws\LegacyTransactionKeyRequest(); - $legacyTransactionKeyRequest->setTransactionId($payment->getCcTransId()); - $legacyTransactionKeyRequest->setSequenceNumber($i); - $legacyTransactionKeyRequest->setCreationDate(new \DateTime($order->getCreatedAt())); - - $getPaymentUuid = new \Lyranetwork\Payzen\Model\Api\Ws\GetPaymentUuid(); - $getPaymentUuid->setLegacyTransactionKeyRequest($legacyTransactionKeyRequest); + $uuidArray[] = $savedUuid; + } - $requestId = $wsApi->setHeaders(); - $getPaymentUuidResponse = $wsApi->getPaymentUuid($getPaymentUuid); + $first = true; + foreach ($uuidArray as $uuid) { + $requestData = [ + 'uuid' => $uuid, + 'comment' => $this->getUserInfo() + ]; + + // Perform our request. + $client = new PayzenRest( + $this->dataHelper->getCommonConfigData('rest_url', $storeId), + $this->dataHelper->getCommonConfigData('site_id', $storeId), + $this->restHelper->getPrivateKey($storeId) + ); - $wsApi->checkAuthenticity(); - $wsApi->checkResult($getPaymentUuidResponse->getLegacyTransactionKeyResult()->getCommonResponse()); + $validatePaymentResponse = $client->post('V4/Transaction/Validate', json_encode($requestData)); - $uuid = $getPaymentUuidResponse->getLegacyTransactionKeyResult() - ->getPaymentResponse() - ->getTransactionUuid(); - } + $this->restHelper->checkResult($validatePaymentResponse, ['WAITING_AUTHORISATION', 'AUTHORISED']); - // Common $queryRequest object to use in all operations. - $queryRequest = new \Lyranetwork\Payzen\Model\Api\Ws\QueryRequest(); - $queryRequest->setUuid($uuid); + // Wrap payment result to use traditional order creation tunnel. + $data = $this->restHelper->convertRestResult($validatePaymentResponse['answer'], true); - $validatePayment = new \Lyranetwork\Payzen\Model\Api\Ws\ValidatePayment(); - $validatePayment->setCommonRequest(new \Lyranetwork\Payzen\Model\Api\Ws\CommonRequest()); - $validatePayment->setQueryRequest($queryRequest); - - $requestId = $wsApi->setHeaders(); + // Load API response. + $response = $this->payzenResponseFactory->create( + [ + 'params' => $data, + 'ctx_mode' => null, + 'key_test' => null, + 'key_prod' => null, + 'algo' => null + ] + ); - // Set JSESSIONID if ws getPaymentUuid is called. - if ($sid) { - $wsApi->setJsessionId($sid); - } + $transId = $order->getPayment()->getCcTransId() . '-' . $response->get('sequence_number'); - $validatePaymentResponse = $wsApi->validatePayment($validatePayment); + if ($first) { // Single payment or first transaction for payment in installments. + $stateObject = $this->paymentHelper->nextOrderState($order, $response, true); - $wsApi->checkAuthenticity(); - $wsApi->checkResult( - $validatePaymentResponse->getValidatePaymentResult()->getCommonResponse(), - ['WAITING_AUTHORISATION', 'AUTHORISED'] - ); + $this->dataHelper->log("Order #{$order->getIncrementId()}, new state : {$stateObject->getState()}, new status : {$stateObject->getStatus()}."); + $order->setState($stateObject->getState()) + ->setStatus($stateObject->getStatus()); + } - $wrapper = new \Lyranetwork\Payzen\Model\Api\Ws\ResultWrapper($validatePaymentResponse->getValidatePaymentResult()->getCommonResponse()); + $order->addStatusHistoryComment(__('Transaction %1 has been validated.', $transId)); - // Load API response. - $response = $this->payzenResponseFactory->create( - [ - 'params' => $wrapper->getResponseParams(), - 'ctx_mode' => $this->dataHelper->getCommonConfigData('ctx_mode', $storeId), - 'key_test' => $this->dataHelper->getCommonConfigData('key_test', $storeId), - 'key_prod' => $this->dataHelper->getCommonConfigData('key_prod', $storeId) - ] - ); + // Update transaction status. + $txn = $this->transactionResource->loadObjectByTxnId( + $this->transaction, + $order->getId(), + $order->getPayment()->getId(), + $transId + ); - $transId = $order->getPayment()->getCcTransId() . '-'. $i; + if ($txn && $txn->getId()) { + $data = $txn->getAdditionalInformation(\Magento\Sales\Model\Order\Payment\Transaction::RAW_DETAILS); + $data['Transaction Status'] = $response->getTransStatus(); - if ($i === 1) { // Single payment or first transaction for payment in installments. - $stateObject = $this->paymentHelper->nextOrderState($order, $response, true); + $txn->setAdditionalInformation(\Magento\Sales\Model\Order\Payment\Transaction::RAW_DETAILS, $data); + $txn->save(); + } - $this->dataHelper->log("Order #{$order->getIncrementId()}, new state : {$stateObject->getState()}, new status : {$stateObject->getStatus()}."); - $order->setState($stateObject->getState()) - ->setStatus($stateObject->getStatus()); + $first = false; } + } else { + // Wrap payment result to use traditional order creation tunnel. + $data = ['vads_trans_status' => 'AUTHORISED']; - $order->addStatusHistoryComment(__('Transaction %1 has been validated.', $transId)); - - // Update transaction status. $txn = $this->transactionResource->loadObjectByTxnId( $this->transaction, $order->getId(), $order->getPayment()->getId(), - $transId + $order->getPayment()->getLastTransId() ); if ($txn && $txn->getId()) { - $data = $txn->getAdditionalInformation(\Magento\Sales\Model\Order\Payment\Transaction::RAW_DETAILS); - $data['Transaction Status'] = $response->getTransStatus(); - - $txn->setAdditionalInformation(\Magento\Sales\Model\Order\Payment\Transaction::RAW_DETAILS, $data); - $txn->save(); + $txnData = $txn->getAdditionalInformation(\Magento\Sales\Model\Order\Payment\Transaction::RAW_DETAILS); + $data['vads_card_brand'] = $txnData['Means of payment']; } + + // Load API response. + $response = $this->payzenResponseFactory->create( + [ + 'params' => $data, + 'ctx_mode' => null, + 'key_test' => null, + 'key_prod' => null, + 'algo' => null + ] + ); + + $stateObject = $this->paymentHelper->nextOrderState($order, $response, true); + + $this->dataHelper->log("Order #{$order->getIncrementId()}, new state : {$stateObject->getState()}, new status : {$stateObject->getStatus()}."); + $order->setState($stateObject->getState()) + ->setStatus($stateObject->getStatus()); + + $order->addStatusHistoryComment(__('Order %1 has been validated.', $order->getIncrementId())); } $this->dataHelper->log("Updating payment information for validated order #{$order->getIncrementId()}."); @@ -899,44 +825,25 @@ public function validatePayment(\Magento\Payment\Model\InfoInterface $payment) $order->save(); $this->messageManager->addSuccess(__('Payment validated successfully.')); - } catch(\Lyranetwork\Payzen\Model\WsException $e) { - $this->dataHelper->log( - "[$requestId] {$e->getMessage()}", - \Psr\Log\LogLevel::WARNING - ); - - $this->messageManager->addWarning(__('Please fix this error to use PayZen web services.')); - $this->messageManager->addError(__($e->getMessage())); - } catch(\SoapFault $f) { - $this->dataHelper->log( - "[$requestId] SoapFault with code {$f->faultcode}: {$f->faultstring}.", - \Psr\Log\LogLevel::WARNING - ); - - $this->messageManager->addWarning(__('Please fix this error to use PayZen web services.')); - $this->messageManager->addError($f->faultstring); } catch(\UnexpectedValueException $e) { $this->dataHelper->log( - "[$requestId] validatePayment error with code {$e->getCode()}: {$e->getMessage()}.", + "validatePayment error with code {$e->getCode()}: {$e->getMessage()}.", \Psr\Log\LogLevel::ERROR ); - - if ($e->getCode() === -1) { - throw new \Exception(__('Authentication error !')); - } elseif ($e->getCode() === 1) { - // Merchant does not subscribe to WS option, validate payment offline. - $notice = __('You are not authorized to do this action online. Please, do not forget to update payment in PayZen Back Office.'); - $this->messageManager->addNotice($notice); - } else { - $this->messageManager->addError($e->getMessage()); - } } catch (\Exception $e) { $this->dataHelper->log( - "[$requestId] Exception with code {$e->getCode()}: {$e->getMessage()}", + "Exception with code {$e->getCode()}: {$e->getMessage()}", \Psr\Log\LogLevel::ERROR ); - $this->messageManager->addError($e->getMessage()); + $message = __("We cannot update the payment right now."); + if ($e->getCode() <= -1) { // Manage cUrl errors. + $message .= ' ' . __("Please consult the PayZen logs for more details."); + } else { + $message .= ' ' . $e->getMessage(); + } + + $this->messageManager->addError($message); } } @@ -1070,188 +977,128 @@ public function isAvailable(\Magento\Quote\Api\Data\CartInterface $quote = null) */ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount) { + // Clear all messages in session. + $this->messageManager->getMessages(true); + $order = $payment->getOrder(); $storeId = $order->getStore()->getId(); - $requestId = ''; - $this->dataHelper->log("Start refund of {$amount} {$order->getOrderCurrencyCode()} for order " . "#{$order->getIncrementId()} with {$this->_code} payment method."); try { - $wsApi = $this->checkAndGetWsApi($storeId); - // Get currency. $currency = PayzenApi::findCurrencyByAlphaCode($order->getOrderCurrencyCode()); - $sid = false; - // Retrieve transaction UUID. $uuid = $payment->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::TRANS_UUID); if (! $uuid) { // Retro compatibility. - $legacyTransactionKeyRequest = new \Lyranetwork\Payzen\Model\Api\Ws\LegacyTransactionKeyRequest(); - $legacyTransactionKeyRequest->setTransactionId($payment->getCcTransId()); - $legacyTransactionKeyRequest->setSequenceNumber('1'); // Only single payments can be refund. - $legacyTransactionKeyRequest->setCreationDate(new \DateTime($order->getCreatedAt())); - - $getPaymentUuid = new \Lyranetwork\Payzen\Model\Api\Ws\GetPaymentUuid(); - $getPaymentUuid->setLegacyTransactionKeyRequest($legacyTransactionKeyRequest); - - $requestId = $wsApi->setHeaders(); - $getPaymentUuidResponse = $wsApi->getPaymentUuid($getPaymentUuid); - - $wsApi->checkAuthenticity(); - $wsApi->checkResult($getPaymentUuidResponse->getLegacyTransactionKeyResult()->getCommonResponse()); - - $uuid = $getPaymentUuidResponse->getLegacyTransactionKeyResult() - ->getPaymentResponse() - ->getTransactionUuid(); - - // Retrieve JSESSIONID created for getPaymentUuid call. - $sid = $wsApi->getJsessionId(); + // Get UUID from Order. + $uuidArray = $this->getPaymentDetails($order); + $uuid = reset($uuidArray); } - // Common $queryRequest object to use in all operations. - $queryRequest = new \Lyranetwork\Payzen\Model\Api\Ws\QueryRequest(); - $queryRequest->setUuid($uuid); - - $getPaymentDetails = new \Lyranetwork\Payzen\Model\Api\Ws\GetPaymentDetails(); - $getPaymentDetails->setQueryRequest($queryRequest); - - $requestId = $wsApi->setHeaders(); - if ($sid) { // Set JSESSIONID if ws getPaymentUuid is called. - $wsApi->setJsessionId($sid); - } + $requestData = ['uuid' => $uuid]; - $getPaymentDetailsResponse = $wsApi->getPaymentDetails($getPaymentDetails); + // Perform our request. + $client = new PayzenRest( + $this->dataHelper->getCommonConfigData('rest_url', $storeId), + $this->dataHelper->getCommonConfigData('site_id', $storeId), + $this->restHelper->getPrivateKey($storeId) + ); - $wsApi->checkAuthenticity(); - $wsApi->checkResult($getPaymentDetailsResponse->getGetPaymentDetailsResult()->getCommonResponse()); + $getPaymentDetails = $client->post('V4/Transaction/Get', json_encode($requestData)); - // Retrieve JSESSIONID created for getPaymentDetails call. - if (! $sid) { - $sid = $wsApi->getJsessionId(); - } + $this->restHelper->checkResult($getPaymentDetails); - $transStatus = $getPaymentDetailsResponse->getGetPaymentDetailsResult() - ->getCommonResponse() - ->getTransactionStatusLabel(); + $transStatus = $getPaymentDetails['answer']['detailedStatus']; $amountInCents = $currency->convertAmountToInteger($amount); - // Common request generation. - $commonRequest = new \Lyranetwork\Payzen\Model\Api\Ws\CommonRequest(); - $commentText = 'Magento user: ' . $this->authSession->getUser()->getUsername(); - $commentText .= '; IP address: ' . $this->dataHelper->getIpAddress(); + $commentText = $this->getUserInfo(); + foreach ($payment->getCreditmemo()->getComments() as $comment) { $commentText .= '; ' . $comment->getComment(); } - $commonRequest->setComment($commentText); - - $requestId = $wsApi->setHeaders(); - $wsApi->setJsessionId($sid); // Set JSESSIONID for the last ws call. - if ($transStatus === 'CAPTURED') { // Transaction captured, we can do refund. - $timestamp = time(); - - $paymentRequest = new \Lyranetwork\Payzen\Model\Api\Ws\PaymentRequest(); - $paymentRequest->setTransactionId(PayzenApi::generateTransId($timestamp)); - $paymentRequest->setAmount($amountInCents); - $paymentRequest->setCurrency($currency->getNum()); - - $captureDelay = $this->getConfigData('capture_delay', $storeId); // Get submodule specific param. - if (! is_numeric($captureDelay)) { - // Get general param. - $captureDelay = $this->dataHelper->getCommonConfigData('capture_delay', $storeId); - } + $requestData = [ + 'uuid' => $uuid, + 'amount' => $amountInCents, + 'resolutionMode' => 'REFUND_ONLY', + 'currency' => $currency->getAlpha3(), + 'comment' => $commentText + ]; - if (is_numeric($captureDelay)) { - $paymentRequest->setExpectedCaptureDate(new \DateTime('@' . strtotime("+$captureDelay days", $timestamp))); - } + $refundPaymentResponse = $client->post('V4/Transaction/CancelOrRefund', json_encode($requestData)); - $validationMode = $this->getConfigData('validation_mode', $storeId); // Get submodule specific param. - if ($validationMode === '-1') { - // Get general param. - $validationMode = $this->dataHelper->getCommonConfigData('validation_mode', $storeId); - } + // Pending or accepted payment. + $successStatuses = array_merge(PayzenApi::getSuccessStatuses(), PayzenApi::getPendingStatuses()); - if ($validationMode !== '') { - $paymentRequest->setManualValidation($validationMode); - } + $this->restHelper->checkResult($refundPaymentResponse, $successStatuses); - $refundPayment = new \Lyranetwork\Payzen\Model\Api\Ws\RefundPayment(); - $refundPayment->setCommonRequest($commonRequest); - $refundPayment->setPaymentRequest($paymentRequest); - $refundPayment->setQueryRequest($queryRequest); - $refurndPaymentResponse = $wsApi->refundPayment($refundPayment); + // Check operation type. + $transType = $refundPaymentResponse['answer']['operationType']; - $wsApi->checkAuthenticity(); - $wsApi->checkResult( - $refurndPaymentResponse->getRefundPaymentResult()->getCommonResponse(), - [ - 'INITIAL', - 'AUTHORISED', - 'AUTHORISED_TO_VALIDATE', - 'WAITING_AUTHORISATION', - 'WAITING_AUTHORISATION_TO_VALIDATE', - 'CAPTURED', - 'UNDER_VERIFICATION' - ] - ); - - // Check operation type (0: debit, 1 refund). - $transType = $refurndPaymentResponse->getRefundPaymentResult() - ->getPaymentResponse() - ->getOperationType(); - if ($transType != 1) { + if ($transType !== 'CREDIT') { throw new \Exception("Unexpected transaction type returned ($transType)."); } // Create refund transaction in Magento. - $this->createRefundTransaction( - $payment, - $refurndPaymentResponse->getRefundPaymentResult()->getCommonResponse(), - $refurndPaymentResponse->getRefundPaymentResult()->getPaymentResponse(), - $refurndPaymentResponse->getRefundPaymentResult()->getCardResponse() - ); + $this->createRefundTransaction($payment, $refundPaymentResponse['answer']); $this->dataHelper->log("Online money refund for order #{$order->getIncrementId()} is successful."); } else { - $transAmount = $getPaymentDetailsResponse->getGetPaymentDetailsResult() - ->getPaymentResponse() - ->getAmount(); + $transAmount = $getPaymentDetails['answer']['amount']; + if ($amountInCents >= $transAmount) { // Transaction cancel. - $cancelPayment = new \Lyranetwork\Payzen\Model\Api\Ws\CancelPayment(); - $cancelPayment->setCommonRequest($commonRequest); - $cancelPayment->setQueryRequest($queryRequest); + $requestData = [ + 'uuid' => $uuid, + 'resolutionMode' => 'CANCELLATION_ONLY', + 'comment' => $commentText + ]; - $cancelPaymentResponse = $wsApi->cancelPayment($cancelPayment); + $cancelPaymentResponse = $client->post('V4/Transaction/CancelOrRefund', json_encode($requestData)); - $wsApi->checkAuthenticity(); - $wsApi->checkResult( - $cancelPaymentResponse->getCancelPaymentResult()->getCommonResponse(), - [ - 'CANCELLED' - ] - ); + $this->restHelper->checkResult($cancelPaymentResponse, ['CANCELLED']); $order->cancel(); $this->dataHelper->log("Online payment cancel for order #{$order->getIncrementId()} is successful."); - } else { // Partial transaction refund, call updatePayment WS. - $paymentRequest = new \Lyranetwork\Payzen\Model\Api\Ws\PaymentRequest(); - $paymentRequest->setAmount($transAmount - $amountInCents); - $paymentRequest->setCurrency($currency->getNum()); - - $updatePayment = new \Lyranetwork\Payzen\Model\Api\Ws\UpdatePayment(); - $updatePayment->setCommonRequest($commonRequest); - $updatePayment->setQueryRequest($queryRequest); - $updatePayment->setPaymentRequest($paymentRequest); - - $updatePaymentResponse = $wsApi->updatePayment($updatePayment); - - $wsApi->checkAuthenticity(); - $wsApi->checkResult( - $updatePaymentResponse->getUpdatePaymentResult()->getCommonResponse(), + } else { + // Partial transaction cancel, call update WS. + $timestamp = time(); + + $captureDelay = $this->getConfigData('capture_delay', $storeId); // Get submodule specific param. + if (! is_numeric($captureDelay)) { + // Get general param. + $captureDelay = $this->dataHelper->getCommonConfigData('capture_delay', $storeId); + } + + $expectedCaptureDate = (is_numeric($captureDelay)) ? new \DateTime('@' . strtotime("+$captureDelay days", $timestamp)) : null; + + $validationMode = $this->getConfigData('validation_mode', $storeId); // Get submodule specific param. + if ($validationMode === '-1') { + // Get general param. + $validationMode = $this->dataHelper->getCommonConfigData('validation_mode', $storeId); + } + + if ($validationMode !== '') { + $validationMode = ($validationMode == '1') ? 'YES' : 'NO'; + } + + $requestData = [ + 'uuid' => $uuid, + 'cardUpdate' => [ + 'amount' => $transAmount - $amountInCents, + 'currency' => $currency->getAlpha3(), + 'expectedCaptureDate' => $expectedCaptureDate, + 'manualValidation' => $validationMode + ], + 'comment' => $commentText + ]; + + $updatePaymentResponse = $client->post('V4/Transaction/Update', json_encode($requestData)); + + $this->restHelper->checkResult($updatePaymentResponse, [ 'AUTHORISED', 'AUTHORISED_TO_VALIDATE', @@ -1262,76 +1109,53 @@ public function refund(\Magento\Payment\Model\InfoInterface $payment, $amount) $this->dataHelper->log("Online payment update for order #{$order->getIncrementId()} is successful."); } } - } catch (\Lyranetwork\Payzen\Model\WsException $e) { - $this->dataHelper->log("[$requestId] {$e->getMessage()}", \Psr\Log\LogLevel::WARNING); - - $this->messageManager->addError($e->getMessage()); - $this->messageManager->addWarning('Please fix error to refund payments through PayZen. If you want to refund order in Magento, use the « Refund Offline » button.'); - throw new \Exception($e->getMessage()); - } catch (\SoapFault $f) { - $this->dataHelper->log( - "[$requestId] SoapFault with code {$f->faultcode}: {$f->faultstring}.", - \Psr\Log\LogLevel::WARNING - ); - - $this->messageManager->addError($f->faultstring); - $this->messageManager->addWarning('Please fix error to refund payments through PayZen. If you want to refund order in Magento, use the « Refund Offline » button.'); - throw new \Exception($f->faultstring); } catch(\UnexpectedValueException $e) { - $this->dataHelper->log("[$requestId] refund error with code {$e->getCode()}: {$e->getMessage()}.", \Psr\Log\LogLevel::ERROR); - - if ($e->getCode() === -1) { - throw new \Exception(__('Authentication error !')); - } elseif ($e->getCode() === 1) { - // Merchant does not subscribe to WS option, refund payment offline. - $notice = __('You are not authorized to do this action online. Please, do not forget to update payment in PayZen Back Office.'); - $this->messageManager->addNotice($notice); - // Magento will do an offline refund. - } elseif ($e->getCode() === 83) { - throw new \Exception(__('Chargebacks cannot be refunded.')); - } else { - throw new \Exception($e->getMessage()); - } + $this->dataHelper->log("refund error with code {$e->getCode()}: {$e->getMessage()}.", \Psr\Log\LogLevel::ERROR); } catch (\Exception $e) { $this->dataHelper->log( - "[$requestId] Exception with code {$e->getCode()}: {$e->getMessage()}", + "Exception with code {$e->getCode()}: {$e->getMessage()}", \Psr\Log\LogLevel::ERROR ); - $message = __('Refund error')->render() . ': ' . $e->getMessage(); - $this->messageManager->addError($message); - throw $e; + $message = __('Refund error') . ':'; + if ($e->getCode() <= -1) { // Manage cUrl errors. + $message .= ' ' . __('Please consult the PayZen logs for more details.'); + } else { + $message .= ' ' . $e->getMessage(); + } + + throw new \Exception($message); } $order->save(); return $this; } - private function createRefundTransaction($payment, $commonResponse, $paymentResponse, $cardResponse) + private function createRefundTransaction($payment, $refundResponse) { - $currency = PayzenApi::findCurrencyByNumCode($paymentResponse->getCurrency()); + $response = $this->restHelper->convertRestResult($refundResponse, true); // Save transaction details to sales_payment_transaction. - $transactionId = $paymentResponse->getTransactionId() . '-' . $paymentResponse->getSequenceNumber(); + $transactionId = $response['vads_trans_id']. '-' . $response['vads_sequence_number']; $expiry = ''; - if ($cardResponse->getExpiryMonth() && $cardResponse->getExpiryYear()) { - $expiry = str_pad($cardResponse->getExpiryMonth(), 2, '0', STR_PAD_LEFT) . ' / ' . - $cardResponse->getExpiryYear(); + if ($response['vads_expiry_month'] && $response['vads_expiry_year']) { + $expiry = str_pad($response['vads_expiry_month'], 2, '0', STR_PAD_LEFT) . ' / ' . + $response['vads_expiry_year']; } // Save paid amount. - $currency = PayzenApi::findCurrencyByNumCode($paymentResponse->getCurrency()); - $amount = round($currency->convertAmountToFloat($paymentResponse->getAmount()), $currency->getDecimals()); + $currency = PayzenApi::findCurrencyByNumCode($response['vads_currency']); + $amount = round($currency->convertAmountToFloat($response['vads_amount']), $currency->getDecimals()); $amountDetail = $amount . ' ' . $currency->getAlpha3(); - if ($paymentResponse->getEffectiveCurrency() && - ($paymentResponse->getCurrency() !== $paymentResponse->getEffectiveCurrency())) { - $effectiveCurrency = PayzenApi::findCurrencyByNumCode($paymentResponse->getEffectiveCurrency()); + if (isset($response['vads_effective_currency']) && + ($response['vads_currency'] !== $response['vads_effective_currency'])) { + $effectiveCurrency = PayzenApi::findCurrencyByNumCode($response['vads_effective_currency']); $effectiveAmount = round( - $effectiveCurrency->convertAmountToFloat($paymentResponse->getEffectiveAmount()), + $effectiveCurrency->convertAmountToFloat($response['vads_effective_amount']), $effectiveCurrency->getDecimals() ); @@ -1342,10 +1166,10 @@ private function createRefundTransaction($payment, $commonResponse, $paymentResp 'Transaction Type' => 'CREDIT', 'Amount' => $amountDetail, 'Transaction ID' => $transactionId, - 'Transaction UUID' => $paymentResponse->getTransactionUuid(), - 'Transaction Status' => $commonResponse->getTransactionStatusLabel(), - 'Means of payment' => $cardResponse->getBrand(), - 'Card Number' => $cardResponse->getNumber(), + 'Transaction UUID' => $response['vads_trans_uuid'], + 'Transaction Status' => $response['vads_trans_status'], + 'Means of payment' => $response['vads_card_brand'], + 'Card Number' => $response['vads_card_number'], 'Expiration Date' => $expiry ]; @@ -1353,37 +1177,54 @@ private function createRefundTransaction($payment, $commonResponse, $paymentResp $this->paymentHelper->addTransaction($payment, $transactionType, $transactionId, $additionalInfo); } - protected function checkAndGetWsApi($storeId) + protected function getPaymentDetails($order, $uuidOnly = true) { - $this->dataHelper->checkWsRequirements(); - - // Headers generation. - $shopId = $this->dataHelper->getCommonConfigData('site_id', $storeId); - $mode = $this->dataHelper->getCommonConfigData('ctx_mode', $storeId); - $keyTest = $this->dataHelper->getCommonConfigData('key_test', $storeId); - $keyProd = $this->dataHelper->getCommonConfigData('key_prod', $storeId); - - // Load specific configuration file for WS. - $options = parse_ini_file($this->dirReader->getModuleDir('etc', 'Lyranetwork_Payzen') . '/ws.ini') ?: []; - - if (! empty($options)) { - if (! $options['proxy.enabled']) { - unset( - $options['proxy_host'], - $options['proxy_port'], - $options['proxy_login'], - $options['proxy_password'] - ); - } + $storeId = $order->getStore()->getId(); + + // Get UUIDs from Order. + $client = new PayzenRest( + $this->dataHelper->getCommonConfigData('rest_url', $storeId), + $this->dataHelper->getCommonConfigData('site_id', $storeId), + $this->restHelper->getPrivateKey($storeId) + ); + + $requestData = [ + 'orderId' => $order->getIncrementId(), + 'operationType' => 'DEBIT' + ]; + + $getOrderResponse = $client->post('V4/Order/Get', json_encode($requestData)); + $this->restHelper->checkResult($getOrderResponse); - unset($options['proxy.enabled']); + // Order transactions organized by sequence numbers. + $transBySequence = []; + foreach ($getOrderResponse['answer']['transactions'] as $transaction) { + $sequenceNumber = $transaction['transactionDetails']['sequenceNumber']; + // Unpaid transactions are not considered. + if ($transaction['status'] !== 'UNPAID') { + $transBySequence[$sequenceNumber] = $uuidOnly ? $transaction['uuid'] : $transaction; + } } - $url = $this->dataHelper->getCommonConfigData('wsdl_url', $storeId); + ksort($transBySequence); + return $transBySequence; + } - $wsApi = new \Lyranetwork\Payzen\Model\Api\Ws\WsApi($url, $options); - $wsApi->init($shopId, $mode, $keyTest, $keyProd); + protected function getUserInfo() + { + $commentText = 'Magento user: ' . $this->authSession->getUser()->getUsername(); + $commentText .= '; IP address: ' . $this->dataHelper->getIpAddress(); - return $wsApi; + return $commentText; + } + + /** + * Return logged in customer model data. + * + * @return int + */ + public function getCurrentCustomer() + { + return $this->dataHelper->getCurrentCustomer($this->customerSession); } } diff --git a/Model/Method/Sepa.php b/Model/Method/Sepa.php index f8d4ab30..5d8d5fae 100644 --- a/Model/Method/Sepa.php +++ b/Model/Method/Sepa.php @@ -19,13 +19,21 @@ class Sepa extends Payzen protected $currencies = ['EUR']; /** - * + * @var \Magento\Customer\Api\CustomerRepositoryInterface + */ + protected $customerRepository; + + /** + * @var \Magento\Customer\Model\Session + */ + protected $customerSession; + + /** * @var \Lyranetwork\Payzen\Model\System\Config\Source\SepaAvailableCountry */ protected $sepaCountries; /** - * * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory @@ -48,6 +56,8 @@ class Sepa extends Payzen * @param \Magento\Framework\Module\Dir\Reader $dirReader * @param \Magento\Framework\DataObject\Factory $dataObjectFactory * @param \Magento\Backend\Model\Auth\Session $authSession + * @param \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository + * @param \Magento\Customer\Model\Session $customerSession * @param \Lyranetwork\Payzen\Model\System\Config\Source\SepaAvailableCountry $sepaCountries * @param \Magento\Framework\Model\ResourceModel\AbstractResource $resource * @param \Magento\Framework\Data\Collection\AbstractDb $resourceCollection @@ -71,16 +81,21 @@ public function __construct( \Lyranetwork\Payzen\Helper\Data $dataHelper, \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, \Magento\Backend\Model\Auth\Session $authSession, + \Magento\Customer\Api\CustomerRepositoryInterface $customerRepository, + \Magento\Customer\Model\Session $customerSession, \Lyranetwork\Payzen\Model\System\Config\Source\SepaAvailableCountry $sepaCountries, \Magento\Framework\Model\ResourceModel\AbstractResource $resource = null, \Magento\Framework\Data\Collection\AbstractDb $resourceCollection = null, array $data = [] ) { + $this->customerRepository = $customerRepository; + $this->customerSession = $customerSession; $this->sepaCountries = $sepaCountries; parent::__construct( @@ -101,6 +116,7 @@ public function __construct( $dataHelper, $paymentHelper, $checkoutHelper, + $restHelper, $productMetadata, $messageManager, $dirReader, @@ -116,7 +132,100 @@ protected function setExtraFields($order) { // Override with SEPA payment card. $this->payzenRequest->set('payment_cards', 'SDD'); - $this->payzenRequest->set('page_action', $this->getConfigData('mandate_mode')); + + if ($this->isOneClickActive() && $order->getCustomerId()) { + // Customer logged-in. + $info = $this->getInfoInstance(); + + $customer = $this->customerRepository->getById($order->getCustomerId()); + + if ($customer->getCustomAttribute('payzen_sepa_identifier') && $this->customerSession->getValidSepaAlias()) { + // Customer has an identifier. + $this->payzenRequest->set('identifier', $customer->getCustomAttribute('payzen_sepa_identifier')->getValue()); + + if (! $info->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::SEPA_IDENTIFIER)) { + // Customer choose to not use alias. + $this->payzenRequest->set('page_action', 'REGISTER_UPDATE_PAY'); + } + } else { + // Bank data acquisition on payment page, let's ask customer for data registration. + $this->dataHelper->log('Customer ' . $customer->getEmail() . + ' will be asked for card data registration on payment page.'); + $this->payzenRequest->set('page_action', 'ASK_REGISTER_PAY'); + } + + $this->customerSession->unsValidSepaAlias(); + } else { + $this->payzenRequest->set('page_action', $this->getMandateMode()); + } + } + + public function isOneclickAvailable() + { + if (! $this->isAvailable()) { + return false; + } + + if ($this->dataHelper->isBackend()) { + return false; + } + + if (! $this->isOneClickActive()) { + return false; + } + + // Customer has not gateway identifier. + if (! $this->getCurrentCustomer() || ! ($identifier = $this->getCurrentCustomer()->getCustomAttribute('payzen_sepa_identifier'))) { + return false; + } + + try { + $aliasEnabled = $this->restHelper->checkIdentifier($identifier->getValue(), $this->getCurrentCustomer()->getEmail()); + } catch (\Exception $e) { + $this->dataHelper->log( + "Saved identifier for customer {$this->getCurrentCustomer()->getEmail()} couldn't be verified on gateway. Error occurred: {$e->getMessage()}", + \Psr\Log\LogLevel::ERROR + ); + + // Unable to validate alias online, we cannot disable feature. + $aliasEnabled = true; + } + + $this->customerSession->setValidSepaAlias($aliasEnabled); + return $aliasEnabled; + } + + public function isOneClickActive() + { + // 1-Click enabled and SEPA direct debit mode is REGISTER_PAY. + if (($this->getConfigData('mandate_mode') === 'REGISTER_PAY') && $this->getConfigData('oneclick_active')) { + return true; + } + + return false; + } + + /** + * Assign data to info model instance. + * + * @param array|\Magento\Framework\DataObject $data + * @return $this + */ + public function assignData(\Magento\Framework\DataObject $data) + { + parent::assignData($data); + + $info = $this->getInfoInstance(); + + $payzenData = $this->extractPaymentData($data); + + // Whether to do a payment by identifier. + $info->setAdditionalInformation( + \Lyranetwork\Payzen\Helper\Payment::SEPA_IDENTIFIER, + $payzenData->getData('payzen_sepa_use_identifier') + ); + + return $this; } public function canUseForCountry($country) @@ -129,4 +238,14 @@ public function canUseForCountry($country) return in_array($country, $availableCountries); } + + /** + * Return Sepa mandate mode. + * + * @return string + */ + public function getMandateMode() + { + return $this->getConfigData('mandate_mode'); + } } diff --git a/Model/Method/Standard.php b/Model/Method/Standard.php index 2b040b20..4b54c69d 100644 --- a/Model/Method/Standard.php +++ b/Model/Method/Standard.php @@ -9,25 +9,24 @@ */ namespace Lyranetwork\Payzen\Model\Method; +use Lyranetwork\Payzen\Helper\Data; + class Standard extends Payzen { protected $_code = \Lyranetwork\Payzen\Helper\Data::METHOD_STANDARD; protected $_formBlockType = \Lyranetwork\Payzen\Block\Payment\Form\Standard::class; /** - * * @var \Magento\Customer\Api\CustomerRepositoryInterface */ protected $customerRepository; /** - * * @var \Magento\Customer\Model\Session */ protected $customerSession; /** - * * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\Api\ExtensionAttributesFactory $extensionFactory @@ -45,6 +44,7 @@ class Standard extends Payzen * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @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 @@ -74,6 +74,7 @@ public function __construct( \Lyranetwork\Payzen\Helper\Data $dataHelper, \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, @@ -106,6 +107,7 @@ public function __construct( $dataHelper, $paymentHelper, $checkoutHelper, + $restHelper, $productMetadata, $messageManager, $dirReader, @@ -154,11 +156,11 @@ protected function setExtraFields($order) $this->payzenRequest->set('url_return', $returnUrl . '?iframe=true'); } - if ($this->getConfigData('oneclick_active') && $order->getCustomerId()) { + if ($this->isOneClickActive() && $order->getCustomerId()) { // 1-Click enabled and customer logged-in. $customer = $this->customerRepository->getById($order->getCustomerId()); - if ($customer->getCustomAttribute('payzen_identifier')) { + if ($customer->getCustomAttribute('payzen_identifier') && $this->customerSession->getValidAlias()) { // Customer has an identifier. $this->payzenRequest->set('identifier', $customer->getCustomAttribute('payzen_identifier')->getValue()); @@ -173,17 +175,8 @@ protected function setExtraFields($order) $this->payzenRequest->set('page_action', 'ASK_REGISTER_PAY'); } } - } - - protected function sendOneyFields() - { - $oneyContract = $this->dataHelper->getCommonConfigData('oney_contract'); - if (! $oneyContract) { - return false; - } - $cards = explode(',', $this->getConfigData('payment_cards')); - return in_array('', $cards) /* All cards */ || in_array('ONEY', $cards) || in_array('ONEY_SANDBOX', $cards); + $this->customerSession->unsetValidAlias(); } /** @@ -209,12 +202,8 @@ public function getAvailableCcTypes() $cards = array_keys($allCards); } - if (! $this->sendOneyFields()) { - $cards = array_diff($cards, [ - 'ONEY', - 'ONEY_SANDBOX' - ]); - } + // Remove Oney card from payment means list. + $cards = array_diff($cards, ['ONEY_3X_4X']); $availCards = []; foreach ($allCards as $code => $label) { @@ -232,25 +221,34 @@ public function isOneclickAvailable() return false; } - // No 1-Click. - if (! $this->getConfigData('oneclick_active')) { - return false; - } - if ($this->dataHelper->isBackend()) { return false; } - if ($this->getEntryMode() == 4) { + if (! $this->isOneClickActive()) { return false; } // Customer has not gateway identifier. - if (! $this->getCurrentCustomer() || ! $this->getCurrentCustomer()->getCustomAttribute('payzen_identifier')) { + $customer = $this->getCurrentCustomer(); + if (! $customer || ! ($identifier = $customer->getCustomAttribute('payzen_identifier'))) { return false; } - return true; + try { + $aliasEnabled = $this->restHelper->checkIdentifier($identifier->getValue(), $customer->getEmail()); + } catch (\Exception $e) { + $this->dataHelper->log( + "Saved identifier for customer {$customer->getEmail()} couldn't be verified on gateway. Error occurred: {$e->getMessage()}", + \Psr\Log\LogLevel::ERROR + ); + + // Unable to validate alias online, we cannot disable feature. + $aliasEnabled = true; + } + + $this->customerSession->setValidAlias($aliasEnabled); + return $aliasEnabled; } /** @@ -269,7 +267,7 @@ public function assignData(\Magento\Framework\DataObject $data) $info->setCcType($payzenData->getData('payzen_standard_cc_type')); - // Wether to do a payment by identifier. + // Whether to do a payment by identifier. $info->setAdditionalInformation( \Lyranetwork\Payzen\Helper\Payment::IDENTIFIER, $payzenData->getData('payzen_standard_use_identifier') @@ -289,7 +287,7 @@ public function isIframeMode() return false; } - return $this->getEntryMode() == 3; + return $this->getEntryMode() == Data::MODE_IFRAME; } /** @@ -303,38 +301,32 @@ public function isLocalCcType() return false; } - return $this->getEntryMode() == 2; + return $this->getEntryMode() == Data::MODE_LOCAL_TYPE; } /** - * Return card selection mode. + * Check if embedded or popin mode is choosen. * - * @return int + * @return bool */ - public function getEntryMode() + public function isRestMode() { - return $this->getConfigData('card_info_mode'); + if ($this->dataHelper->isBackend()) { + return false; + } + + $restModes = [Data::MODE_EMBEDDED, Data::MODE_POPIN]; + return in_array($this->getEntryMode(), $restModes); } /** - * Return logged in customer model data. + * Return card selection mode. * * @return int */ - public function getCurrentCustomer() + public function getEntryMode() { - // Customer not logged in. - if (! $this->customerSession->isLoggedIn()) { - return false; - } - - // Customer has not gateway identifier. - $customer = $this->customerSession->getCustomer(); - if (! $customer || ! $customer->getId()) { - return false; - } - - return $customer->getDataModel(); + return $this->getConfigData('card_info_mode'); } public function getRestApiFormToken() @@ -352,7 +344,7 @@ public function getRestApiFormToken() // Currency. $currency = \Lyranetwork\Payzen\Model\Api\PayzenApi::findCurrencyByAlphaCode($quote->getOrderCurrencyCode()); if ($currency == null) { - // If currency is not supported, use base currency,. + // If currency is not supported, use base currency. $currency = \Lyranetwork\Payzen\Model\Api\PayzenApi::findCurrencyByAlphaCode($quote->getBaseCurrencyCode()); // ... and order total in base currency. @@ -443,9 +435,9 @@ public function getRestApiFormToken() try { // Perform our request. $client = new \Lyranetwork\Payzen\Model\Api\PayzenRest( - trim($this->dataHelper->getCommonConfigData('rest_url')), - trim($this->dataHelper->getCommonConfigData('site_id')), - trim($this->getRestPrivateKey()) + $this->dataHelper->getCommonConfigData('rest_url'), + $this->dataHelper->getCommonConfigData('site_id'), + $this->restHelper->getPrivateKey() ); $response = $client->post('V4/Charge/CreatePayment', json_encode($data)); @@ -472,11 +464,13 @@ public function getRestApiFormToken() } } - private function getRestPrivateKey() + public function isOneClickActive() { - $mode = $this->dataHelper->getCommonConfigData('ctx_mode'); + // 1-Click enabled and not payment by embedded fields (REST API). + if (! $this->isRestMode() && $this->getConfigData('oneclick_active')) { + return true; + } - $key = ($mode === 'PRODUCTION') ? 'rest_private_key_prod' : 'rest_private_key_test'; - return $this->getConfigData($key); + return false; } } diff --git a/Model/MultiConfigProvider.php b/Model/MultiConfigProvider.php index 3b071464..ac2f38d2 100644 --- a/Model/MultiConfigProvider.php +++ b/Model/MultiConfigProvider.php @@ -12,38 +12,26 @@ class MultiConfigProvider extends \Lyranetwork\Payzen\Model\PayzenConfigProvider { /** - * * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\UrlInterface $urlBuilder - * @param \Psr\Log\LoggerInterface $logger - * @param \Magento\Payment\Helper\Data $paymentHelper * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param string $methodCode */ public function __construct( \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\UrlInterface $urlBuilder, - \Psr\Log\LoggerInterface $logger, - \Magento\Payment\Helper\Data $paymentHelper, \Lyranetwork\Payzen\Helper\Data $dataHelper ) { parent::__construct( $storeManager, - $assetRepo, $urlBuilder, - $logger, - $paymentHelper, $dataHelper, \Lyranetwork\Payzen\Helper\Data::METHOD_MULTI ); } /** - * * {@inheritdoc} - * */ public function getConfig() { diff --git a/Model/OneyConfigProvider.php b/Model/OneyConfigProvider.php new file mode 100644 index 00000000..7569677f --- /dev/null +++ b/Model/OneyConfigProvider.php @@ -0,0 +1,84 @@ +timezone = $timezone; + $this->pricingHelper = $pricingHelper; + } + + /** + * {@inheritdoc} + */ + public function getConfig() + { + $config = parent::getConfig(); + $config['payment'][$this->method->getCode()]['availableOptions'] = $this->getAvailableOptions(); + + return $config; + } + + private function getAvailableOptions() + { + $quote = $this->dataHelper->getCheckoutQuote(); + $amount = ($quote && $quote->getId()) ? $quote->getBaseGrandTotal() : null; + + $options = []; + foreach ($this->method->getAvailableOptions($amount) as $key => $option) { + // Option will be available. + $c = is_numeric($option['count']) ? $option['count'] : 1; + $r = is_numeric($option['rate']) ? $option['rate'] : 0; + + // Get final option description. + $search = array('%c', '%r'); + $replace = array($c, $r . ' %'); + $label = str_replace($search, $replace, $option['label']); // Label to display on payment page. + + $options[] = [ + 'key' => $key, + 'label' => $label, + ]; + } + + return $options; + } +} diff --git a/Model/OtherConfigProvider.php b/Model/OtherConfigProvider.php new file mode 100644 index 00000000..1ee03c55 --- /dev/null +++ b/Model/OtherConfigProvider.php @@ -0,0 +1,68 @@ +method->getCode()]['availableOptions'] = $this->getAvailableOptions(); + $config['payment'][$this->method->getCode()]['regroupMode'] = ($this->method->getRegroupMode() == '1'); + + return $config; + } + + private function getAvailableOptions() + { + $quote = $this->dataHelper->getCheckoutQuote(); + + $options = []; + foreach ($this->method->getAvailableMeans($quote) as $key => $option) { + $means = $option['means']; + + $icon = $this->getCcTypeImageSrc($means); + + // Get supported payment means including added ones. + $cards = $this->method->getSupportedPaymentMeans(); + + $options[] = [ + 'key' => $key, + 'value' => $cards[$means], + 'label' => $option['label'], + 'icon' => $icon + ]; + } + + return $options; + } +} diff --git a/Model/PaypalConfigProvider.php b/Model/PaypalConfigProvider.php index fa6caa06..ebe2a4c2 100644 --- a/Model/PaypalConfigProvider.php +++ b/Model/PaypalConfigProvider.php @@ -12,29 +12,19 @@ class PaypalConfigProvider extends \Lyranetwork\Payzen\Model\PayzenConfigProvider { /** - * * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\UrlInterface $urlBuilder - * @param \Psr\Log\LoggerInterface $logger - * @param \Magento\Payment\Helper\Data $paymentHelper * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param string $methodCode */ public function __construct( \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\UrlInterface $urlBuilder, - \Psr\Log\LoggerInterface $logger, - \Magento\Payment\Helper\Data $paymentHelper, \Lyranetwork\Payzen\Helper\Data $dataHelper ) { parent::__construct( $storeManager, - $assetRepo, $urlBuilder, - $logger, - $paymentHelper, $dataHelper, \Lyranetwork\Payzen\Helper\Data::METHOD_PAYPAL ); diff --git a/Model/PayzenConfigProvider.php b/Model/PayzenConfigProvider.php index 6167592f..684f0f7c 100644 --- a/Model/PayzenConfigProvider.php +++ b/Model/PayzenConfigProvider.php @@ -12,74 +12,47 @@ class PayzenConfigProvider implements \Magento\Checkout\Model\ConfigProviderInterface { /** - * * @var \Magento\Store\Model\StoreManagerInterface */ protected $storeManager; /** - * - * @var \Magento\Framework\View\Asset\Repository - */ - protected $assetRepo; - - /** - * * @var \Magento\Framework\UrlInterface */ protected $urlBuilder; /** - * - * @var \Psr\Log\LoggerInterface - */ - protected $logger; - - /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @var \Lyranetwork\Payzen\Model\Method\Payzen */ protected $method; /** - * * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\UrlInterface $urlBuilder - * @param \Psr\Log\LoggerInterface $logger - * @param \Magento\Payment\Helper\Data $paymentHelper * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param string $methodCode */ public function __construct( \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\UrlInterface $urlBuilder, - \Psr\Log\LoggerInterface $logger, - \Magento\Payment\Helper\Data $paymentHelper, \Lyranetwork\Payzen\Helper\Data $dataHelper, $methodCode ) { $this->storeManager = $storeManager; - $this->assetRepo = $assetRepo; $this->urlBuilder = $urlBuilder; - $this->logger = $logger; - $this->method = $paymentHelper->getMethodInstance($methodCode); $this->dataHelper = $dataHelper; + $this->method = $this->dataHelper->getMethodInstance($methodCode); $this->method->setStore($this->storeManager->getStore()->getId()); } /** - * * {@inheritdoc} - * */ public function getConfig() { @@ -113,31 +86,7 @@ protected function getModuleLogoUrl() { $fileName = $this->method->getConfigData('module_logo'); - if ($this->dataHelper->isUploadFileImageExists($fileName)) { - return $this->storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . - 'payzen/images/' . $fileName; - } else { - return $this->getViewFileUrl('Lyranetwork_Payzen::images/' . $fileName); - } - } - - /** - * Retrieve URL of a view file. - * - * @param string $fileId - * @param array $params - * @return string[] - */ - protected function getViewFileUrl($fileId, array $params = []) - { - try { - return $this->assetRepo->getUrlWithParams($fileId, $params); - } catch (\Magento\Framework\Exception\LocalizedException $e) { - $this->logger->critical($e); - return $this->urlBuilder->getUrl('', [ - '_direct' => 'core/index/notFound' - ]); - } + return $this->getCcTypeImageSrc($fileName, false); } protected function getAvailableCcTypes() @@ -148,19 +97,7 @@ protected function getAvailableCcTypes() $cards = []; foreach ($this->method->getAvailableCcTypes() as $value => $label) { - $card = 'cc/' . strtolower($value) . '.png'; - - $icon = false; - if ($this->dataHelper->isUploadFileImageExists($card)) { - $icon = $this->storeManager->getStore()->getBaseUrl(\Magento\Framework\UrlInterface::URL_TYPE_MEDIA) . - 'payzen/images/' . $card; - } else { - $asset = $this->assetRepo->createAsset('Lyranetwork_Payzen::images/' . $card); - - if ($this->dataHelper->isPublishFileImageExists($asset->getRelativeSourceFilePath())) { - $icon = $this->getViewFileUrl('Lyranetwork_Payzen::images/' . $card); - } - } + $icon = $this->getCcTypeImageSrc($value); $cards[] = [ 'value' => $value, @@ -180,4 +117,30 @@ protected function getEntryMode() return $this->method->getEntryMode(); } + + protected function getCcTypeImageSrc($card, $cc = true) + { + return $this->dataHelper->getCcTypeImageSrc($card, $cc); + } + + protected function renderMaskedPan($maskedPan) + { + // Recover card brand if saved with masked pan and check if logo exists. + if (strpos($maskedPan, '|') !== false) { + $cardBrand = substr($maskedPan, 0, strpos($maskedPan, '|')); + + $logoSrc = $this->getCcTypeImageSrc($cardBrand); + if ($logoSrc) { + $logo = '' . $cardBrand . ''; + } + + return $logoSrc ? $logo . '' . substr($maskedPan, strpos($maskedPan, '|') + 1) . + '' : str_replace('|',' ', $maskedPan); + } + + return $maskedPan; + } } diff --git a/Model/SepaConfigProvider.php b/Model/SepaConfigProvider.php index 2ca58dc2..df7ba26a 100644 --- a/Model/SepaConfigProvider.php +++ b/Model/SepaConfigProvider.php @@ -12,31 +12,41 @@ class SepaConfigProvider extends \Lyranetwork\Payzen\Model\PayzenConfigProvider { /** - * * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\UrlInterface $urlBuilder - * @param \Psr\Log\LoggerInterface $logger - * @param \Magento\Payment\Helper\Data $paymentHelper * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param string $methodCode */ public function __construct( \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\UrlInterface $urlBuilder, - \Psr\Log\LoggerInterface $logger, - \Magento\Payment\Helper\Data $paymentHelper, \Lyranetwork\Payzen\Helper\Data $dataHelper ) { parent::__construct( $storeManager, - $assetRepo, $urlBuilder, - $logger, - $paymentHelper, $dataHelper, \Lyranetwork\Payzen\Helper\Data::METHOD_SEPA ); } + + /** + * {@inheritdoc} + */ + public function getConfig() + { + $config = parent::getConfig(); + + $config['payment'][$this->method->getCode()]['oneClick'] = $this->method->isOneclickAvailable(); + + $customer = $this->method->getCurrentCustomer(); + $maskedPan = ''; + if ($customer && $customer->getCustomAttribute('payzen_sepa_iban_bic')) { + $maskedPan = $customer->getCustomAttribute('payzen_sepa_iban_bic')->getValue(); + } + + $config['payment'][$this->method->getCode()]['maskedPan'] = $this->renderMaskedPan($maskedPan); + + return $config; + } } diff --git a/Model/StandardConfigProvider.php b/Model/StandardConfigProvider.php index f7a4992b..872e15f0 100644 --- a/Model/StandardConfigProvider.php +++ b/Model/StandardConfigProvider.php @@ -12,44 +12,31 @@ class StandardConfigProvider extends \Lyranetwork\Payzen\Model\PayzenConfigProvider { /** - * * @var string|boolean */ protected $formToken = false; /** - * * @param \Magento\Store\Model\StoreManagerInterface $storeManager - * @param \Magento\Framework\View\Asset\Repository $assetRepo * @param \Magento\Framework\UrlInterface $urlBuilder - * @param \Psr\Log\LoggerInterface $logger - * @param \Magento\Payment\Helper\Data $paymentHelper * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param string $methodCode */ public function __construct( \Magento\Store\Model\StoreManagerInterface $storeManager, - \Magento\Framework\View\Asset\Repository $assetRepo, \Magento\Framework\UrlInterface $urlBuilder, - \Psr\Log\LoggerInterface $logger, - \Magento\Payment\Helper\Data $paymentHelper, \Lyranetwork\Payzen\Helper\Data $dataHelper ) { parent::__construct( $storeManager, - $assetRepo, $urlBuilder, - $logger, - $paymentHelper, $dataHelper, \Lyranetwork\Payzen\Helper\Data::METHOD_STANDARD ); } /** - * * {@inheritdoc} - * */ public function getConfig() { @@ -64,7 +51,7 @@ public function getConfig() $maskedPan = $customer->getCustomAttribute('payzen_masked_pan')->getValue(); } - $config['payment'][$this->method->getCode()]['maskedPan'] = $maskedPan; + $config['payment'][$this->method->getCode()]['maskedPan'] = $this->renderMaskedPan($maskedPan); // For payment via REST API. $config['payment'][$this->method->getCode()]['restFormToken'] = $this->getRestFormToken(); @@ -89,7 +76,7 @@ private function getIframeLoaderUrl() private function getRestFormToken() { - if ($this->getEntryMode() != 4) { + if (! $this->method->isRestMode()) { return false; } diff --git a/Model/System/Config/Backend/Choozeo/ChoozeoPaymentOptions.php b/Model/System/Config/Backend/Choozeo/ChoozeoPaymentOptions.php index caf51ccd..8c810aa0 100644 --- a/Model/System/Config/Backend/Choozeo/ChoozeoPaymentOptions.php +++ b/Model/System/Config/Backend/Choozeo/ChoozeoPaymentOptions.php @@ -20,18 +20,14 @@ public function beforeSave() } else { $i = 0; foreach ($values as $value) { - $i ++; + $i++; if (empty($value)) { continue; } - if (! empty($value['amount_min']) && (! is_numeric($value['amount_min']) || $value['amount_min'] < 0)) { - $this->throwException('Minimum amount', $i); - } elseif (! empty($value['amount_max']) && - (! is_numeric($value['amount_max']) || $value['amount_max'] < 0)) { - $this->throwException('Maximum amount', $i); - } + $this->checkAmount($value['amount_min'], 'Minimum amount', $i); + $this->checkAmount($value['amount_max'], 'Maximum amount', $i); } } diff --git a/Model/System/Config/Backend/CustgroupOptions.php b/Model/System/Config/Backend/CustgroupOptions.php index fc862a5d..108819b5 100644 --- a/Model/System/Config/Backend/CustgroupOptions.php +++ b/Model/System/Config/Backend/CustgroupOptions.php @@ -20,7 +20,7 @@ public function beforeSave() } else { $i = 0; foreach ($values as $value) { - $i ++; + $i++; if (empty($value)) { continue; diff --git a/Model/System/Config/Backend/Franfinance/FranfinancePaymentOptions.php b/Model/System/Config/Backend/Franfinance/FranfinancePaymentOptions.php new file mode 100644 index 00000000..b94b7815 --- /dev/null +++ b/Model/System/Config/Backend/Franfinance/FranfinancePaymentOptions.php @@ -0,0 +1,40 @@ +getValue(); + + if (! is_array($values) || empty($values)) { + $this->setValue([]); + } else { + $i = 0; + foreach ($values as $value) { + $i++; + + if (empty($value)) { + continue; + } + + if (empty($value['label'])) { + $this->throwException('Label', $i); + } + + $this->checkAmount($value['amount_min'], 'Minimum amount', $i); + $this->checkAmount($value['amount_max'], 'Maximum amount', $i); + } + } + + return parent::beforeSave(); + } +} diff --git a/Model/System/Config/Backend/Fullcb/FullcbPaymentOptions.php b/Model/System/Config/Backend/Fullcb/FullcbPaymentOptions.php index 01b5d71a..ff86a33e 100644 --- a/Model/System/Config/Backend/Fullcb/FullcbPaymentOptions.php +++ b/Model/System/Config/Backend/Fullcb/FullcbPaymentOptions.php @@ -20,7 +20,7 @@ public function beforeSave() } else { $i = 0; foreach ($values as $value) { - $i ++; + $i++; if (empty($value)) { continue; @@ -30,21 +30,10 @@ public function beforeSave() $this->throwException('Label', $i); } - if (! empty($value['amount_min']) && (! is_numeric($value['amount_min']) || $value['amount_min'] < 0)) { - $this->throwException('Minimum amount', $i); - } - - if (! empty($value['amount_max']) && (! is_numeric($value['amount_max']) || $value['amount_max'] < 0)) { - $this->throwException('Maximum amount', $i); - } - - if (! empty($value['rate']) && (! is_numeric($value['rate']) || $value['rate'] < 0)) { - $this->throwException('Rate', $i); - } - - if (! empty($value['cap']) && (! is_numeric($value['cap']) || $value['cap'] < 0)) { - $this->throwException('Cap', $i); - } + $this->checkAmount($value['amount_min'], 'Minimum amount', $i); + $this->checkAmount($value['amount_max'], 'Maximum amount', $i); + $this->checkRate($value['rate'], 'Rate', $i); + $this->checkAmount($value['cap'], 'Cap', $i); } } diff --git a/Model/System/Config/Backend/Gift/AddedCards.php b/Model/System/Config/Backend/Gift/AddedCards.php index dda18969..be9895c5 100644 --- a/Model/System/Config/Backend/Gift/AddedCards.php +++ b/Model/System/Config/Backend/Gift/AddedCards.php @@ -14,19 +14,16 @@ class AddedCards extends \Lyranetwork\Payzen\Model\System\Config\Backend\Serialized\ArraySerialized\ConfigArraySerialized { /** - * * @var \Magento\Framework\File\UploaderFactory */ protected $uploaderFactory; /** - * * @var \Magento\Framework\Filesystem */ protected $filesystem; /** - * * @var \Magento\Config\Model\Config\Backend\File\RequestData\RequestDataInterface */ protected $requestData; @@ -37,7 +34,6 @@ class AddedCards extends \Lyranetwork\Payzen\Model\System\Config\Backend\Seriali protected $adapterFactory; /** - * * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\App\Config\ScopeConfigInterface $config @@ -83,7 +79,7 @@ public function __construct( } /** - * Save uploaded files before saving config value + * Save uploaded files before saving config value. */ public function beforeSave() { @@ -96,7 +92,7 @@ public function beforeSave() $i = 0; foreach ($value as $key => $card) { - $i ++; + $i++; if (empty($card)) { continue; diff --git a/Model/System/Config/Backend/Multi/MultiPaymentOptions.php b/Model/System/Config/Backend/Multi/MultiPaymentOptions.php index 761d808e..db97bceb 100644 --- a/Model/System/Config/Backend/Multi/MultiPaymentOptions.php +++ b/Model/System/Config/Backend/Multi/MultiPaymentOptions.php @@ -23,7 +23,7 @@ public function beforeSave() $i = 0; $options = []; foreach ($values as $value) { - $i ++; + $i++; if (empty($value)) { continue; @@ -40,12 +40,10 @@ public function beforeSave() $this->throwException('Contract', $i); } - $this->checkDecimal($value['count'], 'Count', $i); - $this->checkDecimal($value['period'], 'Period', $i); + $this->checkMandatoryDecimal($value['count'], 'Count', $i); + $this->checkMandatoryDecimal($value['period'], 'Period', $i); - if (! empty($value['first']) && (! is_numeric($value['first']) || $value['first'] >= 100)) { - $this->throwException('1st payment', $i); - } + $this->checkRate($value['first'], '1st installment', $i); $options[] = $value; } @@ -55,18 +53,4 @@ public function beforeSave() return parent::beforeSave(); } - - private function checkDecimal($value, $fieldLabel, $i) - { - if (! preg_match('#^[1-9]\d*$#', $value)) { - $this->throwException($fieldLabel, $i); - } - } - - private function checkAmount($amount, $fieldLabel, $i) - { - if (! empty($amount) && ! preg_match('#^\d+(\.\d+)?$#', $amount)) { - $this->throwException($fieldLabel, $i); - } - } } diff --git a/Model/System/Config/Backend/Oney/Active.php b/Model/System/Config/Backend/Oney/Active.php new file mode 100644 index 00000000..85912619 --- /dev/null +++ b/Model/System/Config/Backend/Oney/Active.php @@ -0,0 +1,76 @@ +checkoutHelper = $checkoutHelper; + parent::__construct($context, $registry, $config, $cacheTypeList, $resource, $resourceCollection, $data); + } + + public function save() + { + $this->messages = []; + + if ($this->getValue() /* Submodule enabled. */) { + try { + // Check Oney requirements. + $this->checkoutHelper->checkOneyRequirements($this->getScope(), $this->getScopeId()); + } catch (\Magento\Framework\Exception\LocalizedException $e) { + $this->setValue(0); + + $this->messages[] = $e->getMessage(); + } + + $_SESSION['payzen_oney_enabled'] = 'True'; + } + + return parent::save(); + } + + public function afterCommitCallback() + { + if (! empty($this->messages)) { + $this->messages[] = __('Payment in 3 or 4 times Oney cannot be used.'); + + throw new \Magento\Framework\Exception\LocalizedException(__(implode("\n", $this->messages))); + } + + return parent::afterCommitCallback(); + } +} diff --git a/Model/System/Config/Backend/Oney/OneyPaymentOptions.php b/Model/System/Config/Backend/Oney/OneyPaymentOptions.php new file mode 100644 index 00000000..5bc520a5 --- /dev/null +++ b/Model/System/Config/Backend/Oney/OneyPaymentOptions.php @@ -0,0 +1,72 @@ +getValue(); + if ($this->isEmptyOneyOptions($values)) { + if (isset($_SESSION['payzen_oney_enabled']) && $_SESSION['payzen_oney_enabled'] === 'True') { + unset($_SESSION['payzen_oney_enabled']); + + $config = $this->getFieldConfig(); + + $field = __($config['label'])->render(); + $group = $this->dataHelper->getGroupTitle($config['path']); + + $msg = __('The field « %1 » is required for section « %2 ».', $field, $group)->render(); + throw new \Magento\Framework\Exception\LocalizedException(__($msg)); + } else { + $this->setValue([]); + } + } else { + $i = 0; + foreach ($values as $value) { + $i++; + + if (empty($value)) { + continue; + } + + if (! preg_match('#^.{0,64}$#u', $value['label'])) { + $this->throwException('Label', $i); + } + + if (empty($value['code'])) { + $this->throwException('Code', $i); + } + + $this->checkAmount($value['minimum'], 'Min. amount', $i); + $this->checkAmount($value['maximum'], 'Max. amount', $i); + $this->checkMandatoryDecimal($value['count'], 'Count', $i); + $this->checkRate($value['rate'], 'Rate', $i); + } + } + + return parent::beforeSave(); + } +} diff --git a/Model/System/Config/Backend/Other/AddedPaymentMeans.php b/Model/System/Config/Backend/Other/AddedPaymentMeans.php new file mode 100644 index 00000000..bce085f2 --- /dev/null +++ b/Model/System/Config/Backend/Other/AddedPaymentMeans.php @@ -0,0 +1,105 @@ +method = $method; + + parent::__construct($context, $registry, $config, $cacheTypeList,$dataHelper, $resource, $resourceCollection, $data); + } + + /** + * Save uploaded files before saving config value. + */ + public function beforeSave() + { + $value = $this->getValue(); + + if (! is_array($value) || empty($value)) { + $this->setValue([]); + return parent::beforeSave(); + } + + $i = 0; + $usedCards = []; + + // Get supported payment means. + $supportedCards = \Lyranetwork\Payzen\Model\Api\PayzenApi::getSupportedCardTypes(); + + foreach ($value as $key => $card) { + $i++; + + if (empty($card)) { + continue; + } + + // Trim value before set. + $card['meanCode'] = trim($card['meanCode']); + $value[$key]['meanCode'] = $card['meanCode']; + + $this->checkCode($card['meanCode'], $i); + $this->checkName($card['meanName'], $i); + + if (in_array($card['meanCode'], $supportedCards) || in_array($card['meanCode'], $usedCards)) { + unset($value[$key]); + } else { + $usedCards[] = $card['meanCode']; + } + } + + $this->setValue($value); + + return parent::beforeSave(); + } + + private function checkCode($value, $i) + { + if (empty($value) || ! preg_match('#^[A-Za-z0-9\-_]+$#', $value)) { + $this->throwException('Code', $i); + } + } + + private function checkName($value, $i) + { + if (empty($value) || ! preg_match('#^[^<>]*$#', $value)) { + $this->throwException('Label', $i); + } + } +} diff --git a/Model/System/Config/Backend/Other/OtherPaymentMeans.php b/Model/System/Config/Backend/Other/OtherPaymentMeans.php new file mode 100644 index 00000000..5fd5d3b9 --- /dev/null +++ b/Model/System/Config/Backend/Other/OtherPaymentMeans.php @@ -0,0 +1,94 @@ +method = $method; + + parent::__construct($context, $registry, $config, $cacheTypeList,$dataHelper, $resource, $resourceCollection, $data); + } + + public function beforeSave() + { + $values = $this->getValue(); + $usedCards = []; + + if (! is_array($values) || empty($values)) { + $this->setValue([]); + } else { + $i = 0; + $options = []; + + // Get supported payment means including added ones. + $supportedCards = $this->method->getSupportedPaymentMeans(); + + foreach ($values as $key => $value) { + $i++; + + if (empty($value)) { + continue; + } + + if (in_array($value['means'], $usedCards)) { + // Do not save several options with the same means of payment. + $this->throwException('Payment means', $i, 'You cannot enable several options with the same means of payment.'); + } else { + $usedCards[] = $value['means']; + } + + if (empty($value['label'])) { + $value['label'] = sprintf(__('Payment with %s'), $supportedCards[$value['means']]); + $values[$key] = $value; + } + + $this->checkAmount($value['minimum'], 'Min. amount', $i); + $this->checkAmount($value['maximum'], 'Max. amount', $i); + $this->checkDecimal($value['capture_delay'], 'Capture delay', $i); + + $options[] = $value; + } + + $this->setValue($values); + $this->dataHelper->updateOtherPaymentModelConfig($options); + } + + return parent::beforeSave(); + } +} diff --git a/Model/System/Config/Backend/PaymentCards.php b/Model/System/Config/Backend/PaymentCards.php index 49efe8b9..bd598619 100644 --- a/Model/System/Config/Backend/PaymentCards.php +++ b/Model/System/Config/Backend/PaymentCards.php @@ -14,19 +14,16 @@ class PaymentCards extends \Magento\Framework\App\Config\Value protected $messages; /** - * * @var \Lyranetwork\Payzen\Helper\Checkout */ protected $checkoutHelper; /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\App\Config\ScopeConfigInterface $config @@ -62,36 +59,8 @@ public function save() $this->setValue([]); } - $data = $this->getGroups('payzen'); // Get data of general config group. - $oneyContract = isset($data['fields']['oney_contract']['value']) && $data['fields']['oney_contract']['value']; - - $oney = true; - if ($oneyContract) { - if (empty($this->getValue()) /* ALL */ - || in_array('ONEY', $this->getValue()) || in_array('ONEY_SANDBOX', $this->getValue())) { - try { - // Check Oney requirements. - $this->checkoutHelper->checkOneyRequirements($this->getScope(), $this->getScopeId()); - } catch (\Magento\Framework\Exception\LocalizedException $e) { - $this->setValue(array_diff($this->getValue(), [ - 'ONEY', - 'ONEY_SANDBOX' - ])); - - if (! in_array($e->getMessage(), $this->messages)) { - $this->messages[] = $e->getMessage(); - } - - $oney = false; - } - } - } else { - // No Oney contract, let's unselect them. - $this->setValue(array_diff($this->getValue(), [ - 'ONEY', - 'ONEY_SANDBOX' - ])); - } + // Remove Oney card from payment means list. + $this->setValue(array_diff($this->getValue(), ['ONEY_3X_4X'])); if (strlen(implode(';', $this->getValue())) > 127) { $config = $this->getFieldConfig(); @@ -102,19 +71,8 @@ public function save() $msg = __('Invalid value for field « %1 » in section « %2 ».', $field, $group)->render(); $msg .= ' ' . __('Too many card types are selected.')->render(); throw new \Magento\Framework\Exception\LocalizedException(__($msg)); - } elseif (! $oney) { - $this->messages[] = __('FacilyPay Oney means of payment cannot be used.')->render(); } return parent::save(); } - - public function afterCommitCallback() - { - if (! empty($this->messages)) { - throw new \Magento\Framework\Exception\LocalizedException(__(implode("\n", $this->messages))); - } - - return parent::afterCommitCallback(); - } } diff --git a/Model/System/Config/Backend/Serialized/ArraySerialized/ConfigArraySerialized.php b/Model/System/Config/Backend/Serialized/ArraySerialized/ConfigArraySerialized.php index 072900a7..546d6266 100644 --- a/Model/System/Config/Backend/Serialized/ArraySerialized/ConfigArraySerialized.php +++ b/Model/System/Config/Backend/Serialized/ArraySerialized/ConfigArraySerialized.php @@ -12,13 +12,11 @@ class ConfigArraySerialized extends \Magento\Config\Model\Config\Backend\Serialized\ArraySerialized { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\App\Config\ScopeConfigInterface $config @@ -68,4 +66,34 @@ protected function throwException($column, $position, $extraMsg = '') // Throw exception. throw new \Magento\Framework\Exception\LocalizedException(__($msg)); } + + protected function checkMandatoryDecimal($value, $fieldLabel, $i) + { + if (empty($value)) { + $this->throwException($fieldLabel, $i); + } + + $this->checkDecimal($value, $fieldLabel, $i); + } + + protected function checkDecimal($value, $fieldLabel, $i) + { + if (! empty($value) && ! preg_match('#^\d+$#', $value)) { + $this->throwException($fieldLabel, $i); + } + } + + protected function checkAmount($amount, $fieldLabel, $i) + { + if (! empty($amount) && ! preg_match('#^\d+(\.\d+)?$#', $amount)) { + $this->throwException($fieldLabel, $i); + } + } + + protected function checkRate($rate, $fieldLabel, $i) + { + if (! empty($rate) && (! is_numeric($rate) || ($rate < 0) || ($rate >= 100))) { + $this->throwException($fieldLabel, $i); + } + } } diff --git a/Model/System/Config/Backend/ShopUrl.php b/Model/System/Config/Backend/ShopUrl.php index 59e73520..bc3f5c13 100644 --- a/Model/System/Config/Backend/ShopUrl.php +++ b/Model/System/Config/Backend/ShopUrl.php @@ -12,13 +12,11 @@ class ShopUrl extends \Magento\Framework\App\Config\Value { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\App\Config\ScopeConfigInterface $config diff --git a/Model/System/Config/Backend/ThemeConfig.php b/Model/System/Config/Backend/ThemeConfig.php index 9be61b39..7afc927b 100644 --- a/Model/System/Config/Backend/ThemeConfig.php +++ b/Model/System/Config/Backend/ThemeConfig.php @@ -12,13 +12,11 @@ class ThemeConfig extends \Magento\Framework\App\Config\Value { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @param \Magento\Framework\Model\Context $context * @param \Magento\Framework\Registry $registry * @param \Magento\Framework\App\Config\ScopeConfigInterface $config diff --git a/Model/System/Config/Source/CardInfoMode.php b/Model/System/Config/Source/CardInfoMode.php index ead22e7e..46ebae0d 100644 --- a/Model/System/Config/Source/CardInfoMode.php +++ b/Model/System/Config/Source/CardInfoMode.php @@ -33,7 +33,12 @@ public function toOptionArray() if ($features['embedded']) { $options[] = [ 'value' => '4', - 'label' => __('Embedded payment fields (REST API)') + 'label' => __('Embedded payment fields on merchant site (REST API)') + ]; + + $options[] = [ + 'value' => '5', + 'label' => __('Embedded payment fields in a pop-in (REST API)') ]; } diff --git a/Model/System/Config/Source/ChoozeoCountry.php b/Model/System/Config/Source/ChoozeoCountry.php index 69614ca0..a7541a7f 100644 --- a/Model/System/Config/Source/ChoozeoCountry.php +++ b/Model/System/Config/Source/ChoozeoCountry.php @@ -15,14 +15,13 @@ class ChoozeoCountry implements \Magento\Framework\Option\ArrayInterface public static $availableCountries = ['FR', 'GP', 'MQ', 'GF', 'RE', 'YT']; /** - * Locale model + * Locale model. * * @var \Magento\Framework\Locale\ListsInterface */ protected $localeLists; /** - * * @param \Magento\Framework\Locale\ListsInterface $localeLists */ public function __construct(\Magento\Framework\Locale\ListsInterface $localeLists) diff --git a/Model/System/Config/Source/CountryList.php b/Model/System/Config/Source/CountryList.php new file mode 100644 index 00000000..32a16a02 --- /dev/null +++ b/Model/System/Config/Source/CountryList.php @@ -0,0 +1,54 @@ +_countryCollectionFactory = $countryCollectionFactory; + $this->translate = $translate; + } + + public function toOptionArray() + { + $countries = $this->_countryCollectionFactory->create(); + + $result = []; + foreach ($countries as $country) { + $code = $country->getCountryId(); + $name = $this->translate->getCountryTranslation($code); + + if (empty($name)) { + $name = $code; + } + + $result[$code] = $name; + } + + return $result; + } +} diff --git a/Model/System/Config/Source/OneyAvailableCountry.php b/Model/System/Config/Source/OneyAvailableCountry.php new file mode 100644 index 00000000..eafc9044 --- /dev/null +++ b/Model/System/Config/Source/OneyAvailableCountry.php @@ -0,0 +1,48 @@ +translate = $translate; + } + + public function toOptionArray() + { + $result = []; + foreach ($this->_availableCountries as $code) { + $name = $this->translate->getCountryTranslation($code); + + if (empty($name)) { + $name = $code; + } + + $result[] = [ + 'value' => $code, + 'label' => $name + ]; + } + + return $result; + } + + public function getCountryCodes() + { + return $this->_availableCountries; + } +} diff --git a/Model/System/Config/Source/RestTheme.php b/Model/System/Config/Source/RestTheme.php index 24c17b27..ee1aec8f 100644 --- a/Model/System/Config/Source/RestTheme.php +++ b/Model/System/Config/Source/RestTheme.php @@ -14,13 +14,13 @@ class RestTheme extends \Magento\Framework\DataObject implements \Magento\Framew public function toOptionArray() { $options = [ - [ - 'value' => 'material', - 'label' => 'Material' - ], [ 'value' => 'classic', 'label' => 'Classic' + ], + [ + 'value' => 'material', + 'label' => 'Material' ] ]; diff --git a/Observer/BackendPaymentPerformRedirectObserver.php b/Observer/BackendPaymentPerformRedirectObserver.php index dfa10ab1..ac2b457d 100644 --- a/Observer/BackendPaymentPerformRedirectObserver.php +++ b/Observer/BackendPaymentPerformRedirectObserver.php @@ -16,19 +16,16 @@ class BackendPaymentPerformRedirectObserver implements ObserverInterface { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @var \Magento\Framework\Registry */ protected $coreRegistry; /** - * * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param \Magento\Framework\Registry $coreRegistry */ diff --git a/Observer/BackendPaymentRedirectObserver.php b/Observer/BackendPaymentRedirectObserver.php index 2d7c18c9..adbca765 100644 --- a/Observer/BackendPaymentRedirectObserver.php +++ b/Observer/BackendPaymentRedirectObserver.php @@ -16,31 +16,26 @@ class BackendPaymentRedirectObserver implements ObserverInterface { /** - * * @var \Lyranetwork\Payzen\Helper\Data */ protected $dataHelper; /** - * * @var \Magento\Framework\UrlInterface */ protected $urlBuilder; /** - * * @var \Magento\Framework\App\Request\Http */ protected $request; /** - * * @var \Magento\Framework\Registry */ protected $coreRegistry; /** - * * @param \Lyranetwork\Payzen\Helper\Data $dataHelper * @param \Magento\Framework\UrlInterface $urlBuilder * @param \Magento\Framework\App\Request\Http $request diff --git a/Observer/UpdateOtherPaymentObserver.php b/Observer/UpdateOtherPaymentObserver.php new file mode 100644 index 00000000..0cb75c44 --- /dev/null +++ b/Observer/UpdateOtherPaymentObserver.php @@ -0,0 +1,40 @@ +getDataObject(); + + if ($payment->getMethod() != 'payzen_other') { + // Not payzen other payment, do nothing. + return $this; + } + + // Retreive selected option. + $option = @unserialize($payment->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::OTHER_OPTION)); + if (is_array($option) && ! empty($option)) { + $payment->setMethod('payzen_other_' . $option['means']); + } + + return $this; + } +} diff --git a/README.md b/README.md index 11cc1582..dd8d3e77 100644 --- a/README.md +++ b/README.md @@ -2,14 +2,17 @@ PayZen for Magento 2 is an open source plugin that links e-commerce websites based on Magento to PayZen secure payment gateway developed by [Lyra Network](https://www.lyra.com/). -Namely, it enables the following payment methods : +Namely, it enables the following payment methods: * PayZen - Standard payment * [mutli] PayZen - Payment in installments * [gift] PayZen - Gift card payment * [choozeo] PayZen - Choozeo payment +* [oney] PayZen - Payment in 3 or 4 times Oney * [fullcb] PayZen - Full CB payment +* [franfinance] PayZen - FranFinance payment * [sepa] PayZen - SEPA payment * [paypal] PayZen - PayPal payment +* [other] PayZen - Other payment means ## Installation & upgrade diff --git a/Setup/InstallData.php b/Setup/InstallData.php index b3363974..2e680f73 100644 --- a/Setup/InstallData.php +++ b/Setup/InstallData.php @@ -21,13 +21,11 @@ class InstallData implements InstallDataInterface { /** - * * @var CustomerSetupFactory */ protected $customerSetupFactory; /** - * * @param CustomerSetupFactory $customerSetupFactory */ public function __construct(CustomerSetupFactory $customerSetupFactory) @@ -36,9 +34,7 @@ public function __construct(CustomerSetupFactory $customerSetupFactory) } /** - * * {@inheritdoc} - * */ public function install(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { diff --git a/Setup/UpgradeData.php b/Setup/UpgradeData.php index ffe8450e..996c6f4a 100644 --- a/Setup/UpgradeData.php +++ b/Setup/UpgradeData.php @@ -18,13 +18,11 @@ class UpgradeData implements UpgradeDataInterface { /** - * * @var CustomerSetupFactory */ protected $customerSetupFactory; /** - * * @param CustomerSetupFactory $customerSetupFactory */ public function __construct(CustomerSetupFactory $customerSetupFactory) @@ -33,9 +31,7 @@ public function __construct(CustomerSetupFactory $customerSetupFactory) } /** - * * {@inheritdoc} - * */ public function upgrade(ModuleDataSetupInterface $setup, ModuleContextInterface $context) { diff --git a/composer.json b/composer.json index e86c3b5d..9e24f288 100644 --- a/composer.json +++ b/composer.json @@ -5,7 +5,7 @@ "php" : "~5.5.0|~5.6.0|~7" }, "type" : "magento2-module", - "version" : "2.4.11", + "version" : "2.5.0", "license" : "OSL-3.0", "autoload" : { "files" : [ diff --git a/etc/adminhtml/events.xml b/etc/adminhtml/events.xml index 32f849e6..ee8f2adf 100644 --- a/etc/adminhtml/events.xml +++ b/etc/adminhtml/events.xml @@ -12,10 +12,10 @@ - + - + \ No newline at end of file diff --git a/etc/adminhtml/system.xml b/etc/adminhtml/system.xml index 91a5bb59..bb56e15b 100644 --- a/etc/adminhtml/system.xml +++ b/etc/adminhtml/system.xml @@ -25,9 +25,12 @@ + + + diff --git a/etc/adminhtml/system/franfinance.xml b/etc/adminhtml/system/franfinance.xml new file mode 100644 index 00000000..60e03594 --- /dev/null +++ b/etc/adminhtml/system/franfinance.xml @@ -0,0 +1,85 @@ + + + + + + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Fieldset\Dependant + 0 + franfinance + + + + Magento\Config\Block\System\Config\Form\Fieldset + + + + + Magento\Config\Model\Config\Source\Yesno + payment/payzen_franfinance/active + + + + + + payment/payzen_franfinance/title + + + + + + payment/payzen_franfinance/sort_order + + + + + + + + Magento\Config\Block\System\Config\Form\Fieldset + + + + payment/payzen_franfinance/specificcountry_display + + + + + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\CustgroupOptions + Lyranetwork\Payzen\Model\System\Config\Backend\CustgroupOptions + payment/payzen_franfinance/custgroup_amount_restriction + + + + + + Magento\Config\Block\System\Config\Form\Fieldset + + + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Franfinance\FranfinancePaymentOptions + Lyranetwork\Payzen\Model\System\Config\Backend\Franfinance\FranfinancePaymentOptions + payment/payzen_franfinance/franfinance_payment_options + Label: The option label to display on the frontend (the %c pattern will be replaced by payments count).
Count: Total number of payments.
Fees: Choose whether or not to apply fees.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.]]>
+
+
+
+
\ No newline at end of file diff --git a/etc/adminhtml/system/fullcb.xml b/etc/adminhtml/system/fullcb.xml index ba8ebf10..301aea81 100644 --- a/etc/adminhtml/system/fullcb.xml +++ b/etc/adminhtml/system/fullcb.xml @@ -11,36 +11,36 @@ --> - + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Fieldset\Dependant 0 fullcb - + Magento\Config\Block\System\Config\Form\Fieldset - + Magento\Config\Model\Config\Source\Yesno payment/payzen_fullcb/active - + payment/payzen_fullcb/title - + payment/payzen_fullcb/sort_order - - + Magento\Config\Block\System\Config\Form\Fieldset - + payment/payzen_fullcb/specificcountry_display - + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Fullcb\FullcbCustgroupOptions @@ -69,18 +69,18 @@ - + Magento\Config\Block\System\Config\Form\Fieldset - + Magento\Config\Model\Config\Source\Yesno payment/payzen_fullcb/enable_payment_options - + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Fullcb\FullcbPaymentOptions Lyranetwork\Payzen\Model\System\Config\Backend\Fullcb\FullcbPaymentOptions diff --git a/etc/adminhtml/system/general.xml b/etc/adminhtml/system/general.xml index 914e3af6..c7a665d9 100644 --- a/etc/adminhtml/system/general.xml +++ b/etc/adminhtml/system/general.xml @@ -118,19 +118,79 @@ - + + + REST API keys are available in your PayZen Back Office (menu: Settings > Shops > REST API keys).]]> + 0 + Magento\Config\Block\System\Config\Form\Fieldset + + + + Magento\Config\Model\Config\Backend\Encrypted + payzen/general/rest_private_key_test + + + + + Magento\Config\Model\Config\Backend\Encrypted + payzen/general/rest_private_key_prod + + + + + 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 + +
+ + 0 Magento\Config\Block\System\Config\Form\Fieldset - + Lyranetwork\Payzen\Model\System\Config\Source\Language payzen/general/language - + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Multiselect @@ -139,13 +199,13 @@ payzen/general/available_languages - + payzen/general/capture_delay - + Lyranetwork\Payzen\Model\System\Config\Source\ValidationMode @@ -153,25 +213,25 @@ - + 0 Magento\Config\Block\System\Config\Form\Fieldset - + Lyranetwork\Payzen\Model\System\Config\Backend\ThemeConfig payzen/general/theme_config - + payzen/general/shop_name - + Lyranetwork\Payzen\Model\System\Config\Backend\ShopUrl @@ -179,31 +239,31 @@ - + 0 Magento\Config\Block\System\Config\Form\Fieldset - + payzen/general/threeds_min_amount - + 0 Magento\Config\Block\System\Config\Form\Fieldset - + Magento\Config\Model\Config\Source\Enabledisable payzen/general/redirect_enabled - + payzen/general/redirect_success_timeout @@ -212,7 +272,7 @@ - + payzen/general/redirect_success_message @@ -221,7 +281,7 @@ - + payzen/general/redirect_error_timeout @@ -230,7 +290,7 @@ - + payzen/general/redirect_error_message @@ -239,21 +299,21 @@ - + Lyranetwork\Payzen\Model\System\Config\Source\ReturnMode payzen/general/return_mode - + Magento\Sales\Model\Config\Source\Order\Status\Newprocessing payzen/general/registered_order_status - + Magento\Config\Model\Config\Source\Yesno @@ -264,26 +324,26 @@ - + 0 Magento\Config\Block\System\Config\Form\Fieldset - + Magento\Config\Model\Config\Source\Enabledisable payzen/general/send_cart_detail - + Lyranetwork\Payzen\Model\System\Config\Source\Category payzen/general/common_category - + Entries marked with * are newly added and must be configured.]]> Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\CategoryMapping Lyranetwork\Payzen\Model\System\Config\Backend\CategoryMapping @@ -293,16 +353,13 @@ - + Lyranetwork\Payzen\Model\System\Config\Backend\Serialized\ArraySerialized\ConfigArraySerialized +
\ No newline at end of file diff --git a/etc/adminhtml/system/oney.xml b/etc/adminhtml/system/oney.xml new file mode 100644 index 00000000..a2c7ad2f --- /dev/null +++ b/etc/adminhtml/system/oney.xml @@ -0,0 +1,115 @@ + + + + + + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Fieldset\Dependant + 0 + oney + + + + Magento\Config\Block\System\Config\Form\Fieldset + + + + + Magento\Config\Model\Config\Source\Yesno + payment/payzen_oney/active + Lyranetwork\Payzen\Model\System\Config\Backend\Oney\Active + + + + + + payment/payzen_oney/title + + + + + + payment/payzen_oney/sort_order + + + + + + + + Magento\Config\Block\System\Config\Form\Fieldset + + + + + payment/payzen_oney/allowspecific + Magento\Payment\Model\Config\Source\Allspecificcountries + + + + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Multiselect + payment/payzen_oney/specificcountry + Lyranetwork\Payzen\Model\System\Config\Source\OneyAvailableCountry + 1 + + + + + + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Oney\OneyCustgroupOptions + Lyranetwork\Payzen\Model\System\Config\Backend\CustgroupOptions + payment/payzen_oney/custgroup_amount_restriction + + + + + + Magento\Config\Block\System\Config\Form\Fieldset + + + + + payment/payzen_oney/capture_delay + + + + + + Lyranetwork\Payzen\Model\System\Config\Source\ValidationMode + payment/payzen_oney/validation_mode + + + + + + Magento\Config\Block\System\Config\Form\Fieldset + + + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Oney\OneyPaymentOptions + Lyranetwork\Payzen\Model\System\Config\Backend\Oney\OneyPaymentOptions + payment/payzen_oney/oney_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.]]>
+
+
+
+
\ No newline at end of file diff --git a/etc/adminhtml/system/other.xml b/etc/adminhtml/system/other.xml new file mode 100644 index 00000000..4ba48e03 --- /dev/null +++ b/etc/adminhtml/system/other.xml @@ -0,0 +1,112 @@ + + + + + + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Fieldset\Dependant + 0 + other + + + + Magento\Config\Block\System\Config\Form\Fieldset + + + + + Magento\Config\Model\Config\Source\Yesno + payment/payzen_other/active + + + + + + payment/payzen_other/title + + + + + + payment/payzen_other/sort_order + + + + + + + + Magento\Config\Block\System\Config\Form\Fieldset + + + + + payment/payzen_other/allowspecific + Magento\Payment\Model\Config\Source\Allspecificcountries + + + + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Multiselect + payment/payzen_other/specificcountry + Magento\Directory\Model\Config\Source\Country + + 1 + + + + + + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\CustgroupOptions + Lyranetwork\Payzen\Model\System\Config\Backend\CustgroupOptions + payment/payzen_other/custgroup_amount_restriction + + + + + + Magento\Config\Block\System\Config\Form\Fieldset + + + + + Magento\Config\Model\Config\Source\Yesno + payment/payzen_other/regroup_payment_means + + + + + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Other\OtherPaymentMeans + Lyranetwork\Payzen\Model\System\Config\Backend\Other\OtherPaymentMeans + payment/payzen_other/other_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.]]>
+
+ + + + Code: The code of the means of payment as expected by PayZen gateway.
Label: The default label of the means of payment.]]>
+ Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Other\AddedPaymentMeans + Lyranetwork\Payzen\Model\System\Config\Backend\Other\AddedPaymentMeans + payment/payzen_other/added_payment_means +
+
+
+
\ No newline at end of file diff --git a/etc/adminhtml/system/paypal.xml b/etc/adminhtml/system/paypal.xml index 4ca740d3..4087e8fe 100644 --- a/etc/adminhtml/system/paypal.xml +++ b/etc/adminhtml/system/paypal.xml @@ -11,36 +11,36 @@ --> - + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Fieldset\Dependant 0 paypal - + Magento\Config\Block\System\Config\Form\Fieldset - + Magento\Config\Model\Config\Source\Yesno payment/payzen_paypal/active - + payment/payzen_paypal/title - + payment/payzen_paypal/sort_order - - + Magento\Config\Block\System\Config\Form\Fieldset - + payment/payzen_paypal/allowspecific Magento\Payment\Model\Config\Source\Allspecificcountries - + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Multiselect payment/payzen_paypal/specificcountry @@ -72,7 +72,7 @@ - + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\CustgroupOptions @@ -81,17 +81,17 @@ - + Magento\Config\Block\System\Config\Form\Fieldset - + payment/payzen_paypal/capture_delay - + Lyranetwork\Payzen\Model\System\Config\Source\ValidationMode diff --git a/etc/adminhtml/system/sepa.xml b/etc/adminhtml/system/sepa.xml index 8f208969..344f6851 100644 --- a/etc/adminhtml/system/sepa.xml +++ b/etc/adminhtml/system/sepa.xml @@ -11,36 +11,36 @@ --> - + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Fieldset\Dependant 0 sepa - + Magento\Config\Block\System\Config\Form\Fieldset - + Magento\Config\Model\Config\Source\Yesno payment/payzen_sepa/active - + payment/payzen_sepa/title - + payment/payzen_sepa/sort_order - - + Magento\Config\Block\System\Config\Form\Fieldset - + payment/payzen_sepa/allowspecific Magento\Payment\Model\Config\Source\Allspecificcountries - + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Multiselect payment/payzen_sepa/specificcountry @@ -72,7 +72,7 @@ - + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\CustgroupOptions @@ -81,17 +81,17 @@ - + Magento\Config\Block\System\Config\Form\Fieldset - + payment/payzen_sepa/capture_delay - + Lyranetwork\Payzen\Model\System\Config\Source\ValidationMode @@ -99,16 +99,26 @@ - + Magento\Config\Block\System\Config\Form\Fieldset - + Lyranetwork\Payzen\Model\System\Config\Source\SepaMandateMode payment/payzen_sepa/mandate_mode + + + + Payment by token
option should be enabled on your PayZen store to use this feature.]]> + Magento\Config\Model\Config\Source\Enabledisable + payment/payzen_sepa/oneclick_active + + REGISTER_PAY + + \ No newline at end of file diff --git a/etc/adminhtml/system/standard.xml b/etc/adminhtml/system/standard.xml index b5bbdf18..cf6b6659 100644 --- a/etc/adminhtml/system/standard.xml +++ b/etc/adminhtml/system/standard.xml @@ -112,8 +112,8 @@ Magento\Config\Block\System\Config\Form\Fieldset - - + + Lyranetwork\Payzen\Model\System\Config\Source\CardInfoMode payment/payzen_standard/card_info_mode @@ -128,95 +128,33 @@ - - - Magento\Config\Model\Config\Backend\Encrypted - payment/payzen_standard/rest_private_key_test - - 4 - - - - - - Magento\Config\Model\Config\Backend\Encrypted - payment/payzen_standard/rest_private_key_prod - - 4 - - - - - - payment/payzen_standard/rest_public_key_test - - 4 - - - - - - payment/payzen_standard/rest_public_key_prod - - 4 - - - - - - Magento\Config\Model\Config\Backend\Encrypted - payment/payzen_standard/rest_return_key_test - - 4 - - - - - - Magento\Config\Model\Config\Backend\Encrypted - payment/payzen_standard/rest_return_key_prod - - 4 - - - - - - Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\NotifyUrl - Settings > Notification rules.
In multistore mode, notification URL is the same for all the stores.]]>
- payment/payzen_standard/notify_url - - 4 - -
- - + Lyranetwork\Payzen\Model\System\Config\Source\RestTheme payment/payzen_standard/rest_theme - 4 + 4,5 - + Lyranetwork\Payzen\Block\Adminhtml\System\Config\Form\Field\Standard\RestPlaceholders payment/payzen_standard/rest_placeholders Lyranetwork\Payzen\Model\System\Config\Backend\Serialized\ArraySerialized\ConfigArraySerialized - 4 + 4,5 - + payment/payzen_standard/rest_attempts - 4 + 4,5 diff --git a/etc/config.xml b/etc/config.xml index d763be39..76448181 100644 --- a/etc/config.xml +++ b/etc/config.xml @@ -15,7 +15,7 @@ support@payzen.eu - 2.4.11 + 2.5.0 V2 Magento_2.x 1 @@ -29,8 +29,13 @@ https://secure.payzen.eu/vads-ws/v5?wsdl payzen/payment/check + + + + + payzen/payment_rest/check https://api.payzen.eu/api-payment/ - https://api.payzen.eu/static/ + https://static.payzen.eu/static/ fr @@ -69,11 +74,6 @@ 1 0 - - - - - payzen/payment_rest/check material @@ -125,6 +125,21 @@ France + + Lyranetwork\Payzen\Model\Method\Oney + payzen + authorize + + 0 + Payment in 3 or 4 times with Oney + 5 + oney-logo.png + + 0 + + -1 + + Lyranetwork\Payzen\Model\Method\Fullcb payzen @@ -132,7 +147,7 @@ 0 Payment with Full CB - 5 + 6 fullcb-logo.png 1 @@ -142,6 +157,21 @@ 0 + + Lyranetwork\Payzen\Model\Method\Franfinance + payzen + authorize + + 0 + Payment with FranFinance + 7 + franfinance-logo.png + + 1 + FR + France + + Lyranetwork\Payzen\Model\Method\Sepa payzen @@ -149,12 +179,13 @@ 0 Payment with SEPA - 6 + 8 sepa-logo.png 0 PAYMENT + 0 @@ -164,13 +195,29 @@ 0 Payment with PayPal - 7 + 9 paypal-logo.png 0 -1 + + + Lyranetwork\Payzen\Model\Method\Other + payzen + authorize + + 0 + Other payment means + 10 + other-logo.png + + 0 + 0 + + -1 + \ No newline at end of file diff --git a/etc/events.xml b/etc/events.xml index ff8ff7ee..46fa4989 100644 --- a/etc/events.xml +++ b/etc/events.xml @@ -13,8 +13,10 @@ + + \ No newline at end of file diff --git a/etc/frontend/di.xml b/etc/frontend/di.xml index 5c5a979d..4055c385 100644 --- a/etc/frontend/di.xml +++ b/etc/frontend/di.xml @@ -18,9 +18,12 @@ Lyranetwork\Payzen\Helper\Data::METHOD_MULTI Lyranetwork\Payzen\Helper\Data::METHOD_GIFT Lyranetwork\Payzen\Helper\Data::METHOD_CHOOZEO + Lyranetwork\Payzen\Helper\Data::METHOD_ONEY Lyranetwork\Payzen\Helper\Data::METHOD_FULLCB Lyranetwork\Payzen\Helper\Data::METHOD_SEPA Lyranetwork\Payzen\Helper\Data::METHOD_PAYPAL + Lyranetwork\Payzen\Helper\Data::METHOD_FRANFINANCE + Lyranetwork\Payzen\Helper\Data::METHOD_OTHER @@ -32,9 +35,12 @@ Lyranetwork\Payzen\Model\MultiConfigProvider Lyranetwork\Payzen\Model\GiftConfigProvider Lyranetwork\Payzen\Model\ChoozeoConfigProvider + Lyranetwork\Payzen\Model\OneyConfigProvider Lyranetwork\Payzen\Model\FullcbConfigProvider Lyranetwork\Payzen\Model\SepaConfigProvider Lyranetwork\Payzen\Model\PaypalConfigProvider + Lyranetwork\Payzen\Model\FranfinanceConfigProvider + Lyranetwork\Payzen\Model\OtherConfigProvider diff --git a/etc/payment.xml b/etc/payment.xml index 2597bb38..c840e49b 100644 --- a/etc/payment.xml +++ b/etc/payment.xml @@ -30,6 +30,9 @@ 0 + + 0 + 0 @@ -39,5 +42,11 @@ 0 + + 0 + + + 0 + \ No newline at end of file diff --git a/etc/ws.ini b/etc/ws.ini deleted file mode 100644 index 14fb9463..00000000 --- a/etc/ws.ini +++ /dev/null @@ -1,9 +0,0 @@ -; enable this option if Server Name Indication (SNI) extension is used -sni.enabled = false - -; configure proxy -proxy.enabled = false -proxy_host = -proxy_port = -proxy_login = -proxy_password = \ No newline at end of file diff --git a/i18n/de_DE.csv b/i18n/de_DE.csv index bd4bda17..748842f3 100644 --- a/i18n/de_DE.csv +++ b/i18n/de_DE.csv @@ -4,9 +4,12 @@ "PAYMENT IN INSTALLMENTS","RATENZAHLUNG" "GIFT CARD PAYMENT","ZAHLUNG ANHAND GESCHENKKARTE" "CHOOZEO PAYMENT","CHOOZEO ZAHLUNG" +"PAYMENT IN 3 OR 4 TIMES ONEY","ZAHLUNG IM 3 ODER 4 MAL ONEY" "FULL CB PAYMENT","FULL CB ZAHLUNG" "SEPA PAYMENT","SEPA ZAHLUNG" "PAYPAL PAYMENT","PAYPAL ZAHLUNG" +"FRANFINANCE PAYMENT","FRANFINANCE ZAHLUNG" +"OTHER PAYMENT MEANS","ANDERZE ZAHLUNGSMITTEL" "MODULE INFORMATION","MODULINFORMATIONEN" "Developed by","Entwickelt von" "Contact us","E-Mail-Adresse" @@ -34,6 +37,17 @@ "Link to the payment page.","Link zur Bezahlungsplattform." "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" +"Test password","Testpasswort" +"Production password","Passwort Produktion" +"Public test key","Öffentlicher Schlüssel (Test)" +"Public production key","Öffentlicher Produktionsschlüssel" +"HMAC-SHA-256 test key","Schlüssel HMAC-SHA-256 für Test" +"HMAC-SHA-256 production key","Schlüssel HMAC-SHA-256 für Produktion" +"REST API Notification URL","REST API Benachrichtigung-URL" +"REST API server URL","REST API server URL" +"JavaScript client URL","JavaScript client URL" "PAYMENT PAGE","ZAHLUNGSSEITE" "Default Language","Standardsprache" "Default language on the payment page.","Standardsprache auf Zahlungsseite." @@ -117,20 +131,23 @@ "ADDITIONAL OPTIONS","ZUSÄTZLICHE OPTIONEN" "Send shopping cart details","Send shopping cart details" "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.","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." -"FacilyPay Oney contract","FacilyPay Oney Vertrag" -"Select « Yes » if you have a FacilyPay Oney contract.","Wählen Sie « Ja » wenn Sie einen FacilyPay Oney Vertrag haben." -"FacilyPay Oney shipping options","FacilyPay Oney Lieferoptionen" -"Define the FacilyPay Oney information about all shipping methods.
FacilyPay Oney label: The label of the shipping method (use 55 alphanumeric characters, accentuated characters and these special characters: space, slash, hyphen, apostrophe).
Type: The delivery type of shipping method.
Speed: Select whether the delivery is STANDARD or EXPRESS.
Entries marked with * are newly added and must be configured.","Benutzen der FacilyPay Oney Informationen bei allen Liefermöglichkeiten.
FacilyPay Oney Name: Der Name der Liefermöglichkeit muss folgenden Kriterien entsprechen (55 alphanumerische Zeichen benutzen, Akzente und Sonderzeichen: Leertaste, QUerstrick, Bindestrich, Auslassungszeichen).
Type: Versandart der Versandmöglichkeit.
Lieferzeit: Wählen Sie die Lieferzeit aus STANDARD oder EXPRESS (mindestens 24 Std.).
Die Einträge mit * markiert sind neu und müssen eingestellt werden." +"Shipping options","Lieferoptionen" +"Define the PayZen information about all shipping methods.
Method title: The label of the shipping method.
Type: The delivery type of shipping method.
Rapidity: Select whether the delivery is STANDARD or EXPRESS.
Delay: Select the delivery delay if rapidity is « Priority ».
Entries marked with * are newly added and must be configured.", "Benutzen der PayZen Informationen bei allen Liefermöglichkeiten.
Titel Zahlungsweise: Der Name der Liefermöglichkeit muss folgenden Kriterien entsprechen.
Type: Versandart der Versandmöglichkeit.
Lieferzeit: Wählen Sie die Lieferzeit aus STANDARD oder EXPRESS (mindestens 24 Std.).
Die Einträge mit * markiert sind neu und müssen eingestellt werden." "Method title","Titel Zahlungsweise" -"FacilyPay Oney label","FacilyPay Oney Name" +"Oney label","Oney Name" "Type","Art" "Delivery company","Zustelldienst" "Reclaim in shop","Ausgabe im Shop" "Relay point","Annahmestelle" "Reclaim in station","Ausgabe bei Station" -"Speed","Geschwindigkeit" +"Rapidity","Geschwindigkeit" "Standard","Standard" "Express","Express" +"Priority","Priorität" +"Delay","Verzögerung" +"<= 1 hour","<= 1 Stunde" +"> 1 hour","> 1 Stunde" +"Immediate","Sofortig" "DISPLAY OPTIONS","ANZEIGEOPTIONEN" "Activation","Aktiviert" "Enables / disables this payment method.","Aktiviert / Deaktiviert dieses Zahlungsmodus." @@ -146,7 +163,7 @@ "Specific Countries","Specific Countries" "Authorized countries","Erlaubte Länder" "Logo","Logo" -"Allowed file types: jpeg, gif, png.","Erlaubte Dateitypen: jpeg, gif, png" +"Allowed file types: jpeg, gif, png.","Erlaubte Dateitypen: jpeg, gif, png." "RESTRICTIONS","BESCHRÄNKUNGEN" "Customer group amount restriction","Kundengruppe Menge Einschränkung" "Customer group","Kundengruppe" @@ -156,23 +173,16 @@ "ALL GROUPS","ALLE GRUPPEN" "The number of days before the bank capture. Enter value only if different from PayZen general configuration.","Anzahl der Tage bis zum Einzug der Zahlung. Geben Sie Wert nur, wenn anders PayZen allgemeine Konfiguration." "ADVANCED OPTIONS","ERWEITERTE OPTIONEN" -"Bank data acquisition mode","Eingabemodus für Karteninformationen" -"Select how the credit card infos will be entered. Attention, to use data acquisition on the merchant site, you must ensure that you have subscribed to this option with PayZen.","Wählen Sie die Eingabeart der Kreditkartendaten aus. Achtung, um die Daten speichern zu können, müssen Sie diese Option bei PayZen unterschrieben haben." +"Card data entry mode","Eingabemodus für Karteninformationen" +"Select how the credit card information will be entered. Attention, to use embedded payment fields, you must ensure that you have subscribed to this option with PayZen.","Wählen Sie die Eingabeart der Kreditkartendaten aus. Achtung, um eingebettete Zahlungsfelder zu verwenden, müssen Sie diese Option bei PayZen unterschrieben haben." "Bank data acquisition on payment gateway","Einspeisung der Karteninformationen in die Zahlungsschnittstelle" "Card type selection on merchant site","Auswahl des Kartentyps auf Händlerwebseite" "Payment page integrated to checkout process (iframe mode)","Bezahlung Seite integriert Checkout-Prozess (iframe-Modus)" -"Embedded payment fields (REST API)","Eingebettete Zahlungsfelder (REST API)" +"Embedded payment fields on merchant site (REST API)","Eingebettete Zahlungsfelder auf Händlerwebseite (REST-API)" +"Embedded payment fields in a pop-in (REST API)","Eingebettete Zahlungsfelder in einem Pop-In (REST-API)" "Payment by token","Zahlung per Alias" "The payment by token allows to pay orders without re-entering bank data at each payment. The Payment by token option should be enabled on your PayZen store to use this feature.","The payment by token allows to pay orders without re-entering bank data at each payment. The Payment by token option should be enabled on your PayZen store to use this feature." "REST API SETTINGS","REST API EINSTELLUNGEN" -"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)." -"Test password","Testpasswort" -"Production password","Passwort Produktion" -"Public test key","Öffentlicher Schlüssel (Test)" -"Public production key","Öffentlicher Produktionsschlüssel" -"HMAC-SHA-256 test key","Schlüssel HMAC-SHA-256 für Test" -"HMAC-SHA-256 production key","Schlüssel HMAC-SHA-256 für Produktion" -"API REST Notification URL","API REST Benachrichtigung-URL" "CUSTOMIZATION","PERSONALISIERUNG" "Theme","Thema" "Select a theme to use to display embedded payment fields. For more customization, you can edit module template manually.","Select a theme to use to display embedded payment fields. For more customization, you can edit module template manually." @@ -195,6 +205,7 @@ "Count","Anzahl" "Period","Zeitraum" "1st installment","1. Rate" +"Action","Aktion" "Gift card types","Art der Geschenkkarten" "Select the gift card types that can be used for the payment.","Auswahl der Kartenarten, die als Geschenkkarten zur Zahlung benutzt werden können" "Add cards","Karte hinzufügen" @@ -205,12 +216,14 @@ "The number of days before the bank capture. Enter value only if different from PayZen general configuration. This setting is considered only if the buyer uses another CC to complete the payment.","Anzahl der Tage bis zum Einzug der Zahlung. Geben Sie Wert nur, wenn anders PayZen allgemeine Konfiguration. Diese Einstellung gilt nur dann, wenn der Käufer eine andere CC verwendet die Zahlung abzuschließen." "If manual is selected, you will have to confirm payments manually in your PayZen Back Office. This setting is considered only if the buyer uses another CC to complete the payment.","Bei manueller Eingabe müssen Sie Zahlungen manuell in Ihr PayZen Back Office bestätigen. Diese Einstellung gilt nur dann, wenn der Käufer eine andere CC verwendet die Zahlung abzuschließen." "Card type selection","Auswahl der Kartentyp" +"Add payment means","Zahlungsmittel hinzufügen" +"Click on « Add » button to add one or more new payment means.
Code: The code of the means of payment as expected by PayZen gateway.
Label: The default label of the means of payment.","Klicken Sie auf die Schaltfläche « Hinzufügen » um ein oder mehrere Zahlungsmittel hinzuzufügen.
Code: Code des neuen Zahlungsmittels.
Name: Das Standardetikett der Zahlungsmittel." "Select where card type will be selected by buyer.","Wählen Sie aus wo der Kartentyp von dem Käufer ausgewählt wird." "On payment gateway","In die Zahlungsschnittstelle" "On merchant site","In die Händlerwebseite" "Enable options selection","Erlauben Optionen Auswahl" "Enable payment options selection on merchant site.","Aktivieren Zahlungsoptionen Auswahl auf Händler-Website." -"Click on Add button to configure one or more payment options.
Label: The option label to display on the frontend (the %c, %r and %a patterns will be respectively replaced by payments count, option rate and option amount).
Code: The option code as defined in your FacilyPay 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 (% c,% r und% ein Muster bzw. ersetzt werden angezeigt durch Zahlungen zählen, Option Geschwindigkeit und Menge Option).
Code: Der Optionscode wie in Ihrem FacilyPay 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." +"Click on Add button to configure one or more payment options.
Label: The option label to display on the frontend (the %c, %r and %a patterns will be respectively replaced by payments count, option rate and option amount).
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 (% c,% r und% ein Muster bzw. ersetzt werden angezeigt durch Zahlungen zählen, Option Geschwindigkeit und Menge Option).
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." "Rate","Preis" "Code","Code" "Define amount restriction for each card.","Definieren Menge Beschränkung für jede Karte." @@ -222,9 +235,25 @@ "Payment in %s times","Zahlung im %s mal" "Configure Full CB 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.
Rate: The interest rate in percentage.
Cap: Maximum fees amount of payment option.","Konfigurieren Sie die Full CB-Zahlungsoptionen.
Kennzeichnung: Die Option Etikett auf dem Frontend.
Mindestbetrag: Mindestbetrag für die Aktivierung der Zahlungsoption.
Höchstbetrag: Höchstbetrag für die Aktivierung der Zahlungsoption.
Preis: Der Zinssatz in Prozent.
Obergrenze: Maximaler Gebührenbetrag der Zahlungsoption." "Cap", "Obergrenze" +"Method title to display on payment means page. Used only if « Regroup payment means » option is enabled.","Method Titel auf Zahlungsmittel Seite angezeigt werden soll. Used only if « Regroup payment means » option is enabled." +"Allowed file types: jpeg, gif, png. Used only if « Regroup payment means » option is enabled.","Erlaubte Dateitypen: jpeg, gif, png. Used only if « Regroup payment means » option is enabled." +"Regroup payment means","Regroup payment means" +"If this option is enabled, all the payment means added in this section will be displayed within the same payment submodule.", "If this option is enabled, all the payment means added in this section will be displayed within the same payment submodule." +"Fees","Gebühren" +"With fees","Mit Kosten" +"Without fees","Kostenlos" +"Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend (the %c pattern will be replaced by payments count).
Count: Total number of payments.
Fees: Choose whether or not to apply fees.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.","Klicken Sie auf die Schaltfläche « Hinzufügen » um eine oder mehrere Zahlungsoptionen einzustellen.
Name: Beschreibung der Mehrfachzahlung (die %c Muster ersetzt wird angezeigt durch Zahlungen zählen).
Anzahl: Gesamtanzahl der Raten.
Gebühren: Aktivieren oder deaktivieren Sie die Anwendung von Gebühren.
Mindestbetrag: Mindestbetrag um die Option anzubieten.
Höchstbetrag: Höchstbetrag um die Option anzubieten." +"Payment means","Zahlungsmittel" +"Countries","Countries" +"Cart data","Datos del carrito" +"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.","Klicken Sie auf die Schaltfläche « Add » button to configure one or more payment means.
Kennzeichnung: The label of the means of payment to display on your site.
Zahlungsmittel: Choose the means of payment you want to propose.
Länder: Countries where the means of payment will be available. Leave blank to authorize all countries.
Mindestbetrag: Mindestbetrag für die Aktivierung die Zahlungsmittel.
Höchstbetrag: Höchstbetrag für die Aktivierung die Zahlungsmittel.
Einzugsfrist: Anzahl der Tage bis zum Einzug der Zahlung. Geben Sie Wert nur, wenn anders PayZen allgemeine Konfiguration.
Bestätigungsmodus: Bei manueller Eingabe müssen Sie Zahlungen manuell in Ihr PayZen Back Office bestätigen.
Warenkorb Daten: 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." +"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." "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." +"You cannot enable several options with the same means of payment.","Sie können nicht mehrere Optionen mit demselben Zahlungsmittel aktivieren." "Too many card types are selected.","Zu viele Kartenarten wurden ausgewählt." "Please configure « ADDITIONAL OPTIONS » part of « PayZen » section.","Bitte konfigurieren « ZUSÄTZLICHE OPTIONEN » Teil « PayZen » Abschnitt." "Please enter a value for « ALL GROUPS - %1 » in « %2 » section as agreed with Banque Accord.","Bitte geben Sie einen Wert für « ALLE GRUPPEN -%1 » in « %2 » Schnitt wie bei der Banque Accord vereinbart." @@ -232,7 +261,7 @@ "Product reference « %1 » does not match PayZen specifications.","Produktreferenz « %1 » nicht PayZen Spezifikationen entsprechen." "The next order ID « %1 » does not match PayZen specifications.","Der nächste Auftrag ID « %1 » nicht PayZen Spezifikationen entsprechen." "This field must agree to the regular expression %1.","Dieses Feld muss mit dem regulären Ausdruck %1 zustimmen." -"FacilyPay Oney means of payment cannot be used.","Das Zahlungsmittel FacilyPay Oney kann nicht benutzt werden." +"Oney means of payment cannot be used.","Das Zahlungsmittel Oney kann nicht benutzt werden." "PayPal means of payment cannot be used.","Das Zahlungsmittel PayPal kann nicht benutzt werden." "Payment Method","Zahlungsmethode" "Sequence Number","Sequenznummer" @@ -267,8 +296,12 @@ "Payment Review","Payment Review" "To validate payment","Zahlungsüberblick" "Validation error","Validierungsfehler" +"Payment is cancelled only in Magento. Please, consider cancelling the payment in PayZen Back Office.","Payment is cancelled only in Magento. Please, consider cancelling the payment in PayZen Back Office." +"Payment is validated only in Magento. Please, consider validating the payment in PayZen Back Office.","Payment is validated only in Magento. Please, consider validating the payment in PayZen Back Office." "Transaction %1 has been validated.","Die Transaktion %1 wurde validiert." +"Order %1 has been validated.","Die Bestellung %1 wurde validiert." "Payment validated successfully.","Zahlung erfolgreich validiert." +"Please consult the PayZen logs for more details.","Please consult the PayZen logs for more details." "An error has occurred during the validation process.","Ein Fehler ist während des Validierungsprozesses aufgetreten." "Please fix this error to use PayZen web services.","Please fix this error to use PayZen web services." "You will enter payment data after order confirmation.","Sie werden die Zahlungsdaten nach Auftragsbestätigung ein." @@ -279,9 +312,14 @@ "Pay with PayZen","Bezahlen Sie mit PayZen" "Pay by gift card","Bezahlen Sie anhand geschenkkarte" "Pay with Choozeo","Bezahlen Sie mit Choozeo" +"Pay with Oney","Bezahlen Sie mit Oney" "Pay with SEPA","Bezahlen Sie mit SEPA" "Pay with PayPal","Bezahlen Sie mit PayPal" "Pay with Full CB","Bezahlen Sie mit Full CB" +"Pay with FranFinance","Bezahlen Sie mit FranFinance" +"Payment with %s","Zahlung mit %s" +"Pay with %s","Bezahlen Sie mit %s" +"Other payment means","Andere Zahlungsmittel" "Payment gateway redirection","Bezahlungsplatform weiterleitung" "Please wait a moment. This page will transfer your data to PayZen payment gateway in a few seconds.","Bitte warten Sie, Sie werden zur PayZen Zahlungsplattform in einigen Sekunden weitergeleitet." "If nothing happens in 10 seconds, click the button below.","Wenn Sie innerhalb von 10 Sekunden nicht weitergeleitet werden, klicken Sie bitte auf diese Schaltfläche." @@ -310,10 +348,18 @@ "delivery address","Lieferadresse" "The field %1 of your %2 is invalid.","Feld %1 Ihrer %2 ist ungültig." "The field %1 of your %2 is mandatory.","Feld %1 Ihrer %2 ist ein Pflichtfeld." +"The following characters: %1 are not allowed for this field.","The following characters: %1 are not allowed for this field." "OR","ODER" -"Click here to pay with your registered means of payment.","Klicken Sie hier mit Ihrer registrierten Zahlungsmittel zu bezahlen." -"You will pay with your registered means of payment %s. No data entry is needed.","Sie werden mit Ihrer registrierten Zahlungsmittel %s bezahlen. Keine Dateneingabe ist erforderlich." +"Click here to pay with your stored means of payment.","Klicken Sie hier mit Ihrer registrierten Zahlungsmittel zu bezahlen." +"You will pay with your stored means of payment %s","Sie werden mit Ihrer registrierten Zahlungsmittel %s bezahlen" "Click here to pay with another means of payment.","Klicken Sie hier mit einem anderen Zahlungsmittel zu zahlen." +"manage your payment means","verwalten Sie Ihre Zahlungsmittel" +"Are you sure you want to delete your saved means of payment? This action is not reversible!","Are you sure you want to delete your saved means of payment? This action is not reversible!" +"Delete %s","Löschen %s" +"You have no stored payment means.","You have no stored payment means." +"My payment means","Meine Zahlungsmittel" +"The stored means of payment could not be deleted.","The stored means of payment could not be deleted." +"The stored means of payment was successfully deleted.","The stored means of payment was successfully deleted." "Shipping Address","Lieferanschrift" "Shipping Method","Versandart" "Sorry, no quotes are available for this product configuration.","Leider stehen keine Angebote für diese Produktkonfiguration zur Verfügung." @@ -322,10 +368,18 @@ "Cannot pay requested product with « PayZen Buy now ».","Kann nicht zahlen angeforderte Produkt mit « PayZen Jetzt kaufen »." "Some of the products you requested are unavailable.","Einige der Produkte Sie nicht erreichbar angefordert werden." "Some of the products you requested are not available in the desired quantity.","Einige der Produkte von Ihnen angeforderte stehen in der gewünschten Menge nicht zur Verfügung." +"Your order total:","Your order total:" +"Debit dates","Debit dates" +"Contribution:","Contribution:" +"Followed by %s installments","Followed by %s installments" +"Installment %i:","Installment %i:" +"Total cost of credit:","Total cost of credit:" +"Funding of %s with a fixed APR of %s %%.","Funding of %s with a fixed APR of %s %%." "Order amount :","Bestellmenge :" "Installments","Ratenzahlungen" -"Fees :","Gebühren:" +"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." "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." @@ -336,4 +390,5 @@ "Your payment was not accepted. Please, try to re-order.","Ihre Zahlung wurde abgelehnt. Bitte führen Sie den Bestellvorgang erneut durch." "The payment was successful. Your order was registered successfully.","Die Zahlung wurde erfolgreich abgeschlossen. Ihre Zahlung wurde erfolgreich gespeichert." "An error has occurred during the payment process.","Ein Fehler ist während dem Zahlungsvorgang unterlaufen." -"Payment cancelled.","Zahlung storniert." \ No newline at end of file +"Payment cancelled.","Zahlung storniert." +"Capture delay column","Einzugsfrist" \ No newline at end of file diff --git a/i18n/en_US.csv b/i18n/en_US.csv index b6a4e770..8e03cf61 100644 --- a/i18n/en_US.csv +++ b/i18n/en_US.csv @@ -4,9 +4,12 @@ "PAYMENT IN INSTALLMENTS","PAYMENT IN INSTALLMENTS" "GIFT CARD PAYMENT","GIFT CARD PAYMENT" "CHOOZEO PAYMENT","CHOOZEO PAYMENT" +"PAYMENT IN 3 OR 4 TIMES ONEY","PAYMENT IN 3 OR 4 TIMES ONEY" "FULL CB PAYMENT","FULL CB PAYMENT" "SEPA PAYMENT","SEPA PAYMENT" "PAYPAL PAYMENT","PAYPAL PAYMENT" +"FRANFINANCE PAYMENT","FRANFINANCE PAYMENT" +"OTHER PAYMENT MEANS","OTHER PAYMENT MEANS" "MODULE INFORMATION","MODULE INFORMATION" "Developed by","Developed by" "Contact us","Contact us" @@ -33,7 +36,18 @@ "Payment page URL","Payment page URL" "Link to the payment page.","Link to the payment page." "Instant Payment Notification URL","Instant Payment Notification URL" +"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)." +"Test password","Test password" +"Production password","Production password" +"Public test key","Public test key" +"Public production key","Public production key" +"HMAC-SHA-256 test key","HMAC-SHA-256 test key" +"HMAC-SHA-256 production key","HMAC-SHA-256 production key" +"REST API Notification URL","REST API 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 server URL","REST API server URL" +"JavaScript client URL","JavaScript client URL" "PAYMENT PAGE","PAYMENT PAGE" "Default Language","Default Language" "Default language on the payment page.","Default language on the payment page." @@ -117,20 +131,22 @@ "ADDITIONAL OPTIONS","ADDITIONAL OPTIONS" "Send shopping cart details","Send shopping cart details" "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.","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." -"FacilyPay Oney contract","FacilyPay Oney contract" -"Select « Yes » if you have a FacilyPay Oney contract.","Select « Yes » if you have a FacilyPay Oney contract." -"FacilyPay Oney shipping options","FacilyPay Oney shipping options" -"Define the FacilyPay Oney information about all shipping methods.
FacilyPay Oney label: The label of the shipping method (use 55 alphanumeric characters, accentuated characters and these special characters: space, slash, hyphen, apostrophe).
Type: The delivery type of shipping method.
Speed: Select whether the delivery is STANDARD or EXPRESS.
Entries marked with * are newly added and must be configured.","Define the FacilyPay Oney information about all shipping methods.
FacilyPay Oney label: The label of the shipping method (use 55 alphanumeric characters, accentuated characters and these special characters: space, slash, hyphen, apostrophe).
Type: The delivery type of shipping method.
Speed: Select whether the delivery is STANDARD or EXPRESS.
Entries marked with * are newly added and must be configured." +"Shipping options","Shipping options" +"Define the PayZen information about all shipping methods.
Method title: The label of the shipping method.
Type: The delivery type of shipping method.
Rapidity: Select whether the delivery is STANDARD or EXPRESS.
Delay: Select the delivery delay if rapidity is « Priority ».
Entries marked with * are newly added and must be configured.", "Define the PayZen information about all shipping methods.
Method title: The label of the shipping method.
Type: The delivery type of shipping method.
Rapidity: Select whether the delivery is STANDARD or EXPRESS.
Delay: Select the delivery delay if rapidity is « Priority ».
Entries marked with * are newly added and must be configured." "Method title","Method title" -"FacilyPay Oney label","FacilyPay Oney label" "Type","Type" "Delivery company","Delivery company" "Reclaim in shop","Reclaim in shop" "Relay point","Relay point" "Reclaim in station","Reclaim in station" -"Speed","Speed" +"Rapidity","Rapidity" "Standard","Standard" "Express","Express" +"Priority","Priority" +"Delay","Delay" +"<= 1 hour","<= 1 hour" +"> 1 hour","> 1 hour" +"Immediate","Immediate" "DISPLAY OPTIONS","DISPLAY OPTIONS" "Activation","Activation" "Enables / disables this payment method.","Enables / disables this payment method." @@ -156,23 +172,16 @@ "ALL GROUPS","ALL GROUPS" "The number of days before the bank capture. Enter value only if different from PayZen general configuration.","The number of days before the bank capture. Enter value only if different from PayZen general configuration." "ADVANCED OPTIONS","ADVANCED OPTIONS" -"Bank data acquisition mode","Bank data acquisition mode" -"Select how the credit card infos will be entered. Attention, to use data acquisition on the merchant site, you must ensure that you have subscribed to this option with PayZen.","Select how the credit card infos will be entered. Attention, to use data acquisition on the merchant site, you must ensure that you have subscribed to this option with PayZen." +"Card data entry mode","Card data entry mode" +"Select how the credit card information will be entered. Attention, to use embedded payment fields, you must ensure that you have subscribed to this option with PayZen.","Select how the credit card information will be entered. Attention, to use embedded payment fields, you must ensure that you have subscribed to this option with PayZen." "Bank data acquisition on payment gateway","Bank data acquisition on payment gateway" "Card type selection on merchant site","Card type selection on merchant site" "Payment page integrated to checkout process (iframe mode)","Payment page integrated to checkout process (iframe mode)" -"Embedded payment fields (REST API)","Embedded payment fields (REST API)" +"Embedded payment fields on merchant site (REST API)","Embedded payment fields on merchant site (REST API)" +"Embedded payment fields in a pop-in (REST API)","Embedded payment fields in a pop-in (REST API)" "Payment by token","Payment by token" "The payment by token allows to pay orders without re-entering bank data at each payment. The Payment by token option should be enabled on your PayZen store to use this feature.","The payment by token allows to pay orders without re-entering bank data at each payment. The Payment by token option should be enabled on your PayZen store to use this feature." "REST API SETTINGS","REST API SETTINGS" -"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)." -"Test password","Test password" -"Production password","Production password" -"Public test key","Public test key" -"Public production key","Public production key" -"HMAC-SHA-256 test key","HMAC-SHA-256 test key" -"HMAC-SHA-256 production key","HMAC-SHA-256 production key" -"API REST Notification URL","API REST Notification URL" "CUSTOMIZATION","CUSTOMIZATION" "Theme","Theme" "Select a theme to use to display embedded payment fields. For more customization, you can edit module template manually.","Select a theme to use to display embedded payment fields. For more customization, you can edit module template manually." @@ -195,6 +204,7 @@ "Count","Count" "Period","Period" "1st installment","1st installment" +"Action","Action" "Gift card types","Gift card types" "Select the gift card types that can be used for the payment.","Select the gift card types that can be used for the payment." "Add cards","Add cards" @@ -206,11 +216,13 @@ "If manual is selected, you will have to confirm payments manually in your PayZen Back Office. This setting is considered only if the buyer uses another CC to complete the payment.","If manual is selected, you will have to confirm payments manually in your PayZen Back Office. This setting is considered only if the buyer uses another CC to complete the payment." "Card type selection","Card type selection" "Select where card type will be selected by buyer.","Select where card type will be selected by buyer." +"Add payment means","Add payment means" +"Click on « Add » button to add one or more new payment means.
Code: The code of the means of payment as expected by PayZen gateway.
Label: The default label of the means of payment.","Click on « Add » button to add one or more new payment means.
Code: The code of the means of payment as expected by PayZen gateway.
Label: The default label of the means of payment." "On payment gateway","On payment gateway" "On merchant site","On merchant site" "Enable options selection","Enable options selection" "Enable payment options selection on merchant site.","Enable payment options selection on merchant site." -"Click on Add button to configure one or more payment options.
Label: The option label to display on the frontend (the %c, %r and %a patterns will be respectively replaced by payments count, option rate and option amount).
Code: The option code as defined in your FacilyPay 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, %r and %a patterns will be respectively replaced by payments count, option rate and option amount).
Code: The option code as defined in your FacilyPay 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, %r and %a patterns will be respectively replaced by payments count, option rate and option amount).
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, %r and %a patterns will be respectively replaced by payments count, option rate and option amount).
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." "Rate","Rate" "Code","Code" "Define amount restriction for each card.","Define amount restriction for each card." @@ -222,9 +234,25 @@ "Payment in %s times","Payment in %s times" "Configure Full CB 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.
Rate: The interest rate in percentage.
Cap: Maximum fees amount of payment option.","Configure Full CB payment options.
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.
Rate: The interest rate in percentage.
Cap: Maximum fees amount of payment option." "Cap","Cap" +"Fees","Fees" +"With fees","With fees" +"Without fees","Without fees" +"Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend (the %c pattern will be replaced by payments count).
Count: Total number of payments.
Fees: Choose whether or not to apply fees.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.","Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend (the %c pattern will be replaced by payments count).
Count: Total number of payments.
Fees: Choose whether or not to apply fees.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option." +"Method title to display on payment means page. Used only if « Regroup payment means » option is enabled.","Method title to display on payment means page. Used only if « Regroup payment means » option is enabled." +"Allowed file types: jpeg, gif, png. Used only if « Regroup payment means » option is enabled.","Allowed file types: jpeg, gif, png. Used only if « Regroup payment means » option is enabled." +"Regroup payment means","Regroup payment means" +"If this option is enabled, all the payment means added in this section will be displayed within the same payment submodule.", "If this option is enabled, all the payment means added in this section will be displayed within the same payment submodule." +"Payment means","Payment means" +"Countries","Countries" +"Cart data","Cart data" +"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.","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." +"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." "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 »." +"You cannot enable several options with the same means of payment.","You cannot enable several options with the same means of payment." "Too many card types are selected.","Too many card types are selected." "Please configure « ADDITIONAL OPTIONS » part of « PayZen » section.","Please configure « ADDITIONAL OPTIONS » part of « PayZen » section." "Please enter a value for « ALL GROUPS - %1 » in « %2 » section as agreed with Banque Accord.","Please enter a value for « ALL GROUPS - %1 » in « %2 » section as agreed with Banque Accord." @@ -232,7 +260,7 @@ "Product reference « %1 » does not match PayZen specifications.","Product reference « %1 » does not match PayZen specifications." "The next order ID « %1 » does not match PayZen specifications.","The next order ID « %1 » does not match PayZen specifications." "This field must agree to the regular expression %1.","This field must agree to the regular expression %1." -"FacilyPay Oney means of payment cannot be used.","FacilyPay Oney means of payment cannot be used." +"Payment in 3 or 4 times Oney cannot be used.","Le paiement 3 ou 4 fois Oney ne peut pas être utilisé." "PayPal means of payment cannot be used.","PayPal means of payment cannot be used." "Payment Method","Payment Method" "Sequence Number","Sequence Number" @@ -267,8 +295,12 @@ "Payment Review","Payment Review" "To validate payment","To validate payment" "Validation error","Validation error" +"Payment is cancelled only in Magento. Please, consider cancelling the payment in PayZen Back Office.","Payment is cancelled only in Magento. Please, consider cancelling the payment in PayZen Back Office." +"Payment is validated only in Magento. Please, consider validating the payment in PayZen Back Office.","Payment is validated only in Magento. Please, consider validating the payment in PayZen Back Office." "Transaction %1 has been validated.","Transaction %1 has been validated." +"Order %1 has been validated.","Order %1 has been validated." "Payment validated successfully.","Payment validated successfully." +"Please consult the PayZen logs for more details.","Please consult the PayZen logs for more details." "Please fix this error to use PayZen web services.","Please fix this error to use PayZen web services." "An error has occurred during the validation process.","An error has occurred during the validation process." "You will enter payment data after order confirmation.","You will enter payment data after order confirmation." @@ -279,9 +311,14 @@ "Pay with PayZen","Pay with PayZen" "Pay by gift card","Pay by gift card" "Pay with Choozeo","Pay with Choozeo" +"Pay in 3 or 4 times Oney","Payer en 3 ou 4 fois Oney" "Pay with SEPA","Pay with SEPA" "Pay with PayPal","Pay with PayPal" "Pay with Full CB","Pay with Full CB" +"Pay with FranFinance","Pay with FranFinance" +"Other payment means","Other payment means" +"Payment with %s","Payment with %s" +"Pay with %s","Pay with %s" "Payment gateway redirection","Payment gateway redirection" "Please wait a moment. This page will transfer your data to PayZen payment gateway in a few seconds.","Please wait a moment. This page will transfer your data to PayZen payment gateway in a few seconds." "If nothing happens in 10 seconds, click the button below.","If nothing happens in 10 seconds, click the button below." @@ -310,10 +347,18 @@ "delivery address","delivery address" "The field %1 of your %2 is invalid.","The field %1 of your %2 is invalid." "The field %1 of your %2 is mandatory.","The field %1 of your %2 is mandatory." +"The following characters: %1 are not allowed for this field.","The following characters: %1 are not allowed for this field." "OR","OR" -"Click here to pay with your registered means of payment.","Click here to pay with your registered means of payment." -"You will pay with your registered means of payment %s. No data entry is needed.","You will pay with your registered means of payment %s. No data entry is needed." +"Click here to pay with your stored means of payment.","Click here to pay with your stored means of payment." +"You will pay with your stored means of payment %s","You will pay with your stored means of payment %s" "Click here to pay with another means of payment.","Click here to pay with another means of payment." +"manage your payment means","manage your payment means" +"Are you sure you want to delete your saved means of payment? This action is not reversible!","Are you sure you want to delete your saved means of payment? This action is not reversible!" +"Delete %s","Delete %s" +"You have no stored payment means.","You have no stored payment means." +"My payment means","My payment means" +"The stored means of payment could not be deleted.","The stored means of payment could not be deleted." +"The stored means of payment was successfully deleted.","The stored means of payment was successfully deleted." "Shipping Address","Shipping Address" "Shipping Method","Shipping Method" "Sorry, no quotes are available for this product configuration.","Sorry, no quotes are available for this product configuration." @@ -322,10 +367,18 @@ "Cannot pay requested product with « PayZen Buy now ».","Cannot pay requested product with « PayZen Buy now »." "Some of the products you requested are unavailable.","Some of the products you requested are unavailable." "Some of the products you requested are not available in the desired quantity.","Some of the products you requested are not available in the desired quantity." +"Your order total:","Your order total:" +"Debit dates","Debit dates" +"Contribution:","Contribution:" +"Followed by %s installments","Followed by %s installments" +"Installment %i:","Installment %i:" +"Total cost of credit:","Total cost of credit:" +"Funding of %s with a fixed APR of %s %%.","Funding of %s with a fixed APR of %s %%." "Order amount :","Order amount :" "Installments","Installments" "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." "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?" @@ -336,4 +389,5 @@ "Your payment was not accepted. Please, try to re-order.","Your payment was not accepted. Please, try to re-order." "The payment was successful. Your order was registered successfully.","The payment was successful. Your order was registered successfully." "An error has occurred during the payment process.","An error has occurred during the payment process." -"Payment cancelled.","Payment cancelled." \ No newline at end of file +"Payment cancelled.","Payment cancelled." +"Capture delay column","Capture delay" \ No newline at end of file diff --git a/i18n/es_ES.csv b/i18n/es_ES.csv index 21de4a22..c07302d9 100644 --- a/i18n/es_ES.csv +++ b/i18n/es_ES.csv @@ -1,12 +1,15 @@ "Accept payments by credit cards with PayZen.","Aceptar pagos con tarjeta de crédito con PayZen." "GENERAL CONFIGURATION","CONFIGURACIÓN GENERAL" "STANDARD PAYMENT","PAGO STANDARD" -"PAYMENT IN INSTALLMENTS","PAGO EN CUOTAS" +"PAYMENT IN INSTALLMENTS","PAGO EN N VENCIMIENTOS" "GIFT CARD PAYMENT","PAGO CON TARJETA REGALO" "CHOOZEO PAYMENT","PAGO CHOOZEO" +"PAYMENT IN 3 OR 4 TIMES ONEY","PAGO EN 3 O 4 VECES ONEY" "FULL CB PAYMENT","PAGO FULL CB" "SEPA PAYMENT","PAGO SEPA" "PAYPAL PAYMENT","PAGO PAYPAL" +"FRANFINANCE PAYMENT","PAGO FRANFINANCE" +"OTHER PAYMENT MEANS","OTROS MEDIOS DE PAGO" "MODULE INFORMATION","INFORMACIÓN DEL MÓDULO" "Developed by","Desarrollado por" "Contact us","Contáctenos" @@ -34,6 +37,17 @@ "Link to the payment page.","Enlace a la página de pago." "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)." +"Test password","Contraseña de test" +"Production password","Contraseña de producción" +"Public test key","Clave pública de test" +"Public production key","Clave pública de producción" +"HMAC-SHA-256 test key","Clave HMAC-SHA-256 de test" +"HMAC-SHA-256 production key","Clave HMAC-SHA-256 de producción" +"REST API Notification URL","URL de notificación de API REST" +"REST API server URL","URL del servidor API REST" +"JavaScript client URL","URL del cliente JavaScript" "PAYMENT PAGE","PÁGINA DE PAGO" "Default Language","Idioma por defecto" "Default language on the payment page.","Idioma por defecto en la página de pago." @@ -62,7 +76,7 @@ "Manual","Manual" "Card Types","Tipos de tarjeta" "The card type(s) that can be used for the payment. Select none to use gateway configuration.","El tipo(s) de tarjeta que se puede usar para el pago. No haga ninguna selección para usar la configuración del portal." -"ALL","ALL" +"ALL","TODAS" "Category mapping","Asignación de categoría" "Use the same category for all products.","Use la misma categoría para todos los productos." "(Use category mapping below)","(Use la asignación de categoría a continuación)" @@ -117,20 +131,23 @@ "ADDITIONAL OPTIONS","OPCIONES ADICIONALES" "Send shopping cart details","Enviar el detalle del carrito de compras" "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.","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." -"FacilyPay Oney contract","Afiliación de FacilyPay Oney" -"Select « Yes » if you have a FacilyPay Oney contract.","Seleccione « Sí » si tiene una afiliación de FacilyPay Oney." -"FacilyPay Oney shipping options","Opciones de envío de FacilyPay Oney" -"Define the FacilyPay Oney information about all shipping methods.
FacilyPay Oney label: The label of the shipping method (use 55 alphanumeric characters, accentuated characters and these special characters: space, slash, hyphen, apostrophe).
Type: The delivery type of shipping method.
Speed: Select whether the delivery is STANDARD or EXPRESS.
Entries marked with * are newly added and must be configured.","Defina la información de FacilyPay Oney sobre todos los métodos de envío.
Etiqueta FacilyPay Oney: La etiqueta del método de envío (use 55 caracteres alfanuméricos, caracteres acentuados y estos caracteres especiales: espacio, barra diagonal, guión, apóstrofe).
Tipo: El tipo de entrega del método de envío.
Velocidad: Seleccione si la entrega es ESTÁNDAR o EXPRESO.
Las entradas marcadas con * son agregadas recientemente y se deben configurar." +"Shipping options","Opciones de envío" +"Define the PayZen information about all shipping methods.
Method title: The label of the shipping method.
Type: The delivery type of shipping method.
Rapidity: Select whether the delivery is STANDARD or EXPRESS.
Delay: Select the delivery delay if rapidity is « Priority ».
Entries marked with * are newly added and must be configured.", "Defina la información de PayZen sobre todos los métodos de envío.
Título del método: La etiqueta del método de envío .
Tipo: El tipo de entrega del método de envío.
Rapidez: Seleccione si la entrega es ESTÁNDAR o EXPRESO.
Las entradas marcadas con * son agregadas recientemente y se deben configurar." +"Method title","Título del método" "Method title","Título del método" -"FacilyPay Oney label","Etiqueta FacilyPay Oney" "Type","Tipo" "Delivery company","Empresa de entrega" "Reclaim in shop","Reclamar en tienda" "Relay point","Punto de intercambio" "Reclaim in station","Reclamar en estación" -"Speed","Velocidad" +"Rapidity","Rapidez" "Standard","Estándar" "Express","Expreso" +"Priority","Prioritario" +"Delay","Plazo" +"<= 1 hour","<= 1 hora" +"> 1 hour","> 1 hora" +"Immediate","Inmediato" "DISPLAY OPTIONS","OPCIONES DE VISUALIZACIÓN" "Activation","Activación" "Enables / disables this payment method.","Habilita/deshabilita este método de pago." @@ -156,23 +173,16 @@ "ALL GROUPS","TODOS LOS GRUPOS" "The number of days before the bank capture. Enter value only if different from PayZen general configuration.","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." "ADVANCED OPTIONS","OPCIONES AVANZADAS" -"Bank data acquisition mode","Modo de adquisición de datos bancarios" -"Select how the credit card infos will be entered. Attention, to use data acquisition on the merchant site, you must ensure that you have subscribed to this option with PayZen.","Seleccione la forma en que se ingresarán los datos de la tarjeta de crédito. Atención: para usar la adquisición de datos en el sitio del vendedor, debe asegurarse de estar suscrito a esta opción con PayZen." +"Card data entry mode","Modo de ingreso de datos de la tarjeta" +"Select how the credit card information will be entered. Attention, to use embedded payment fields, you must ensure that you have subscribed to this option with PayZen.","Seleccione la forma en que se ingresarán los datos de la tarjeta de crédito. Atención: para usar los campos de pago incrustados, debe asegurarse de estar suscrito a esta opción con PayZen." "Bank data acquisition on payment gateway","Adquisición de datos bancarios en el portal de pago" "Card type selection on merchant site","Selección del tipo de tarjeta en el sitio del vendedor" "Payment page integrated to checkout process (iframe mode)","Página de pago integrada al proceso de pago (modo iframe)" -"Embedded payment fields (REST API)","Campos de pago incrustados (API REST)" +"Embedded payment fields on merchant site (REST API)","Campos de pago incrustados en el sitio web vendedor (API REST)" +"Embedded payment fields in a pop-in (REST API)","Campos de pago incrustados en una ventana pop-in (API REST)" "Payment by token","Pago por token" -"The payment by token allows to pay orders without re-entering bank data at each payment. The Payment by token option should be enabled on your PayZen store to use this feature.","El pago por token permite pagar pedidos sin reingresar datos bancarios en cada pago. La opción Pago por token debe estar habilitada en su tienda PayZen para usar esta función." +"The payment by token allows to pay orders without re-entering bank data at each payment. The Payment by token option should be enabled on your PayZen store to use this feature.","El pago por token permite pagar pedidos sin reingresar datos bancarios en cada pago. La opción Pago por token; debe estar habilitada en su tienda PayZen para usar esta función." "REST API SETTINGS","CONFIGURACIÓN 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)." -"Test password","Contraseña de test" -"Production password","Contraseña de producción" -"Public test key","Clave pública de test" -"Public production key","Clave pública de producción" -"HMAC-SHA-256 test key","Clave HMAC-SHA-256 de test" -"HMAC-SHA-256 production key","Clave HMAC-SHA-256 de producción" -"API REST Notification URL","URL de notificación de API REST" "CUSTOMIZATION","PERSONALIZACIÓN" "Theme","Tema" "Select a theme to use to display embedded payment fields. For more customization, you can edit module template manually.","Seleccione un tema para usar para mostrar los campos de pago incrustados. Para una mayor personalización, puede editar la plantilla del módulo manualmente." @@ -181,8 +191,8 @@ "Placeholder","Marcador de posición" "Texts to use as placeholders for embedded payment fields.","Textos a usar como marcadores de posición para campos de pago incrustados." "Payment attempts number","Número de intentos de pago" -"Maximum number of payment retries after a failed payment (between 0 and 9). If blank, the gateway default value is 3.","Número máximo de intentos de pago después de un pago fallido (entre 0 y 9). Si está en blanco, el valor por defecto del portal es 3." -"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 cuotas 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." +"Maximum number of payment retries after a failed payment (between 0 and 10). Leave blank to use gateway configuration.","Número máximo de intentos de pago después de un pago fallido (entre 0 y 10). Deje en blanco para usar la configuración del portal." +"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." @@ -195,6 +205,7 @@ "Count","Conteo" "Period","Periodo" "1st installment","Primer vencimiento" +"Action","Acción" "Gift card types","Tipos de tarjeta regalo" "Select the gift card types that can be used for the payment.","Seleccione los tipos de tarjeta regalo que se pueden usar para el pago." "Add cards","Agregar tarjetas" @@ -205,12 +216,14 @@ "The number of days before the bank capture. Enter value only if different from PayZen general configuration. This setting is considered only if the buyer uses another CC to complete the payment.","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. Esta configuración solo se considera si el comprador utiliza otra tarjeta de crédito para completar el pago." "If manual is selected, you will have to confirm payments manually in your PayZen Back Office. This setting is considered only if the buyer uses another CC to complete the payment.","Si se selecciona manual, deberá confirmar los pagos manualmente en su Back Office PayZen. Esta configuración solo se considera si el comprador utiliza otra tarjeta de crédito para completar el pago." "Card type selection","Selección del tipo de tarjeta" +"Add payment means","Agregar medios de pago" +"Click on « Add » button to add one or more new payment means.
Code: The code of the means of payment as expected by PayZen gateway.
Label: The default label of the means of payment.","Haga clic en el botón para agregar uno o más medios de pago nuevos.
Código: El código del medio de pago cómo esperado por la pasarela PayZen.
Etiqueta: La etiqueta predeterminada del medio de pago." "Select where card type will be selected by buyer.","Elija el lugar donde el comprador seleccionará el tipo de tarjeta." "On payment gateway","En el portal de pago" "On merchant site","En el sitio del vendedor" "Enable options selection","Habilite la selección de opciones" "Enable payment options selection on merchant site.","Habilite la selección de opciones de pago en el sitio del vendedor." -"Click on Add button to configure one or more payment options.
Label: The option label to display on the frontend (the %c, %r and %a patterns will be respectively replaced by payments count, option rate and option amount).
Code: The option code as defined in your FacilyPay 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, %r y %a se reemplazarán respectivamente por conteo de pagos, tasa de opción y monto de opción).
Código: El código de opción como se define en su afiliación de FacilyPay 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." +"Click on Add button to configure one or more payment options.
Label: The option label to display on the frontend (the %c, %r and %a patterns will be respectively replaced by payments count, option rate and option amount).
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, %r y %a se reemplazarán respectivamente por conteo de pagos, tasa de opción y monto 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." "Rate","Tasa" "Code","Código" "Define amount restriction for each card.","Defina la restricción del monto para cada tarjeta." @@ -220,11 +233,25 @@ "Register a recurrent SEPA mandate with direct debit","Registre un mandato SEPA recurrente con débito directo" "Register a recurrent SEPA mandate without direct debit","Registre un mandato SEPA recurrente sin débito directo" "Payment in %s times","Pago en %s cuotas" -"Configure Full CB 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.
Rate: The interest rate in percentage.
Cap: Maximum fees amount of payment option.","Configure las opciones de pago Full CB.
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.
Tasa: La tasa de interés en porcentaje.
Cap: Monto máximo de las tarifas de la opción de pago." +"Configure Full CB 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.
Rate: The interest rate in percentage.
Cap: Maximum fees amount of payment option.","Configure las opciones de pago Full CB.
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.
Tasa: La tasa de interés en porcentaje.
Cap: Monto máximo de los gastos de la opción de pago." "Cap","Cap" -"The configuration of the PayZen module has been successfully reset.","La configuración del módulo PayZen se restableció correctamente." +"Fees","Gastos" +"With fees","Con gastos" +"Without fees","Sin gastos" +"Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend (the %c pattern will be replaced by payments count).
Count: Total number of payments.
Fees: Choose whether or not to apply fees.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.","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 (el patrón %c se reemplazara por el conteo de pagos).
Conteo: Número total de pagos.
Gastos: Habilita o desabilita la aplicación de los gastos.
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." +"Method title to display on payment means page. Used only if « Regroup payment means » option is enabled.","Título del método a mostrar en la página de medios de pago. Se usa solo si la opción « Agrupar los medios de pago » está habilitada." +"Allowed file types: jpeg, gif, png. Used only if « Regroup payment means » option is enabled.","Tipos de archivo permitidos: jpeg, gif, png. Se usa solo si la opción « Agrupar los medios de pago » está habilitada." +"Regroup payment means","Agrupar los medios de pago" +"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 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 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 »." +"You cannot enable several options with the same means of payment.","No puede habilitar varias opciones con el mismo medio de pago." "Too many card types are selected.","Se seleccionaron demasiados tipos de tarjeta." "Please configure « ADDITIONAL OPTIONS » part of « PayZen » section.","Configure la parte de « OPCIONES ADICIONALES » de la sección « PayZen »." "Please enter a value for « ALL GROUPS - %1 » in « %2 » section as agreed with Banque Accord.","Ingrese un valor para « TODOS LOS GRUPOS - %1 » en la sección « %2 » como se acordó con Banque Accord." @@ -232,7 +259,7 @@ "Product reference « %1 » does not match PayZen specifications.","El ID de cliente « %1 » no cumple con las especificaciones de PayZen." "The next order ID « %1 » does not match PayZen specifications.","El ID del siguiente pedido « %1 » no cumple con las especificaciones de PayZen." "This field must agree to the regular expression %1.","Este campo debe aceptar la expresión regular %1." -"FacilyPay Oney means of payment cannot be used.","No se puede usar el medio de pago FacilyPay Oney." +"Payment in 3 or 4 times Oney cannot be used.","No se puede usar el pago 3 o 4 veces Oney." "PayPal means of payment cannot be used.","No se puede usar el medio de pago PayPal." "Payment Method","Método de pago" "Sequence Number","Número de secuencia" @@ -267,8 +294,12 @@ "Payment Review","Revisión del pago" "To validate payment","Para validar el pago" "Validation error","Error de validación" +"Payment is cancelled only in Magento. Please, consider cancelling the payment in PayZen Back Office.","El pago se cancela solo en Magento. Considere cancelar el pago. en el Back Office PayZen." +"Payment is validated only in Magento. Please, consider validating the payment in PayZen Back Office.","El pago se valida solo en Magento. Considere validar el pago. en el Back Office PayZen." "Transaction %1 has been validated.","La transacción %1 fue validada." +"Order %1 has been validated.","El pedido %1 fue validado." "Payment validated successfully.","Pago validado correctamente." +"Please consult the PayZen logs for more details.","Consulte los registros de PayZen para obtener más detalles." "An error has occurred during the validation process.","Ocurrió un error durante el proceso de validación." "Please fix this error to use PayZen web services.","Corrija este error para usar los servicios web de PayZen." "You will enter payment data after order confirmation.","Usted ingresará los datos de pago después de la confirmación del pedido." @@ -279,9 +310,14 @@ "Pay with PayZen","Pagar con PayZen" "Pay by gift card","Pagar con tarjeta regalo" "Pay with Choozeo","Pagar con Choozeo" +"Pay in 3 or 4 times Oney","Pagar en 3 o 4 veces Oney" "Pay with SEPA","Pagar con SEPA" "Pay with PayPal","Pagar con PayPal" "Pay with Full CB","Pagar con Full CB" +"Pay with FranFinance","Pagar con FranFinance" +"Other payment means","Otros medios de pago" +"Payment with %s","Pago con %s" +"Pay with %s","Pagar con %s" "Payment gateway redirection","Redirección al portal de pago" "Please wait a moment. This page will transfer your data to PayZen payment gateway in a few seconds.","Espere un momento. Esta página transferirá sus datos al portal de pago de PayZen en unos segundos." "If nothing happens in 10 seconds, click the button below.","Si no sucede nada en 10 segundos, haga clic en el botón a continuación." @@ -306,14 +342,22 @@ "Telephone","Teléfono" "The field %1 is required for this means of payment.","El campo %1 se requiere para este medio de pago." "The fields %1 are required for this means of payment.","Los campos %1 se requieren para este medio de pago." +"The following characters: %1 are not allowed for this field.","Los siguientes caracteres: %1 no están permitidos para este campo." "billing address","dirección de facturación" "delivery address","dirección de entrega" "The field %1 of your %2 is invalid.","El campo %1 de su %2 no es válido." "The field %1 of your %2 is mandatory.","El campo %1 de su %2 es obligatorio." "OR","O" -"Click here to pay with your registered means of payment.","Haga clic aquí para pagar con su medio de pago registrado." -"You will pay with your registered means of payment %s. No data entry is needed.","Pagará con su medio de pago registrado %s. No se requiere ingresar datos." +"Click here to pay with your stored means of payment.","Haga clic aquí para pagar con su medio de pago registrado." +"You will pay with your stored means of payment %s","Pagará con su medio de pago registrado %s" "Click here to pay with another means of payment.","Haga clic aquí para pagar con otro medio de pago." +"manage your payment means","administrar sus medios de pago" +"Are you sure you want to delete your saved means of payment? This action is not reversible!","¿Está seguro de que desea eliminar su medio de pago registrado? ¡Esta acción no es reversible!" +"Delete %s","Eliminar %s" +"You have no stored payment means.","You have no stored payment means." +"My payment means","Mis medios de pago" +"The stored means of payment could not be deleted.","The stored means of payment could not be deleted." +"The stored means of payment was successfully deleted.","The stored means of payment was successfully deleted." "Shipping Address","Dirección de envío" "Shipping Method","Método de envío" "Sorry, no quotes are available for this product configuration.","Lo sentimos, no hay presupuestos disponibles para esta configuración de producto." @@ -322,10 +366,18 @@ "Cannot pay requested product with « PayZen Buy now ».","No se puede pagar el producto solicitado con « PayZen Buy now »." "Some of the products you requested are unavailable.","Algunos de los productos que solicitó no están disponibles." "Some of the products you requested are not available in the desired quantity.","Algunos de los productos que solicitó no están disponibles en la cantidad deseada." +"Your order total:","Total de su pedido:" +"Debit dates","Fechas de débito" +"Contribution:","Contribución:" +"Followed by %s installments","Seguido por %s pagos" +"Installment %i:","Pago %i:" +"Total cost of credit:","Costo total del crédito:" +"Funding of %s with a fixed APR of %s %%.","Financiación de %s con APR fija de %s %%." "Order amount :","Monto del pedido:" -"Installments","Cuotas" -"Fees :","Tarifas:" +"Installments","Vencimientos" +"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." "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?" @@ -336,4 +388,5 @@ "Your payment was not accepted. Please, try to re-order.","Su pago no fue aceptado. Intente realizar de nuevo el pedido." "The payment was successful. Your order was registered successfully.","El pago fue exitoso. Su pedido se registró correctamente." "An error has occurred during the payment process.","Ocurrió un error durante el proceso de pago." -"Payment cancelled.","Pago cancelado." \ No newline at end of file +"Payment cancelled.","Pago cancelado." +"Capture delay column","Plazo de captura" \ No newline at end of file diff --git a/i18n/fr_FR.csv b/i18n/fr_FR.csv index 8fe145cb..be6464b0 100644 --- a/i18n/fr_FR.csv +++ b/i18n/fr_FR.csv @@ -4,9 +4,12 @@ "PAYMENT IN INSTALLMENTS","PAIEMENT EN PLUSIEURS FOIS" "GIFT CARD PAYMENT","PAIEMENT PAR CARTE CADEAU" "CHOOZEO PAYMENT","PAIEMENT CHOOZEO" +"PAYMENT IN 3 OR 4 TIMES ONEY","PAIEMENT EN 3 OU 4 FOIS ONEY" "FULL CB PAYMENT","PAIEMENT FULL CB" "SEPA PAYMENT","PAIEMENT SEPA" "PAYPAL PAYMENT","PAIEMENT PAYPAL" +"FRANFINANCE PAYMENT","PAIEMENT FRANFINANCE" +"OTHER PAYMENT MEANS","AUTRES MOYENS DE PAIEMENTS" "MODULE INFORMATION","INFORMATIONS SUR LE MODULE" "Developed by","Développé par" "Contact us","Courriel de contact" @@ -34,6 +37,17 @@ "Link to the payment page.","URL vers laquelle l'acheteur sera redirigé pour le paiement." "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)." +"Test password","Mot de passe de test" +"Production password","Mot de passe de production" +"Public test key","Clé publique de test" +"Public production key","Clé publique de production" +"HMAC-SHA-256 test key","Clé HMAC-SHA-256 de test" +"HMAC-SHA-256 production key","Clé HMAC-SHA-256 de production" +"REST API Notification URL","URL de notification de l'API REST" +"REST API server URL","URL du serveur de l'API REST" +"JavaScript client URL","URL du client JavaScript" "PAYMENT PAGE","PAGE DE PAIEMENT" "Default Language","Langue par défaut" "Default language on the payment page.","Sélectionner la langue par défaut à utiliser sur la page de paiement." @@ -117,20 +131,23 @@ "ADDITIONAL OPTIONS","OPTIONS ADDITIONNELLES" "Send shopping cart details","Envoyer le détail du panier" "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.","Si vous désactivez cette option, le détail du panier ne sera pas envoyé à la plateforme. A noter que dans certains cas, cette option doit être activée. Reportez-vous à la documentation pour plus d'informations." -"FacilyPay Oney contract","Contrat FacilyPay Oney" -"Select « Yes » if you have a FacilyPay Oney contract.","Sélectionnez « Oui » si vous avez un contrat FacilyPay Oney." -"FacilyPay Oney shipping options","Options de livraison FacilyPay Oney" -"Define the FacilyPay Oney information about all shipping methods.
FacilyPay Oney label: The label of the shipping method (use 55 alphanumeric characters, accentuated characters and these special characters: space, slash, hyphen, apostrophe).
Type: The delivery type of shipping method.
Speed: Select whether the delivery is STANDARD or EXPRESS.
Entries marked with * are newly added and must be configured.","Définir les informations FacilyPay Oney sur toutes les méthodes de livraison.
Libellé FacilyPay Oney: Le libellé de la méthode livraison (utiliser 55 caractères alphanumériques, caractères accentués et les caractères spéciaux suivants: espace, slash, tiret, apostrophe).
Type: Le type d'envoi de la méthode de livraison.
Vitesse: Sélectionner la vitesse de livraison STANDARD ou EXPRESS (moins de 24h).
Les entrées marquées par * sont nouvelles et doivent être configurées." +"Shipping options","Options de livraison" +"Define the PayZen information about all shipping methods.
Method title: The label of the shipping method.
Type: The delivery type of shipping method.
Rapidity: Select whether the delivery is STANDARD or EXPRESS.
Delay: Select the delivery delay if rapidity is « Priority ».
Entries marked with * are newly added and must be configured.","Définir les informations PayZen sur les méthodes de livraison utilisées.
Titre de la méthode: Le nom de la méthode livraison.
Type: Le type de transport.
Rapidité: Sélectionner la rapidité de livraison.
Délai: Sélectionner le délai de livraison si la vitesse est « Priorité ».
Les entrées marquées par * sont nouvelles et doivent être configurées." "Method title","Titre de la méthode" -"FacilyPay Oney label","Libellé FacilyPay Oney" "Type","Type" "Delivery company","Compagnie de livraison" "Reclaim in shop","Retrait en magasin" "Relay point","Point relais" "Reclaim in station","Retrait en station" -"Speed","Vitesse" +"Rapidity","Rapidité" "Standard","Standard" "Express","Express" +"Priority","Prioritaire" +"Delay","Délai" +"<= 1 hour","<= 1 heure" +"> 1 hour","> 1 heure" +"Immediate","Immédiat" +"24/7","24h/24, 7j/7" "DISPLAY OPTIONS","OPTIONS D'AFFICHAGE" "Activation","Activation" "Enables / disables this payment method.","Active / désactive cette méthode de paiement." @@ -156,23 +173,16 @@ "ALL GROUPS","TOUS LES GROUPES" "The number of days before the bank capture. Enter value only if different from PayZen general configuration.","Le nombre de jours avant la remise en banque. Saisir une valeur seulement si différente de la configuration PayZen générale." "ADVANCED OPTIONS","OPTIONS AVANCÉES" -"Bank data acquisition mode","Mode d'acquisition des données bancaires" -"Select how the credit card infos will be entered. Attention, to use data acquisition on the merchant site, you must ensure that you have subscribed to this option with PayZen.","Sélectionner la manière dont seront saisies les données de la carte de crédit. Attention, pour utiliser l'acquisition des données sur le site marchand, vous devez vous assurer d'avoir souscrit à cette option auprès de PayZen." +"Card data entry mode","Mode de saisie des données de la carte" +"Select how the credit card information will be entered. Attention, to use embedded payment fields, you must ensure that you have subscribed to this option with PayZen.","Sélectionner la manière dont seront saisies les données de la carte de crédit. Attention, pour utiliser les champs de paiement embarqués, vous devez vous assurer d'avoir souscrit à cette option auprès de PayZen." "Bank data acquisition on payment gateway","Acquisition des données sur la plateforme de paiement" "Card type selection on merchant site","Sélection du type de carte sur le site marchand" "Payment page integrated to checkout process (iframe mode)","Page de paiement intégrée au tunnel de commande (mode iframe)" -"Embedded payment fields (REST API)","Champs de paiement embarqués (API REST)" +"Embedded payment fields on merchant site (REST API)","Champs de paiement embarqués sur le site marchand (API REST)" +"Embedded payment fields in a pop-in (REST API)","Champs de paiement embarqués dans une pop-in (API REST)" "Payment by token","Paiement par alias" "The payment by token allows to pay orders without re-entering bank data at each payment. The Payment by token option should be enabled on your PayZen store to use this feature.","Le paiement par alias permet de régler une commande sans resaisir les données bancaires à chaque paiement. L'option Paiement par alias doit être activée sur votre boutique PayZen pour utiliser cette fonctionnalité." "REST API SETTINGS","PARAMÈTRES DE L'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)." -"Test password","Mot de passe de test" -"Production password","Mot de passe de production" -"Public test key","Clé publique de test" -"Public production key","Clé publique de production" -"HMAC-SHA-256 test key","Clé HMAC-SHA-256 de test" -"HMAC-SHA-256 production key","Clé HMAC-SHA-256 de production" -"API REST Notification URL","URL de notification de l'API REST" "CUSTOMIZATION","PERSONNALISATION" "Theme","Thème" "Select a theme to use to display embedded payment fields. For more customization, you can edit module template manually.","Sélectionnez un thème à utiliser pour afficher les champs de paiement embarqués. Pour plus de personnalisation, vous pouvez éditer le template du module manuellement." @@ -195,6 +205,7 @@ "Count","Nombre" "Period","Période" "1st installment","1ère échéance" +"Action","Action" "Gift card types","Types de cartes cadeau" "Select the gift card types that can be used for the payment.","Sélectionner les types de carte cadeau qui pourront être utilisés pour le paiement." "Add cards","Ajouter des cartes" @@ -205,12 +216,14 @@ "The number of days before the bank capture. Enter value only if different from PayZen general configuration. This setting is considered only if the buyer uses another CC to complete the payment.","Le nombre de jours avant la remise en banque. Saisir une valeur seulement si différente de la configuration PayZen générale. Ce paramètre est pris en compte seulement si l'acheteur complète le paiement avec une autre CB." "If manual is selected, you will have to confirm payments manually in your PayZen Back Office. This setting is considered only if the buyer uses another CC to complete the payment.","En mode manuel, vous devrez confirmer les paiements dans le Back Office PayZen. Ce paramètre est pris en compte seulement si l'acheteur complète le paiement avec une autre CB." "Card type selection","Sélection du type de carte" +"Add payment means","Ajouter des moyens de paiement" +"Click on « Add » button to add one or more new payment means.
Code: The code of the means of payment as expected by PayZen gateway.
Label: The default label of the means of payment.","Cliquer sur le bouton « Ajouter » pour ajouter un ou plusieurs nouveaux moyens de paiement.
Code : Le code du moyen de paiement tel qu'attendu par la plateforme PayZen.
Libellé : Le libellé par défaut du moyen de paiement." "Select where card type will be selected by buyer.","Sélectionner où le type de carte sera choisi par l'acheteur." "On payment gateway","Sur la plateforme de paiement" "On merchant site","Sur le site marchand" "Enable options selection","Activer la sélection des options" "Enable payment options selection on merchant site.","Activer la sélection des options de paiement sur le site marchand." -"Click on Add button to configure one or more payment options.
Label: The option label to display on the frontend (the %c, %r and %a patterns will be respectively replaced by payments count, option rate and option amount).
Code: The option code as defined in your FacilyPay 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, %r et %a seront remplacés respectivement par le nombre paiements, le taux d'intérêt et le montant de l'option).
Code: Le code de l'option tel que défini dans votre contrat FacilyPay 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." +"Click on Add button to configure one or more payment options.
Label: The option label to display on the frontend (the %c, %r and %a patterns will be respectively replaced by payments count, option rate and option amount).
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, %r et %a seront remplacés respectivement par le nombre paiements, le taux d'intérêt et le montant de l'option).
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." "Rate","Taux" "Code","Code" "Define amount restriction for each card.","Définir la restriction sur le montant pour chaque carte." @@ -222,9 +235,25 @@ "Payment in %s times","Paiement en %s fois" "Configure Full CB 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.
Rate: The interest rate in percentage.
Cap: Maximum fees amount of payment option.","Configurer les options de paiement Full CB.
Libellé: Texte décrivant l'option de paiement.
Montant min: Montant minimum pour proposer l'option.
Montant max: Montant maximum pour proposer l'option.
Taux: Le taux d'intérêt pour l'option.
Plafond: Montant maximum des frais de dossier pour l'option." "Cap","Plafond" +"Fees","Frais" +"With fees","Avec frais" +"Without fees","Sans frais" +"Click on « Add » button to configure one or more payment options.
Label: The option label to display on the frontend (the %c pattern will be replaced by payments count).
Count: Total number of payments.
Fees: Choose whether or not to apply fees.
Min. amount: Minimum amount to enable the payment option.
Max. amount: Maximum amount to enable the payment option.","Cliquer sur le bouton « Ajouter » pour configurer une ou plusieurs options de paiement.
Libellé: Texte décrivant l'option de paiement (le code %c sera remplacé par le nombre de paiements).
Nombre: Nombre total de paiements.
Frais: Choisir d'appliquer ou non les frais.
Montant min.: Montant minimum pour proposer l'option.
Montant max.: Montant maximum pour proposer l'option." +"Method title to display on payment means page. Used only if « Regroup payment means » option is enabled.","Titre de la méthode à afficher sur la page des moyens de paiement. Utilisé uniquement si l'option « Regrouper les moyens de paiement » est activée." +"Allowed file types: jpeg, gif, png. Used only if « Regroup payment means » option is enabled.","Types de fichier autorisés: jpeg, gif, png. Utilisé uniquement si l'option « Regrouper les moyens de paiement » est activée." +"Regroup payment means","Regrouper les moyens de paiement" +"If this option is enabled, all the payment means added in this section will be displayed within the same payment submodule.", "Si cette option est activée, les moyens de paiement ajoutés dans cette section seront affichés dans un même sous-module de paiement." +"Payment means","Moyens de paiement" +"Countries","Pays" +"Cart data","Données panier" +"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.","Cliquer sur le bouton « Ajouter » pour configurer un ou plusieurs moyens de paiement.
Label: Le libellé du moyen de paiement à afficher sur votre site.
Moyen de paiement: Choisir le moyen de paiement que vous voulez proposer.
Pays: Pays où le moyen de paiement sera disponible. Laisser vide pour autoriser tous les pays.
Montant min: Montant minimum pour proposer le moyen de paiement.
Montant max: Montant maximum pour proposer le moyen de paiement.
Délai de remise: Le nombre de jours avant la remise en banque. Saisir une valeur seulement si différente de la configuration PayZen générale.
Mode de validation: En mode manuel, vous devrez confirmer les paiements dans le Back Office PayZen.
Données panier: Si vous désactivez cette option, le détail du panier ne sera pas envoyé à la plateforme. A noter que dans certains cas, cette option doit être activée. Reportez-vous à la documentation pour plus d'informations." +"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." "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 ».","La configuration du module PayZen a été réinitialisée avec succès." +"Invalid value for field « %s » in section « %s ».","Valeur invalide pour le champ « %s » dans la section « %s »." +"The field « %1 » is required for section « %2 ».","Le champ « %1 » est obligatoire pour la section « %2 »." +"You cannot enable several options with the same means of payment.","Vous ne pouvez pas activer plusieurs options avec le même moyen de paiement." "Too many card types are selected.","Trop de types de carte sont sélectionnés." "Please configure « ADDITIONAL OPTIONS » part of « PayZen » section.","Veuillez configurer la partie « OPTIONS ADDITIONNELLES » de la section « PayZen »." "Please enter a value for « ALL GROUPS - %1 » in « %2 » section as agreed with Banque Accord.","Veuillez renseigner une valeur pour le champ « TOUS LES GROUPES - %1 » dans la section « %2 » tel que convenu avec Banque Accord." @@ -232,7 +261,7 @@ "Product reference « %1 » does not match PayZen specifications.","La référence produit « %1 » ne correspond pas aux spécifications PayZen." "The next order ID « %1 » does not match PayZen specifications.","L'ID pour la prochaine commande « %1 » ne correspond pas aux spécifications PayZen." "This field must agree to the regular expression %1.","Ce champ doit respecter l'expression régulière %1." -"FacilyPay Oney means of payment cannot be used.","Le moyen de paiement FacilyPay Oney ne peut pas être utilisé." +"Payment in 3 or 4 times Oney cannot be used.","Le paiement 3 ou 4 fois Oney ne peut pas être utilisé." "PayPal means of payment cannot be used.","Le moyen de paiement PayPal ne peut pas être utilisé." "Payment Method","Méthode de paiement" "Sequence Number","Numéro de séquence" @@ -267,8 +296,12 @@ "Payment Review","Vérification du paiement" "To validate payment","Paiement à valider" "Validation error","Erreur de validation" +"Payment is cancelled only in Magento. Please, consider cancelling the payment in PayZen Back Office.","Le paiement est annulé uniquement dans Magento. Pensez à annuler le paiement dans le Back Office PayZen." +"Payment is validated only in Magento. Please, consider validating the payment in PayZen Back Office.","Le paiement est validé uniquement dans Magento. Pensez à valider le paiement dans le Back Office PayZen." "Transaction %1 has been validated.","La transaction %1 a été validée." +"Order %1 has been validated.","La commande %1 a été validée." "Payment validated successfully.","Paiement validé avec succès." +"Please consult the PayZen logs for more details.","Veuillez consulter les logs de PayZen pour plus de détails." "An error has occurred during the validation process.","Une erreur est survenue durant le processus de validation." "Please fix this error to use PayZen web services.";"Veuillez corriger cette erreur pour utiliser les services web PayZen." "You will enter payment data after order confirmation.","Vous allez saisir les informations de paiement après confirmation de la commande." @@ -279,9 +312,14 @@ "Pay with PayZen","Payer avec PayZen" "Pay by gift card","Payer par carte cadeau" "Pay with Choozeo","Payer avec Choozeo" +"Pay in 3 or 4 times Oney","Payer en 3 ou 4 fois Oney" "Pay with SEPA","Payer avec SEPA" "Pay with PayPal","Payer avec PayPal" "Pay with Full CB","Payer avec Full CB" +"Pay with FranFinance","Payer avec FranFinance" +"Other payment means","Autres moyens de paiement" +"Payment with %s","Paiement avec %s" +"Pay with %s","Payer avec %s" "Payment gateway redirection","Redirection vers la plateforme de paiement" "Please wait a moment. This page will transfer your data to PayZen payment gateway in a few seconds.","Veuillez patienter SVP, vous allez être redirigé(e) vers la plateforme de paiement PayZen dans quelques secondes." "If nothing happens in 10 seconds, click the button below.","Si rien ne se passe dans 10 secondes, cliquez sur le bouton ci-dessous." @@ -310,10 +348,18 @@ "delivery address","addresse de livraison" "The field %1 of your %2 is invalid.","Le champ %1 de votre %2 est invalide." "The field %1 of your %2 is mandatory.","Le champ %1 de votre %2 est obligatoire." +"The following characters: %1 are not allowed for this field.","Les caractères suivants: %1 ne sont pas authorisés pour ce champs." "OR","OU" -"Click here to pay with your registered means of payment.","Cliquez ici pour payer avec votre moyen de paiement enregistré." -"You will pay with your registered means of payment %s. No data entry is needed.","Vous allez payer avec votre moyen de paiement enregistré %s. La saisie des données bancaires n'est pas nécessaire." +"Click here to pay with your stored means of payment.","Cliquez ici pour payer avec votre moyen de paiement enregistré." +"You will pay with your stored means of payment %s","Vous allez payer avec votre moyen de paiement enregistré %s" "Click here to pay with another means of payment.","Cliquez ici pour payer avec un autre moyen de paiement." +"manage your payment means","gérez vos moyens de paiement" +"Are you sure you want to delete your saved means of payment? This action is not reversible!","Voulez-vous vraiment supprimer votre moyen de paiement enregistré? Cette action n'est pas réversible!" +"Delete %s","Supprimer %s" +"You have no stored payment means.","Vous n'avez aucun moyen de paiement enregistré." +"My payment means","Mes moyens de paiement" +"The stored means of payment could not be deleted.","Le moyen de paiement enregistré n'a pas pu être supprimé." +"The stored means of payment was successfully deleted.","Le moyen de paiement enregistré a été supprimé avec succès." "Shipping Address","Addresse de livraison" "Shipping Method","Méthode de livraison" "Sorry, no quotes are available for this product configuration.","Aucun mode de livraison n'est disponible pour le produit avec ces options." @@ -322,10 +368,18 @@ "Cannot pay requested product with « PayZen Buy now ».","Vous ne pouvez pas payer le produit demandé avec « PayZen Achetez maintenant »." "Some of the products you requested are unavailable.","Certains produits demandés ne sont plus disponibles." "Some of the products you requested are not available in the desired quantity.","Certains produits ne sont pas disponibles dans les quantités demandées." +"Your order total:","Montant de votre commande:" +"Debit dates","Dates de prélèvement" +"Contribution:","Apport de:" +"Followed by %s installments","Suivi de %s mensualités" +"Installment %i:","Mensualité %i:" +"Total cost of credit:","Coût total du crédit:" +"Funding of %s with a fixed APR of %s %%.","Financement de %s au TAEG fixe de %s %%." "Order amount :","Montant commande :" "Installments","Echéancier" "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." "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?" @@ -336,4 +390,5 @@ "Your payment was not accepted. Please, try to re-order.","Votre paiement n'a pas été accepté. Veuillez repasser votre commande." "The payment was successful. Your order was registered successfully.","Le paiement a réussi. Votre commande est enregistrée avec succès." "An error has occurred during the payment process.","Une erreur est survenue durant le processus de paiement." -"Payment cancelled.","Paiement annulé." \ No newline at end of file +"Payment cancelled.","Paiement annulé." +"Capture delay column","Délai de remise" \ No newline at end of file diff --git a/view/adminhtml/templates/payment/info.phtml b/view/adminhtml/templates/payment/info.phtml index b2dcc7f5..b02b3232 100644 --- a/view/adminhtml/templates/payment/info.phtml +++ b/view/adminhtml/templates/payment/info.phtml @@ -37,6 +37,17 @@ echo '
'; echo $block->escapeHtml($option['label']); } + } elseif (stripos($payment->getMethod(), 'payzen_other') === 0) { + // Other payment means, show selected option. + $option = $payment->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::OTHER_OPTION); + if (is_string($option)) { + $option = @unserialize($option); + } + + if (is_array($option) && ! empty($option)) { + echo '
'; + echo $block->escapeHtml($option['label'] . ' (' . $option['means']. ')' ); + } } ?>

diff --git a/view/base/web/images/cc/oney.png b/view/base/web/images/cc/oney.png deleted file mode 100644 index 0aad89da2afd684fa178049f4e39cf3d63310a6b..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 20861 zcmV))K#ISKP)zZ9DHZ^|9b~Qdpwl!N4 z>}ovYo7ZfLYq3EX^u)-~g=Ln=E44&+u>~@UERa%Yfy8_Z&`lAYYles%GlXSX;7Fz= z=%xrtvjW`|J5y}opKOC|iFWW#XaWigvYWDNeac3p zl)bKce^;_C?%unGg&_jgLNT1q&?JE-3G3vW@<}SOz|~uq`G*dqt7-d^?b$lu z%}Vw6_9PqCBzf>jl5YCqQzPG)8PWxd!n^VhzPVk%xc%MnQD6_eyQe4K-rWl$cJ#&& zKW7Z~>8-k9vn2xhd-lPYfRUJXbP9w8=2(%m8q1Q_sc*XAXjjY$bHvyCo$&cS@uu(4 zO-JqQh2j3a@!I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.png b/view/base/web/images/oney-logo.png new file mode 100644 index 0000000000000000000000000000000000000000..2d2699b9523bcb1add86cee0ce3dfd424176224d GIT binary patch literal 2191 zcmV;A2ypj_P) z5^^Jf1V|uFOKyac#7-Q?_c*@9aeRpr+i^l{$Jh?B)9n=R5EB zzVGvX&wFvm%KzC#)&Z{rUI)AmcpdQf0&qAQm|v0&>a#m0-n%_{Shdg*2rtK1Vrd)V z@u(+gS6Ht1Xg}yw?c*4WZOfC9SRhk1BpqHu@8sbs;qzZ|o~ji5`j+3QCoXcF^6Mb z>D-OHA?hn+AeqA?NBhZ*iTzHmDb)tT$1|SC*K7vKW|EVG)ZZ`gJV1u^RpF>NDY@jI zyDWR<(?0SAlfb8fAxdXfA1UV(i%XLfi^jtvrsmv1T1kq+JQh)yzlp^ok(j5DO)23R zYVexsjMF=Fj7g3$pin^pwz{)x@#@(wHc8$< z?8>-Ljm~~!a*mmt3Z=QfMz|eTD)`SieA5X@p{X9GvHhz2b*+_ew2vvxeKjLL#t9)t z8e1P^*oHy~oZ=8rCKYg>?q67Mkh~CyhDan9Y?l8Czzj~IFXU$GN^;kbP$5SM7kyf6 zQ!n%uvo~U;g8#hU!K&o_F)5ai{8n8Yjrr+An?FGx#qG(DLQ$;56NUrfC9a_!(SZrQ zvllB0b7#@erV{qkN^5(ni)Odv^zc@wm=GS{dh67(2y& zu9&?!Z;;$n{{z~)l=(naG(<*cTcPNJ=$)dWpOg;2Sj5_Nn)4z)o#7GNvJRgZQ%8XI zya-OD=e9RwYnC2>&TI1b@j5Wsh>cbJH$k5?$!6L65WAuHEWQ%#oy-E@TG6&e-wd1v zgOWE23Qh}*Q!jMH;^A)fhloq1aIH28XUma#75tyuJ$kBWiDu6MJ=k9_-pMswu(~y+ zT;hv3ZmEwMoXl=z0qxMA-2qdBcqevtD39D(;x7lSwZc8EWBXCD1g6?~7awMF28h8f zhtdiGb-a?fw#@p3i*LM!XrANk4#$?hRh0wP73sT~V*R?KCkMz?>AqmpSwHeN+-Mm2 z3vcEeZ>A#k<`~ab3%9^}mwGRD85~mTJQ-weiBEAL9;_DZqS^;E+(Vnjqd%(l#yMjELt`)pp0C`@p<%0MXZ^+uO`@rS5bWZ%Ui1kyA4a^KR zh<8INtg5X;P?}3u6un*gz{a33-#}`dw_ItTH+B7H9qu~+im zDqwAZpGSHhaD&4roR?+4#4bF~=7%ktPt zpht5kj|Qo;iJ-KUL!GeF(x2JYaE+K+3x`NK_jP~7+@m`EU4WT1;Hv-}b<~Nd6TU1t zAh~l%JlBwUi)QPl?DrvY^cUgt8P2OVkGx-7iH+y^yP|RbeZVL`01VRGJZkhS@!aJK zAzAbrPjgY9n;F_#I^Xt3V&3cW5A*2*KQ&CuE+u&0qy0#;Fjyxh_xuK+EoP$!Qsu2n z{Vo8v$bX-i!{L~xWBfRDHje%kjJr8e^1lIt?ZN0h6cOZb(9&+V_#{G*&w2vSC+ME6v2{|}Z){nu$(zvA z(3YSJJtl8(1LU#ZEZgS^*{B-pk|kP*+}xHrlSE@drMVYr0-XwT3$o@>0QCQ09tE%`WW_6Mx(v=h=WR{l^j(qJB{w+4!}?kT0%_c?{5N`Ra_{WD;cRN4*np1J ztv;AOT1I1GwDlZ%#)41+1N?x29(9&KyqJ_mqq`(|_UM029n^3JKeSZqPiAZ!yV}PO zB{%}Am-BvAGE5y2bbhTkm>@zl9(Z)XI9SHysn3~|xuT>(CPlG!<;T9zV%iv5Cw}%M z4PntY``}sH=9y?!?11?MjcY`|(Ac`uX0*gyI%aM@$ET6RYDYikb9IV%$PccQ)-gDjTU%+&WK0VwoaH%Otsip zB_tEpwg+Z%yXviMYAoBHR!1^_EyaA{g=ozC(Ap4+y6N1AKU8u#c*o)vFZuOrp-B1U z^lDr|Q|2yYki)B53e02%-4mL3c-3fE-(?XKE64>xX%~jmJbXNV9&(Idf&w){OlGFX z|Mzex>N+pjiQMedo true + + true + true @@ -60,6 +63,12 @@ true + + true + + + true + diff --git a/view/frontend/layout/customer_account.xml b/view/frontend/layout/customer_account.xml new file mode 100644 index 00000000..7548a1ae --- /dev/null +++ b/view/frontend/layout/customer_account.xml @@ -0,0 +1,25 @@ + + + + + + + + + payzen/customer/index + My payment means + 140 + + + + + \ No newline at end of file diff --git a/view/frontend/layout/payzen_customer_index.xml b/view/frontend/layout/payzen_customer_index.xml new file mode 100644 index 00000000..21c28d46 --- /dev/null +++ b/view/frontend/layout/payzen_customer_index.xml @@ -0,0 +1,29 @@ + + + + + + + + + + + + + My payment means + + + + + + + \ No newline at end of file diff --git a/view/frontend/templates/customer/payment_means.phtml b/view/frontend/templates/customer/payment_means.phtml new file mode 100644 index 00000000..c53b2f01 --- /dev/null +++ b/view/frontend/templates/customer/payment_means.phtml @@ -0,0 +1,66 @@ +getStoredPaymentMeans(); + +?> + +
+ + + + + + + + + + + + getCcTypeImageSrc($card['brand'])): ?> + + + + + + + + + +
escapeHtml(__('Type')); ?>escapeHtml(__('Means of payment')); ?>escapeHtml(__('Action')); ?>
<?php echo $block->escapeHtml($card['brand']); ?> + escapeHtml($card['brand']); ?>escapeHtml($card['number']); ?> +
+ getBlockHtml('formkey'); ?> + + + +
+
+
+ +
escapeHtml(__('You have no stored payment means.')); ?>
+ \ No newline at end of file diff --git a/view/frontend/templates/payment/form/franfinance.phtml b/view/frontend/templates/payment/form/franfinance.phtml new file mode 100644 index 00000000..93d2f765 --- /dev/null +++ b/view/frontend/templates/payment/form/franfinance.phtml @@ -0,0 +1,44 @@ + + + \ No newline at end of file diff --git a/view/frontend/templates/payment/form/gift.phtml b/view/frontend/templates/payment/form/gift.phtml index cfcbefe3..44fc0d3a 100644 --- a/view/frontend/templates/payment/form/gift.phtml +++ b/view/frontend/templates/payment/form/gift.phtml @@ -36,11 +36,14 @@ $first = false; } ?> -
diff --git a/view/frontend/templates/payment/form/multi.phtml b/view/frontend/templates/payment/form/multi.phtml index b5abe950..942dd2b2 100644 --- a/view/frontend/templates/payment/form/multi.phtml +++ b/view/frontend/templates/payment/form/multi.phtml @@ -34,12 +34,16 @@ if ($block->isLocalCcType()) : } $first = false; - - $html .= ''; + $ccImageSrc = $block->getCcTypeImageSrc($code); + + $label = $ccImageSrc ? '' . $block->escapeHtml($label) . '' + : "" . $block->escapeHtml($label) . ""; + + $html .= ''; $html .= ''; } diff --git a/view/frontend/templates/payment/form/oney.phtml b/view/frontend/templates/payment/form/oney.phtml new file mode 100644 index 00000000..0cd62781 --- /dev/null +++ b/view/frontend/templates/payment/form/oney.phtml @@ -0,0 +1,44 @@ + + + \ No newline at end of file diff --git a/view/frontend/templates/payment/form/other.phtml b/view/frontend/templates/payment/form/other.phtml new file mode 100644 index 00000000..49c60fcd --- /dev/null +++ b/view/frontend/templates/payment/form/other.phtml @@ -0,0 +1,67 @@ +getAvailableMeans(); + +if ($block->regroupPaymentMeans()) : +?> + + + + + + \ No newline at end of file diff --git a/view/frontend/templates/payment/form/sepa.phtml b/view/frontend/templates/payment/form/sepa.phtml index 9f7ea0b0..4a025513 100644 --- a/view/frontend/templates/payment/form/sepa.phtml +++ b/view/frontend/templates/payment/form/sepa.phtml @@ -7,9 +7,61 @@ * @copyright Lyra Network * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ +$oneClickActive = $block->isOneClickActive(); // 1-Click enabled? +$customer = $block->getCurrentCustomer(); // Logged in customer. ?> \ No newline at end of file + +getCustomAttribute('payzen_sepa_identifier')) : ?> +
  • + escapeHtml(__('You will enter payment data after order confirmation.')); ?> +
  • +
  • + escapeHtml(__('OR')); ?> +
  • + +
    + + +
  • + + + escapeHtml(__('You will pay with your stored means of payment %s.')); ?> + +
  • + +
  • + escapeHtml(__('OR')); ?> +
  • + +
  • + + escapeHtml(__('Click here to pay with another means of payment.')); ?> + +
  • + + + +getCustomAttribute('payzen_sepa_identifier')) : ?> + + \ No newline at end of file diff --git a/view/frontend/templates/payment/form/standard.phtml b/view/frontend/templates/payment/form/standard.phtml index 8b9f0597..d2b82d80 100644 --- a/view/frontend/templates/payment/form/standard.phtml +++ b/view/frontend/templates/payment/form/standard.phtml @@ -8,7 +8,7 @@ * @license https://opensource.org/licenses/osl-3.0.php Open Software License (OSL 3.0) */ -$oneClickActive = $block->getConfigData('oneclick_active'); // 1-Click enabled ? +$oneClickActive = $block->isOneClickActive(); // 1-Click enabled? $customer = $block->getCurrentCustomer(); // Logged in customer. ?> @@ -31,20 +31,24 @@ if ($block->isLocalCcType()) : if ($single) { $html .= '' ; + . '" value="' . $block->escapeHtml($code) . '" name="payment[payzen_standard_cc_type]" />' ; } else { $html .= '' ; + . $block->escapeHtml($code) . '" name="payment[payzen_standard_cc_type]" />' ; } $first = false; + $ccImageSrc = $block->getCcTypeImageSrc($code); - $html .= ''; + $label = $ccImageSrc ? '' . $block->escapeHtml($label) . '' + : "" . $block->escapeHtml($label) . ""; + + $html .= ''; $html .= ''; $network = $block->getCcTypeNetwork($code); @@ -79,7 +83,7 @@ if ($oneClickActive && $customer && $customer->getCustomAttribute('payzen_identi
  • - escapeHtml(__('Click here to pay with your registered means of payment.')); ?> + escapeHtml(__('Click here to pay with your stored means of payment.')); ?>
  • @@ -87,7 +91,7 @@ if ($oneClickActive && $customer && $customer->getCustomAttribute('payzen_identi
  • - escapeHtml(__('You will pay with your registered means of payment %s. No data entry is needed.')); ?> + escapeHtml(__('You will pay with your stored means of payment %s.')); ?>
  • diff --git a/view/frontend/templates/payment/info.phtml b/view/frontend/templates/payment/info.phtml index 7128a960..4a1b1a5c 100644 --- a/view/frontend/templates/payment/info.phtml +++ b/view/frontend/templates/payment/info.phtml @@ -37,6 +37,17 @@ echo '
    '; echo $block->escapeHtml($option['label']); } + } elseif (stripos($payment->getMethod(), 'payzen_other') === 0) { + // Other payment means, show selected option. + $option = $payment->getAdditionalInformation(\Lyranetwork\Payzen\Helper\Payment::OTHER_OPTION); + if (is_string($option)) { + $option = @unserialize($option); + } + + if (isset($option) && is_array($option)) { + echo '
    '; + echo $block->escapeHtml($option['label'] . ' (' . $option['means'] . ')'); + } } ?>

    diff --git a/view/frontend/templates/payment/logo.phtml b/view/frontend/templates/payment/logo.phtml index e8927d26..debb086e 100644 --- a/view/frontend/templates/payment/logo.phtml +++ b/view/frontend/templates/payment/logo.phtml @@ -9,4 +9,4 @@ */ ?> -PayZen \ No newline at end of file +PayZen \ No newline at end of file diff --git a/view/frontend/web/css/payzen.css b/view/frontend/web/css/payzen.css index 324df62e..b3f1e06f 100644 --- a/view/frontend/web/css/payzen.css +++ b/view/frontend/web/css/payzen.css @@ -7,7 +7,11 @@ } .payzen-standard-cc-block { - display:none; + display: none; +} + +.payzen-sepa-cc-block { + display: none; } ul.payzen-identifier { @@ -19,7 +23,6 @@ a.payzen-payment-link { color: #39C; text-decoration: none; font-family: Georgia,Times,"Times New Roman",serif; - font-style: italic; font-size: 16px; } @@ -32,6 +35,15 @@ a.payzen-payment-link { float: left; width: 50%; } +.payzen-payment-option ul { + padding: 5px 5px; +} + + +.payzen-other fieldset div.field { + float: left; + width: 50%; +} .payzen_review .small { font-size: 10px; @@ -49,10 +61,43 @@ a.payzen-payment-link { border-bottom: 1px solid black; } -.payzen_review td.amount { +.payzen_review .payzen_bold { font-weight: bold; } .payzen_review td, .payzen_review th { padding: 5px 5px; +} + +button.kr-popin-button { + display: none !important; + width: 0; + height: 0; +} + +.payzen-card { + display: inline !important; +} + +.payzen-card img, .payzen-card span { + vertical-align: middle; + margin-right: 10px; +} + +.payzen-card img { + max-width: 90px; + max-height: 30px; +} + +.payzen-card span { + height: 30px; +} + +.payzen-confirm-delete { + max-width: 750px; + margin: auto; +} + +.payzen-confirm-delete .modal-footer { + text-align: right; } \ No newline at end of file diff --git a/view/frontend/web/js/customer/delete-widget.js b/view/frontend/web/js/customer/delete-widget.js new file mode 100644 index 00000000..780ebe41 --- /dev/null +++ b/view/frontend/web/js/customer/delete-widget.js @@ -0,0 +1,37 @@ +/** + * 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) + */ + +/*browser:true*/ +/*global define*/ +define([ + 'jquery', + 'Magento_Ui/js/modal/modalToggle', + 'mage/translate' +], function ($, modalToggle) { + 'use strict'; + + return function (config, deleteButton) { + config.buttons = [{ + text: $.mage.__('Cancel'), + class: 'action secondary cancel' + }, { + text: $.mage.__('Delete'), + class: 'action primary', + + /** + * Default action on button click. + */ + click: function (event) { + $(deleteButton.form).submit(); + } + }]; + + modalToggle(config, deleteButton); + }; +}); diff --git a/view/frontend/web/js/view/payment/method-renderer/payzen-abstract.js b/view/frontend/web/js/view/payment/method-renderer/payzen-abstract.js index 10a08fba..e0570beb 100644 --- a/view/frontend/web/js/view/payment/method-renderer/payzen-abstract.js +++ b/view/frontend/web/js/view/payment/method-renderer/payzen-abstract.js @@ -12,11 +12,57 @@ define( [ 'jquery', - 'Magento_Checkout/js/view/payment/default' + 'Magento_Checkout/js/view/payment/default', + 'mage/url' ], - function ($, Component) { + function ($, Component, url) { 'use strict'; + // Reload payment page to update Oney error message cookie. + $(window).on('hashchange', function(e) { + if ((window.location.hash === '#payment') && $('#payzen_oney').length) { + $('#payzen_oney_message').hide(); + $('#payment_form_payzen_oney').hide(); + window.location.reload(); + } + }); + + $(document).ready(function() { + setTimeout(function() { + var message = ''; + if ($('#payzen_oney').length) { + // Show Oney error message if any. + message = $.cookie('payzen_oney_error'); // Get error message from cookie. + + if (message) { + html = '
    ' + + '' + message + '
    '; + + $('#payzen_oney_message').html(html); + $('#payment_form_payzen_oney').hide(); + } + } + + var reloading = sessionStorage.getItem('reloading'); + if (reloading) { + sessionStorage.removeItem('reloading'); + + // Show success/fail message after deleting payment means. + message = sessionStorage.getItem('message'); + var success = sessionStorage.getItem('success'); + var identifier = sessionStorage.getItem('identifier'); + + var html = '
    ' + message + '
    '; + if (success === 'true') { + html = '
    ' + message + '
    '; + } + + $('#' + identifier).html(html); + $('#' + identifier).delay(2000).hide(0); + } + }, 1000); + }); + return Component.extend({ defaults: { redirectAfterPlaceOrder: false @@ -53,6 +99,10 @@ define( afterPlaceOrder: function () { // Order placed with payment_pending status, redirect to gateway. $.mage.redirect(this.getCheckoutRedirectUrl()); + }, + + getPaymentMeansUrl: function () { + return url.build('payzen/customer/index'); } }); } diff --git a/view/frontend/web/js/view/payment/method-renderer/payzen-franfinance.js b/view/frontend/web/js/view/payment/method-renderer/payzen-franfinance.js new file mode 100644 index 00000000..cdb05bb2 --- /dev/null +++ b/view/frontend/web/js/view/payment/method-renderer/payzen-franfinance.js @@ -0,0 +1,47 @@ +/** + * 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) + */ + +/*browser:true*/ +/*global define*/ +define( + [ + 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-abstract' + ], + function (Component) { + 'use strict'; + + return Component.extend({ + defaults: { + template: 'Lyranetwork_Payzen/payment/payzen-franfinance', + payzenFranfinanceOption: window.checkoutConfig.payment.payzen_franfinance.availableOptions ? + window.checkoutConfig.payment.payzen_franfinance.availableOptions[0]['key'] : null + }, + + initObservable: function () { + this._super().observe('payzenFranfinanceOption'); + return this; + }, + + getData: function () { + var data = this._super(); + data['additional_data']['payzen_franfinance_option'] = this.payzenFranfinanceOption(); + + return data; + }, + + showLabel: function () { + return true; + }, + + getAvailableOptions: function () { + return window.checkoutConfig.payment.payzen_franfinance.availableOptions; + } + }); + } +); diff --git a/view/frontend/web/js/view/payment/method-renderer/payzen-gift.js b/view/frontend/web/js/view/payment/method-renderer/payzen-gift.js index ed64b413..3f178fee 100644 --- a/view/frontend/web/js/view/payment/method-renderer/payzen-gift.js +++ b/view/frontend/web/js/view/payment/method-renderer/payzen-gift.js @@ -11,11 +11,9 @@ /*global define*/ define( [ - 'jquery', - 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-abstract', - 'Magento_Checkout/js/model/full-screen-loader' + 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-abstract' ], - function ($, Component, fullScreenLoader) { + function (Component) { 'use strict'; return Component.extend({ diff --git a/view/frontend/web/js/view/payment/method-renderer/payzen-multi.js b/view/frontend/web/js/view/payment/method-renderer/payzen-multi.js index dd43fc9c..99432be4 100644 --- a/view/frontend/web/js/view/payment/method-renderer/payzen-multi.js +++ b/view/frontend/web/js/view/payment/method-renderer/payzen-multi.js @@ -36,7 +36,7 @@ define( getData: function () { var data = this._super(); - if (this.getEntryMode() == 2) { + if (this.getEntryMode() == 2) { // Payment means selection on merchant site. data['additional_data']['payzen_multi_cc_type'] = this.payzenCcType(); } diff --git a/view/frontend/web/js/view/payment/method-renderer/payzen-oney.js b/view/frontend/web/js/view/payment/method-renderer/payzen-oney.js new file mode 100644 index 00000000..403f59e9 --- /dev/null +++ b/view/frontend/web/js/view/payment/method-renderer/payzen-oney.js @@ -0,0 +1,60 @@ +/** + * 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) + */ + +/*browser:true*/ +/*global define*/ +define( + [ + 'jquery', + 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-abstract' + ], + function ($, Component) { + 'use strict'; + + return Component.extend({ + defaults: { + template: 'Lyranetwork_Payzen/payment/payzen-oney', + payzenOneyOption: window.checkoutConfig.payment.payzen_oney.availableOptions ? + window.checkoutConfig.payment.payzen_oney.availableOptions[0]['key'] : null + }, + + initObservable: function () { + this._super().observe('payzenOneyOption'); + return this; + }, + + getData: function () { + var data = this._super(); + data['additional_data']['payzen_oney_option'] = this.payzenOneyOption(); + + return data; + }, + + showLabel: function () { + return true; + }, + + getAvailableOptions: function () { + return window.checkoutConfig.payment.payzen_oney.availableOptions; + }, + + getErrorMessage: function () { + return $.cookie('payzen_oney_error'); + }, + + isPlaceOrderActionAllowed: function () { + if ($.cookie('payzen_oney_error')) { + return false; + } else { + return this._super(); + } + } + }); + } +); diff --git a/view/frontend/web/js/view/payment/method-renderer/payzen-other.js b/view/frontend/web/js/view/payment/method-renderer/payzen-other.js new file mode 100644 index 00000000..19c318f3 --- /dev/null +++ b/view/frontend/web/js/view/payment/method-renderer/payzen-other.js @@ -0,0 +1,86 @@ +/** + * 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) + */ + +/*browser:true*/ +/*global define*/ +define( + [ + 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-abstract', + 'Magento_Checkout/js/action/select-payment-method', + 'Magento_Checkout/js/checkout-data' + ], + function ( + Component, + selectPaymentMethodAction, + checkoutData + ) { + 'use strict'; + + return Component.extend({ + defaults: { + template: 'Lyranetwork_Payzen/payment/payzen-other', + payzenOtherOption: window.checkoutConfig.payment.payzen_other.availableOptions ? + window.checkoutConfig.payment.payzen_other.availableOptions[0]['key'] : null, + }, + + initObservable: function () { + this._super(); + this.observe('payzenOtherOption'); + + return this; + }, + + getData: function () { + var data = this._super(); + + data['additional_data']['payzen_other_option'] = this.payzenOtherOption(); + + return data; + }, + + /** + * Get payment method code + */ + getOptionCode: function (option) { + return this.getCode() + '_' + option; + }, + + /** + * Get payment method data + */ + getOptionData: function (method) { + var data = this.getData(); + data['method'] = method; + + return data; + }, + + selectOptionPaymentMethod: function (option) { + var method = this.getCode() + '_' + option; + + selectPaymentMethodAction(this.getOptionData(method)); + checkoutData.setSelectedPaymentMethod(method); + + return true; + }, + + showLabel: function () { + return true; + }, + + getAvailableOptions: function () { + return window.checkoutConfig.payment.payzen_other.availableOptions; + }, + + getRegroupMode: function () { + return window.checkoutConfig.payment.payzen_other.regroupMode; + } + }); + } +); diff --git a/view/frontend/web/js/view/payment/method-renderer/payzen-paypal.js b/view/frontend/web/js/view/payment/method-renderer/payzen-paypal.js index d62122e4..c0ef25f4 100644 --- a/view/frontend/web/js/view/payment/method-renderer/payzen-paypal.js +++ b/view/frontend/web/js/view/payment/method-renderer/payzen-paypal.js @@ -11,11 +11,9 @@ /*global define*/ define( [ - 'jquery', - 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-abstract', - 'Magento_Checkout/js/model/full-screen-loader' + 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-abstract' ], - function ($, Component, fullScreenLoader) { + function (Component) { 'use strict'; return Component.extend({ diff --git a/view/frontend/web/js/view/payment/method-renderer/payzen-sepa.js b/view/frontend/web/js/view/payment/method-renderer/payzen-sepa.js index f0ee1f95..9619cc27 100644 --- a/view/frontend/web/js/view/payment/method-renderer/payzen-sepa.js +++ b/view/frontend/web/js/view/payment/method-renderer/payzen-sepa.js @@ -12,15 +12,45 @@ define( [ 'jquery', - 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-abstract', - 'Magento_Checkout/js/model/full-screen-loader' + 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-abstract' ], - function ($, Component, fullScreenLoader) { + function ($, Component) { 'use strict'; return Component.extend({ defaults: { template: 'Lyranetwork_Payzen/payment/payzen-sepa', + payzenUseIdentifier: 1, + }, + + initObservable: function () { + this._super(); + this.observe('payzenUseIdentifier'); + + return this; + }, + + getData: function () { + var data = this._super(); + + if (this.isOneClick()) { + data['additional_data']['payzen_sepa_use_identifier'] = this.payzenUseIdentifier(); + } + + return data; + }, + + isOneClick: function () { + return window.checkoutConfig.payment[this.item.method].oneClick || false; + }, + + getMaskedPan: function () { + return window.checkoutConfig.payment[this.item.method].maskedPan || null; + }, + + updatePaymentBlock: function (blockName) { + $('.payment-method._active .payment-method-content .payzen-identifier li.payzen-sepa-block').hide(); + $('li.payzen-sepa-' + blockName + '-block').show(); }, }); } diff --git a/view/frontend/web/js/view/payment/method-renderer/payzen-standard.js b/view/frontend/web/js/view/payment/method-renderer/payzen-standard.js index 095902fd..88e3ee8d 100644 --- a/view/frontend/web/js/view/payment/method-renderer/payzen-standard.js +++ b/view/frontend/web/js/view/payment/method-renderer/payzen-standard.js @@ -139,7 +139,7 @@ define( data['additional_data']['payzen_standard_use_identifier'] = this.payzenUseIdentifier(); } - if (this.getEntryMode() == 2) { + if (this.getEntryMode() == 2) { // Payment means selection on merchant site. data['additional_data']['payzen_standard_cc_type'] = this.payzenCcType(); } @@ -220,15 +220,19 @@ define( placeOrderClick: function () { var me = this; - if ((me.getEntryMode() == 4) && me.getRestFormToken()) { + if (((me.getEntryMode() == 4) || (me.getEntryMode() == 5)) && me.getRestFormToken()) { + // Embedded or popin mode. $('#payzen_rest_form .kr-form-error').html(''); if (!additionalValidators.validate()) { return; } - fullScreenLoader.startLoader(); - me.isPlaceOrderActionAllowed(false); + var isPopin = $('.kr-popin-button').length > 0; + if (!isPopin) { + fullScreenLoader.startLoader(); + me.isPlaceOrderActionAllowed(false); + } var newPayload = JSON.stringify({ cartId: quote.getQuoteId(), @@ -238,7 +242,11 @@ define( }); if (me.payload && (me.payload === newPayload)) { - KR.submit(); + if (isPopin) { + KR.openPopin(); + } else { + KR.submit(); + } } else { me.payload = newPayload; @@ -270,7 +278,11 @@ define( }).then( function(v) { var KR = v.KR; - KR.submit(); + if ($('.kr-popin-button').length > 0) { + KR.openPopin(); + } else { + KR.submit(); + } } ); } else { @@ -325,7 +337,7 @@ define( afterPlaceOrder: function () { var me = this; - if (me.getEntryMode() == 3) { + if (me.getEntryMode() == 3) { // Iframe mode. // Iframe mode. fullScreenLoader.stopLoader(); diff --git a/view/frontend/web/js/view/payment/payzen-payments.js b/view/frontend/web/js/view/payment/payzen-payments.js index 6ec07d9e..59735948 100644 --- a/view/frontend/web/js/view/payment/payzen-payments.js +++ b/view/frontend/web/js/view/payment/payzen-payments.js @@ -10,7 +10,8 @@ define( [ 'uiComponent', - 'Magento_Checkout/js/model/payment/renderer-list' + 'Magento_Checkout/js/model/payment/renderer-list', + 'Magento_Checkout/js/view/payment/default' ], function (Component, rendererList) { 'use strict'; @@ -31,6 +32,10 @@ define( type: 'payzen_choozeo', component: 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-choozeo' }, + { + type: 'payzen_oney', + component: 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-oney' + }, { type: 'payzen_fullcb', component: 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-fullcb' @@ -42,6 +47,14 @@ define( { type: 'payzen_paypal', component: 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-paypal' + }, + { + type: 'payzen_franfinance', + component: 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-franfinance' + }, + { + type: 'payzen_other', + component: 'Lyranetwork_Payzen/js/view/payment/method-renderer/payzen-other' } ); diff --git a/view/frontend/web/template/payment/payzen-choozeo.html b/view/frontend/web/template/payment/payzen-choozeo.html index af3bfabb..1e492a00 100644 --- a/view/frontend/web/template/payment/payzen-choozeo.html +++ b/view/frontend/web/template/payment/payzen-choozeo.html @@ -17,12 +17,13 @@ data-bind="attr: {id: getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()" /> diff --git a/view/frontend/web/template/payment/payzen-franfinance.html b/view/frontend/web/template/payment/payzen-franfinance.html new file mode 100644 index 00000000..f85a1a9b --- /dev/null +++ b/view/frontend/web/template/payment/payzen-franfinance.html @@ -0,0 +1,87 @@ + + +
    +
    + + +
    + +
    + + + +
    + + + +
    + +
    +
    + +
    +
      + +
    • + + + +
    • + +
    +
    + +
    +
    + +
    + + + +
    + +
    +
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/view/frontend/web/template/payment/payzen-fullcb.html b/view/frontend/web/template/payment/payzen-fullcb.html index 8bbb363f..f60490a7 100644 --- a/view/frontend/web/template/payment/payzen-fullcb.html +++ b/view/frontend/web/template/payment/payzen-fullcb.html @@ -17,12 +17,13 @@ data-bind="attr: {id: getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()" /> @@ -41,7 +42,7 @@
    -
      +
      • - + - +
        - + @@ -92,12 +93,12 @@ - + - + diff --git a/view/frontend/web/template/payment/payzen-gift.html b/view/frontend/web/template/payment/payzen-gift.html index 67d5534f..1eb610c7 100644 --- a/view/frontend/web/template/payment/payzen-gift.html +++ b/view/frontend/web/template/payment/payzen-gift.html @@ -17,12 +17,13 @@ data-bind="attr: {id: getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()" />
    diff --git a/view/frontend/web/template/payment/payzen-multi.html b/view/frontend/web/template/payment/payzen-multi.html index 5b9bb6cb..d4e782d1 100644 --- a/view/frontend/web/template/payment/payzen-multi.html +++ b/view/frontend/web/template/payment/payzen-multi.html @@ -17,12 +17,13 @@ data-bind="attr: {id: getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()" />
    @@ -50,7 +51,7 @@
    -
      +
    - + diff --git a/view/frontend/web/template/payment/payzen-oney.html b/view/frontend/web/template/payment/payzen-oney.html new file mode 100644 index 00000000..160cba06 --- /dev/null +++ b/view/frontend/web/template/payment/payzen-oney.html @@ -0,0 +1,88 @@ + + +
    +
    + + +
    + +
    +
    + + + + + +
    + + + +
    + +
    +
    +
    +
      + +
    • + + +
    • + +
    +
    +
    +
    + +
    + + + +
    + +
    +
    + +
    +
    + +
    +
    \ No newline at end of file diff --git a/view/frontend/web/template/payment/payzen-other-grouped.html b/view/frontend/web/template/payment/payzen-other-grouped.html new file mode 100644 index 00000000..f58b617d --- /dev/null +++ b/view/frontend/web/template/payment/payzen-other-grouped.html @@ -0,0 +1,92 @@ + + +
    +
    + + +
    + +
    + + + +
    + + + +
    + +
    +
    + + +
    +
      + +
    • + + +
    • + +
    +
    +
    +
    + +
    + + + +
    + +
    +
    + +
    +
    +
    +
    \ No newline at end of file diff --git a/view/frontend/web/template/payment/payzen-other-separated.html b/view/frontend/web/template/payment/payzen-other-separated.html new file mode 100644 index 00000000..2627f66a --- /dev/null +++ b/view/frontend/web/template/payment/payzen-other-separated.html @@ -0,0 +1,71 @@ + + +
    +
    + + + + + +
    + +
    + + + +
    + + + +
    + +
    + + + +
    + +
    +
    + + +
    +
    +
    +
    + \ No newline at end of file diff --git a/view/frontend/web/template/payment/payzen-other.html b/view/frontend/web/template/payment/payzen-other.html new file mode 100644 index 00000000..aed06050 --- /dev/null +++ b/view/frontend/web/template/payment/payzen-other.html @@ -0,0 +1,18 @@ + + + + + + + + + \ No newline at end of file diff --git a/view/frontend/web/template/payment/payzen-paypal.html b/view/frontend/web/template/payment/payzen-paypal.html index c2de6e33..9f373f10 100644 --- a/view/frontend/web/template/payment/payzen-paypal.html +++ b/view/frontend/web/template/payment/payzen-paypal.html @@ -17,12 +17,13 @@ data-bind="attr: {id: getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()" /> diff --git a/view/frontend/web/template/payment/payzen-sepa.html b/view/frontend/web/template/payment/payzen-sepa.html index 3a8f3ea1..d6dab627 100644 --- a/view/frontend/web/template/payment/payzen-sepa.html +++ b/view/frontend/web/template/payment/payzen-sepa.html @@ -15,14 +15,15 @@ name="payment[method]" class="radio" data-bind="attr: {id: getCode()}, value: getCode(), checked: isChecked, click: selectPaymentMethod, visible: isRadioButtonVisible()" /> -
  • + + escapeHtml(__('Click here to pay with your stored means of payment.')); ?> + +