Changeset 3087870
- Timestamp:
- 05/16/2024 02:43:54 PM (20 months ago)
- Location:
- cartasi-x-pay
- Files:
-
- 122 added
- 21 edited
-
tags/7.3.1 (added)
-
tags/7.3.1/README.md (added)
-
tags/7.3.1/assets (added)
-
tags/7.3.1/assets/css (added)
-
tags/7.3.1/assets/css/xpay-admin.css (added)
-
tags/7.3.1/assets/css/xpay.css (added)
-
tags/7.3.1/assets/images (added)
-
tags/7.3.1/assets/images/logo.jpg (added)
-
tags/7.3.1/assets/js (added)
-
tags/7.3.1/assets/js/pagodil-sticker.min.js (added)
-
tags/7.3.1/assets/js/xpay-admin.js (added)
-
tags/7.3.1/assets/js/xpay-build-npg.js (added)
-
tags/7.3.1/assets/js/xpay-build.js (added)
-
tags/7.3.1/assets/js/xpay.js (added)
-
tags/7.3.1/lang (added)
-
tags/7.3.1/lang/woocommerce-gateway-nexi-xpay-it_IT.mo (added)
-
tags/7.3.1/lang/woocommerce-gateway-nexi-xpay-it_IT.po (added)
-
tags/7.3.1/src (added)
-
tags/7.3.1/src/autoload.php (added)
-
tags/7.3.1/src/classes (added)
-
tags/7.3.1/src/classes/Nexi (added)
-
tags/7.3.1/src/classes/Nexi/CapToStateCode.php (added)
-
tags/7.3.1/src/classes/Nexi/Iso3166.php (added)
-
tags/7.3.1/src/classes/Nexi/Log.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_3DS20_Data_Provider.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Admin_Page.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Build_Token.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_Admin.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_NPG_API.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_NPG_APM.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_NPG_Cards.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_NPG_Cards_Build.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_NPG_Currency.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_NPG_Generic_Method.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_NPG_Lock_Handler.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_NPG_Process_Completion.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_XPay_API.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_XPay_APM.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_XPay_Cards.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_XPay_Generic_Method.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Gateway_XPay_Process_Completion.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_NPG_3DS20_Data_Provider.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_NPG_Token.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Nexi_Helper.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Pagodil_Configuration.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Pagodil_Data_Provider.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Pagodil_Widget.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Pending_Status.php (added)
-
tags/7.3.1/src/classes/Nexi/WC_Save_Order_Meta.php (added)
-
tags/7.3.1/templates (added)
-
tags/7.3.1/templates/build_preview.php (added)
-
tags/7.3.1/templates/npg_build_payment.php (added)
-
tags/7.3.1/templates/npg_payment_detail.php (added)
-
tags/7.3.1/templates/pagodil_checkout.php (added)
-
tags/7.3.1/templates/xpay_payment_detail.php (added)
-
tags/7.3.1/woocommerce-gateway-nexi-xpay.php (added)
-
tags/7.3.2 (added)
-
tags/7.3.2/README.md (added)
-
tags/7.3.2/assets (added)
-
tags/7.3.2/assets/css (added)
-
tags/7.3.2/assets/css/xpay-admin.css (added)
-
tags/7.3.2/assets/css/xpay.css (added)
-
tags/7.3.2/assets/images (added)
-
tags/7.3.2/assets/images/logo.jpg (added)
-
tags/7.3.2/assets/js (added)
-
tags/7.3.2/assets/js/pagodil-sticker.min.js (added)
-
tags/7.3.2/assets/js/xpay-admin.js (added)
-
tags/7.3.2/assets/js/xpay-build-npg.js (added)
-
tags/7.3.2/assets/js/xpay-build.js (added)
-
tags/7.3.2/assets/js/xpay.js (added)
-
tags/7.3.2/lang (added)
-
tags/7.3.2/lang/woocommerce-gateway-nexi-xpay-el.mo (added)
-
tags/7.3.2/lang/woocommerce-gateway-nexi-xpay-el.po (added)
-
tags/7.3.2/lang/woocommerce-gateway-nexi-xpay-it_IT.mo (added)
-
tags/7.3.2/lang/woocommerce-gateway-nexi-xpay-it_IT.po (added)
-
tags/7.3.2/src (added)
-
tags/7.3.2/src/autoload.php (added)
-
tags/7.3.2/src/classes (added)
-
tags/7.3.2/src/classes/Nexi (added)
-
tags/7.3.2/src/classes/Nexi/CapToStateCode.php (added)
-
tags/7.3.2/src/classes/Nexi/Iso3166.php (added)
-
tags/7.3.2/src/classes/Nexi/Log.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_3DS20_Data_Provider.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Admin_Page.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Build_Token.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_Admin.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_NPG_API.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_NPG_APM.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_NPG_Cards.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_NPG_Cards_Build.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_NPG_Currency.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_NPG_Generic_Method.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_NPG_Lock_Handler.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_NPG_Process_Completion.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_XPay_API.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_XPay_APM.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_XPay_Cards.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_XPay_Generic_Method.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Gateway_XPay_Process_Completion.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_NPG_3DS20_Data_Provider.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_NPG_Token.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Nexi_Db.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Nexi_Helper.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Pagodil_Configuration.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Pagodil_Data_Provider.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Pagodil_Widget.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Pending_Status.php (added)
-
tags/7.3.2/src/classes/Nexi/WC_Save_Order_Meta.php (added)
-
tags/7.3.2/templates (added)
-
tags/7.3.2/templates/build_preview.php (added)
-
tags/7.3.2/templates/npg_build_payment.php (added)
-
tags/7.3.2/templates/npg_payment_detail.php (added)
-
tags/7.3.2/templates/pagodil_checkout.php (added)
-
tags/7.3.2/templates/xpay_payment_detail.php (added)
-
tags/7.3.2/woocommerce-gateway-nexi-xpay.php (added)
-
trunk/README.md (modified) (2 diffs)
-
trunk/assets/css/xpay.css (modified) (1 diff)
-
trunk/assets/js/xpay-admin.js (modified) (9 diffs)
-
trunk/lang/woocommerce-gateway-nexi-xpay-el.mo (added)
-
trunk/lang/woocommerce-gateway-nexi-xpay-el.po (added)
-
trunk/lang/woocommerce-gateway-nexi-xpay-it_IT.mo (modified) (previous)
-
trunk/lang/woocommerce-gateway-nexi-xpay-it_IT.po (modified) (56 diffs)
-
trunk/src/classes/Nexi/WC_Admin_Page.php (modified) (7 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_Admin.php (modified) (13 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_NPG_API.php (modified) (11 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_NPG_APM.php (modified) (3 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_NPG_Cards.php (modified) (9 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) (3 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_NPG_Lock_Handler.php (modified) (3 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_NPG_Process_Completion.php (modified) (14 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php (modified) (29 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php (modified) (8 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_XPay_Generic_Method.php (modified) (2 diffs)
-
trunk/src/classes/Nexi/WC_Gateway_XPay_Process_Completion.php (modified) (3 diffs)
-
trunk/src/classes/Nexi/WC_Nexi_Db.php (added)
-
trunk/src/classes/Nexi/WC_Nexi_Helper.php (modified) (3 diffs)
-
trunk/templates/npg_payment_detail.php (modified) (2 diffs)
-
trunk/woocommerce-gateway-nexi-xpay.php (modified) (13 diffs)
Legend:
- Unmodified
- Added
- Removed
-
cartasi-x-pay/trunk/README.md
r3029363 r3087870 5 5 Author: Nexi Payments SpA 6 6 Requires at least: 4.4.0 7 Tested up to: 6. 4.27 Tested up to: 6.5.3 8 8 WC Requires at least: 2.7.0 9 WC Tested up to: 8. 5.210 Stable tag: 7.3. 19 WC Tested up to: 8.8.3 10 Stable tag: 7.3.2 11 11 License: GNU General Public License v3.0 12 12 License URI: http://www.gnu.org/licenses/gpl-3.0.html … … 266 266 * Changed - Management of bcmath PHP library 267 267 * Fixed - Minor issues 268 268 269 269 = 7.3.1 = 270 270 * Fixed - Subscription issue 271 272 = 7.3.2 = 273 * Added - Greek language 274 * Added - Multicurrency with Apple Pay and Google Pay 275 * Added - Installment payments for the Greek market 276 * Fixed - Minor issues -
cartasi-x-pay/trunk/assets/css/xpay.css
r3029363 r3087870 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); 22 26 } 23 27 -
cartasi-x-pay/trunk/assets/js/xpay-admin.js
r2975087 r3087870 15 15 const GATEWAY_NPG = "npg"; 16 16 17 hideShowGatewayProperties( 18 $(".gateway-input").length ? $(".gateway-input option:selected").val() : false 19 ); 20 21 $(".gateway-input").on("change", function () { 22 hideShowGatewayProperties($(this).val()); 17 hideShowGatewayProperties($(".gateway-input").length ? $(".gateway-input option:selected").val() : false); 18 19 $(".gateway-input, .installments-enabled").on("change", function () { 20 hideShowGatewayProperties($(".gateway-input option:selected").val()); 23 21 }); 24 22 25 23 function hideShowGatewayProperties(flag) { 26 if (flag == GATEWAY_NPG) {24 if (flag === GATEWAY_NPG) { 27 25 $(".xpay-only").each(function () { 28 26 $($(this).parents("tr")[0]).hide(); … … 42 40 $(this).show(); 43 41 }); 44 } else if (flag == false || flag == GATEWAY_XPAY) { 42 43 if ($('input[name$="nexi_xpay_installments_enabled"]').is(':checked')) { 44 $(".installments-only").each(function () { 45 $($(this).parents("tr")[0]).show(); 46 }); 47 } else { 48 $(".installments-only").each(function () { 49 $($(this).parents("tr")[0]).hide(); 50 }); 51 } 52 } else if (flag === false || flag === GATEWAY_XPAY) { 45 53 $(".npg-only").each(function () { 54 $($(this).parents("tr")[0]).hide(); 55 }); 56 57 $(".installments-only").each(function () { 46 58 $($(this).parents("tr")[0]).hide(); 47 59 }); … … 72 84 "border-color", 73 85 "placeholder-color", 74 "color" ,86 "color" 75 87 ]; 76 88 … … 82 94 styles[i], 83 95 element.val() 84 );96 ); 85 97 } else if (styles[i] === "placeholder-color") { 86 98 $("#dynamicStyle").html( 87 99 ".stylePreview .content-anteprima .Bricks input::placeholder { color: " + 88 element.val() +89 "}"90 );100 element.val() + 101 "}" 102 ); 91 103 } else { 92 104 $(".stylePreview .content-anteprima .Bricks input").css( 93 105 styles[i], 94 106 element.val() 95 );107 ); 96 108 } 97 109 break; … … 117 129 closeOnSelect: false, 118 130 scrollAfterSelect: true, 119 templateSelection: formatState ,131 templateSelection: formatState 120 132 }); 121 133 } … … 153 165 var domanda = confirm( 154 166 jQuery("#xpay_account_form_question").val() + 155 " " +156 amount +157 " " +158 jQuery("#xpay_account_form_currency_label").val() +159 " ?"160 );167 " " + 168 amount + 169 " " + 170 jQuery("#xpay_account_form_currency_label").val() + 171 " ?" 172 ); 161 173 if (domanda === true) { 162 174 $("html, body").css("cursor", "wait"); … … 170 182 }, 171 183 data: { 172 amount: amount ,184 amount: amount 173 185 }, 174 186 success: function (json) { … … 184 196 alert(data.message); 185 197 window.location.reload(); 186 } ,198 } 187 199 }); 188 200 } … … 194 206 } 195 207 }); 208 209 function inputText(name, value) { 210 return '<td><input type="text" name="' + name + '" value="' + value + '" /></td>'; 211 } 212 213 function addVariation(toAmount, nInstallments) { 214 var randomId = 'row-variation-' + Math.floor(Math.random() * 10000000); 215 216 var row = '<tr id="' + randomId + '">'; 217 218 row += inputText("to_amount", toAmount); 219 row += inputText("n_installments", nInstallments); 220 row += '<td><button class="button delete-ranges-variation" data-target="#' + randomId + '">' + $('#ranges-delete-label').val() + '</button></td>'; 221 222 row += '</tr>'; 223 224 $('#installments-ranges-variations-container table tbody').append(row); 225 } 226 227 $(document).on('click', '#add-ranges-variation', function (event) { 228 event.preventDefault(); 229 230 addVariation("", ""); 231 232 writeRangesVariation(); 233 }); 234 235 $(document).on('click', '.delete-ranges-variation', function (event) { 236 event.preventDefault(); 237 238 $($(this).data('target')).remove(); 239 240 writeRangesVariation(); 241 }); 242 243 function writeRangesVariation() { 244 if ($('#nexi_xpay_installments_ranges').length) { 245 var variations = []; 246 247 $('#installments-ranges-variations-container table tbody tr').each(function () { 248 variations.push({ 249 to_amount: $('#' + $(this).attr('id') + ' input[name="to_amount"]').val(), 250 n_installments: $('#' + $(this).attr('id') + ' input[name="n_installments"]').val() 251 }); 252 }); 253 254 $('#nexi_xpay_installments_ranges').val(JSON.stringify(variations)); 255 } 256 } 257 258 $(document).on('change', '#installments-ranges-variations-container input', function () { 259 writeRangesVariation(); 260 }); 261 262 if ($('#nexi_xpay_installments_ranges').length) { 263 var rangesVariations = JSON.parse($('#nexi_xpay_installments_ranges').val()); 264 265 for (var variation of rangesVariations) { 266 addVariation(variation.to_amount, variation.n_installments); 267 } 268 } 196 269 }); 197 270 })(jQuery); -
cartasi-x-pay/trunk/lang/woocommerce-gateway-nexi-xpay-it_IT.po
r3017100 r3087870 7 7 "gateway-nexi-xpay\n" 8 8 "POT-Creation-Date: 2021-11-16 09:07+0100\n" 9 "PO-Revision-Date: 202 3-12-12 10:38+0000\n"9 "PO-Revision-Date: 2024-02-14 15:04+0000\n" 10 10 "Last-Translator: \n" 11 11 "Language-Team: Italiano\n" … … 21 21 "X-Poedit-SearchPath-0: .\n" 22 22 23 #: src/classes/Nexi/WC_Gateway_NPG_ Cards.php:7424 #: src/classes/Nexi/WC_Gateway_ XPay_APM.php:5325 #: src/classes/Nexi/WC_Gateway_ NPG_APM.php:6623 #: src/classes/Nexi/WC_Gateway_NPG_APM.php:66 24 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:79 25 #: src/classes/Nexi/WC_Gateway_XPay_APM.php:53 26 26 msgid " configurations" 27 27 msgstr " configurazioni" … … 41 41 msgstr "%1$s che finisce con %2$s (scadenza %3$s/%4$s)" 42 42 43 #: src/classes/Nexi/WC_Gateway_Admin.php:14 743 #: src/classes/Nexi/WC_Gateway_Admin.php:148 44 44 msgid "" 45 45 "(for example, shipping and / or invoicing address, payment details). Nexi " … … 51 51 "raccolti separatamente ai fini della prevenzione delle frodi." 52 52 53 #: src/classes/Nexi/WC_Gateway_Admin.php:145 54 #: src/classes/Nexi/WC_Gateway_Admin.php:146 53 #: src/classes/Nexi/WC_Gateway_Admin.php:268 54 msgid "" 55 "1 to 99 installments, 1 for one shot payment. Before set up a configuration, " 56 "make sure to check with your payment provider what is the maximum number " 57 "accepted for your terminal." 58 msgstr "" 59 "Da 1 a 99 rate, 1 per pagamento in un'unica soluzione. Prima di impostare " 60 "una configurazione, assicurati di verificare con il tuo fornitore di servizi " 61 "di pagamento qual è il numero massimo accettato per il tuo terminale." 62 63 #: src/classes/Nexi/WC_Gateway_Admin.php:146 64 #: src/classes/Nexi/WC_Gateway_Admin.php:147 55 65 msgid "3D Secure 2 Service" 56 66 msgstr "Servizio 3D Secure 2" 57 67 58 #: src/classes/Nexi/WC_Gateway_Admin.php:13 768 #: src/classes/Nexi/WC_Gateway_Admin.php:138 59 69 msgid "" 60 70 "A POST notification by the Nexi servers is sent to the following address, " … … 64 74 "Nexi, contenente le informazioni sull'esito del pagamento." 65 75 66 #: templates/ npg_payment_detail.php:159 templates/xpay_payment_detail.php:11476 #: templates/xpay_payment_detail.php:114 templates/npg_payment_detail.php:166 67 77 msgid "Account" 68 78 msgstr "Contabilizza" 69 79 70 #: src/classes/Nexi/WC_Gateway_Admin.php:20 680 #: src/classes/Nexi/WC_Gateway_Admin.php:207 71 81 msgid "Accounting" 72 82 msgstr "Contabilizzazione" … … 77 87 msgstr "Contabilizzazione della transazione %s effettuata con successo" 78 88 79 #: templates/ npg_payment_detail.php:97 templates/xpay_payment_detail.php:6289 #: templates/xpay_payment_detail.php:62 templates/npg_payment_detail.php:104 80 90 msgid "Accounting operations" 81 91 msgstr "Operazioni contabili" 82 92 83 #: templates/npg_payment_detail.php:1 5693 #: templates/npg_payment_detail.php:163 84 94 msgid "Accounting successful" 85 95 msgstr "Contabilizzazione avvenuta con successo" … … 89 99 msgstr "Attiva il metodo di pagamento PagoDIL all'interno del negozio." 90 100 91 #: src/classes/Nexi/WC_Gateway_Admin.php:175 101 #: src/classes/Nexi/WC_Gateway_Admin.php:279 102 msgid "Add amount and installments for each row. The installments limit is 99" 103 msgstr "Aggiungi importo e rate per ogni riga. Il limite delle rate è 99" 104 105 #: src/classes/Nexi/WC_Gateway_Admin.php:455 106 msgid "Add rule" 107 msgstr "Aggiungi regola" 108 109 #: src/classes/Nexi/WC_Gateway_Admin.php:176 92 110 msgid "Alias" 93 111 msgstr "Alias" 94 112 95 #: src/classes/Nexi/WC_Gateway_Admin.php:16 4113 #: src/classes/Nexi/WC_Gateway_Admin.php:165 96 114 msgid "Alias and MAC Key" 97 115 msgstr "Alias - Chiave MAC" … … 101 119 msgstr "Tutte le categorie" 102 120 103 #: templates/ npg_payment_detail.php:109 templates/xpay_payment_detail.php:74121 #: templates/xpay_payment_detail.php:74 templates/npg_payment_detail.php:116 104 122 msgid "Amount" 105 123 msgstr "Importo" 106 124 107 #: templates/ npg_payment_detail.php:83 templates/xpay_payment_detail.php:41125 #: templates/xpay_payment_detail.php:41 templates/npg_payment_detail.php:90 108 126 msgid "Amount: " 109 127 msgstr "Importo: " 110 128 111 #: src/classes/Nexi/WC_ Gateway_XPay_APM.php:77112 #: src/classes/Nexi/WC_ Pagodil_Widget.php:59129 #: src/classes/Nexi/WC_Pagodil_Widget.php:59 130 #: src/classes/Nexi/WC_Gateway_XPay_APM.php:77 113 131 #, php-format 114 132 msgid "Amount: %s installments of %s€" 115 133 msgstr "Importo: %s rate da %s€" 116 134 117 #: src/classes/Nexi/WC_Gateway_Admin.php:19 0135 #: src/classes/Nexi/WC_Gateway_Admin.php:191 118 136 msgid "API Key" 119 137 msgstr "API Key" 120 138 121 #: src/classes/Nexi/WC_Gateway_Admin.php:16 5139 #: src/classes/Nexi/WC_Gateway_Admin.php:166 122 140 msgid "APIKey" 123 141 msgstr "APIKey" 124 142 125 #: src/classes/Nexi/WC_Gateway_NPG_ Cards.php:70126 #: src/classes/Nexi/WC_Gateway_ XPay_APM.php:49127 #: src/classes/Nexi/WC_Gateway_ NPG_APM.php:62143 #: src/classes/Nexi/WC_Gateway_NPG_APM.php:62 144 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:75 145 #: src/classes/Nexi/WC_Gateway_XPay_APM.php:49 128 146 #| msgid "APMs do not have a custom configuration." 129 147 msgid "APMs do not have a custom configuration. " 130 148 msgstr "Gli APM non hanno una configurazione personalizzata." 131 149 132 #: src/classes/Nexi/WC_Admin_Page.php:162 133 msgid "" 134 "Attention, bcmath PHP extension is not loaded, it is needed to list " 135 "correctly order information and perform other operations." 136 msgstr "" 137 "Attenzione, l'estensione PHP bcmath non è attiva, è necessaria per elencare " 138 "le informazioni sull'ordine ed eseguire altre operazioni." 139 140 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:107 150 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:130 151 #: src/classes/Nexi/WC_Gateway_NPG_Cards_Build.php:48 141 152 #: src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php:174 142 #: src/classes/Nexi/WC_Gateway_NPG_Cards_Build.php:48 143 #: src/classes/Nexi/WC_Gateway_XPay_Generic_Method.php:75 153 #: src/classes/Nexi/WC_Gateway_XPay_Generic_Method.php:74 144 154 msgid "" 145 155 "Attention, the order for which you are making payment contains recurring " … … 150 160 "sicuro da Nexi." 151 161 152 #: src/classes/Nexi/WC_Gateway_Admin.php:3 00162 #: src/classes/Nexi/WC_Gateway_Admin.php:341 153 163 msgid "Border Color" 154 164 msgstr "Colore bordo" 155 165 156 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:3 51166 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:348 157 167 msgid "Buy now and pay a little by little with PagoDIL" 158 168 msgstr "Acquista subito e paga un po' alla volta con PagoDIL" 159 169 160 #: src/classes/Nexi/WC_Gateway_Admin.php:14 4170 #: src/classes/Nexi/WC_Gateway_Admin.php:145 161 171 msgid "" 162 172 "By activating this option it is established that the terms and conditions " … … 170 180 "aggiuntivi forniti dal" 171 181 172 #: src/classes/Nexi/WC_Gateway_Admin.php:2 48182 #: src/classes/Nexi/WC_Gateway_Admin.php:289 173 183 msgid "" 174 184 "By using this configurator you can change the look and feel of your module" … … 180 190 msgstr "Impossibile connettersi." 181 191 182 #: templates/ npg_payment_detail.php:51 templates/xpay_payment_detail.php:17192 #: templates/xpay_payment_detail.php:17 templates/npg_payment_detail.php:51 183 193 msgid "Card detail" 184 194 msgstr "Dettaglio carta" … … 188 198 msgstr "Numero carta" 189 199 190 #: templates/ npg_payment_detail.php:57 templates/xpay_payment_detail.php:26200 #: templates/xpay_payment_detail.php:26 templates/npg_payment_detail.php:57 191 201 msgid "Card pan: " 192 202 msgstr "Pan carta: " 193 203 194 #: templates/ npg_payment_detail.php:54 templates/xpay_payment_detail.php:20204 #: templates/xpay_payment_detail.php:20 templates/npg_payment_detail.php:54 195 205 msgid "Card: " 196 206 msgstr "Carta: " 197 207 198 #: templates/ npg_payment_detail.php:36 templates/xpay_payment_detail.php:4208 #: templates/xpay_payment_detail.php:4 templates/npg_payment_detail.php:36 199 209 msgid "Cardholder" 200 210 msgstr "Titolare carta" … … 208 218 msgstr "Scegli il numero di rate" 209 219 210 #: src/classes/Nexi/WC_Gateway_Admin.php:16 1220 #: src/classes/Nexi/WC_Gateway_Admin.php:162 211 221 msgid "Choose the type of credentials you have available for XPay" 212 222 msgstr "" … … 226 236 msgstr "Errore CURL: %s" 227 237 228 #: src/classes/Nexi/WC_Gateway_NPG_API.php:3 21238 #: src/classes/Nexi/WC_Gateway_NPG_API.php:330 229 239 msgid "Customer not found." 230 240 msgstr "Cliente non trovato." 231 241 232 #: src/classes/Nexi/WC_Admin_Page.php:1 48242 #: src/classes/Nexi/WC_Admin_Page.php:155 233 243 msgid "Czech Kurun" 234 244 msgstr "Corona Ceca" 235 245 236 #: templates/ npg_payment_detail.php:110 templates/xpay_payment_detail.php:72246 #: templates/xpay_payment_detail.php:72 templates/npg_payment_detail.php:117 237 247 msgid "Date" 238 248 msgstr "Data" 239 249 240 #: templates/ npg_payment_detail.php:76 templates/xpay_payment_detail.php:38250 #: templates/xpay_payment_detail.php:38 templates/npg_payment_detail.php:78 241 251 msgid "Date: " 242 252 msgstr "Data: " 243 253 244 #: src/classes/Nexi/WC_Gateway_Admin.php:21 0254 #: src/classes/Nexi/WC_Gateway_Admin.php:211 245 255 msgid "Deferred" 246 256 msgstr "Differita" 247 257 248 #: templates/npg_payment_detail.php:155 templates/xpay_payment_detail.php:110 258 #: src/classes/Nexi/WC_Gateway_Admin.php:458 259 msgid "Delete" 260 msgstr "Elimina" 261 262 #: templates/xpay_payment_detail.php:110 templates/npg_payment_detail.php:162 249 263 msgid "Do you confirm to account" 250 264 msgstr "Confermi di voler contabilizzare" 251 265 252 #: src/classes/Nexi/WC_Pagodil_Widget.php: 195266 #: src/classes/Nexi/WC_Pagodil_Widget.php:202 253 267 #, php-format 254 268 #| msgid "" … … 262 276 "il valore minimo di %s€ nel carrello" 263 277 264 #: src/classes/Nexi/WC_Admin_Page.php:15 0265 #: src/classes/Nexi/WC_Admin_Page.php:15 1278 #: src/classes/Nexi/WC_Admin_Page.php:157 279 #: src/classes/Nexi/WC_Admin_Page.php:158 266 280 msgid "Dollars" 267 281 msgstr "Dollari" 268 282 269 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:2 51283 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:248 270 284 msgid "Easily pay with your Apple Pay wallet" 271 285 msgstr "Paga facilmente con il tuo wallet Apple Pay" 272 286 273 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:24 6287 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:243 274 288 msgid "Easily pay with your Google Pay wallet" 275 289 msgstr "Paga facilmente con il tuo wallet Google Pay" 276 290 277 #: src/classes/Nexi/WC_Gateway_Admin.php:21 6291 #: src/classes/Nexi/WC_Gateway_Admin.php:217 278 292 msgid "Enable 3D Secure 2 service" 279 293 msgstr "Abilita il servizio 3D Secure 2" 280 294 281 #: src/classes/Nexi/WC_Gateway_Admin.php:23 6295 #: src/classes/Nexi/WC_Gateway_Admin.php:237 282 296 #| msgid "Enable Nexi XPay for Multcurrency payments" 283 297 msgid "Enable Nexi XPay for Multicurrency payments" 284 298 msgstr "Abilita Nexi XPay ai pagamenti Multivaluta" 285 299 286 #: src/classes/Nexi/WC_Gateway_Admin.php:22 5300 #: src/classes/Nexi/WC_Gateway_Admin.php:226 287 301 msgid "Enable Nexi XPay for OneClick payment" 288 302 msgstr "Abilita Nexi XPay ai pagamenti OneClick" 289 303 290 #: src/classes/Nexi/WC_Gateway_Admin.php:22 7304 #: src/classes/Nexi/WC_Gateway_Admin.php:228 291 305 msgid "" 292 306 "Enable Nexi XPay for OneClick payment. Make sure that this option is also " … … 296 310 "sia abilitata anche nella configurazione del tuo terminale." 297 311 298 #: src/classes/Nexi/WC_Gateway_Admin.php:3 49312 #: src/classes/Nexi/WC_Gateway_Admin.php:390 299 313 msgid "Enable Nexi XPay for subscription's payment" 300 314 msgstr "Abilita Nexi XPay ai pagamenti ricorrenti" 301 315 302 #: src/classes/Nexi/WC_Gateway_ Admin.php:153303 #: src/classes/Nexi/WC_Gateway_ XPay_APM.php:63304 #: src/classes/Nexi/WC_Gateway_ NPG_APM.php:76316 #: src/classes/Nexi/WC_Gateway_NPG_APM.php:76 317 #: src/classes/Nexi/WC_Gateway_Admin.php:154 318 #: src/classes/Nexi/WC_Gateway_XPay_APM.php:63 305 319 msgid "Enable Nexi XPay payment plugin." 306 320 msgstr "Abilita il plugin di pagamento Nexi XPay." 307 321 308 #: src/classes/Nexi/WC_Gateway_Admin.php:20 1322 #: src/classes/Nexi/WC_Gateway_Admin.php:202 309 323 msgid "Enable Nexi XPay plugin in testing mode." 310 324 msgstr "Abilita il plugin Nexi XPay in modalità di test." … … 323 337 "informazioni relative alla rateizzazione messa a disposizione sul prodotto." 324 338 325 #: src/classes/Nexi/WC_Gateway_Admin.php:21 8339 #: src/classes/Nexi/WC_Gateway_Admin.php:219 326 340 msgid "Enable the sending of the fields for the 3D Secure 2 service" 327 341 msgstr "Abilita l'invio dei campi aggiuntivi per il servizio 3D Secure 2" 328 342 329 #: src/classes/Nexi/WC_Gateway_Admin.php:23 8343 #: src/classes/Nexi/WC_Gateway_Admin.php:239 330 344 #| msgid "" 331 345 #| "Enable this option to make the payment methods available for different " … … 344 358 "nella configurazione del tuo terminale." 345 359 346 #: src/classes/Nexi/WC_Gateway_Admin.php:151 347 #: src/classes/Nexi/WC_Gateway_XPay_APM.php:61 348 #: src/classes/Nexi/WC_Gateway_NPG_APM.php:74 360 #: src/classes/Nexi/WC_Gateway_Admin.php:250 361 msgid "" 362 "Enable this option to use installment payments via XPay. This functionality " 363 "is only available to merchants with Greek VAT Number. Before enabling this " 364 "functionality, make sure it is available on your terminal with your payment " 365 "provider." 366 msgstr "" 367 "Abilita questa opzione per utilizzare i pagamenti rateali tramite XPay. " 368 "Questa funzionalità è disponibile solo per i commercianti con partita IVA " 369 "greca. Prima di abilitare questa funzionalità, assicurati che sia " 370 "disponibile sul tuo terminale presso il tuo fornitore di servizi di " 371 "pagamento." 372 373 #: src/classes/Nexi/WC_Gateway_NPG_APM.php:74 374 #: src/classes/Nexi/WC_Gateway_Admin.php:152 375 #: src/classes/Nexi/WC_Gateway_XPay_APM.php:61 349 376 msgid "Enable/Disable" 350 377 msgstr "Abilita/Disabilita" 351 378 352 #: src/classes/Nexi/WC_Gateway_Admin.php:234 379 #: src/classes/Nexi/WC_Gateway_Admin.php:246 380 #: src/classes/Nexi/WC_Gateway_Admin.php:248 381 msgid "Enable/Disable Installment Payments" 382 msgstr "Abilita/Disabilita pagamenti rateali" 383 384 #: src/classes/Nexi/WC_Gateway_Admin.php:235 353 385 #| msgid "Enable/Disable Multcurrency" 354 386 msgid "Enable/Disable Multicurrency" 355 387 msgstr "Abilita/Disabilita Multivaluta" 356 388 357 #: src/classes/Nexi/WC_Gateway_Admin.php:22 3389 #: src/classes/Nexi/WC_Gateway_Admin.php:224 358 390 msgid "Enable/Disable OneClick" 359 391 msgstr "Abilita/Disabilita OneClick" 360 392 361 #: src/classes/Nexi/WC_Gateway_Admin.php:3 47393 #: src/classes/Nexi/WC_Gateway_Admin.php:388 362 394 msgid "Enable/Disable Recurring" 363 395 msgstr "Abilita/Disabilita ricorrenze" 364 396 365 #: src/classes/Nexi/WC_Gateway_Admin.php: 199397 #: src/classes/Nexi/WC_Gateway_Admin.php:200 366 398 msgid "Enable/Disable TEST Mode" 367 399 msgstr "Abilita/Disabilita modalità di TEST" 368 400 369 #: src/classes/Nexi/WC_Gateway_Admin.php:3 09401 #: src/classes/Nexi/WC_Gateway_Admin.php:350 370 402 msgid "Error Border Color" 371 403 msgstr "Colore bordo errore" … … 388 420 msgstr "Errore durante il controllo delle credenziali." 389 421 390 #: src/classes/Nexi/WC_Admin_Page.php:1 47422 #: src/classes/Nexi/WC_Admin_Page.php:154 391 423 msgid "Euros" 392 424 msgstr "Euro" … … 396 428 msgstr "Data scadenza: " 397 429 398 #: src/classes/Nexi/WC_Gateway_Admin.php:2 58430 #: src/classes/Nexi/WC_Gateway_Admin.php:299 399 431 msgid "Font family" 400 432 msgstr "Carattere" 401 433 402 #: src/classes/Nexi/WC_Gateway_Admin.php: 266434 #: src/classes/Nexi/WC_Gateway_Admin.php:307 403 435 msgid "Font size" 404 436 msgstr "Dimensione Carattere" 405 437 406 #: src/classes/Nexi/WC_Gateway_Admin.php: 274438 #: src/classes/Nexi/WC_Gateway_Admin.php:315 407 439 msgid "Font style" 408 440 msgstr "Stile Carattere" 409 441 410 #: src/classes/Nexi/WC_Gateway_Admin.php: 276442 #: src/classes/Nexi/WC_Gateway_Admin.php:317 411 443 msgid "Font style in the CC Form" 412 444 msgstr "Lo stile del font nel form per le carte di credito" 413 445 414 #: src/classes/Nexi/WC_Gateway_Admin.php: 283446 #: src/classes/Nexi/WC_Gateway_Admin.php:324 415 447 msgid "Font variant" 416 448 msgstr "Variante Carattere" 417 449 418 #: src/classes/Nexi/WC_Gateway_Admin.php: 285450 #: src/classes/Nexi/WC_Gateway_Admin.php:326 419 451 msgid "Font variant in the CC Form" 420 452 msgstr "La viariante dello stile del font nel form per le carte di credito" 421 453 422 #: src/classes/Nexi/WC_Gateway_Admin.php:13 6454 #: src/classes/Nexi/WC_Gateway_Admin.php:137 423 455 msgid "" 424 456 "For a correct behavior of the module, check in the configuration section of " … … 434 466 msgstr "Per categorie selezionate" 435 467 436 #: src/classes/Nexi/WC_Gateway_Admin.php:19 2468 #: src/classes/Nexi/WC_Gateway_Admin.php:193 437 469 msgid "" 438 470 "Generated from the Back Office XPay. Follow the directions in the developer " … … 442 474 "sviluppatori per il procedimento di generazione corretto." 443 475 444 #: src/classes/Nexi/WC_Gateway_Admin.php:17 7445 #: src/classes/Nexi/WC_Gateway_Admin.php:18 3446 #: src/classes/Nexi/WC_Gateway_Admin.php:3 56447 #: src/classes/Nexi/WC_Gateway_Admin.php: 362448 #: src/classes/Nexi/WC_Gateway_Admin.php: 368476 #: src/classes/Nexi/WC_Gateway_Admin.php:178 477 #: src/classes/Nexi/WC_Gateway_Admin.php:184 478 #: src/classes/Nexi/WC_Gateway_Admin.php:397 479 #: src/classes/Nexi/WC_Gateway_Admin.php:403 480 #: src/classes/Nexi/WC_Gateway_Admin.php:409 449 481 msgid "Given to Merchant by Nexi." 450 482 msgstr "Fornito all'esercente da Nexi." 451 483 452 #: src/classes/Nexi/WC_Gateway_Admin.php: 366484 #: src/classes/Nexi/WC_Gateway_Admin.php:407 453 485 msgid "Group" 454 486 msgstr "Gruppo" … … 466 498 "verrà utilizzato dal plugin per il pagamento tramite PagoDIL." 467 499 468 #: src/classes/Nexi/WC_Gateway_Admin.php:2 09500 #: src/classes/Nexi/WC_Gateway_Admin.php:210 469 501 msgid "Immediate" 470 502 msgstr "Immediata" … … 478 510 msgstr "Prodotti rateizzabili" 479 511 480 #: src/classes/Nexi/WC_Gateway_NPG_Process_Completion.php:357 481 #: src/classes/Nexi/WC_Gateway_XPay_Process_Completion.php:266 512 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:108 513 msgid "Installments" 514 msgstr "Numero di rate" 515 516 #: templates/npg_payment_detail.php:85 517 msgid "Installments: " 518 msgstr "Numero di rate: " 519 520 #: src/classes/Nexi/WC_Gateway_XPay_Process_Completion.php:266 521 #: src/classes/Nexi/WC_Gateway_NPG_Process_Completion.php:393 482 522 msgid "Invalid amount." 483 523 msgstr "Importo non valido." 484 524 485 #: src/classes/Nexi/WC_Gateway_Admin.php: 80525 #: src/classes/Nexi/WC_Gateway_Admin.php:78 486 526 msgid "Invalid API Key. Check and try again." 487 527 msgstr "API Key non valida. Controlla e riprova." 488 528 489 #: src/classes/Nexi/WC_Gateway_Admin.php: 70529 #: src/classes/Nexi/WC_Gateway_Admin.php:69 490 530 msgid "Invalid credentials. Check and try again." 491 531 msgstr "Credenziali non valide. Controlla e riprova." … … 496 536 msgstr "Variante plugin non valida" 497 537 498 #: src/classes/Nexi/WC_Gateway_NPG_Generic_Method.php:1 15499 #: src/classes/Nexi/WC_Gateway_XPay_Generic_Method.php:1 52538 #: src/classes/Nexi/WC_Gateway_NPG_Generic_Method.php:121 539 #: src/classes/Nexi/WC_Gateway_XPay_Generic_Method.php:162 500 540 msgid "Invalid refund amount." 501 541 msgstr "Importo non valido." … … 513 553 msgstr "Errore JSON" 514 554 515 #: src/classes/Nexi/WC_Gateway_Admin.php:18 1555 #: src/classes/Nexi/WC_Gateway_Admin.php:182 516 556 msgid "Key MAC" 517 557 msgstr "Chiave MAC" 518 558 519 #: src/classes/Nexi/WC_Gateway_Admin.php: 292559 #: src/classes/Nexi/WC_Gateway_Admin.php:333 520 560 msgid "Letter spacing" 521 561 msgstr "Spaziatura" … … 546 586 "tramite pagamenti rateali con PagoDIL. Questo valore corrisponde all'importo " 547 587 "impostato nel back office XPay." 588 589 #: src/classes/Nexi/WC_Gateway_Admin.php:446 590 msgid "Maximum installments" 591 msgstr "Numero massimo di rate" 592 593 #: src/classes/Nexi/WC_Gateway_Admin.php:275 594 #: src/classes/Nexi/WC_Gateway_Admin.php:277 595 msgid "Maximum number of installments depending on the total order amount" 596 msgstr "Numero massimo di rate in base all'importo totale dell'ordine" 597 598 #: src/classes/Nexi/WC_Gateway_Admin.php:263 599 #: src/classes/Nexi/WC_Gateway_Admin.php:266 600 msgid "Maximum number of installments regardless of the total order amount" 601 msgstr "" 602 "Numero massimo di rate indipendentemente dall'importo totale dell'ordine" 548 603 549 604 #: src/classes/Nexi/WC_Pagodil_Configuration.php:98 … … 571 626 "impostato nel back office XPay." 572 627 573 #: src/classes/Nexi/WC_Admin_Page.php:17 6628 #: src/classes/Nexi/WC_Admin_Page.php:171 574 629 msgid "Missing codTrans" 575 630 msgstr "CodTrans mancante" … … 579 634 msgstr "MM/YY" 580 635 581 #: templates/ npg_payment_detail.php:39 templates/xpay_payment_detail.php:7636 #: templates/xpay_payment_detail.php:7 templates/npg_payment_detail.php:39 582 637 msgid "Name: " 583 638 msgstr "Nome: " … … 587 642 msgstr "Nazionalità: " 588 643 589 #: templates/ npg_payment_detail.php:99 templates/xpay_payment_detail.php:64644 #: templates/xpay_payment_detail.php:64 templates/npg_payment_detail.php:106 590 645 msgid "New accounting operation" 591 646 msgstr "Nuova operazione contabile" 592 647 593 #: src/classes/Nexi/WC_Gateway_ XPay_Cards_Build.php:118594 #: src/classes/Nexi/WC_Gateway_ NPG_Cards_Build.php:39648 #: src/classes/Nexi/WC_Gateway_NPG_Cards_Build.php:39 649 #: src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php:118 595 650 msgid "New payment methods can only be added during checkout" 596 651 msgstr "" … … 598 653 "dell'ordine." 599 654 600 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php: 89601 #: src/classes/Nexi/WC_Gateway_XPay_Generic_Method.php: 70655 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:94 656 #: src/classes/Nexi/WC_Gateway_XPay_Generic_Method.php:69 602 657 msgid "New payment methods can only be added during checkout." 603 658 msgstr "" … … 605 660 "dell'ordine." 606 661 607 #: src/classes/Nexi/WC_Admin_Page.php:1 17662 #: src/classes/Nexi/WC_Admin_Page.php:121 608 663 msgid "Nexi payment details" 609 664 msgstr "Dettagli pagamento Nexi" … … 614 669 615 670 #. Name of the plugin 616 #: src/classes/Nexi/WC_Gateway_ Admin.php:23617 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:7 3618 #: src/classes/Nexi/WC_Gateway_ XPay_APM.php:52619 #: src/classes/Nexi/WC_Gateway_ NPG_APM.php:65671 #: src/classes/Nexi/WC_Gateway_NPG_APM.php:65 672 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:78 673 #: src/classes/Nexi/WC_Gateway_Admin.php:22 674 #: src/classes/Nexi/WC_Gateway_XPay_APM.php:52 620 675 msgid "Nexi XPay" 621 676 msgstr "Nexi XPay" … … 645 700 msgstr[1] "Nexi: Da Autorizzare (%s)" 646 701 647 #: src/classes/Nexi/WC_Gateway_NPG_API.php:3 37702 #: src/classes/Nexi/WC_Gateway_NPG_API.php:346 648 703 msgid "NPG orderId not found for order: " 649 704 msgstr "NPG orderId non trovato per l'ordine: " … … 674 729 msgstr "Numero prodotti nel carrello (Opzionale)" 675 730 676 #: templates/npg_payment_detail.php:86 731 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:111 732 msgid "One time solution" 733 msgstr "Unica soluzione" 734 735 #: templates/npg_payment_detail.php:93 677 736 msgid "Order ID: " 678 737 msgstr "ID Ordine:" 679 738 680 #: src/classes/Nexi/WC_Gateway_NPG_API.php:3 48739 #: src/classes/Nexi/WC_Gateway_NPG_API.php:357 681 740 msgid "Order not found." 682 741 msgstr "Ordine non trovato." … … 690 749 msgstr "Logo istituzionale PagoDIL" 691 750 692 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:27 6751 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:273 693 752 msgid "Pay directly from your bank account with Giropay" 694 753 msgstr "Paga in sicurezza direttamente dal tuo conto bancario con Giropay" 695 754 696 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:2 81755 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:278 697 756 msgid "Pay directly from your bank account with iDEAL" 698 757 msgstr "Paga in sicurezza direttamente dal tuo conto bancario con iDEAL" 699 758 700 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:28 6759 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:283 701 760 msgid "Pay easily with Bancontact" 702 761 msgstr "Paga facilmente con Bancontact" 703 762 704 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:3 31763 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:328 705 764 msgid "Pay easily with your Amazon account" 706 765 msgstr "Paga facilmente con il tuo account Amazon" 707 766 708 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:32 6767 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:323 709 768 msgid "Pay easily with your Satispay account" 710 769 msgstr "Paga facilmente con il tuo account Satispay" 711 770 712 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:34 6771 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:343 713 772 msgid "Pay in 3 installments with Klarna interest-free" 714 773 msgstr "Paga in 3 rate senza interessi tramite Klarna" 715 774 716 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:3 41775 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:338 717 776 msgid "Pay in 3 or 4 installments by credit, debit or Postepay card with Oney" 718 777 msgstr "Paga in 3 o 4 rate con carta di credito, debito o Postepay con Oney" … … 722 781 msgstr "Paga a rate senza interessi" 723 782 724 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:30 6783 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:303 725 784 msgid "Pay in one tap with your Skrill wallet" 726 785 msgstr "Paga in un tap con il tuo wallet Skrill" 727 786 728 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:26 6787 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:263 729 788 msgid "Pay quickly and easily with your AliPay wallet" 730 789 msgstr "Paga in modo semplice e veloce con il tuo wallet AliPay" 731 790 732 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php: 301791 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:298 733 792 msgid "Pay quickly and easily with your Skrill wallet" 734 793 msgstr "Paga in modo semplice e veloce con il tuo wallet Skrill" 735 794 736 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:2 71795 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:268 737 796 msgid "Pay quickly and easily with your WeChat Pay wallet" 738 797 msgstr "Paga in modo semplice e veloce con il tuo wallet WeChat Pay" 739 798 740 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:2 61799 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:258 741 800 msgid "Pay securely by bank transfer with MyBank" 742 801 msgstr "Paga in sicurezza tramite bonifico bancario con MyBank" 743 802 744 #: src/classes/Nexi/WC_Gateway_Admin.php:26 745 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:29 746 #: src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php:46 803 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:28 747 804 #: src/classes/Nexi/WC_Gateway_NPG_Cards_Build.php:29 748 #: src/classes/Nexi/WC_Gateway_XPay_Cards.php:46 805 #: src/classes/Nexi/WC_Gateway_XPay_Cards.php:46 806 #: src/classes/Nexi/WC_Gateway_Admin.php:25 807 #: src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php:46 749 808 #| msgid "Pay securely by credit, debit and prepaid card through Nexi." 750 809 msgid "Pay securely by credit, debit and prepaid card. Powered by Nexi." … … 753 812 "Nexi." 754 813 755 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:33 6814 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:333 756 815 msgid "Pay securely with your PayPal account" 757 816 msgstr "Paga in sicurezza con il account PayPal" 758 817 759 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:25 6818 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:253 760 819 msgid "Pay via BANCOMAT Pay just by entering your phone number" 761 820 msgstr "Paga tramite BANCOMAT Pay inserendo solo il tuo numero di telefono" … … 765 824 msgstr "Pagamento annullato: " 766 825 767 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:25 768 #: src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php:25 826 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:24 769 827 #: src/classes/Nexi/WC_Gateway_NPG_Cards_Build.php:25 770 #: src/classes/Nexi/WC_Gateway_XPay_Cards.php:25 828 #: src/classes/Nexi/WC_Gateway_XPay_Cards.php:25 829 #: src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php:25 771 830 msgid "Payment cards" 772 831 msgstr "Carte di pagamento" … … 779 838 780 839 #: woocommerce-gateway-nexi-xpay.php:196 781 #: src/classes/Nexi/WC_Gateway_ NPG_Process_Completion.php:280782 #: src/classes/Nexi/WC_Gateway_ NPG_Process_Completion.php:286840 #: src/classes/Nexi/WC_Gateway_XPay_Process_Completion.php:154 841 #: src/classes/Nexi/WC_Gateway_XPay_Process_Completion.php:210 783 842 #: src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php:255 784 #: src/classes/Nexi/WC_Gateway_ XPay_Process_Completion.php:154785 #: src/classes/Nexi/WC_Gateway_ XPay_Process_Completion.php:210843 #: src/classes/Nexi/WC_Gateway_NPG_Process_Completion.php:316 844 #: src/classes/Nexi/WC_Gateway_NPG_Process_Completion.php:322 786 845 msgid "Payment error" 787 846 msgstr "Errore nel pagamento" 788 847 789 #: src/classes/Nexi/WC_Gateway_ NPG_Process_Completion.php:88790 #: src/classes/Nexi/WC_Gateway_ XPay_Process_Completion.php:89848 #: src/classes/Nexi/WC_Gateway_XPay_Process_Completion.php:89 849 #: src/classes/Nexi/WC_Gateway_NPG_Process_Completion.php:88 791 850 msgid "Payment error, please try again" 792 851 msgstr "Errore nel pagamento, riprova" 793 852 794 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:26 795 #: src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php:26 853 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:25 796 854 #: src/classes/Nexi/WC_Gateway_NPG_Cards_Build.php:26 797 #: src/classes/Nexi/WC_Gateway_XPay_Cards.php:26 855 #: src/classes/Nexi/WC_Gateway_XPay_Cards.php:26 856 #: src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php:26 798 857 msgid "Payment gateway." 799 858 msgstr "Gateway di pagamento." 800 859 801 #: src/classes/Nexi/WC_Gateway_ NPG_Process_Completion.php:337802 #: src/classes/Nexi/WC_Gateway_ XPay_Process_Completion.php:245860 #: src/classes/Nexi/WC_Gateway_XPay_Process_Completion.php:245 861 #: src/classes/Nexi/WC_Gateway_NPG_Process_Completion.php:373 803 862 msgid "Payment has been cancelled." 804 863 msgstr "Il pagamento è stato annullato." 805 864 806 865 #. Description of the plugin 807 #: src/classes/Nexi/WC_Gateway_Admin.php:2 4866 #: src/classes/Nexi/WC_Gateway_Admin.php:23 808 867 msgid "" 809 868 "Payment plugin for payment cards and alternative methods. Powered by Nexi." … … 811 870 "Plugin di pagamento per carte di pagamento e metodi alternativi tramite Nexi." 812 871 813 #: src/classes/Nexi/WC_Gateway_Admin.php:3 18872 #: src/classes/Nexi/WC_Gateway_Admin.php:359 814 873 msgid "Placeholder Color" 815 874 msgstr "Colore placeholder" 816 875 817 #: src/classes/Nexi/WC_Gateway_Admin.php:20 3876 #: src/classes/Nexi/WC_Gateway_Admin.php:204 818 877 msgid "Please refer to Dev Portal to get access to the Sandbox" 819 878 msgstr "" … … 821 880 "alla Sandbox." 822 881 823 #: src/classes/Nexi/WC_Gateway_Admin.php:20 3882 #: src/classes/Nexi/WC_Gateway_Admin.php:204 824 883 msgid "Please register at" 825 884 msgstr "Si prega di registrarsi sul sito" 826 885 827 #: src/classes/Nexi/WC_Gateway_NPG_ Cards.php:72828 #: src/classes/Nexi/WC_Gateway_ XPay_APM.php:51829 #: src/classes/Nexi/WC_Gateway_ NPG_APM.php:64886 #: src/classes/Nexi/WC_Gateway_NPG_APM.php:64 887 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:77 888 #: src/classes/Nexi/WC_Gateway_XPay_APM.php:51 830 889 msgid "Please use " 831 890 msgstr "Si prega di utilizzare " 832 891 833 #: src/classes/Nexi/WC_Gateway_Admin.php:2 52892 #: src/classes/Nexi/WC_Gateway_Admin.php:293 834 893 msgid "Preview" 835 894 msgstr "Anteprima" 836 895 837 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:2 91896 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:288 838 897 msgid "Real time payment directly from your bank account with EPS" 839 898 msgstr "Paga in tempo reale direttamente dal tuo conto bancario con EPS" 840 899 841 #: src/classes/Nexi/WC_Gateway_Admin.php:3 54900 #: src/classes/Nexi/WC_Gateway_Admin.php:395 842 901 msgid "Recurring Alias" 843 902 msgstr "Alias ricorrenze" 844 903 845 #: src/classes/Nexi/WC_Gateway_Admin.php: 360904 #: src/classes/Nexi/WC_Gateway_Admin.php:401 846 905 msgid "Recurring key MAC" 847 906 msgstr "Chiave MAC ricorrenze" 848 907 849 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:1 16908 #: src/classes/Nexi/WC_Gateway_NPG_Cards.php:139 850 909 #: src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php:179 851 910 msgid "Remember the payment option." … … 856 915 msgstr "Risposta KO" 857 916 858 #: templates/npg_payment_detail.php:1 08917 #: templates/npg_payment_detail.php:115 859 918 msgid "Result" 860 919 msgstr "Esito" 861 920 862 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:3 11921 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:308 863 922 msgid "Secure payment directly from your bank account with PayU" 864 923 msgstr "Paga in sicurezza direttamente dal tuo conto bancario con PayU" 865 924 866 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:29 6925 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:293 867 926 msgid "Secure payment directly from your bank account with Przelewy24" 868 927 msgstr "Paga in sicurezza direttamente dal tuo conto bancario con Przelewy24" 869 928 870 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:31 6929 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:313 871 930 msgid "Secure payment directly from your home banking with Blik" 872 931 msgstr "Paga in sicurezza direttamente dal tuo home banking con Blik" 873 932 874 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:3 21933 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:318 875 934 msgid "Secure payment directly from your home banking with Multibanco" 876 935 msgstr "Paga in sicurezza direttamente dal tuo home banking con Multibanco" 877 936 878 #: src/classes/Nexi/WC_Gateway_Admin.php:16 7937 #: src/classes/Nexi/WC_Gateway_Admin.php:168 879 938 msgid "" 880 939 "Select \"Alias and MAC Key\" option if you received the credentials of the " … … 886 945 "fase di attivazione del servizio" 887 946 888 #: src/classes/Nexi/WC_Gateway_Admin.php:16 8947 #: src/classes/Nexi/WC_Gateway_Admin.php:169 889 948 msgid "" 890 949 "Select \"APIKey\" option if you use the API Key as the credential of the " … … 938 997 msgstr "Visualizza widget" 939 998 940 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:2 41999 #: src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php:238 941 1000 msgid "" 942 1001 "Simply pay by bank transfer directly from your home banking with PagoinConto" … … 949 1008 msgstr "Stato: " 950 1009 951 #: src/classes/Nexi/WC_Gateway_Admin.php:2 461010 #: src/classes/Nexi/WC_Gateway_Admin.php:287 952 1011 msgid "Style configuration" 953 1012 msgstr "Configurazione stile" 954 1013 955 #: src/classes/Nexi/WC_Gateway_Admin.php:3 431014 #: src/classes/Nexi/WC_Gateway_Admin.php:384 956 1015 msgid "Subscription configuration" 957 1016 msgstr "Configurazione ricorrenze" … … 961 1020 msgstr "Codice fiscale" 962 1021 963 #: src/classes/Nexi/WC_Gateway_Admin.php:3 271022 #: src/classes/Nexi/WC_Gateway_Admin.php:368 964 1023 msgid "Text Color" 965 1024 msgstr "Colore testo" 966 1025 967 #: src/classes/Nexi/WC_Gateway_Admin.php:3 291026 #: src/classes/Nexi/WC_Gateway_Admin.php:370 968 1027 msgid "Text color in input field" 969 1028 msgstr "Colore del testo nei campi input" 970 1029 971 #: src/classes/Nexi/WC_Gateway_Admin.php:3 201030 #: src/classes/Nexi/WC_Gateway_Admin.php:361 972 1031 msgid "Text color of placeholder" 973 1032 msgstr "Il colore del testo del valore placeholder" … … 978 1037 msgstr "Grazie per l'acquisto. Tuttavia, la transazione è stata rifiutata." 979 1038 980 #: src/classes/Nexi/WC_Gateway_Admin.php:14 21039 #: src/classes/Nexi/WC_Gateway_Admin.php:143 981 1040 msgid "" 982 1041 "The 3D Secure 2 protocol adopted by the main international circuits (Visa, " … … 989 1048 "l’esperienza di acquisto del titolare della carta." 990 1049 991 #: src/classes/Nexi/WC_Gateway_Admin.php:21 21050 #: src/classes/Nexi/WC_Gateway_Admin.php:213 992 1051 msgid "" 993 1052 "The field identifies the collection method that the merchant wants to apply " … … 1006 1065 "terminale" 1007 1066 1008 #: src/classes/Nexi/WC_Gateway_Admin.php: 2601067 #: src/classes/Nexi/WC_Gateway_Admin.php:301 1009 1068 msgid "The font family in the CC Form" 1010 1069 msgstr "Il font family nel form per le carte di credito" 1011 1070 1012 #: src/classes/Nexi/WC_Gateway_Admin.php:1 391071 #: src/classes/Nexi/WC_Gateway_Admin.php:140 1013 1072 msgid "" 1014 1073 "The notification is essential for the functioning of the plugin, it is " … … 1029 1088 "nell'apposito form un nuovo indirizzo." 1030 1089 1031 #: src/classes/Nexi/WC_Gateway_Admin.php: 2681090 #: src/classes/Nexi/WC_Gateway_Admin.php:309 1032 1091 msgid "The size of the font in the CC Form in pixel" 1033 1092 msgstr "La gradezza del font nel form per le carte di credito" 1034 1093 1035 #: src/classes/Nexi/WC_Gateway_Admin.php: 2941094 #: src/classes/Nexi/WC_Gateway_Admin.php:335 1036 1095 msgid "The space between letters in pixel" 1037 1096 msgstr "Spaziatura in pixel" … … 1053 1112 msgstr[1] "Da Autorizzare (%s)" 1054 1113 1055 #: src/classes/Nexi/WC_Gateway_Admin.php:20 31114 #: src/classes/Nexi/WC_Gateway_Admin.php:204 1056 1115 msgid "to get the test credentials." 1057 1116 msgstr "per avere le tue credenziali di test." … … 1061 1120 msgstr "Codice transazione: " 1062 1121 1063 #: templates/ npg_payment_detail.php:69 templates/xpay_payment_detail.php:351122 #: templates/xpay_payment_detail.php:35 templates/npg_payment_detail.php:70 1064 1123 msgid "Transaction detail" 1065 1124 msgstr "Dettaglio transazione" 1066 1125 1067 #: templates/ npg_payment_detail.php:107 templates/xpay_payment_detail.php:731126 #: templates/xpay_payment_detail.php:73 templates/npg_payment_detail.php:114 1068 1127 msgid "Type of operation" 1069 1128 msgstr "Tipo di operazione" … … 1075 1134 "Impossibile contabilizzare l'ordine %s. L'ordine non ha un riferimento XPay." 1076 1135 1077 #: src/classes/Nexi/WC_Gateway_NPG_API.php: 4961136 #: src/classes/Nexi/WC_Gateway_NPG_API.php:505 1078 1137 msgid "Unable to complete account operation." 1079 1138 msgstr "Operazione di contabilizzazione fallita." 1080 1139 1081 #: src/classes/Nexi/WC_Gateway_NPG_API.php:43 01140 #: src/classes/Nexi/WC_Gateway_NPG_API.php:439 1082 1141 msgid "Unable to complete refund operation." 1083 1142 msgstr "Operazione di storno fallita." 1084 1143 1085 #: src/classes/Nexi/WC_Gateway_NPG_API.php:6 631144 #: src/classes/Nexi/WC_Gateway_NPG_API.php:672 1086 1145 msgid "Unable to finalize the payment." 1087 1146 msgstr "Errore durante la finalizzazione del pagamento." 1088 1147 1089 #: src/classes/Nexi/WC_Gateway_NPG_API.php:1 831090 #: src/classes/Nexi/WC_Gateway_NPG_API.php:6 421148 #: src/classes/Nexi/WC_Gateway_NPG_API.php:192 1149 #: src/classes/Nexi/WC_Gateway_NPG_API.php:651 1091 1150 msgid "Unable to initialize the payment." 1092 1151 msgstr "Errore durante l'inizializzazione del pagamento." 1093 1152 1094 #: src/classes/Nexi/WC_Gateway_NPG_API.php:5 461153 #: src/classes/Nexi/WC_Gateway_NPG_API.php:555 1095 1154 msgid "Unable to perform the recurring payment." 1096 1155 msgstr "Non è stato possibile effettuare il pagamento ricorrente." 1097 1156 1098 #: src/classes/Nexi/WC_Gateway_NPG_API.php:3 041099 #: src/classes/Nexi/WC_Gateway_NPG_API.php:3 251157 #: src/classes/Nexi/WC_Gateway_NPG_API.php:313 1158 #: src/classes/Nexi/WC_Gateway_NPG_API.php:334 1100 1159 msgid "Unable to retrive customer related info." 1101 1160 msgstr "Non è stato possibile recuperare le informazione legate al cliente." 1102 1161 1103 #: src/classes/Nexi/WC_Gateway_NPG_API.php:3 441104 #: src/classes/Nexi/WC_Gateway_NPG_API.php:3 521162 #: src/classes/Nexi/WC_Gateway_NPG_API.php:353 1163 #: src/classes/Nexi/WC_Gateway_NPG_API.php:361 1105 1164 msgid "Unable to retrive order related info." 1106 1165 msgstr "Non è stato possibile recuperare le informazione legate all'ordine." 1166 1167 #: src/classes/Nexi/WC_Gateway_Admin.php:445 1168 msgid "Up to an amount of" 1169 msgstr "Fino ad un importo di" 1107 1170 1108 1171 #: woocommerce-gateway-nexi-xpay.php:301 … … 1115 1178 "calcoli corretti." 1116 1179 1117 #: src/classes/Nexi/WC_Gateway_Admin.php:3 111180 #: src/classes/Nexi/WC_Gateway_Admin.php:352 1118 1181 msgid "When form has error" 1119 1182 msgstr "Quando il form ha errori" 1120 1183 1121 #: src/classes/Nexi/WC_Gateway_Admin.php:3 021184 #: src/classes/Nexi/WC_Gateway_Admin.php:343 1122 1185 msgid "When form is empty or correct" 1123 1186 msgstr "Quando il form è vuoto o corretto" … … 1143 1206 msgstr "Sessione XPay Build scaduta" 1144 1207 1145 #: src/classes/Nexi/WC_Admin_Page.php:1 261208 #: src/classes/Nexi/WC_Admin_Page.php:132 1146 1209 msgid "XPay payment details" 1147 1210 msgstr "Dettagli di pagamento XPay" 1148 1211 1149 #: src/classes/Nexi/WC_Admin_Page.php:1 491212 #: src/classes/Nexi/WC_Admin_Page.php:156 1150 1213 msgid "Zloty" 1151 1214 msgstr "Zloty" -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Admin_Page.php
r3017100 r3087870 20 20 { 21 21 $instance = new static(); 22 add_action('add_meta_boxes', array($instance, 'add_meta_box_details_payment_nexixpay')); 22 23 add_action('add_meta_boxes', array($instance, 'add_meta_box_details_payment_nexixpay'), 10, 2); 23 24 24 25 wp_enqueue_script('xpay-admin-checkout', plugins_url('assets/js/xpay-admin.js', WC_ECOMMERCE_GATEWAY_NEXI_MAIN_FILE), array('jquery'), WC_GATEWAY_XPAY_VERSION); … … 103 104 } 104 105 105 public function add_meta_box_details_payment_nexixpay() 106 { 107 $order_id = get_post_field("ID"); 106 public function add_meta_box_details_payment_nexixpay($post_type, $post) 107 { 108 $order_id = $post->ID; 109 108 110 $order = wc_get_order($order_id); 111 109 112 if (!$order) { 110 113 return; 111 114 } 112 115 113 $np OrderId = get_post_meta($order_id,"_npg_" . "orderId", true);114 115 if ($np OrderId != "") {116 $npgOrderId = get_post_meta($order_id, "_npg_" . "orderId", true); 117 118 if ($npgOrderId != "") { 116 119 if ($order->get_payment_method() === 'xpay' || substr($order->get_payment_method(), 0, 9) == 'xpay_npg_' || substr($order->get_payment_method(), 0, 10) == 'xpay_build') { 117 add_meta_box('xpay-subscription-box', __('Nexi payment details', 'woocommerce-gateway-nexi-xpay'), array($this, 'details_payment_npg'), 'shop_order', 'normal', 'high'); 120 foreach (array('woocommerce_page_wc-orders', 'shop_order') as $type) { 121 add_meta_box('xpay-subscription-box', __('Nexi payment details', 'woocommerce-gateway-nexi-xpay'), array($this, 'details_payment_npg'), $type, 'normal', 'high'); 122 } 118 123 } 119 124 } else { … … 124 129 125 130 if ($order->get_payment_method() === 'xpay' || substr($order->get_payment_method(), 0, 5) == 'xpay_') { 126 add_meta_box('xpay-subscription-box', __('XPay payment details', 'woocommerce-gateway-nexi-xpay'), array($this, 'details_payment_xpay'), 'shop_order', 'normal', 'high'); 131 foreach (array('woocommerce_page_wc-orders', 'shop_order') as $type) { 132 add_meta_box('xpay-subscription-box', __('XPay payment details', 'woocommerce-gateway-nexi-xpay'), array($this, 'details_payment_xpay'), $type, 'normal', 'high'); 133 } 127 134 } 128 135 } … … 155 162 } 156 163 157 public function details_payment_xpay() 158 { 159 $order_id = get_post_field("ID"); 164 public function details_payment_xpay($post) 165 { 166 $order_id = $post->ID; 167 160 168 $transactionCodTrans = WC_Nexi_Helper::get_xpay_post_meta($order_id, 'codTrans'); 161 169 … … 246 254 } 247 255 248 public function details_payment_npg( )249 { 250 $order_id = get_post_field("ID");256 public function details_payment_npg($post) 257 { 258 $order_id = $post->ID; 251 259 252 260 try { … … 276 284 277 285 $accountUrl = get_rest_url(null, "woocommerce-gateway-nexi-xpay/process_account/npg/" . $order->get_id()); 286 287 $installmentsNumber = get_post_meta($order_id, "_npg_" . "installmentsNumber", true); 278 288 } catch (\Exception $exc) { 279 289 Log::actionWarning(__FUNCTION__ . ': ' . $exc->getMessage()); … … 284 294 include_once WC_Nexi_Helper::get_nexi_template_path('npg_payment_detail.php'); 285 295 } 296 286 297 } -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Gateway_Admin.php
r3017100 r3087870 1 1 <?php 2 3 2 /** 4 3 * Copyright (c) 2019 Nexi Payments S.p.A. … … 66 65 public static function my_error_notice_xpay() 67 66 { 68 ?>67 ?> 69 68 <div class="error notice"> 70 69 <p><?php echo __('Invalid credentials. Check and try again.', 'woocommerce-gateway-nexi-xpay'); ?></p> 71 70 </div> 72 <?php 73 } 74 71 <?php 72 } 75 73 76 74 public static function my_error_notice_npg() 77 75 { 78 ?>76 ?> 79 77 <div class="error notice"> 80 78 <p><?php echo __('Invalid API Key. Check and try again.', 'woocommerce-gateway-nexi-xpay'); ?></p> 81 79 </div> 82 <?php80 <?php 83 81 } 84 82 … … 137 135 parent::init_form_fields(); 138 136 139 140 137 $descriptionEnable = __('For a correct behavior of the module, check in the configuration section of the Nexi back-office that the transaction cancellation in the event of a failed notification is set.', 'woocommerce-gateway-nexi-xpay') . '<br/><br/>' 141 138 . __('A POST notification by the Nexi servers is sent to the following address, containing information on the outcome of the payment.', 'woocommerce-gateway-nexi-xpay') . '<br/>' … … 169 166 GATEWAY_NPG => __('APIKey', 'woocommerce-gateway-nexi-xpay') 170 167 ), 171 'description' => '- ' . __('Select "Alias and MAC Key" option if you received the credentials of the production environment in the Welcome Mail received from Nexi during the activation of the service', 'woocommerce-gateway-nexi-xpay') . '<br />'172 . '- ' . __('Select "APIKey" option if you use the API Key as the credential of the production environment generated from the Back Office XPay. Follow the directions in the developer portal for the correct generation process.', 'woocommerce-gateway-nexi-xpay'),168 'description' => '- ' . __('Select "Alias and MAC Key" option if you received the credentials of the production environment in the Welcome Mail received from Nexi during the activation of the service', 'woocommerce-gateway-nexi-xpay') . '<br />' 169 . '- ' . __('Select "APIKey" option if you use the API Key as the credential of the production environment generated from the Back Office XPay. Follow the directions in the developer portal for the correct generation process.', 'woocommerce-gateway-nexi-xpay'), 173 170 'class' => 'gateway-input' 174 171 ) … … 242 239 'description' => __('Enable this option to make the payment methods available for different currencies. To have the complete list of the supported currencies, please visit the developer Portal. Make sure that this option is also enabled on your terminal configuration.', 'woocommerce-gateway-nexi-xpay'), 243 240 'class' => 'npg-only', 241 ), 242 )); 243 244 $this->form_fields = array_merge($this->form_fields, array( 245 'nexi_xpay_installments_enabled' => array( 246 'title' => __('Enable/Disable Installment Payments', 'woocommerce-gateway-nexi-xpay'), 247 'type' => 'checkbox', 248 'label' => __('Enable/Disable Installment Payments', 'woocommerce-gateway-nexi-xpay'), 249 'default' => 'no', 250 'description' => __('Enable this option to use installment payments via XPay. This functionality is only available to merchants with Greek VAT Number. Before enabling this functionality, make sure it is available on your terminal with your payment provider.', 'woocommerce-gateway-nexi-xpay'), 251 'class' => 'npg-only installments-enabled', 252 ), 253 )); 254 255 $maxInstallmentsOptions = array(); 256 257 for ($i = 2; $i < 100; $i++) { 258 $maxInstallmentsOptions[$i] = $i; 259 } 260 261 $this->form_fields = array_merge($this->form_fields, array( 262 'nexi_xpay_max_installments' => array( 263 'title' => __('Maximum number of installments regardless of the total order amount', 'woocommerce-gateway-nexi-xpay'), 264 'type' => 'select', 265 'options' => $maxInstallmentsOptions, 266 'label' => __('Maximum number of installments regardless of the total order amount', 'woocommerce-gateway-nexi-xpay'), 267 'default' => 'no', 268 'description' => __('1 to 99 installments, 1 for one shot payment. Before set up a configuration, make sure to check with your payment provider what is the maximum number accepted for your terminal.', 'woocommerce-gateway-nexi-xpay'), 269 'class' => 'npg-only installments-only', 270 ), 271 )); 272 273 $this->form_fields = array_merge($this->form_fields, array( 274 'nexi_xpay_installments_ranges' => array( 275 'title' => __('Maximum number of installments depending on the total order amount', 'woocommerce-gateway-nexi-xpay'), 276 'type' => 'field_group', 277 'label' => __('Maximum number of installments depending on the total order amount', 'woocommerce-gateway-nexi-xpay'), 278 'default' => '[]', 279 'description' => __('Add amount and installments for each row. The installments limit is 99', 'woocommerce-gateway-nexi-xpay'), 280 'class' => 'npg-only installments-only', 244 281 ), 245 282 )); … … 375 412 )); 376 413 } 414 } 415 416 /** 417 * Generate Field group HTML. 418 * 419 * @param mixed $key 420 * @param mixed $data 421 * @return string 422 */ 423 public function generate_field_group_html($key, $data) 424 { 425 $field = $this->plugin_id . $this->id . '_' . $key; 426 427 $value = $this->get_option($key); 428 429 if ($value === false || $value === null || $value === "") { 430 $value = $data['default']; 431 } 432 433 ob_start(); 434 ?> 435 <tr valign="top"> 436 <th scope="row" class="titledesc"> 437 <label for="<?php echo esc_attr($field); ?>"><?php echo wp_kses_post($data['title']); ?></label> 438 </th> 439 <td class="forminp <?php echo esc_attr($data['class']); ?>"> 440 <fieldset> 441 <div id="installments-ranges-variations-container"> 442 <table> 443 <thead> 444 <tr> 445 <th><?php echo __('Up to an amount of', 'woocommerce-gateway-nexi-xpay'); ?></th> 446 <th><?php echo __('Maximum installments', 'woocommerce-gateway-nexi-xpay'); ?></th> 447 <th></th> 448 </tr> 449 </thead> 450 <tbody></tbody> 451 </table> 452 </div> 453 454 <div> 455 <button class="button" id="add-ranges-variation"><?php echo __('Add rule', 'woocommerce-gateway-nexi-xpay'); ?></button> 456 </div> 457 458 <input type="hidden" id="ranges-delete-label" value="<?php echo __('Delete', 'woocommerce-gateway-nexi-xpay'); ?>" /> 459 460 <input type="hidden" id="<?php echo esc_attr($key); ?>" name="<?php echo esc_attr($field); ?>" value="<?php echo esc_attr($value); ?>" /> 461 </fieldset> 462 463 <style> 464 #installments-ranges-variations-container table thead th, 465 #installments-ranges-variations-container table tbody td { 466 padding: 5px 10px; 467 padding-left: 0; 468 width: 200px; 469 } 470 471 #installments-ranges-variations-container table tbody td input { 472 width: 190px; 473 } 474 475 #installments-ranges-variations-container { 476 margin-bottom: 20px; 477 } 478 </style> 479 </td> 480 </tr> 481 <?php 482 return ob_get_clean(); 377 483 } 378 484 … … 389 495 390 496 ob_start(); 391 ?>497 ?> 392 498 <tr valign="top"> 393 499 <th scope="row" class="titledesc"> … … 396 502 <td class="forminp <?php echo esc_attr($data['class']); ?>"> 397 503 <fieldset> 398 399 504 <?php 400 505 if ($this->id == "xpay") { 401 ?>506 ?> 402 507 403 508 <label for="<?php echo esc_attr($field); ?>"><?php echo wp_kses_post($data['label']); ?></label> … … 405 510 <?php echo $this->get_description_html($data); ?> 406 511 407 <?php 408 512 <?php 409 513 } else { 410 411 514 $path = plugin_dir_path(WC_ECOMMERCE_GATEWAY_NEXI_MAIN_FILE); 412 515 … … 414 517 } 415 518 ?> 416 417 519 </fieldset> 418 520 </td> 419 521 </tr> 420 <?php522 <?php 421 523 return ob_get_clean(); 422 524 } … … 434 536 435 537 ob_start(); 436 ?>538 ?> 437 539 <tr valign="top"> 438 540 <th scope="row" class="titledesc"> … … 447 549 </td> 448 550 </tr> 449 <?php551 <?php 450 552 return ob_get_clean(); 451 553 } … … 471 573 ); 472 574 } 575 473 576 } -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Gateway_NPG_API.php
r2975087 r3087870 114 114 } 115 115 116 public function new_payment_link($order, $recurringPayment, $cart, $selectedToken, $saveCard, $selectedC = 'CARDS')116 public function new_payment_link($order, $recurringPayment, $cart, $selectedToken, $saveCard, $selectedC, $installmentsNumber) 117 117 { 118 118 try { … … 130 130 "description" => "WC Order " . $order->get_id(), 131 131 "customField" => "Woocommerce " . WC_WOOCOMMERCE_GATEWAY_NEXI_XPAY_WOOCOMMERCE_VERSION . " - nexi" . WC_GATEWAY_NEXI_PLUGIN_VARIANT . " " . WC_GATEWAY_XPAY_VERSION, 132 "customerId" => $customerId132 "customerId" => $customerId 133 133 ), 134 134 "paymentSession" => array( … … 147 147 ); 148 148 149 if ($installmentsNumber && $installmentsNumber >= 2) { 150 $payload["order"]["plan"] = array( 151 "planType" => "ACQUIRER_AGREEMENT", 152 "installmentQty" => $installmentsNumber, 153 ); 154 155 update_post_meta($order->get_id(), "_npg_" . "installmentsNumber", $installmentsNumber); 156 } 157 149 158 if ($recurringPayment) { 150 159 if (!$this->nexi_xpay_recurring_enabled) { … … 332 341 { 333 342 try { 334 $npgOrderId = get_post_meta($order_id, "_npg_" . "orderId", true);343 $npgOrderId = get_post_meta($order_id, "_npg_" . "orderId", true); 335 344 336 345 if (!$npgOrderId) { … … 509 518 "currency" => $order->get_currency(), 510 519 "customField" => "WC Order " . $order->get_id(), 511 "customerId" => $customerId,520 "customerId" => $customerId, 512 521 ], 513 522 "contractId" => $contractId, … … 515 524 ]; 516 525 517 $params = WC_NPG_3DS20_Data_Provider::calculate_params($order);526 $params = WC_NPG_3DS20_Data_Provider::calculate_params($order); 518 527 519 528 if (count($params) > 0) { … … 537 546 return $orderId; 538 547 } else if (in_array($operation['operationResult'], NPG_PAYMENT_FAILURE)) { 539 throw new \Exception('Payment failed - ' . json_encode($response));548 throw new \Exception('Payment failed - ' . json_encode($response)); 540 549 } else { 541 550 throw new \Exception('Invalid operationResult - ' . json_encode($response)); … … 587 596 "description" => "WC Order ", 588 597 "customField" => "Woocommerce " . WC_WOOCOMMERCE_GATEWAY_NEXI_XPAY_WOOCOMMERCE_VERSION . " - nexi" . WC_GATEWAY_NEXI_PLUGIN_VARIANT . " " . WC_GATEWAY_XPAY_VERSION, 589 "customerId" => $customerId,598 "customerId" => $customerId, 590 599 ), 591 600 "paymentSession" => array( … … 733 742 734 743 Log::actionInfo(__FUNCTION__ . ' - Request : ' . json_encode([ 735 'method' => $method,736 'requestUrl' => $requestUrl,737 'httpHeader' => array_splice($httpHeader, 1),738 'payload' => $payload,739 'extraHeaders' => $extraHeaders744 'method' => $method, 745 'requestUrl' => $requestUrl, 746 'httpHeader' => array_splice($httpHeader, 1), 747 'payload' => $payload, 748 'extraHeaders' => $extraHeaders 740 749 ])); 741 750 … … 814 823 815 824 while (strlen($id) < $length) { 816 $id .= (int) ((rand() * rand()) / rand());825 $id .= (int) ((rand() * rand()) / rand()); 817 826 } 818 827 … … 824 833 return substr(md5($prefix . $customerId . '-' . time()), 0, 18); 825 834 } 835 826 836 } -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Gateway_NPG_APM.php
r3029363 r3087870 16 16 class WC_Gateway_NPG_APM extends WC_Gateway_NPG_Generic_Method 17 17 { 18 18 19 protected $selectedCard; 19 20 … … 38 39 39 40 try { 40 $recurringPayment = class_exists("\WC_Subscriptions_Cart") && \WC_Subscriptions_Cart::cart_contains_subscription();41 $recurringPayment = WC_Nexi_Helper::order_or_cart_contains_subscription($order); 41 42 42 43 update_post_meta($order_id, "_npg_" . "is_build", false); 43 44 44 $redirectLink = WC_Gateway_NPG_API::getInstance()->new_payment_link($order, $recurringPayment, WC()->cart, false, false, $this->selectedCard );45 $redirectLink = WC_Gateway_NPG_API::getInstance()->new_payment_link($order, $recurringPayment, WC()->cart, false, false, $this->selectedCard, 0); 45 46 46 47 $result = 'success'; … … 79 80 ); 80 81 } 82 81 83 } -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Gateway_NPG_Cards.php
r3017100 r3087870 1 1 <?php 2 3 2 /** 4 3 * Copyright (c) 2019 Nexi Payments S.p.A. … … 23 22 $this->supports = array_merge($this->supports, ['tokenization']); 24 23 25 $this->method_title = __('Payment cards', 'woocommerce-gateway-nexi-xpay');26 $this->method_description = __('Payment gateway.', 'woocommerce-gateway-nexi-xpay');24 $this->method_title = __('Payment cards', 'woocommerce-gateway-nexi-xpay'); 25 $this->method_description = __('Payment gateway.', 'woocommerce-gateway-nexi-xpay'); 27 26 $this->title = $this->method_title; 28 27 … … 36 35 37 36 try { 38 $recurringPayment = class_exists("\WC_Subscriptions_Cart") && \WC_Subscriptions_Cart::cart_contains_subscription();37 $recurringPayment = WC_Nexi_Helper::order_or_cart_contains_subscription($order); 39 38 40 39 $selectedToken = 'new'; … … 49 48 } 50 49 51 $redirectLink = WC_Gateway_NPG_API::getInstance()->new_payment_link($order, $recurringPayment, WC()->cart, $selectedToken, $saveCard); 50 $installmentsNumber = 0; 51 52 if (isset($_REQUEST["nexi-xpay-installments-number"])) { 53 $installmentsNumber = $_REQUEST["nexi-xpay-installments-number"]; 54 } 55 56 $redirectLink = WC_Gateway_NPG_API::getInstance()->new_payment_link($order, $recurringPayment, WC()->cart, $selectedToken, $saveCard, 'CARDS', $installmentsNumber); 52 57 53 58 $result = 'success'; … … 93 98 $this->tokenization_script(); 94 99 95 echo $this->description . '<br>'; 96 97 $isRecurring = (class_exists("\WC_Subscriptions_Cart") && \WC_Subscriptions_Cart::cart_contains_subscription()); 100 echo $this->description . '<br />'; 101 102 $installmentsInfo = $this->get_installments_info(); 103 104 if ($installmentsInfo["installments_enabled"]) { 105 ?> 106 <fieldset> 107 <label for="nexi-xpay-installments-number" style="display: block;"> 108 <?php echo __('Installments', 'woocommerce-gateway-nexi-xpay'); ?> 109 </label> 110 <select id="nexi-xpay-installments-number" name="nexi-xpay-installments-number"> 111 <option value=""><?php echo __('One time solution', 'woocommerce-gateway-nexi-xpay'); ?></option> 112 <?php foreach ($installmentsInfo['max_installments'] as $installmentsNumber) { ?> 113 <option value="<?php echo $installmentsNumber; ?>"><?php echo $installmentsNumber; ?></option> 114 <?php } ?> 115 </select> 116 </fieldset> 117 <?php 118 } 119 120 $isRecurring = WC_Nexi_Helper::cart_contains_subscription(); 98 121 99 122 if (!$isRecurring) { … … 102 125 103 126 if ($isRecurring) { 104 ?>127 ?> 105 128 <fieldset id="wc-<?php echo esc_attr($this->id) ?>-cc-form"> 106 129 <?php … … 108 131 ?> 109 132 </fieldset> 110 <?php133 <?php 111 134 } else if ($this->settings["nexi_xpay_oneclick_enabled"] == "yes") { 112 ?>135 ?> 113 136 <fieldset id="wc-<?php echo esc_attr($this->id) ?>-cc-form"> 114 137 <p class="form-row woocommerce-SavedPaymentMethods-saveNew"> … … 117 140 </p> 118 141 </fieldset> 119 <?php142 <?php 120 143 } 121 144 } … … 131 154 } 132 155 } 156 157 private function get_installments_info() 158 { 159 $installmentsEnabled = $this->settings["nexi_xpay_installments_enabled"] === "yes"; 160 161 $maxInstallments = array(); 162 163 if ($installmentsEnabled) { 164 $tot = min($this->settings["nexi_xpay_max_installments"] ?? 99, $this->get_max_installments_number_by_cart()); 165 166 for ($i = 2; $i <= $tot; $i++) { 167 $maxInstallments[] = $i; 168 } 169 } 170 171 return array( 172 'installments_enabled' => $installmentsEnabled && count($maxInstallments) > 0, 173 'max_installments' => $maxInstallments, 174 ); 175 } 176 177 private function get_max_installments_number_by_cart() 178 { 179 $nInstallments = null; 180 181 $ranges = json_decode($this->settings["nexi_xpay_installments_ranges"], true); 182 183 if (is_array($ranges) && count($ranges)) { 184 $baseGrandTotal = floatval(WC()->cart->total); 185 186 $rangesValues = array_values($ranges); 187 188 $toAmount = array_column($rangesValues, 'to_amount'); 189 190 array_multisort($toAmount, SORT_ASC, $rangesValues); 191 192 foreach ($rangesValues as $value) { 193 if ($baseGrandTotal <= $value['to_amount']) { 194 $nInstallments = (int) $value['n_installments']; 195 break; 196 } 197 } 198 } 199 200 return $nInstallments ?? 99; 201 } 202 133 203 } -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Gateway_NPG_Cards_Build.php
r3017100 r3087870 41 41 } 42 42 43 $isRecurring = (class_exists("\WC_Subscriptions_Cart") && \WC_Subscriptions_Cart::cart_contains_subscription());43 $isRecurring = WC_Nexi_Helper::cart_contains_subscription(); 44 44 45 45 echo $this->description . "<br>"; … … 118 118 $total = floatval(WC()->cart->total); 119 119 120 $isRecurring = (class_exists("\WC_Subscriptions_Cart") && \WC_Subscriptions_Cart::cart_contains_subscription());120 $isRecurring = WC_Nexi_Helper::cart_contains_subscription(); 121 121 122 122 $orderId = null; … … 143 143 wp_die(); 144 144 } 145 145 146 } -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Gateway_NPG_Generic_Method.php
r3017100 r3087870 29 29 public function get_sorted_cards_images() 30 30 { 31 $avai able_methods_npg = json_decode(\WC_Admin_Settings::get_option('xpay_npg_available_methods'), true);31 $available_methods_npg = json_decode(\WC_Admin_Settings::get_option('xpay_npg_available_methods'), true); 32 32 $cards = [ 33 33 'MC', … … 42 42 $image_list = array_fill(0, count($cards), null); 43 43 44 foreach ($avaiable_methods_npg as $apm) { 45 if ($apm['paymentMethodType'] != 'CARDS') { 46 continue; 44 if (is_array($available_methods_npg)) { 45 foreach ($available_methods_npg as $apm) { 46 if ($apm['paymentMethodType'] != 'CARDS') { 47 continue; 48 } 49 50 if (!in_array($apm['circuit'], $cards)) { 51 continue; 52 } 53 54 array_splice($image_list, array_search($apm['circuit'], $cards), 1, [$apm['imageLink']]); 47 55 } 48 49 if (!in_array($apm['circuit'], $cards)) {50 continue;51 }52 53 array_splice($image_list, array_search($apm['circuit'], $cards), 1, [$apm['imageLink']]);54 56 } 55 57 … … 130 132 } 131 133 } 134 132 135 } -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Gateway_NPG_Lock_Handler.php
r3017100 r3087870 17 17 { 18 18 19 private static function set_order_validate_lock($order_id, $npg_order_id)19 private static function get_table_name() 20 20 { 21 update_post_meta($order_id, '_npg_lock_' . $npg_order_id, 1); 21 global $wpdb; 22 23 $table_name = $wpdb->prefix . 'nexi_' . WC_GATEWAY_NEXI_PLUGIN_VARIANT . '_order_lock'; 24 25 return $table_name; 22 26 } 23 27 24 private static function can_take_lock($order_id, $npg_order_id)28 private static function take_lock($order_id, $function) 25 29 { 26 //not using get_post_meta because its value could be chached therefore not correct27 28 30 global $wpdb; 29 31 30 $result = $wpdb->get_results(" SELECT * 31 FROM " . $wpdb->prefix . "postmeta 32 WHERE post_id = " . $order_id . " AND meta_key = '_npg_lock_" . $npg_order_id . "'"); 33 34 $lock = is_array($result) && !empty($result); 35 36 return !$lock; 32 return $wpdb->insert(self::get_table_name(), array('id' => $order_id, 'caller' => $function), array('%d', '%s')); 37 33 } 38 34 39 public static function chek_and_take_lock($order_id, $npg_order_id) 35 public static function create_lock_table() 36 { 37 global $wpdb; 38 39 $table_name = self::get_table_name(); 40 41 $charset_collate = $wpdb->get_charset_collate(); 42 43 $sql = " CREATE TABLE $table_name (id bigint(20) UNSIGNED NOT NULL, caller VARCHAR(64) NOT NULL, PRIMARY KEY (id) ) $charset_collate; "; 44 45 require_once ABSPATH . 'wp-admin/includes/upgrade.php'; 46 47 dbDelta($sql); 48 } 49 50 public static function check_and_take_lock($order_id, $function) 40 51 { 41 52 $i = 0; … … 44 55 ++$i; 45 56 46 if (static::can_take_lock($order_id, $npg_order_id)) { 47 static::set_order_validate_lock($order_id, $npg_order_id); 57 if (static::take_lock($order_id, $function) !== false) { 48 58 return true; 49 59 } … … 57 67 } 58 68 59 public static function release_lock($order_id , $npg_order_id)69 public static function release_lock($order_id) 60 70 { 61 delete_post_meta($order_id, '_npg_lock_' . $npg_order_id); 71 global $wpdb; 72 73 $wpdb->delete(self::get_table_name(), array('id' => $order_id), array('%d')); 62 74 } 75 63 76 } -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Gateway_NPG_Process_Completion.php
r3017100 r3087870 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 wc_add_notice(__('Payment error, please try again', 'woocommerce-gateway-nexi-xpay') . ($error_message != "" ? " (" . htmlentities($error_message ?? "") . ")" : ""), 'error'); 89 89 90 90 $payment_error = get_post_meta($order_id, '_npg_' . 'payment_error', true); … … 105 105 private static function check_if_build_and_get_wc_order_id($order_id) 106 106 { 107 if ((bool) get_post_meta($order_id, "_npg_" . "is_build", true) && get_post_meta($order_id, "_npg_" . "wc_order_id", true)) {107 if ((bool) get_post_meta($order_id, "_npg_" . "is_build", true) && get_post_meta($order_id, "_npg_" . "wc_order_id", true)) { 108 108 return get_post_meta($order_id, "_npg_" . "wc_order_id", true); 109 109 } … … 131 131 } 132 132 133 $npg_order_id = $params['operation']['orderId']; 134 135 if (!WC_Gateway_NPG_Lock_Handler::chek_and_take_lock($order_id, $npg_order_id)) { 133 if (!WC_Gateway_NPG_Lock_Handler::check_and_take_lock($order_id, __FUNCTION__)) { 136 134 Log::actionWarning(__FUNCTION__ . ': Couldn\'t get execution lock'); 137 135 … … 146 144 Log::actionWarning(__FUNCTION__ . ': Invalid securityToken for order: ' . $order_id . ' - Request: ' . json_encode($params)); 147 145 148 WC_Gateway_NPG_Lock_Handler::release_lock($order_id , $npg_order_id);146 WC_Gateway_NPG_Lock_Handler::release_lock($order_id); 149 147 150 148 return new \WP_REST_Response($payload, $status, []); … … 169 167 } 170 168 171 WC_Gateway_NPG_Lock_Handler::release_lock($order_id , $npg_order_id);169 WC_Gateway_NPG_Lock_Handler::release_lock($order_id); 172 170 173 171 return new \WP_REST_Response($payload, $status, []); … … 176 174 public static function redirect($data) 177 175 { 176 sleep(2); 177 178 178 $params = $data->get_params(); 179 179 … … 184 184 $npg_order_id = get_post_meta($order_id, '_npg_' . 'orderId', true); 185 185 186 if (!WC_Gateway_NPG_Lock_Handler::che k_and_take_lock($order_id, $npg_order_id)) {186 if (!WC_Gateway_NPG_Lock_Handler::check_and_take_lock($order_id, __FUNCTION__)) { 187 187 Log::actionWarning(__FUNCTION__ . ': Couldn\'t get execution lock'); 188 188 … … 213 213 $authorizationRecord = WC_Gateway_NPG_API::getInstance()->get_order_status($order_id); 214 214 215 if ($c == 10) {216 Log::actionWarning(__FUNCTION__ . ": reached max num mber of GET for order: " . $order_id);215 if ($c == 20) { 216 Log::actionWarning(__FUNCTION__ . ": reached max number of GET for order: " . $order_id); 217 217 break; 218 218 } … … 232 232 $order = new \WC_Order($order_id); 233 233 234 if ($order->needs_payment() ) {235 WC_Gateway_NPG_Lock_Handler::release_lock($order_id , $npg_order_id);234 if ($order->needs_payment() || $order->get_status() == 'cancelled') { 235 WC_Gateway_NPG_Lock_Handler::release_lock($order_id); 236 236 237 237 return new \WP_REST_Response( … … 246 246 } 247 247 248 WC_Gateway_NPG_Lock_Handler::release_lock($order_id , $npg_order_id);248 WC_Gateway_NPG_Lock_Handler::release_lock($order_id); 249 249 250 250 return new \WP_REST_Response( … … 267 267 case NPG_OR_EXECUTED: 268 268 if (!in_array($order->get_status(), ['completed', 'processing'])) { 269 $completed = $order->payment_complete(get_post_meta($order_id, "_npg_" . "orderId", true));269 $completed = $order->payment_complete(get_post_meta($order_id, "_npg_" . "orderId", true)); 270 270 271 271 if ($completed) { 272 Log::actionInfo(__FUNCTION__ . ": order completed: " . $order_id); 273 272 274 WC_Save_Order_Meta::saveSuccessNpg( 273 275 $order_id, … … 298 300 case NPG_OR_3DS_FAILED: 299 301 case NPG_OR_FAILED: 300 if ( $order->get_status() != 'failed') {302 if (!in_array($order->get_status(), ['failed', 'cancelled'])) { 301 303 $order->update_status('failed'); 302 304 } … … 304 306 Log::actionWarning(__FUNCTION__ . ': payment error'); 305 307 306 $error = $operation['operationResult'];308 $error = $operation['operationResult']; 307 309 308 310 foreach ($operation['warnings'] as $warning) { … … 399 401 } 400 402 } 403 401 404 } -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Gateway_Nexi_Register_Available.php
r3029363 r3087870 39 39 'MY_BANK', 40 40 'PAGODIL', 41 'KLARNA', 42 'PAGOLIGHT', 43 'PAYPAL_BNPL', 41 44 ), 42 45 'CZK' => array( … … 45 48 'PLN' => array( 46 49 'PAYU', 47 'BLIK' 50 'BLIK', 48 51 ), 49 52 'NZD' => array( 50 'POLI' 53 'POLI', 51 54 ), 52 55 'AUD' => array( 53 'POLI' 54 ) 56 'POLI', 57 ), 58 'GBP' => array( 59 'KLARNA', 60 ), 61 'DKK' => array( 62 'KLARNA', 63 ), 55 64 ); 56 65 private static $xpayMinAmounts = array( … … 61 70 'PAYU' => 300, 62 71 'BLIK' => 100, 63 'POLI' => 100 72 'POLI' => 100, 73 'KLARNA' => 3500, 74 'PAGOLIGHT' => 6000, 75 'PAYPAL_BNPL' => 3000, 76 ); 77 private static $xpayMaxAmounts = array( 78 'KLARNA' => 150000, 79 'PAGOLIGHT' => 500000, 80 'PAYPAL_BNPL' => 200000, 64 81 ); 65 82 … … 88 105 private function evaluate_all() 89 106 { 90 global $pagenow , $wp;107 global $pagenow; 91 108 92 109 $this->paymentGateways = array(); 93 110 94 if (is_admin() && $pagenow == 'admin.php' ) {111 if (is_admin() && $pagenow == 'admin.php' && $_GET['page'] == 'wc-settings' && $_GET['tab'] == 'checkout') { 95 112 $this->paymentGateways[] = new \Nexi\WC_Gateway_Admin(); 96 113 } else { … … 181 198 } 182 199 200 // Test for maximum amount. Each APM can have a maximum amount for payment processing 201 if (WC_Nexi_Helper::nexi_array_key_exists(self::$xpayMaxAmounts, $am['selectedcard']) && isset(WC()->cart)) { 202 $currentCartAmount = WC_Nexi_Helper::mul_bcmul(WC()->cart->total, 100, 0); 203 204 if ($currentCartAmount > self::$xpayMaxAmounts[$am['selectedcard']]) { 205 return; 206 } 207 } 208 183 209 // Test for PagoDIL configuration. Cart must be payable in installable to pay with PagoDIL 184 210 if ($am['selectedcard'] == 'PAGODIL' && isset(WC()->cart)) { … … 214 240 215 241 // Test for minimum amount. Each APM can have a minimum amount for payment processing 216 if (isset(WC()->cart)) { 217 $currentCartAmount = \Nexi\WC_Gateway_NPG_Currency::calculate_amount_to_min_unit(WC()->cart->total, $this->currency); 218 219 if ($apmInfo['min_amount'] !== null && $currentCartAmount < $apmInfo['min_amount']) { 220 return; 242 if (isset($apmInfo['min_amount'])) { 243 if (isset(WC()->cart)) { 244 $currentCartAmount = \Nexi\WC_Gateway_NPG_Currency::calculate_amount_to_min_unit(WC()->cart->total, $this->currency); 245 246 if ($currentCartAmount < $apmInfo['min_amount']) { 247 return; 248 } 249 } 250 } 251 252 // Test for maximum amount. Each APM can have a maximum amount for payment processing 253 if (isset($apmInfo['max_amount'])) { 254 if (isset(WC()->cart)) { 255 $currentCartAmount = \Nexi\WC_Gateway_NPG_Currency::calculate_amount_to_min_unit(WC()->cart->total, $this->currency); 256 257 if ($currentCartAmount > $apmInfo['max_amount']) { 258 return; 259 } 221 260 } 222 261 } … … 238 277 'description' => __('Simply pay by bank transfer directly from your home banking with PagoinConto', 'woocommerce-gateway-nexi-xpay'), 239 278 'min_amount' => null, 279 'max_amount' => null, 240 280 ], 241 281 'GOOGLEPAY' => [ … … 243 283 'description' => __('Easily pay with your Google Pay wallet', 'woocommerce-gateway-nexi-xpay'), 244 284 'min_amount' => null, 285 'max_amount' => null, 245 286 ], 246 287 'APPLEPAY' => [ … … 248 289 'description' => __('Easily pay with your Apple Pay wallet', 'woocommerce-gateway-nexi-xpay'), 249 290 'min_amount' => null, 291 'max_amount' => null, 250 292 ], 251 293 'BANCOMATPAY' => [ … … 253 295 'description' => __('Pay via BANCOMAT Pay just by entering your phone number', 'woocommerce-gateway-nexi-xpay'), 254 296 'min_amount' => null, 297 'max_amount' => null, 255 298 ], 256 299 'MYBANK' => [ … … 258 301 'description' => __('Pay securely by bank transfer with MyBank', 'woocommerce-gateway-nexi-xpay'), 259 302 'min_amount' => null, 303 'max_amount' => null, 260 304 ], 261 305 'ALIPAY' => [ … … 263 307 'description' => __('Pay quickly and easily with your AliPay wallet', 'woocommerce-gateway-nexi-xpay'), 264 308 'min_amount' => null, 309 'max_amount' => null, 265 310 ], 266 311 'WECHATPAY' => [ … … 268 313 'description' => __('Pay quickly and easily with your WeChat Pay wallet', 'woocommerce-gateway-nexi-xpay'), 269 314 'min_amount' => null, 315 'max_amount' => null, 270 316 ], 271 317 'GIROPAY' => [ … … 273 319 'description' => __('Pay directly from your bank account with Giropay', 'woocommerce-gateway-nexi-xpay'), 274 320 'min_amount' => 10, 321 'max_amount' => null, 275 322 ], 276 323 'IDEAL' => [ … … 278 325 'description' => __('Pay directly from your bank account with iDEAL', 'woocommerce-gateway-nexi-xpay'), 279 326 'min_amount' => 10, 327 'max_amount' => null, 280 328 ], 281 329 'BANCONTACT' => [ … … 283 331 'description' => __('Pay easily with Bancontact', 'woocommerce-gateway-nexi-xpay'), 284 332 'min_amount' => null, 333 'max_amount' => null, 285 334 ], 286 335 'EPS' => [ … … 288 337 'description' => __('Real time payment directly from your bank account with EPS', 'woocommerce-gateway-nexi-xpay'), 289 338 'min_amount' => 100, 339 'max_amount' => null, 290 340 ], 291 341 'PRZELEWY24' => [ … … 293 343 'description' => __('Secure payment directly from your bank account with Przelewy24', 'woocommerce-gateway-nexi-xpay'), 294 344 'min_amount' => null, 345 'max_amount' => null, 295 346 ], 296 347 'SKRILL' => [ … … 298 349 'description' => __('Pay quickly and easily with your Skrill wallet', 'woocommerce-gateway-nexi-xpay'), 299 350 'min_amount' => null, 351 'max_amount' => null, 300 352 ], 301 353 'SKRILL1TAP' => [ … … 303 355 'description' => __('Pay in one tap with your Skrill wallet', 'woocommerce-gateway-nexi-xpay'), 304 356 'min_amount' => null, 357 'max_amount' => null, 305 358 ], 306 359 'PAYU' => [ … … 308 361 'description' => __('Secure payment directly from your bank account with PayU', 'woocommerce-gateway-nexi-xpay'), 309 362 'min_amount' => 300, 363 'max_amount' => null, 310 364 ], 311 365 'BLIK' => [ … … 313 367 'description' => __('Secure payment directly from your home banking with Blik', 'woocommerce-gateway-nexi-xpay'), 314 368 'min_amount' => 100, 369 'max_amount' => null, 315 370 ], 316 371 'MULTIBANCO' => [ … … 318 373 'description' => __('Secure payment directly from your home banking with Multibanco', 'woocommerce-gateway-nexi-xpay'), 319 374 'min_amount' => null, 375 'max_amount' => null, 320 376 ], 321 377 'SATISPAY' => [ … … 323 379 'description' => __('Pay easily with your Satispay account', 'woocommerce-gateway-nexi-xpay'), 324 380 'min_amount' => null, 381 'max_amount' => null, 325 382 ], 326 383 'AMAZONPAY' => [ … … 328 385 'description' => __('Pay easily with your Amazon account', 'woocommerce-gateway-nexi-xpay'), 329 386 'min_amount' => null, 387 'max_amount' => null, 330 388 ], 331 389 'PAYPAL' => [ … … 333 391 'description' => __('Pay securely with your PayPal account', 'woocommerce-gateway-nexi-xpay'), 334 392 'min_amount' => null, 393 'max_amount' => null, 335 394 ], 336 395 'ONEY' => [ … … 338 397 'description' => __('Pay in 3 or 4 installments by credit, debit or Postepay card with Oney', 'woocommerce-gateway-nexi-xpay'), 339 398 'min_amount' => null, 399 'max_amount' => null, 340 400 ], 341 401 'KLARNA' => [ 342 402 'title' => 'Klarna', 343 403 'description' => __('Pay in 3 installments with Klarna interest-free', 'woocommerce-gateway-nexi-xpay'), 344 'min_amount' => null, 404 'min_amount' => 3500, 405 'max_amount' => 150000, 345 406 ], 346 407 'PAGODIL' => [ … … 348 409 'description' => __('Buy now and pay a little by little with PagoDIL', 'woocommerce-gateway-nexi-xpay'), 349 410 'min_amount' => null, 411 'max_amount' => null, 412 ], 413 'PAGOLIGHT' => [ 414 'title' => 'PagoLight', 415 'description' => __('Pay in installments with PagoLight', 'woocommerce-gateway-nexi-xpay'), 416 'min_amount' => 6000, 417 'max_amount' => 300000, 418 ], 419 'PAYPAL_BNPL' => [ 420 'title' => 'PayPal BNPL', 421 'description' => __('Pay in 3 installments with PayPal', 'woocommerce-gateway-nexi-xpay'), 422 'min_amount' => 3000, 423 'max_amount' => 200000, 350 424 ], 351 425 ]; … … 364 438 private static function is_currency_valid_for_apm($currency, $apmCode) 365 439 { 366 if (WC_Nexi_Helper::nexi_array_key_exists_and_equals(WC_Nexi_Helper::get_nexi_settings(), 'nexi_xpay_multicurrency_enabled', 'yes') && $apmCode == "CARDS") { 440 $validApmCodes = array( 441 "CARDS", 442 "GOOGLEPAY", 443 "APPLEPAY", 444 ); 445 446 if (WC_Nexi_Helper::nexi_array_key_exists_and_equals(WC_Nexi_Helper::get_nexi_settings(), 'nexi_xpay_multicurrency_enabled', 'yes') && in_array($apmCode, $validApmCodes)) { 367 447 return in_array($currency, \Nexi\WC_Gateway_NPG_Currency::get_npg_supported_currency_list()); 368 448 } -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Gateway_XPay_Cards_Build.php
r3017100 r3087870 1 1 <?php 2 3 2 /** 4 3 * Copyright (c) 2019 Nexi Payments S.p.A. … … 44 43 } 45 44 46 $this->description = $img_list . __("Pay securely by credit, debit and prepaid card. Powered by Nexi.", 'woocommerce-gateway-nexi-xpay');45 $this->description = $img_list . __("Pay securely by credit, debit and prepaid card. Powered by Nexi.", 'woocommerce-gateway-nexi-xpay'); 47 46 48 47 if (\WC_Admin_Settings::get_option('xpay_logo_small') == "") { … … 124 123 echo $this->description . "<br>"; 125 124 126 $isRecurring = (class_exists("\WC_Subscriptions_Cart") && \WC_Subscriptions_Cart::cart_contains_subscription());125 $isRecurring = WC_Nexi_Helper::cart_contains_subscription(); 127 126 128 127 $payment_payload = \Nexi\WC_Gateway_XPay_API::getInstance()->get_payment_build_payload(\WC_Payment_Gateway::get_order_total()); … … 131 130 $this->saved_payment_methods(); 132 131 } 133 ?>132 ?> 134 133 <fieldset id="wc-<?php echo esc_attr($this->id) ?>-cc-form" class="wc-credit-card-form wc-payment-form"> 135 134 … … 174 173 echo __('Attention, the order for which you are making payment contains recurring payments, payment data will be stored securely by Nexi.', 'woocommerce-gateway-nexi-xpay'); 175 174 } else if ($this->settings["nexi_xpay_oneclick_enabled"] == "yes") { 176 ?>175 ?> 177 176 <p class="form-row woocommerce-SavedPaymentMethods-saveNew"> 178 177 <input id="save-card" name="save-card" type="checkbox" value="1" style="width:auto;" /> … … 184 183 185 184 </fieldset> 186 <?php185 <?php 187 186 } 188 187 … … 193 192 194 193 try { 195 $isRecurring = (class_exists("\WC_Subscriptions_Cart") && \WC_Subscriptions_Cart::cart_contains_subscription());194 $isRecurring = WC_Nexi_Helper::order_or_cart_contains_subscription($order); 196 195 $isNewCard = true; 197 196 … … 316 315 '; 317 316 } 317 318 318 } -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Gateway_XPay_Generic_Method.php
r3029363 r3087870 71 71 } 72 72 73 if ( class_exists("\WC_Subscriptions_Cart") && \WC_Subscriptions_Cart::cart_contains_subscription()) {73 if (WC_Nexi_Helper::cart_contains_subscription()) { 74 74 echo __('Attention, the order for which you are making payment contains recurring payments, payment data will be stored securely by Nexi.', 'woocommerce-gateway-nexi-xpay'); 75 75 } else { … … 82 82 $order = new \WC_Order($order_id); 83 83 84 $recurringPaymentRequired = class_exists("\WC_Subscriptions_Cart") && \WC_Subscriptions_Cart::cart_contains_subscription();84 $recurringPaymentRequired = WC_Nexi_Helper::order_or_cart_contains_subscription($order); 85 85 86 86 $order_form = \Nexi\WC_Gateway_XPay_API::getInstance()->get_payment_form($order, $this->selectedCard, $recurringPaymentRequired); -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Gateway_XPay_Process_Completion.php
r3029363 r3087870 146 146 ); 147 147 } else { 148 if ( $order->get_status() != 'failed') {148 if (!in_array($order->get_status(), ['failed', 'cancelled'])) { 149 149 $order->update_status('failed'); 150 150 } … … 202 202 } 203 203 } else { 204 if ( $order->get_status() != 'failed') {204 if (!in_array($order->get_status(), ['failed', 'cancelled'])) { 205 205 $order->update_status('failed'); 206 206 } … … 213 213 214 214 Log::actionInfo(__FUNCTION__ . ": user redirect for order id " . $order_id . ' - ' . (array_key_exists('esito', $params) ? $params['esito'] : '')); 215 216 if ($order->needs_payment() ) {215 216 if ($order->needs_payment() || $order->get_status() == 'cancelled') { 217 217 return new \WP_REST_Response( 218 218 "redirecting failed...", -
cartasi-x-pay/trunk/src/classes/Nexi/WC_Nexi_Helper.php
r3017100 r3087870 16 16 class WC_Nexi_Helper 17 17 { 18 19 public static function cart_contains_subscription() 20 { 21 return class_exists("\WC_Subscriptions_Cart") && \WC_Subscriptions_Cart::cart_contains_subscription(); 22 } 23 24 public static function order_or_cart_contains_subscription($order) 25 { 26 return (function_exists('wcs_order_contains_subscription') && wcs_order_contains_subscription($order)) || self::cart_contains_subscription(); 27 } 28 18 29 /** 19 30 * checks if the requested information is available as per new configuration format and returns it … … 47 58 return ""; 48 59 } 49 50 60 51 61 /** … … 129 139 return static::nexi_array_key_exists($array, $key) && in_array($value, $array[$key]); 130 140 } 141 131 142 } -
cartasi-x-pay/trunk/templates/npg_payment_detail.php
r2975087 r3087870 65 65 ($firstOp !== null && array_key_exists('operationTime', $firstOp)) || 66 66 (array_key_exists('orderStatus', $orderInfo) && array_key_exists('order', $orderInfo['orderStatus']) && count($orderInfo['orderStatus']['order']) > 0) 67 ) { ?> 67 ) { 68 ?> 68 69 <div class="order_data_column"> 69 70 <h3><?php echo __("Transaction detail", 'woocommerce-gateway-nexi-xpay') ?></h3> 70 71 <p> 71 <?php if ($firstOp !== null && $firstOp['operationTime'] != '') { 72 <?php 73 if ($firstOp !== null && $firstOp['operationTime'] != '') { 72 74 $transactionDate = new \DateTime($firstOp['operationTime']); 73 75 74 76 if ($transactionDate) { 77 ?> 78 <strong><?php echo __("Date: ", 'woocommerce-gateway-nexi-xpay') ?></strong> <?php echo htmlentities($transactionDate->format("d/m/Y H:i")) ?><br> 79 <?php 80 } 81 } 75 82 ?> 76 <strong><?php echo __("Date: ", 'woocommerce-gateway-nexi-xpay') ?></strong> <?php echo htmlentities($transactionDate->format("d/m/Y H:i")) ?><br> 77 <?php 78 }79 } ?>80 <?php 81 if (array_key_exists('orderStatus', $orderInfo) && array_key_exists('order', $orderInfo['orderStatus']) && count($orderInfo['orderStatus']['order']) > 0) { ?>83 84 <?php if (isset($installmentsNumber) && $installmentsNumber >= 2) { ?> 85 <strong><?php echo __("Installments: ", 'woocommerce-gateway-nexi-xpay') ?></strong> <?php echo $installmentsNumber; ?><br> 86 <?php } ?> 87 88 <?php if (array_key_exists('orderStatus', $orderInfo) && array_key_exists('order', $orderInfo['orderStatus']) && count($orderInfo['orderStatus']['order']) > 0) { ?> 82 89 <?php if ($orderInfo['orderStatus']['order']['amount']) { ?> 83 90 <strong><?php echo __("Amount: ", 'woocommerce-gateway-nexi-xpay') ?></strong> <?php echo \Nexi\WC_Gateway_NPG_Currency::format_npg_amount($orderInfo['orderStatus']['order']['amount'], $orderInfo['orderStatus']['order']['currency']) . " " . $currencySign ?><br> … … 93 100 94 101 <?php if ($showOperations || $canAccount) { 95 ?>102 ?> 96 103 <?php if ($showOperations) { ?> 97 104 <h3><?php echo __("Accounting operations", 'woocommerce-gateway-nexi-xpay') ?></h3> -
cartasi-x-pay/trunk/woocommerce-gateway-nexi-xpay.php
r3029363 r3087870 5 5 * Plugin URI: 6 6 * Description: Payment plugin for payment cards and alternative methods. Powered by Nexi. 7 * Version: 7.3. 17 * Version: 7.3.2 8 8 * Author: Nexi SpA 9 9 * Author URI: https://www.nexi.it … … 14 14 * License URI: http://www.gnu.org/licenses/gpl-3.0.html 15 15 */ 16 17 16 if (!defined('ABSPATH')) { 18 17 exit; … … 24 23 25 24 if (in_array('woocommerce/woocommerce.php', apply_filters('active_plugins', get_option('active_plugins'))) || is_plugin_active_for_network('woocommerce/woocommerce.php')) { 26 define("WC_GATEWAY_XPAY_VERSION", "7.3. 1");25 define("WC_GATEWAY_XPAY_VERSION", "7.3.2"); 27 26 28 27 define("GATEWAY_XPAY", "xpay"); … … 35 34 define('WC_SETTINGS_KEY', 'woocommerce_' . WC_GATEWAY_NEXI_PLUGIN_VARIANT . '_settings'); 36 35 37 /*NPG constants**************************************************/38 36 define('NPG_OR_AUTHORIZED', 'AUTHORIZED'); 39 37 define('NPG_OR_EXECUTED', 'EXECUTED'); … … 78 76 79 77 define('NPG_RT_MIT_SCHEDULED', 'MIT_SCHEDULED'); 80 /****************************************************************/81 78 82 79 load_plugin_textdomain('woocommerce-gateway-nexi-xpay', false, dirname(plugin_basename(__FILE__)) . '/lang'); … … 136 133 // custom hook called by the scheduled cron 137 134 add_action('wp_nexi_polling', 'wp_nexi_polling_executor'); 135 138 136 function wp_nexi_polling_executor() 139 137 { … … 160 158 case NPG_OR_AUTHORIZED: 161 159 case NPG_OR_EXECUTED: 162 $completed = $orderObj->payment_complete(get_post_meta($order->get_id(), "_npg_" . "orderId", true));160 $completed = $orderObj->payment_complete(get_post_meta($order->get_id(), "_npg_" . "orderId", true)); 163 161 164 162 if ($completed) { … … 192 190 \Nexi\Log::actionWarning(__FUNCTION__ . ': payment error - operation: ' . json_encode($authorizationRecord)); 193 191 194 $orderObj->update_status('failed'); 192 if ($order->get_status() != 'cancelled') { 193 $orderObj->update_status('failed'); 194 } 195 195 196 196 $orderObj->add_order_note(__('Payment error', 'woocommerce-gateway-nexi-xpay')); … … 205 205 206 206 add_action('wp_nexi_update_npg_payment_methods', 'wp_nexi_update_npg_payment_methods_executor'); 207 207 208 function wp_nexi_update_npg_payment_methods_executor() 208 209 { … … 233 234 add_filter('cron_schedules', 'my_add_nexi_schedules_for_polling'); 234 235 235 236 236 //chcks if the task is not already scheduled 237 237 if (!wp_next_scheduled('wp_nexi_polling') && WC_GATEWAY_NEXI_PLUGIN_VARIANT == 'xpay' && \Nexi\WC_Nexi_Helper::nexi_is_gateway_NPG()) { … … 256 256 register_activation_hook(__FILE__, 'xpay_plugin_activation'); 257 257 258 259 258 function xpay_plugin_deactivation() 260 259 { … … 273 272 274 273 register_deactivation_hook(__FILE__, 'xpay_plugin_deactivation'); 275 276 274 277 275 function xpay_plugin_action_links($links) … … 286 284 add_filter('plugin_action_links_' . plugin_basename(__FILE__), 'xpay_plugin_action_links'); 287 285 288 add_action('init', '\Nexi\WC_Pending_Status::addNexiPendingPaymentOrderStatus'); 286 function nexi_xpay_plugin_init() 287 { 288 \Nexi\WC_Pending_Status::addNexiPendingPaymentOrderStatus(); 289 290 \Nexi\WC_Nexi_Db::run_updates(); 291 } 292 293 add_action('init', 'nexi_xpay_plugin_init'); 289 294 290 295 add_filter('wc_order_statuses', '\Nexi\WC_Pending_Status::wcOrderStatusesFilter');
Note: See TracChangeset
for help on using the changeset viewer.