Changeset 3185787
- Timestamp:
- 11/11/2024 02:13:33 PM (15 months ago)
- Location:
- nexi-xpay-build
- Files:
-
- 63 added
- 12 edited
-
tags/7.4.0 (added)
-
tags/7.4.0/README.md (added)
-
tags/7.4.0/assets (added)
-
tags/7.4.0/assets/css (added)
-
tags/7.4.0/assets/css/xpay-admin.css (added)
-
tags/7.4.0/assets/css/xpay.css (added)
-
tags/7.4.0/assets/images (added)
-
tags/7.4.0/assets/images/logo.jpg (added)
-
tags/7.4.0/assets/js (added)
-
tags/7.4.0/assets/js/pagodil-sticker.min.js (added)
-
tags/7.4.0/assets/js/xpay-admin.js (added)
-
tags/7.4.0/assets/js/xpay-build-npg.js (added)
-
tags/7.4.0/assets/js/xpay-build.js (added)
-
tags/7.4.0/assets/js/xpay.js (added)
-
tags/7.4.0/lang (added)
-
tags/7.4.0/lang/woocommerce-gateway-nexi-xpay-el.mo (added)
-
tags/7.4.0/lang/woocommerce-gateway-nexi-xpay-el.po (added)
-
tags/7.4.0/lang/woocommerce-gateway-nexi-xpay-it_IT.mo (added)
-
tags/7.4.0/lang/woocommerce-gateway-nexi-xpay-it_IT.po (added)
-
tags/7.4.0/src (added)
-
tags/7.4.0/src/autoload.php (added)
-
tags/7.4.0/src/classes (added)
-
tags/7.4.0/src/classes/Nexi (added)
-
tags/7.4.0/src/classes/Nexi/CapToStateCode.php (added)
-
tags/7.4.0/src/classes/Nexi/Iso3166.php (added)
-
tags/7.4.0/src/classes/Nexi/Log.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_3DS20_Data_Provider.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Admin_Page.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Build_Token.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_Admin.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_NPG_API.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_NPG_APM.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_NPG_Cards.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_NPG_Cards_Build.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_NPG_Currency.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_NPG_Generic_Method.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_NPG_Lock_Handler.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_NPG_Process_Completion.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_XPay_API.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_XPay_APM.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_XPay_Cards.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_XPay_Generic_Method.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Gateway_XPay_Process_Completion.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Klarna_Data_Provider.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_NPG_3DS20_Data_Provider.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_NPG_Token.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Nexi_Db.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Nexi_Helper.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Pagodil_Configuration.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Pagodil_Data_Provider.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Pagodil_Widget.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Pending_Status.php (added)
-
tags/7.4.0/src/classes/Nexi/WC_Save_Order_Meta.php (added)
-
tags/7.4.0/templates (added)
-
tags/7.4.0/templates/build_preview.php (added)
-
tags/7.4.0/templates/npg_build_payment.php (added)
-
tags/7.4.0/templates/npg_payment_detail.php (added)
-
tags/7.4.0/templates/pagodil_checkout.php (added)
-
tags/7.4.0/templates/xpay_payment_detail.php (added)
-
tags/7.4.0/woocommerce-gateway-nexi-xpay.php (added)
-
trunk/README.md (modified) (4 diffs)
-
trunk/assets/css/xpay.css (modified) (3 diffs)
-
trunk/assets/js/xpay.js (modified) (2 diffs)
-
trunk/lang/woocommerce-gateway-nexi-xpay-it_IT.po (modified) (1 diff)
-
trunk/src/classes/Nexi/WC_Gateway_NPG_API.php (modified) (2 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_NPG_Cards_Build.php (modified) (3 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_NPG_Generic_Method.php (modified) (1 diff)
-
trunk/src/classes/Nexi/WC_Gateway_NPG_Process_Completion.php (modified) (1 diff)
-
trunk/src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php (modified) (3 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_XPay_API.php (modified) (2 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_XPay_Process_Completion.php (modified) (1 diff)
-
trunk/src/classes/Nexi/WC_Klarna_Data_Provider.php (added)
-
trunk/woocommerce-gateway-nexi-xpay.php (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
nexi-xpay-build/trunk/README.md
r3118320 r3185787 1 1 === Nexi XPay Build === 2 Contributors: Nexi Payments SpA3 Tags: nexi, nexi payments, xpay, payment gateway, e-commerce , ecommerce, woocommerce nexi, x-pay, xpay, x-pay easy, x-pay pro, payment, card payments, e-commerce payment gateway, online shop, shopping cart, virtual POS, woocommerce payment gateway, wordpress payment gateway, Nexi credit card, Nexi payment2 Contributors: Nexi Payments 3 Tags: nexi, nexi payments, xpay, payment gateway, e-commerce 4 4 Author URI: https://ecommerce.nexi.it 5 5 Author: Nexi Payments SpA 6 Requires at least: 4. 4.07 Tested up to: 6. 5.46 Requires at least: 4.6 7 Tested up to: 6.6.2 8 8 WC Requires at least: 2.7.0 9 WC Tested up to: 8.9.310 Stable tag: 7. 3.49 WC Tested up to: 9.3.3 10 Stable tag: 7.4.0 11 11 License: GNU General Public License v3.0 12 12 License URI: http://www.gnu.org/licenses/gpl-3.0.html 13 13 14 XPay is the payment gateway provided by Nexi, a leading group in Italy with the goal of shaping the future of digital payments. 15 14 16 == Description == 15 17 16 Questo modulo permette di collegare il tuo sito e-commerce al gateway di pagamento XPay. 17 XPay è il servizio di Nexi che ti consente di accettare i pagamenti online e mobile in modo semplice e veloce.18 19 XPay è il gateway di pagamento di Nexi, gruppo leader in Italia con lo scopo di costruire il futuro dei pagamenti digitali.20 21 Nexi parte da un posizionamento consolidato sul mercato, che le permette di gestire, 44 mln di carte di pagamento, transazioni per un totale di 186 miliardi di euro, 860 mila punti vendita convenzionati in Italia, di cui oltre 18 mila ecommerce che utilizzano il gateway di pagamento XPay.22 23 XPay ti permette di accettare pagamenti online, è aperto a tutti i circuiti di pagamento più diffusi ed è in grado di gestire tutti i canali di vendita (e-commerce, mobile).24 25 L’estensione XPay per Wordpress/WooCommerce, ti permette di integrare il gateway di pagamento XPay senza ulteriori implementazioni sul tuo sito. Gestisce il passaggio del cliente dal tuo sito all’ambiente sicuro Nexi e viceversa. Il cliente resta sul tuo e-commerce fino al momento del checkout e viene poi reindirizzato in ambiente sicuro Nexi per effettuare il pagamento. Non devi gestire nessun tipo di dato sensibile.26 27 L’estensione è costantemente aggiornata con le evoluzioni e i miglioramenti diXPay.28 29 ** Per utilizzare l’estensione, è necessario un account XPay: puoi ottenere il tuo account facilmente e completamente online al sitohttps://ecommerce.nexi.it/.**30 31 == Funzionalità del modulo XPay==32 33 - ** Pagamento Semplice:** reindirizzamento del cliente al gateway di pagamento sicuro di Nexi.34 - ** Pagamento OneClick:** consente al cliente finale di memorizzare i dati della propria carta di credito, ed utilizzarli successivamente per effettuare gli acquisti con un soloclick.35 - ** Pagamento Ricorrente**: consente all'esercente di tokenizzare i dati della carta del cliente, in modo da poter effettuare domiciliazioni e ricorrenze per abbonamenti o altri servizi. Per poter abilitare i pagamenti ricorrenti è necessario installare l’estensione WooCommerce Subscriptions.36 - **Pay-By-Link :** permette di inviare al cliente via mail o tramite social un link che rimanda alla pagina di pagamento.37 - ** Gestione delle transazioni** sui circuiti internazionali **Visa**, **Mastercard**, Visa Electron, V-Pay, Maestro, **American Express**.38 - **Acce ttazione di sistemi di pagamento alternativi** (**PayPal**, Amazon Pay, **Apple Pay**, **Google Pay**, **Bancomat Pay**, MyBank, iDeal, Bancontact, GiroPay ecc…)39 - **Easy checkout:** interfaccia di pagamento semplice e intuitiva (pagina di cassa Nexi con logo dell’esercente)40 - ** Area di test:** permette di testare il corretto funzionamento del modulo, utilzzando parmetri e carte fittizie, senza dover effettuare transazioni reali.41 - **Multilingua :** riconosce la lingua del portale dell’esercente, e automaticamente la imposta nella pagina di cassa di XPay.42 - ** Gestione Contabilizzazione:** possibilità di configurazione della modalità di incasso, totale o parziale, immediata o differita, direttamente dal modulo.43 - ** Operazioni di back-office:** permette di effettuare operazione di storno e annullo direttamente dalla gestione ordine del CMS senza la necessità di accedere al backoffice di XPay.44 - **3D Secure 2:** adottato dai principali circuiti internazionali (Visa, MasterCard, American Express), introduce nuovi metodi di autenticazione, in grado di migliorare e velocizzare l'esperienza di acquisto del titolare della carta.45 46 47 * In base al tuo convenzionamento e alla configurazione impostata per il plug-in, la disponibilità delle funzionalità di XPay potrebbe cambiare. Per maggiori informazioni ti invitiamo a consultare le specifiche tecniche presenti nel portale sviluppatori del servizio sottoscritto. Trovi il link delle specifiche tecniche nella welcome mail ricevuta all’attivazione del servizio.*48 49 50 Per ulteriori informazioni consulta il sito https://ecommerce.nexi.it 18 This module allows you to connect your e-commerce website to the XPay payment gateway. 19 XPay is Nexi's service that enables you to accept online and mobile payments easily and quickly. 20 21 XPay is the payment gateway provided by Nexi, a leading group in Italy with the goal of shaping the future of digital payments. 22 23 Nexi has a strong market position, managing 44 million payment cards and processing transactions totaling 186 billion euros. It has 860,000 affiliated points of sale in Italy, including over 18,000 e-commerce platforms that use the XPay payment gateway. 24 25 XPay allows you to accept online payments and is compatible with all major payment circuits. It can handle all sales channels, including e-commerce and mobile. 26 27 The XPay extension for Wordpress/WooCommerce enables you to integrate the XPay payment gateway into your website without additional implementations. It manages the customer's transition from your website to the secure Nexi environment and vice versa. The customer remains on your e-commerce site until the checkout process and is then redirected to the secure Nexi environment for payment. You don't need to handle any sensitive data. 28 29 The extension is regularly updated to incorporate the advancements and improvements of XPay. 30 31 **To use the extension, you need an XPay account, which you can easily obtain online at https://ecommerce.nexi.it/.** 32 33 == XPay Module Features == 34 35 - **Simple Payment**: Redirects the customer to Nexi's secure payment gateway. 36 - **One-Click Payment**: Allows the end customer to store their credit card data and use it for future purchases with a single click. 37 - **Recurring Payment**: Enables the merchant to tokenize the customer's card data, allowing for recurring billing and subscriptions. To enable recurring payments, you need to install the WooCommerce Subscriptions extension. 38 - **Pay-By-Link**: Enables sending a payment link to the customer via email or social media. 39 - **Transaction Management**: Supports international payment circuits such as Visa, Mastercard, Visa Electron, V-Pay, Maestro, American Express. 40 - **Acceptance of Alternative Payment Systems**: (PayPal, Amazon Pay, Apple Pay, Google Pay, Bancomat Pay, MyBank, iDeal, Bancontact, GiroPay, etc.) 41 - **Easy Checkout**: Provides a simple and intuitive payment interface (Nexi checkout page with merchant logo). 42 - **Testing Area**: Allows testing the module's functionality using dummy parameters and cards, without conducting real transactions. 43 - **Multilingual Support**: Recognizes the language of the merchant's portal and automatically sets it in the XPay checkout page. 44 - **Accounting Management**: Allows configuring the collection mode (total or partial, immediate or deferred) directly from the module. 45 - **Back-Office Operations**: Enables refund and cancellation operations directly from the CMS order management, without accessing the XPay back office. 46 - **3D Secure 2**: Implemented by major international circuits (Visa, MasterCard, American Express), introduces new authentication methods to enhance and expedite the cardholder's purchasing experience. 47 48 49 *Depending on your agreement and plugin configuration, the availability of XPay features may vary. For more information, please consult the technical specifications in the subscribed service's developer portal. You can find the link to the technical specifications in the welcome email received upon service activation.* 50 51 52 For more information, please visit https://ecommerce.nexi.it. 51 53 52 54 == Installation == 53 1. Controlla la compatibilità del plugin Nexi XPay con la versione di Woocommerce/Wordpress installata nel tuo sito 54 2. Vai nell'area amministrativa di WordPress e fai clic su Plugin » Aggiungi nuovo. 55 3. Clicca sul pulsante Carica plugin nella parte superiore della pagina 56 4. Cerca il file .zip del plugin nel tuo computer. 57 5. Clicca sul pulsante Installa ora e attiva il plugin tramite il pulsante di attivazione. 58 6. Per il corretto funzionamento del plugin è necessario che nel server sia attiva l'estensione PHP bcmath. Nel caso venga mostrato l'errore della mancanza di questa estensione nel back office Wordpress, contattare l'hosting del sito. 59 60 = English = 61 1. Check the compatibility of the Nexi XPay plugin with the version of Woocommerce/Wordpress installed on your site 62 2. Go to your WordPress admin area and click on Plugins » Add New. 63 3. Click on the Upload Plugin button on top of the page. 55 56 1. Check the compatibility of the Nexi XPay plugin with the version of Woocommerce/Wordpress installed on your site. 57 2. Go to your WordPress admin area and click on "Plugins » Add New." 58 3. Click on the "Upload Plugin" button at the top of the page. 64 59 4. Browse for the plugin .zip file on your computer. 65 5. Click on the install now button and then hit the activate button. 66 6. For the plugin to work correctly, the bcmath PHP extension must be active on the server. In case the error of missing this extension is shown in the Wordpress back office, contact the hosting of the site. 67 68 == Configurazione == 69 1. Vai nelle impostazioni di WooCommerce e clicca su "Pagamenti". 70 2. Clicca su Nexi XPay per procedere con la configurazione. 71 3. Abilita il metodo di pagamento. 72 4. Scegliere tra le opzioni Alias – Chiave Mac oppure APIKey in base al servizio sottoscritto. 73 5. Abilita/Disabilita la modalità di test per testare il modulo con le credenziali di test fornite da Nexi. 74 6. Cliccare su Salva. 75 76 **Aggiungere/rimuovere metodi di pagamento alternativi** 77 Per aggiungere o rimuovere metodi di pagamento alternativi è necessario accedere al back office XPay. Se si effettuano delle modifiche, è necessario eseguire un salvataggio nella configurazione del modulo XPay in modo da aggiornare i metodi di pagamento. 60 5. Click on the "Install Now" button and then activate the plugin using the activation button. 61 6. For the plugin to work correctly, the bcmath PHP extension must be active on the server. If you see an error indicating the absence of this extension in the WordPress back office, please contact your site's hosting provider. 62 63 == Configuration == 64 65 1. Go to the WooCommerce settings and click on "Payments." 66 2. Click on Nexi XPay to proceed with the configuration. 67 3. Enable the payment method. 68 4. Choose between the options Alias - MAC Key or API Key based on the subscribed service. 69 5. Enable/Disable the test mode to test the module using the test credentials provided by Nexi. 70 6. Click on Save. 71 72 **Adding/Removing Alternative Payment Methods** 73 To add or remove alternative payment methods, you need to access the XPay back office. After making any changes, save the XPay module configuration to update the payment methods. 78 74 79 75 **Bancomat Pay** 80 Il plugin aggiorna lo stato degli ordini tramite una notifica inviata dai server Nexi, se il modulo non riceve la notifica correttamente, non sarà in grado di aggiornare lo stato. 81 Di default, in caso di problemi sulla notifica (sito non raggiungibile, errore ricevuti dal sito dell'esercente), la transazione viene annullata, anche se il pagamento si conclude con esito positivo. Questo comportamento permette che lo stato delle transazioni Nexi sia allineato con lo stato degli ordini nel CMS. 82 L'opzione di annullo transazione in caso di notifica fallita, non è disponibile con il metodo di pagamento Bancomat Pay: in caso di anomalie sulla notifica ci potrebbero quindi essere dei disallinemaneti tra lo stato dell'ordine restituito dal plugin e lo stato effettivo della transazione lato Nexi. Si potrebbe quindi riscontrare il seguente scenario: il pagamento lato Bancomat Pay viene effettuato correttamente con esito positivo, ma a causa di un problema sulla notifica il plugin non è in grado di aggiornare lo stato dell'ordine mettendolo in elaborazione. 83 Con questo metodo di pagamento non è previsto lo storno delle transazioni: in caso di rimborso l'esercente dovrà procedere con bonifico o altro metodo.76 The plugin updates the order status through a notification sent by Nexi's servers. If the module doesn't receive the notification correctly, it won't be able to update the status. 77 By default, in case of notification issues (unreachable site, errors received from the merchant's site), the transaction is canceled, even if the payment is successfully completed. This behavior ensures that the status of Nexi transactions aligns with the order status in the CMS. 78 The option to cancel the transaction in case of failed notification is not available with the Bancomat Pay payment method. In case of notification anomalies, there might be discrepancies between the order status returned by the plugin and the actual transaction status on the Nexi side. Therefore, the following scenario may occur: the Bancomat Pay payment is successfully made with a positive outcome, but due to a notification problem, the plugin is unable to update the order status to "Processing." 79 This payment method doesn't support transaction refunds. In case of a refund, the merchant will need to proceed with a bank transfer or another method. 84 80 85 81 … … 243 239 = 7.1.1 = 244 240 * Fixed - Minor issues 245 246 = 7.1.2 = 247 * Fixed - Minor issues 248 241 249 242 = 7.2.0 = 250 243 * Added - OneClick feature via Api-Key … … 252 245 * Added - Multicurrency support for Payment Cards via Api-Key 253 246 * Added - Multilanguage feature via Api-Key, keeps the language (if supported) between the shop and the payment gateway 254 247 255 248 = 7.2.1 = 256 249 * Fixed - installation issue 257 250 258 251 = 7.2.2 = 259 252 * Fixed - Minor issues … … 281 274 = 7.3.4 = 282 275 * Fixed - Minor issues 276 277 = 7.4.0 = 278 * Added - New payment methods HeyLight, Klarna, PayPal Pay in 3 Installments 279 * Fixed - Minor issues -
nexi-xpay-build/trunk/assets/css/xpay.css
r3087872 r3185787 20 20 #payment .payment_methods li[class*="payment_method_xpay"] label img:where([src*="google-pay"]) { 21 21 transform: scale(2); 22 }23 24 #payment .payment_methods li[class*="payment_method_xpay"] label img:where([src*="pagolight"]) {25 transform: scale(2.5);26 22 } 27 23 … … 56 52 57 53 #payment .payment_methods .nexixpay-loghi-container div.img-container { 54 width: 100%; 58 55 max-width: 50px; 59 56 max-height: 50px; … … 107 104 height: 50px; 108 105 border: none; 106 width: 100%; 109 107 } 110 108 -
nexi-xpay-build/trunk/assets/js/xpay.js
r3017117 r3185787 10 10 */ 11 11 12 function checkApplePay($) { 13 if (!window.ApplePaySession) { 14 if ($(".payment_method_xpay_applepay").length) { 15 $(".payment_method_xpay_applepay").remove(); 16 } 17 18 if ($(".payment_method_xpay_npg_applepay").length) { 19 $(".payment_method_xpay_npg_applepay").remove(); 20 } 21 } 22 } 23 12 24 (function ($) { 13 25 $(document).ready(function () { … … 18 30 } 19 31 20 setTimeout(() => { 21 if (!window.ApplePaySession) { 22 if ($(".payment_method_xpay_applepay").length) { 23 $(".payment_method_xpay_applepay").remove(); 24 } 32 checkApplePay($); 25 33 26 if ($(".payment_method_xpay_npg_applepay").length) { 27 $(".payment_method_xpay_npg_applepay").remove(); 28 } 29 } 30 }, 500); 34 setInterval(function () { 35 checkApplePay($); 36 }, 700); 31 37 32 38 $(document).on('change', '#pagodil-installments-number', function () { -
nexi-xpay-build/trunk/lang/woocommerce-gateway-nexi-xpay-it_IT.po
r3087872 r3185787 1 # Copyright (C) 202 1Nexi SpA1 # Copyright (C) 2024 Nexi SpA 2 2 # This file is distributed under the GNU General Public License v3.0. 3 3 msgid "" -
nexi-xpay-build/trunk/src/classes/Nexi/WC_Gateway_NPG_API.php
r3092050 r3185787 35 35 private $nexi_npg_api_key; 36 36 private $base_url = null; 37 private $nexi_xpay_accounting; 38 private $nexi_xpay_oneclick_enabled; 39 private $nexi_xpay_3ds20_enabled; 40 private $nexi_xpay_recurring_enabled; 37 41 38 42 private function __construct() … … 399 403 } 400 404 401 if ( $operation['operationResult'] == NPG_OR_EXECUTED) {405 if (in_array($operation['operationResult'], array(NPG_OR_AUTHORIZED, NPG_OR_EXECUTED))) { 402 406 return $operation['operationId']; 403 407 } -
nexi-xpay-build/trunk/src/classes/Nexi/WC_Gateway_NPG_Cards_Build.php
r3087872 r3185787 59 59 public function process_payment($order_id) 60 60 { 61 $order = new \WC_Order($order_id);62 $result = 'failure';63 64 $redirectLink = $this->get_return_url($order);65 66 61 $orderId = $_REQUEST["orderId"]; 67 62 … … 88 83 } 89 84 90 $result = 'success';91 92 85 if ($res['state'] === "REDIRECTED_TO_EXTERNAL_DOMAIN") { 86 $result = 'success'; 93 87 $redirectLink = $res['url']; 94 88 } else { 95 89 if (isset($res['operation']) && !empty($res['operation'])) { 96 90 \Nexi\WC_Gateway_NPG_Process_Completion::change_order_status_by_operation($order_id, $res['operation']); 91 92 $order = new \WC_Order($order_id); 93 94 if (in_array($order->get_status(), ['failed', 'cancelled'])) { 95 $result = 'failure'; 96 $redirectLink = $this->get_return_url($order); 97 } else { 98 $result = 'success'; 99 $redirectLink = $this->get_return_url($order); 100 } 97 101 } else { 98 $result = 'failure';99 100 102 throw new \Exception('Operation not set on finalize response: ' . json_encode($res)); 101 103 } … … 105 107 106 108 wc_add_notice(__("Error during payment proccess", "woocommerce-gateway-nexi-xpay"), "error"); 109 110 $order = new \WC_Order($order_id); 111 112 $result = 'failure'; 113 $redirectLink = $this->get_return_url($order); 107 114 } 108 115 -
nexi-xpay-build/trunk/src/classes/Nexi/WC_Gateway_NPG_Generic_Method.php
r3092050 r3185787 38 38 'JCB', 39 39 //UPI 40 'DINERS', 40 41 ]; 41 42 -
nexi-xpay-build/trunk/src/classes/Nexi/WC_Gateway_NPG_Process_Completion.php
r3087872 r3185787 86 86 $error_message = get_post_meta($order_id, '_npg_' . 'last_error', true); 87 87 88 wc_add_notice(__('Payment error, please try again', 'woocommerce-gateway-nexi-xpay') . ($error_message != "" ? " (" . htmlentities($error_message ?? "") . ")" : ""), 'error'); 88 if ($error_message != "") { 89 wc_add_notice(__('Payment error, please try again', 'woocommerce-gateway-nexi-xpay') . " (" . htmlentities($error_message) . ")", 'error'); 90 } 89 91 90 92 $payment_error = get_post_meta($order_id, '_npg_' . 'payment_error', true); -
nexi-xpay-build/trunk/src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php
r3101172 r3185787 109 109 $this->paymentGateways = array(); 110 110 111 if (is_admin() && $pagenow == 'admin.php' && $_GET['page'] == 'wc-settings'&& $_GET['tab'] == 'checkout') {111 if (is_admin() && $pagenow == 'admin.php' && isset($_GET['page']) && $_GET['page'] == 'wc-settings' && isset($_GET['tab']) && $_GET['tab'] == 'checkout') { 112 112 $this->paymentGateways[] = new \Nexi\WC_Gateway_Admin(); 113 113 } else { … … 218 218 } 219 219 } 220 } 221 222 if ($am['selectedcard'] === 'PAGOLIGHT') { 223 $am['description'] = 'HeyLight'; 224 } 225 226 if ($am['selectedcard'] === 'MY_BANK') { 227 $am['description'] = 'MyBank'; 220 228 } 221 229 … … 412 420 'max_amount' => null, 413 421 ], 414 ' PAGOLIGHT' => [415 'title' => ' PagoLight',416 'description' => __('Pay in installments with PagoLight', 'woocommerce-gateway-nexi-xpay'),422 'HEYLIGHT' => [ 423 'title' => 'HeyLight', 424 'description' => __('Pay in installments with HeyLight', 'woocommerce-gateway-nexi-xpay'), 417 425 'min_amount' => 6000, 418 'max_amount' => 300000,426 'max_amount' => 500000, 419 427 ], 420 428 'PAYPAL_BNPL' => [ -
nexi-xpay-build/trunk/src/classes/Nexi/WC_Gateway_XPay_API.php
r3092050 r3185787 240 240 } 241 241 242 if ($selectedcard == "KLARNA") { 243 $params = array_merge($params, WC_Klarna_Data_Provider::calculate_params($order)); 244 } 245 242 246 update_post_meta($order->get_id(), "_xpay_" . "codTrans", $params['codTrans']); 243 247 … … 312 316 public function validate_return_mac($request_parameters) 313 317 { 314 $mac = sha1('codTrans=' . $request_parameters['codTrans'].315 'esito=' . $request_parameters['esito'].316 'importo=' . $request_parameters['importo'].317 'divisa=' . $request_parameters['divisa'].318 'data=' . $request_parameters['data'].319 'orario=' . $request_parameters['orario'].320 'codAut=' . $request_parameters['codAut'].318 $mac = sha1('codTrans=' . ($request_parameters['codTrans'] ?? '') . 319 'esito=' . ($request_parameters['esito'] ?? '') . 320 'importo=' . ($request_parameters['importo'] ?? '') . 321 'divisa=' . ($request_parameters['divisa'] ?? '') . 322 'data=' . ($request_parameters['data'] ?? '') . 323 'orario=' . ($request_parameters['orario'] ?? '') . 324 'codAut=' . ($request_parameters['codAut'] ?? '') . 321 325 $this->nexi_xpay_mac); 322 if ($mac == $request_parameters["mac"]) { 326 327 if ($mac == ($request_parameters["mac"] ?? '')) { 323 328 return true; 324 329 } 325 330 326 Log::actionWarning(__FUNCTION__ . ": error: " . $request_parameters["mac"]. " != " . $mac);331 Log::actionWarning(__FUNCTION__ . ": error: " . ($request_parameters["mac"] ?? '') . " != " . $mac); 327 332 328 333 return false; -
nexi-xpay-build/trunk/src/classes/Nexi/WC_Gateway_XPay_Process_Completion.php
r3087872 r3185787 213 213 214 214 Log::actionInfo(__FUNCTION__ . ": user redirect for order id " . $order_id . ' - ' . (array_key_exists('esito', $params) ? $params['esito'] : '')); 215 215 216 216 if ($order->needs_payment() || $order->get_status() == 'cancelled') { 217 217 return new \WP_REST_Response( -
nexi-xpay-build/trunk/woocommerce-gateway-nexi-xpay.php
r3101172 r3185787 2 2 3 3 /** 4 * Plugin Name: Nexi XPay 4 * Plugin Name: Nexi XPay Build 5 5 * Plugin URI: 6 6 * Description: Payment plugin for payment cards and alternative methods. Powered by Nexi. 7 * Version: 7. 3.47 * Version: 7.4.0 8 8 * Author: Nexi SpA 9 9 * Author URI: https://www.nexi.it 10 * Text Domain: woocommerce-gateway-nexi-xpay11 10 * Domain Path: /lang 12 * Copyright: © 2017-202 1, Nexi SpA11 * Copyright: © 2017-2024, Nexi SpA 13 12 * License: GNU General Public License v3.0 14 13 * License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 27 26 { 28 27 if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins'))) || is_plugin_active_for_network('woocommerce/woocommerce.php')) { 29 define("WC_GATEWAY_XPAY_VERSION", "7. 3.4");28 define("WC_GATEWAY_XPAY_VERSION", "7.4.0"); 30 29 31 30 define("GATEWAY_XPAY", "xpay"); 32 31 define("GATEWAY_NPG", "npg"); 33 32 34 // The script build-plugin-variants.sh replaces xpay_build with 'xpay' or 'xpay_build'35 33 define('WC_GATEWAY_NEXI_PLUGIN_VARIANT', 'xpay_build'); 36 34 define('WC_GATEWAY_XPAY_PLUGIN_COLL', false);
Note: See TracChangeset
for help on using the changeset viewer.