Version Description
Download this release
Release Info
Developer | mercadopago |
Plugin | WooCommerce MercadoPago |
Version | 3.0.12 |
Comparing to | |
See all releases |
Code changes from version 3.0.11 to 3.0.12
- i18n/languages/woocommerce-mercadopago-es_AR.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_AR.po +13 -4
- i18n/languages/woocommerce-mercadopago-es_CL.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_CL.po +13 -4
- i18n/languages/woocommerce-mercadopago-es_CO.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_CO.po +13 -4
- i18n/languages/woocommerce-mercadopago-es_ES.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_ES.po +13 -4
- i18n/languages/woocommerce-mercadopago-es_MX.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_MX.po +13 -4
- i18n/languages/woocommerce-mercadopago-es_PE.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_PE.po +13 -4
- i18n/languages/woocommerce-mercadopago-es_UY.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_UY.po +13 -4
- i18n/languages/woocommerce-mercadopago-es_VE.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_VE.po +13 -4
- i18n/languages/woocommerce-mercadopago-pt_BR.mo +0 -0
- i18n/languages/woocommerce-mercadopago-pt_BR.po +13 -4
- i18n/languages/woocommerce-mercadopago.pot +11 -2
- includes/WC_WooMercadoPago_BasicGateway.php +28 -18
- includes/WC_WooMercadoPago_CustomGateway.php +31 -29
- includes/WC_WooMercadoPago_SubscriptionGateway.php +31 -29
- includes/WC_WooMercadoPago_TicketGateway.php +59 -36
- includes/sdk/lib/mercadopago.php +1 -1
- readme.txt +7 -1
- woocommerce-mercadopago.php +2 -2
i18n/languages/woocommerce-mercadopago-es_AR.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_AR.po
CHANGED
@@ -439,11 +439,11 @@ msgstr "Excluir medios de pago"
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
-
msgid "Discount by Gateway"
|
443 |
-
msgstr "Descuento por Gateway"
|
444 |
|
445 |
-
msgid "Give a percentual (
|
446 |
-
msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
@@ -1059,3 +1059,12 @@ msgstr "Posibles causas: Comprador y vendedor tienen la misma cuenta en Mercado
|
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
+
msgid "Discount/Fee by Gateway"
|
443 |
+
msgstr "Descuento/Tarifa por Gateway"
|
444 |
|
445 |
+
msgid "Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts."
|
446 |
+
msgstr "Dé un descuento o tarifa porcentual para sus clientes si utilizan este medio de pago. Use negativo para las tarifas, positivo para los descuentos."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
1062 |
+
|
1063 |
+
msgid "Days for Expiration"
|
1064 |
+
msgstr "Días para Caducidad"
|
1065 |
+
|
1066 |
+
msgid "Place the number of days (1 to 30) until expiration of the ticket."
|
1067 |
+
msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket."
|
1068 |
+
|
1069 |
+
msgid "Fee of"
|
1070 |
+
msgstr "Tarifa de"
|
i18n/languages/woocommerce-mercadopago-es_CL.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_CL.po
CHANGED
@@ -439,11 +439,11 @@ msgstr "Excluir medios de pago"
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
-
msgid "Discount by Gateway"
|
443 |
-
msgstr "Descuento por Gateway"
|
444 |
|
445 |
-
msgid "Give a percentual (
|
446 |
-
msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
@@ -1059,3 +1059,12 @@ msgstr "Posibles causas: Comprador y vendedor tienen la misma cuenta en Mercado
|
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
+
msgid "Discount/Fee by Gateway"
|
443 |
+
msgstr "Descuento/Tarifa por Gateway"
|
444 |
|
445 |
+
msgid "Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts."
|
446 |
+
msgstr "Dé un descuento o tarifa porcentual para sus clientes si utilizan este medio de pago. Use negativo para las tarifas, positivo para los descuentos."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
1062 |
+
|
1063 |
+
msgid "Days for Expiration"
|
1064 |
+
msgstr "Días para Caducidad"
|
1065 |
+
|
1066 |
+
msgid "Place the number of days (1 to 30) until expiration of the ticket."
|
1067 |
+
msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket."
|
1068 |
+
|
1069 |
+
msgid "Fee of"
|
1070 |
+
msgstr "Tarifa de"
|
i18n/languages/woocommerce-mercadopago-es_CO.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_CO.po
CHANGED
@@ -439,11 +439,11 @@ msgstr "Excluir medios de pago"
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
-
msgid "Discount by Gateway"
|
443 |
-
msgstr "Descuento por Gateway"
|
444 |
|
445 |
-
msgid "Give a percentual (
|
446 |
-
msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
@@ -1059,3 +1059,12 @@ msgstr "Posibles causas: Comprador y vendedor tienen la misma cuenta en Mercado
|
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
+
msgid "Discount/Fee by Gateway"
|
443 |
+
msgstr "Descuento/Tarifa por Gateway"
|
444 |
|
445 |
+
msgid "Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts."
|
446 |
+
msgstr "Dé un descuento o tarifa porcentual para sus clientes si utilizan este medio de pago. Use negativo para las tarifas, positivo para los descuentos."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
1062 |
+
|
1063 |
+
msgid "Days for Expiration"
|
1064 |
+
msgstr "Días para Caducidad"
|
1065 |
+
|
1066 |
+
msgid "Place the number of days (1 to 30) until expiration of the ticket."
|
1067 |
+
msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket."
|
1068 |
+
|
1069 |
+
msgid "Fee of"
|
1070 |
+
msgstr "Tarifa de"
|
i18n/languages/woocommerce-mercadopago-es_ES.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_ES.po
CHANGED
@@ -439,11 +439,11 @@ msgstr "Excluir medios de pago"
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
-
msgid "Discount by Gateway"
|
443 |
-
msgstr "Descuento por Gateway"
|
444 |
|
445 |
-
msgid "Give a percentual (
|
446 |
-
msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
@@ -1059,3 +1059,12 @@ msgstr "Posibles causas: Comprador y vendedor tienen la misma cuenta en Mercado
|
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
+
msgid "Discount/Fee by Gateway"
|
443 |
+
msgstr "Descuento/Tarifa por Gateway"
|
444 |
|
445 |
+
msgid "Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts."
|
446 |
+
msgstr "Dé un descuento o tarifa porcentual para sus clientes si utilizan este medio de pago. Use negativo para las tarifas, positivo para los descuentos."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
1062 |
+
|
1063 |
+
msgid "Days for Expiration"
|
1064 |
+
msgstr "Días para Caducidad"
|
1065 |
+
|
1066 |
+
msgid "Place the number of days (1 to 30) until expiration of the ticket."
|
1067 |
+
msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket."
|
1068 |
+
|
1069 |
+
msgid "Fee of"
|
1070 |
+
msgstr "Tarifa de"
|
i18n/languages/woocommerce-mercadopago-es_MX.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_MX.po
CHANGED
@@ -439,11 +439,11 @@ msgstr "Excluir medios de pago"
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
-
msgid "Discount by Gateway"
|
443 |
-
msgstr "Descuento por Gateway"
|
444 |
|
445 |
-
msgid "Give a percentual (
|
446 |
-
msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
@@ -1059,3 +1059,12 @@ msgstr "Posibles causas: Comprador y vendedor tienen la misma cuenta en Mercado
|
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
+
msgid "Discount/Fee by Gateway"
|
443 |
+
msgstr "Descuento/Tarifa por Gateway"
|
444 |
|
445 |
+
msgid "Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts."
|
446 |
+
msgstr "Dé un descuento o tarifa porcentual para sus clientes si utilizan este medio de pago. Use negativo para las tarifas, positivo para los descuentos."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
1062 |
+
|
1063 |
+
msgid "Days for Expiration"
|
1064 |
+
msgstr "Días para Caducidad"
|
1065 |
+
|
1066 |
+
msgid "Place the number of days (1 to 30) until expiration of the ticket."
|
1067 |
+
msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket."
|
1068 |
+
|
1069 |
+
msgid "Fee of"
|
1070 |
+
msgstr "Tarifa de"
|
i18n/languages/woocommerce-mercadopago-es_PE.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_PE.po
CHANGED
@@ -439,11 +439,11 @@ msgstr "Excluir medios de pago"
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
-
msgid "Discount by Gateway"
|
443 |
-
msgstr "Descuento por Gateway"
|
444 |
|
445 |
-
msgid "Give a percentual (
|
446 |
-
msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
@@ -1059,3 +1059,12 @@ msgstr "Posibles causas: Comprador y vendedor tienen la misma cuenta en Mercado
|
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
+
msgid "Discount/Fee by Gateway"
|
443 |
+
msgstr "Descuento/Tarifa por Gateway"
|
444 |
|
445 |
+
msgid "Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts."
|
446 |
+
msgstr "Dé un descuento o tarifa porcentual para sus clientes si utilizan este medio de pago. Use negativo para las tarifas, positivo para los descuentos."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
1062 |
+
|
1063 |
+
msgid "Days for Expiration"
|
1064 |
+
msgstr "Días para Caducidad"
|
1065 |
+
|
1066 |
+
msgid "Place the number of days (1 to 30) until expiration of the ticket."
|
1067 |
+
msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket."
|
1068 |
+
|
1069 |
+
msgid "Fee of"
|
1070 |
+
msgstr "Tarifa de"
|
i18n/languages/woocommerce-mercadopago-es_UY.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_UY.po
CHANGED
@@ -439,11 +439,11 @@ msgstr "Excluir medios de pago"
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
-
msgid "Discount by Gateway"
|
443 |
-
msgstr "Descuento por Gateway"
|
444 |
|
445 |
-
msgid "Give a percentual (
|
446 |
-
msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
@@ -1059,3 +1059,12 @@ msgstr "Posibles causas: Comprador y vendedor tienen la misma cuenta en Mercado
|
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
+
msgid "Discount/Fee by Gateway"
|
443 |
+
msgstr "Descuento/Tarifa por Gateway"
|
444 |
|
445 |
+
msgid "Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts."
|
446 |
+
msgstr "Dé un descuento o tarifa porcentual para sus clientes si utilizan este medio de pago. Use negativo para las tarifas, positivo para los descuentos."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
1062 |
+
|
1063 |
+
msgid "Days for Expiration"
|
1064 |
+
msgstr "Días para Caducidad"
|
1065 |
+
|
1066 |
+
msgid "Place the number of days (1 to 30) until expiration of the ticket."
|
1067 |
+
msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket."
|
1068 |
+
|
1069 |
+
msgid "Fee of"
|
1070 |
+
msgstr "Tarifa de"
|
i18n/languages/woocommerce-mercadopago-es_VE.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-es_VE.po
CHANGED
@@ -439,11 +439,11 @@ msgstr "Excluir medios de pago"
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
-
msgid "Discount by Gateway"
|
443 |
-
msgstr "Descuento por Gateway"
|
444 |
|
445 |
-
msgid "Give a percentual (
|
446 |
-
msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
@@ -1059,3 +1059,12 @@ msgstr "Posibles causas: Comprador y vendedor tienen la misma cuenta en Mercado
|
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
|
441 |
|
442 |
+
msgid "Discount/Fee by Gateway"
|
443 |
+
msgstr "Descuento/Tarifa por Gateway"
|
444 |
|
445 |
+
msgid "Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts."
|
446 |
+
msgstr "Dé un descuento o tarifa porcentual para sus clientes si utilizan este medio de pago. Use negativo para las tarifas, positivo para los descuentos."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo de Dos Tarjetas"
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Posibles causas: Pendencia de permiso de uso en producción para la credencial del vendedor."
|
1062 |
+
|
1063 |
+
msgid "Days for Expiration"
|
1064 |
+
msgstr "Días para Caducidad"
|
1065 |
+
|
1066 |
+
msgid "Place the number of days (1 to 30) until expiration of the ticket."
|
1067 |
+
msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket."
|
1068 |
+
|
1069 |
+
msgid "Fee of"
|
1070 |
+
msgstr "Tarifa de"
|
i18n/languages/woocommerce-mercadopago-pt_BR.mo
CHANGED
Binary file
|
i18n/languages/woocommerce-mercadopago-pt_BR.po
CHANGED
@@ -439,11 +439,11 @@ msgstr "Excluir Métodos de Pagamento"
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione os meios de pagamento que <strong>não</strong> gostaria de receber com o Mercado Pago."
|
441 |
|
442 |
-
msgid "Discount by Gateway"
|
443 |
-
msgstr "Desconto por Gateway"
|
444 |
|
445 |
-
msgid "Give a percentual (
|
446 |
-
msgstr "Dê um desconto porcentual (
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo Dois Cartões"
|
@@ -1059,3 +1059,12 @@ msgstr "Possíveis causas: Comprador e vendedor têm o mesmo email no Mercado Pa
|
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Possíveis causas: Pendência de permissão de uso em produção para a credencial do vendedor."
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr "Selecione os meios de pagamento que <strong>não</strong> gostaria de receber com o Mercado Pago."
|
441 |
|
442 |
+
msgid "Discount/Fee by Gateway"
|
443 |
+
msgstr "Desconto/Taxa por Gateway"
|
444 |
|
445 |
+
msgid "Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts."
|
446 |
+
msgstr "Dê um desconto ou taxa porcentual (-99 a 99) para seus clientes caso eles usem este método de pagamento. Use negativo para taxas, positivo para descontos."
|
447 |
|
448 |
msgid "Two Cards Mode"
|
449 |
msgstr "Modo Dois Cartões"
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr "Possíveis causas: Pendência de permissão de uso em produção para a credencial do vendedor."
|
1062 |
+
|
1063 |
+
msgid "Days for Expiration"
|
1064 |
+
msgstr "Dias de Validade"
|
1065 |
+
|
1066 |
+
msgid "Place the number of days (1 to 30) until expiration of the ticket."
|
1067 |
+
msgstr "Coloca um número de dias (1 a 30) para a validade do boleto."
|
1068 |
+
|
1069 |
+
msgid "Fee of"
|
1070 |
+
msgstr "Taxa de"
|
i18n/languages/woocommerce-mercadopago.pot
CHANGED
@@ -439,10 +439,10 @@ msgstr ""
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr ""
|
441 |
|
442 |
-
msgid "Discount by Gateway"
|
443 |
msgstr ""
|
444 |
|
445 |
-
msgid "Give a percentual (
|
446 |
msgstr ""
|
447 |
|
448 |
msgid "Two Cards Mode"
|
@@ -1059,3 +1059,12 @@ msgstr ""
|
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr ""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
439 |
msgid "Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago."
|
440 |
msgstr ""
|
441 |
|
442 |
+
msgid "Discount/Fee by Gateway"
|
443 |
msgstr ""
|
444 |
|
445 |
+
msgid "Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts."
|
446 |
msgstr ""
|
447 |
|
448 |
msgid "Two Cards Mode"
|
1059 |
|
1060 |
msgid "Posible causes: Pending permission of use in production of the seller credentials."
|
1061 |
msgstr ""
|
1062 |
+
|
1063 |
+
msgid "Days for Expiration"
|
1064 |
+
msgstr ""
|
1065 |
+
|
1066 |
+
msgid "Place the number of days (1 to 30) until expiration of the ticket."
|
1067 |
+
msgstr ""
|
1068 |
+
|
1069 |
+
msgid "Fee of"
|
1070 |
+
msgstr ""
|
includes/WC_WooMercadoPago_BasicGateway.php
CHANGED
@@ -308,9 +308,9 @@ class WC_WooMercadoPago_BasicGateway extends WC_Payment_Gateway {
|
|
308 |
'default' => ''
|
309 |
),
|
310 |
'gateway_discount' => array(
|
311 |
-
'title' => __( 'Discount by Gateway', 'woocommerce-mercadopago' ),
|
312 |
'type' => 'number',
|
313 |
-
'description' => __( 'Give a percentual (
|
314 |
'default' => '0'
|
315 |
),
|
316 |
'two_cards_mode' => array(
|
@@ -356,7 +356,7 @@ class WC_WooMercadoPago_BasicGateway extends WC_Payment_Gateway {
|
|
356 |
if ( ! is_numeric( $value ) || empty ( $value ) ) {
|
357 |
$this->settings[$key] = 0;
|
358 |
} else {
|
359 |
-
if ( $value <
|
360 |
$this->settings[$key] = 0;
|
361 |
} else {
|
362 |
$this->settings[$key] = $value;
|
@@ -570,15 +570,17 @@ class WC_WooMercadoPago_BasicGateway extends WC_Payment_Gateway {
|
|
570 |
?>
|
571 |
<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
572 |
<script type="text/javascript">
|
573 |
-
|
574 |
-
|
575 |
-
|
576 |
-
|
577 |
-
|
578 |
-
|
579 |
-
|
580 |
-
|
581 |
-
|
|
|
|
|
582 |
</script>
|
583 |
<?php
|
584 |
|
@@ -596,11 +598,13 @@ class WC_WooMercadoPago_BasicGateway extends WC_Payment_Gateway {
|
|
596 |
$this->write_log( __FUNCTION__, 'updating order of ID ' . $order_id );
|
597 |
echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
598 |
<script type="text/javascript">
|
599 |
-
|
600 |
-
|
601 |
-
|
602 |
-
|
603 |
-
|
|
|
|
|
604 |
</script>';
|
605 |
}
|
606 |
}
|
@@ -1054,7 +1058,10 @@ class WC_WooMercadoPago_BasicGateway extends WC_Payment_Gateway {
|
|
1054 |
if ( $title != $this->title || $this->gateway_discount == 0 ) {
|
1055 |
return $title;
|
1056 |
}
|
1057 |
-
if ( WC()->session->chosen_payment_method
|
|
|
|
|
|
|
1058 |
return $title;
|
1059 |
}
|
1060 |
$total = (float) WC()->cart->subtotal;
|
@@ -1062,6 +1069,9 @@ class WC_WooMercadoPago_BasicGateway extends WC_Payment_Gateway {
|
|
1062 |
if ( $price_percent > 0 ) {
|
1063 |
$title .= ' (' . __( 'Discount of', 'woocommerce-mercadopago' ) . ' ' .
|
1064 |
strip_tags( wc_price( $total * $price_percent ) ) . ')';
|
|
|
|
|
|
|
1065 |
}
|
1066 |
return $title;
|
1067 |
}
|
308 |
'default' => ''
|
309 |
),
|
310 |
'gateway_discount' => array(
|
311 |
+
'title' => __( 'Discount/Fee by Gateway', 'woocommerce-mercadopago' ),
|
312 |
'type' => 'number',
|
313 |
+
'description' => __( 'Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts.', 'woocommerce-mercadopago' ),
|
314 |
'default' => '0'
|
315 |
),
|
316 |
'two_cards_mode' => array(
|
356 |
if ( ! is_numeric( $value ) || empty ( $value ) ) {
|
357 |
$this->settings[$key] = 0;
|
358 |
} else {
|
359 |
+
if ( $value < -99 || $value > 99 || empty ( $value ) ) {
|
360 |
$this->settings[$key] = 0;
|
361 |
} else {
|
362 |
$this->settings[$key] = $value;
|
570 |
?>
|
571 |
<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
572 |
<script type="text/javascript">
|
573 |
+
try {
|
574 |
+
var MA = ModuleAnalytics;
|
575 |
+
MA.setToken( '<?php echo $client_id; ?>' );
|
576 |
+
MA.setPlatform( 'WooCommerce' );
|
577 |
+
MA.setPlatformVersion( '<?php echo $w->version; ?>' );
|
578 |
+
MA.setModuleVersion( '<?php echo WC_Woo_Mercado_Pago_Module::VERSION; ?>' );
|
579 |
+
MA.setPayerEmail( '<?php echo ( $logged_user_email != null ? $logged_user_email : "" ); ?>' );
|
580 |
+
MA.setUserLogged( <?php echo ( empty( $logged_user_email ) ? 0 : 1 ); ?> );
|
581 |
+
MA.setInstalledModules( '<?php echo $available_payments; ?>' );
|
582 |
+
MA.post();
|
583 |
+
} catch(err) {}
|
584 |
</script>
|
585 |
<?php
|
586 |
|
598 |
$this->write_log( __FUNCTION__, 'updating order of ID ' . $order_id );
|
599 |
echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
600 |
<script type="text/javascript">
|
601 |
+
try {
|
602 |
+
var MA = ModuleAnalytics;
|
603 |
+
MA.setToken( ' . $client_id . ' );
|
604 |
+
MA.setPaymentType("basic");
|
605 |
+
MA.setCheckoutType("basic");
|
606 |
+
MA.put();
|
607 |
+
} catch(err) {}
|
608 |
</script>';
|
609 |
}
|
610 |
}
|
1058 |
if ( $title != $this->title || $this->gateway_discount == 0 ) {
|
1059 |
return $title;
|
1060 |
}
|
1061 |
+
if ( WC()->session->chosen_payment_method === 'woo-mercado-pago-subscription' ) {
|
1062 |
+
return $title;
|
1063 |
+
}
|
1064 |
+
if ( ! is_numeric( $this->gateway_discount ) || $this->gateway_discount < -99 || $this->gateway_discount > 99 ) {
|
1065 |
return $title;
|
1066 |
}
|
1067 |
$total = (float) WC()->cart->subtotal;
|
1069 |
if ( $price_percent > 0 ) {
|
1070 |
$title .= ' (' . __( 'Discount of', 'woocommerce-mercadopago' ) . ' ' .
|
1071 |
strip_tags( wc_price( $total * $price_percent ) ) . ')';
|
1072 |
+
} elseif ( $price_percent < 0 ) {
|
1073 |
+
$title .= ' (' . __( 'Fee of', 'woocommerce-mercadopago' ) . ' ' .
|
1074 |
+
strip_tags( wc_price( -$total * $price_percent ) ) . ')';
|
1075 |
}
|
1076 |
return $title;
|
1077 |
}
|
includes/WC_WooMercadoPago_CustomGateway.php
CHANGED
@@ -204,9 +204,9 @@ class WC_WooMercadoPago_CustomGateway extends WC_Payment_Gateway {
|
|
204 |
'description' => __( 'When charging a credit card, only [approved] or [reject] status will be taken.', 'woocommerce-mercadopago' )
|
205 |
),
|
206 |
'gateway_discount' => array(
|
207 |
-
'title' => __( 'Discount by Gateway', 'woocommerce-mercadopago' ),
|
208 |
'type' => 'number',
|
209 |
-
'description' => __( 'Give a percentual (
|
210 |
'default' => '0'
|
211 |
)
|
212 |
);
|
@@ -229,7 +229,7 @@ class WC_WooMercadoPago_CustomGateway extends WC_Payment_Gateway {
|
|
229 |
if ( ! is_numeric( $value ) || empty ( $value ) ) {
|
230 |
$this->settings[$key] = 0;
|
231 |
} else {
|
232 |
-
if ( $value <
|
233 |
$this->settings[$key] = 0;
|
234 |
} else {
|
235 |
$this->settings[$key] = $value;
|
@@ -425,15 +425,17 @@ class WC_WooMercadoPago_CustomGateway extends WC_Payment_Gateway {
|
|
425 |
?>
|
426 |
<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
427 |
<script type="text/javascript">
|
428 |
-
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
|
|
|
|
437 |
</script>
|
438 |
<?php
|
439 |
}
|
@@ -449,11 +451,13 @@ class WC_WooMercadoPago_CustomGateway extends WC_Payment_Gateway {
|
|
449 |
$this->write_log( __FUNCTION__, 'updating order of ID ' . $order_id );
|
450 |
echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
451 |
<script type="text/javascript">
|
452 |
-
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
|
|
|
|
457 |
</script>';
|
458 |
}
|
459 |
}
|
@@ -1010,26 +1014,24 @@ class WC_WooMercadoPago_CustomGateway extends WC_Payment_Gateway {
|
|
1010 |
|
1011 |
// Display the discount in payment method title.
|
1012 |
public function get_payment_method_title_custom( $title, $id ) {
|
1013 |
-
|
1014 |
if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
1015 |
return $title;
|
1016 |
}
|
1017 |
-
|
1018 |
if ( $title != $this->title || $this->gateway_discount == 0 ) {
|
1019 |
return $title;
|
1020 |
}
|
1021 |
-
|
|
|
|
|
1022 |
$total = (float) WC()->cart->subtotal;
|
1023 |
-
|
1024 |
-
|
1025 |
-
|
1026 |
-
|
1027 |
-
|
1028 |
-
|
1029 |
-
|
1030 |
-
}
|
1031 |
}
|
1032 |
-
|
1033 |
return $title;
|
1034 |
}
|
1035 |
|
204 |
'description' => __( 'When charging a credit card, only [approved] or [reject] status will be taken.', 'woocommerce-mercadopago' )
|
205 |
),
|
206 |
'gateway_discount' => array(
|
207 |
+
'title' => __( 'Discount/Fee by Gateway', 'woocommerce-mercadopago' ),
|
208 |
'type' => 'number',
|
209 |
+
'description' => __( 'Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts.', 'woocommerce-mercadopago' ),
|
210 |
'default' => '0'
|
211 |
)
|
212 |
);
|
229 |
if ( ! is_numeric( $value ) || empty ( $value ) ) {
|
230 |
$this->settings[$key] = 0;
|
231 |
} else {
|
232 |
+
if ( $value < -99 || $value > 99 || empty ( $value ) ) {
|
233 |
$this->settings[$key] = 0;
|
234 |
} else {
|
235 |
$this->settings[$key] = $value;
|
425 |
?>
|
426 |
<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
427 |
<script type="text/javascript">
|
428 |
+
try {
|
429 |
+
var MA = ModuleAnalytics;
|
430 |
+
MA.setPublicKey( '<?php echo $public_key; ?>' );
|
431 |
+
MA.setPlatform( 'WooCommerce' );
|
432 |
+
MA.setPlatformVersion( '<?php echo $w->version; ?>' );
|
433 |
+
MA.setModuleVersion( '<?php echo WC_Woo_Mercado_Pago_Module::VERSION; ?>' );
|
434 |
+
MA.setPayerEmail( '<?php echo ( $logged_user_email != null ? $logged_user_email : "" ); ?>' );
|
435 |
+
MA.setUserLogged( <?php echo ( empty( $logged_user_email ) ? 0 : 1 ); ?> );
|
436 |
+
MA.setInstalledModules( '<?php echo $available_payments; ?>' );
|
437 |
+
MA.post();
|
438 |
+
} catch(err) {}
|
439 |
</script>
|
440 |
<?php
|
441 |
}
|
451 |
$this->write_log( __FUNCTION__, 'updating order of ID ' . $order_id );
|
452 |
echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
453 |
<script type="text/javascript">
|
454 |
+
try {
|
455 |
+
var MA = ModuleAnalytics;
|
456 |
+
MA.setPublicKey( "' . $public_key . '" );
|
457 |
+
MA.setPaymentType("credit_card");
|
458 |
+
MA.setCheckoutType("custom");
|
459 |
+
MA.put();
|
460 |
+
} catch(err) {}
|
461 |
</script>';
|
462 |
}
|
463 |
}
|
1014 |
|
1015 |
// Display the discount in payment method title.
|
1016 |
public function get_payment_method_title_custom( $title, $id ) {
|
|
|
1017 |
if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
1018 |
return $title;
|
1019 |
}
|
|
|
1020 |
if ( $title != $this->title || $this->gateway_discount == 0 ) {
|
1021 |
return $title;
|
1022 |
}
|
1023 |
+
if ( ! is_numeric( $this->gateway_discount ) || $this->gateway_discount < -99 || $this->gateway_discount > 99 ) {
|
1024 |
+
return $title;
|
1025 |
+
}
|
1026 |
$total = (float) WC()->cart->subtotal;
|
1027 |
+
$price_percent = $this->gateway_discount / 100;
|
1028 |
+
if ( $price_percent > 0 ) {
|
1029 |
+
$title .= ' (' . __( 'Discount of', 'woocommerce-mercadopago' ) . ' ' .
|
1030 |
+
strip_tags( wc_price( $total * $price_percent ) ) . ')';
|
1031 |
+
} elseif ( $price_percent < 0 ) {
|
1032 |
+
$title .= ' (' . __( 'Fee of', 'woocommerce-mercadopago' ) . ' ' .
|
1033 |
+
strip_tags( wc_price( -$total * $price_percent ) ) . ')';
|
|
|
1034 |
}
|
|
|
1035 |
return $title;
|
1036 |
}
|
1037 |
|
includes/WC_WooMercadoPago_SubscriptionGateway.php
CHANGED
@@ -301,9 +301,9 @@ class WC_WooMercadoPago_SubscriptionGateway extends WC_Payment_Gateway {
|
|
301 |
'type' => 'title'
|
302 |
),
|
303 |
'gateway_discount' => array(
|
304 |
-
'title' => __( 'Discount by Gateway', 'woocommerce-mercadopago' ),
|
305 |
'type' => 'number',
|
306 |
-
'description' => __( 'Give a percentual (
|
307 |
'default' => '0'
|
308 |
)
|
309 |
);
|
@@ -338,7 +338,7 @@ class WC_WooMercadoPago_SubscriptionGateway extends WC_Payment_Gateway {
|
|
338 |
if ( ! is_numeric( $value ) || empty ( $value ) ) {
|
339 |
$this->settings[$key] = 0;
|
340 |
} else {
|
341 |
-
if ( $value <
|
342 |
$this->settings[$key] = 0;
|
343 |
} else {
|
344 |
$this->settings[$key] = $value;
|
@@ -463,15 +463,17 @@ class WC_WooMercadoPago_SubscriptionGateway extends WC_Payment_Gateway {
|
|
463 |
?>
|
464 |
<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
465 |
<script type="text/javascript">
|
466 |
-
|
467 |
-
|
468 |
-
|
469 |
-
|
470 |
-
|
471 |
-
|
472 |
-
|
473 |
-
|
474 |
-
|
|
|
|
|
475 |
</script>
|
476 |
<?php
|
477 |
|
@@ -489,11 +491,13 @@ class WC_WooMercadoPago_SubscriptionGateway extends WC_Payment_Gateway {
|
|
489 |
$this->write_log( __FUNCTION__, 'updating order of ID ' . $order_id );
|
490 |
echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
491 |
<script type="text/javascript">
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
|
|
|
|
497 |
</script>';
|
498 |
|
499 |
}
|
@@ -790,26 +794,24 @@ class WC_WooMercadoPago_SubscriptionGateway extends WC_Payment_Gateway {
|
|
790 |
|
791 |
// Display the discount in payment method title.
|
792 |
public function get_payment_method_title_subscription( $title, $id ) {
|
793 |
-
|
794 |
if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
795 |
return $title;
|
796 |
}
|
797 |
-
|
798 |
if ( $title != $this->title || $this->gateway_discount == 0 ) {
|
799 |
return $title;
|
800 |
}
|
801 |
-
|
|
|
|
|
802 |
$total = (float) WC()->cart->subtotal;
|
803 |
-
|
804 |
-
|
805 |
-
|
806 |
-
|
807 |
-
|
808 |
-
|
809 |
-
|
810 |
-
}
|
811 |
}
|
812 |
-
|
813 |
return $title;
|
814 |
}
|
815 |
|
301 |
'type' => 'title'
|
302 |
),
|
303 |
'gateway_discount' => array(
|
304 |
+
'title' => __( 'Discount/Fee by Gateway', 'woocommerce-mercadopago' ),
|
305 |
'type' => 'number',
|
306 |
+
'description' => __( 'Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts.', 'woocommerce-mercadopago' ),
|
307 |
'default' => '0'
|
308 |
)
|
309 |
);
|
338 |
if ( ! is_numeric( $value ) || empty ( $value ) ) {
|
339 |
$this->settings[$key] = 0;
|
340 |
} else {
|
341 |
+
if ( $value < -99 || $value > 99 || empty ( $value ) ) {
|
342 |
$this->settings[$key] = 0;
|
343 |
} else {
|
344 |
$this->settings[$key] = $value;
|
463 |
?>
|
464 |
<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
465 |
<script type="text/javascript">
|
466 |
+
try {
|
467 |
+
var MA = ModuleAnalytics;
|
468 |
+
MA.setToken( '<?php echo $client_id; ?>' );
|
469 |
+
MA.setPlatform( 'WooCommerce' );
|
470 |
+
MA.setPlatformVersion( '<?php echo $w->version; ?>' );
|
471 |
+
MA.setModuleVersion( '<?php echo WC_Woo_Mercado_Pago_Module::VERSION; ?>' );
|
472 |
+
MA.setPayerEmail( '<?php echo ( $logged_user_email != null ? $logged_user_email : "" ); ?>' );
|
473 |
+
MA.setUserLogged( <?php echo ( empty( $logged_user_email ) ? 0 : 1 ); ?> );
|
474 |
+
MA.setInstalledModules( '<?php echo $payments; ?>' );
|
475 |
+
MA.post();
|
476 |
+
} catch(err) {}
|
477 |
</script>
|
478 |
<?php
|
479 |
|
491 |
$this->write_log( __FUNCTION__, 'updating order of ID ' . $order_id );
|
492 |
echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
493 |
<script type="text/javascript">
|
494 |
+
try {
|
495 |
+
var MA = ModuleAnalytics;
|
496 |
+
MA.setToken( ' . $client_id . ' );
|
497 |
+
MA.setPaymentType("subscription");
|
498 |
+
MA.setCheckoutType("subscription");
|
499 |
+
MA.put();
|
500 |
+
} catch(err) {}
|
501 |
</script>';
|
502 |
|
503 |
}
|
794 |
|
795 |
// Display the discount in payment method title.
|
796 |
public function get_payment_method_title_subscription( $title, $id ) {
|
|
|
797 |
if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
798 |
return $title;
|
799 |
}
|
|
|
800 |
if ( $title != $this->title || $this->gateway_discount == 0 ) {
|
801 |
return $title;
|
802 |
}
|
803 |
+
if ( ! is_numeric( $this->gateway_discount ) || $this->gateway_discount < -99 || $this->gateway_discount > 99 ) {
|
804 |
+
return $title;
|
805 |
+
}
|
806 |
$total = (float) WC()->cart->subtotal;
|
807 |
+
$price_percent = $this->gateway_discount / 100;
|
808 |
+
if ( $price_percent > 0 ) {
|
809 |
+
$title .= ' (' . __( 'Discount of', 'woocommerce-mercadopago' ) . ' ' .
|
810 |
+
strip_tags( wc_price( $total * $price_percent ) ) . ')';
|
811 |
+
} elseif ( $price_percent < 0 ) {
|
812 |
+
$title .= ' (' . __( 'Fee of', 'woocommerce-mercadopago' ) . ' ' .
|
813 |
+
strip_tags( wc_price( -$total * $price_percent ) ) . ')';
|
|
|
814 |
}
|
|
|
815 |
return $title;
|
816 |
}
|
817 |
|
includes/WC_WooMercadoPago_TicketGateway.php
CHANGED
@@ -57,6 +57,7 @@ class WC_WooMercadoPago_TicketGateway extends WC_Payment_Gateway {
|
|
57 |
// How checkout payment behaves.
|
58 |
$this->coupon_mode = $this->get_option( 'coupon_mode', 'no' );
|
59 |
$this->stock_reduce_mode = $this->get_option( 'stock_reduce_mode', 'no' );
|
|
|
60 |
$this->gateway_discount = $this->get_option( 'gateway_discount', 0 );
|
61 |
|
62 |
// Logging and debug.
|
@@ -204,10 +205,16 @@ class WC_WooMercadoPago_TicketGateway extends WC_Payment_Gateway {
|
|
204 |
'default' => 'no',
|
205 |
'description' => __( 'Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval.', 'woocommerce-mercadopago' )
|
206 |
),
|
|
|
|
|
|
|
|
|
|
|
|
|
207 |
'gateway_discount' => array(
|
208 |
-
'title' => __( 'Discount by Gateway', 'woocommerce-mercadopago' ),
|
209 |
'type' => 'number',
|
210 |
-
'description' => __( 'Give a percentual (
|
211 |
'default' => '0'
|
212 |
)
|
213 |
);
|
@@ -230,12 +237,22 @@ class WC_WooMercadoPago_TicketGateway extends WC_Payment_Gateway {
|
|
230 |
if ( ! is_numeric( $value ) || empty ( $value ) ) {
|
231 |
$this->settings[$key] = 0;
|
232 |
} else {
|
233 |
-
if ( $value <
|
234 |
$this->settings[$key] = 0;
|
235 |
} else {
|
236 |
$this->settings[$key] = $value;
|
237 |
}
|
238 |
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
239 |
} else {
|
240 |
$this->settings[$key] = $this->get_field_value( $key, $field, $post_data );
|
241 |
}
|
@@ -426,15 +443,17 @@ class WC_WooMercadoPago_TicketGateway extends WC_Payment_Gateway {
|
|
426 |
?>
|
427 |
<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
428 |
<script type="text/javascript">
|
429 |
-
|
430 |
-
|
431 |
-
|
432 |
-
|
433 |
-
|
434 |
-
|
435 |
-
|
436 |
-
|
437 |
-
|
|
|
|
|
438 |
</script>
|
439 |
<?php
|
440 |
}
|
@@ -450,11 +469,13 @@ class WC_WooMercadoPago_TicketGateway extends WC_Payment_Gateway {
|
|
450 |
$this->write_log( __FUNCTION__, 'updating order of ID ' . $order_id );
|
451 |
echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
452 |
<script type="text/javascript">
|
453 |
-
|
454 |
-
|
455 |
-
|
456 |
-
|
457 |
-
|
|
|
|
|
458 |
</script>';
|
459 |
}
|
460 |
|
@@ -472,13 +493,13 @@ class WC_WooMercadoPago_TicketGateway extends WC_Payment_Gateway {
|
|
472 |
}
|
473 |
|
474 |
$html = '<p>' .
|
475 |
-
|
476 |
-
|
477 |
-
|
478 |
-
|
479 |
-
|
480 |
-
|
481 |
-
|
482 |
$added_text = '<p>' . $html . '</p>';
|
483 |
echo $added_text;
|
484 |
}
|
@@ -824,9 +845,13 @@ class WC_WooMercadoPago_TicketGateway extends WC_Payment_Gateway {
|
|
824 |
$order->shipping_address_2
|
825 |
)
|
826 |
);
|
|
|
|
|
|
|
827 |
|
828 |
// The payment preference.
|
829 |
$preferences = array(
|
|
|
830 |
'transaction_amount' => ( $this->site_data['currency'] == 'COP' || $this->site_data['currency'] == 'CLP' ) ?
|
831 |
floor( $order_total * $currency_ratio ) :
|
832 |
floor( $order_total * $currency_ratio * 100 ) / 100,
|
@@ -990,26 +1015,24 @@ class WC_WooMercadoPago_TicketGateway extends WC_Payment_Gateway {
|
|
990 |
|
991 |
// Display the discount in payment method title.
|
992 |
public function get_payment_method_title_ticket( $title, $id ) {
|
993 |
-
|
994 |
if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
995 |
return $title;
|
996 |
}
|
997 |
-
|
998 |
if ( $title != $this->title || $this->gateway_discount == 0 ) {
|
999 |
return $title;
|
1000 |
}
|
1001 |
-
|
|
|
|
|
1002 |
$total = (float) WC()->cart->subtotal;
|
1003 |
-
|
1004 |
-
|
1005 |
-
|
1006 |
-
|
1007 |
-
|
1008 |
-
|
1009 |
-
|
1010 |
-
}
|
1011 |
}
|
1012 |
-
|
1013 |
return $title;
|
1014 |
}
|
1015 |
|
57 |
// How checkout payment behaves.
|
58 |
$this->coupon_mode = $this->get_option( 'coupon_mode', 'no' );
|
59 |
$this->stock_reduce_mode = $this->get_option( 'stock_reduce_mode', 'no' );
|
60 |
+
$this->date_expiration = $this->get_option( 'date_expiration', 3 );
|
61 |
$this->gateway_discount = $this->get_option( 'gateway_discount', 0 );
|
62 |
|
63 |
// Logging and debug.
|
205 |
'default' => 'no',
|
206 |
'description' => __( 'Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval.', 'woocommerce-mercadopago' )
|
207 |
),
|
208 |
+
'date_expiration' => array(
|
209 |
+
'title' => __( 'Days for Expiration', 'woocommerce-mercadopago' ),
|
210 |
+
'type' => 'number',
|
211 |
+
'description' => __( 'Place the number of days (1 to 30) until expiration of the ticket.', 'woocommerce-mercadopago' ),
|
212 |
+
'default' => '3'
|
213 |
+
),
|
214 |
'gateway_discount' => array(
|
215 |
+
'title' => __( 'Discount/Fee by Gateway', 'woocommerce-mercadopago' ),
|
216 |
'type' => 'number',
|
217 |
+
'description' => __( 'Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts.', 'woocommerce-mercadopago' ),
|
218 |
'default' => '0'
|
219 |
)
|
220 |
);
|
237 |
if ( ! is_numeric( $value ) || empty ( $value ) ) {
|
238 |
$this->settings[$key] = 0;
|
239 |
} else {
|
240 |
+
if ( $value < -99 || $value > 99 || empty ( $value ) ) {
|
241 |
$this->settings[$key] = 0;
|
242 |
} else {
|
243 |
$this->settings[$key] = $value;
|
244 |
}
|
245 |
}
|
246 |
+
} elseif ( $key == 'date_expiration' ) {
|
247 |
+
if ( ! is_numeric( $value ) || empty ( $value ) ) {
|
248 |
+
$this->settings[$key] = 3;
|
249 |
+
} else {
|
250 |
+
if ( $value < 1 || $value > 30 || empty ( $value ) ) {
|
251 |
+
$this->settings[$key] = 3;
|
252 |
+
} else {
|
253 |
+
$this->settings[$key] = $value;
|
254 |
+
}
|
255 |
+
}
|
256 |
} else {
|
257 |
$this->settings[$key] = $this->get_field_value( $key, $field, $post_data );
|
258 |
}
|
443 |
?>
|
444 |
<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
445 |
<script type="text/javascript">
|
446 |
+
try {
|
447 |
+
var MA = ModuleAnalytics;
|
448 |
+
MA.setToken( '<?php echo $client_id; ?>' );
|
449 |
+
MA.setPlatform( 'WooCommerce' );
|
450 |
+
MA.setPlatformVersion( '<?php echo $w->version; ?>' );
|
451 |
+
MA.setModuleVersion( '<?php echo WC_Woo_Mercado_Pago_Module::VERSION; ?>' );
|
452 |
+
MA.setPayerEmail( '<?php echo ( $logged_user_email != null ? $logged_user_email : "" ); ?>' );
|
453 |
+
MA.setUserLogged( <?php echo ( empty( $logged_user_email ) ? 0 : 1 ); ?> );
|
454 |
+
MA.setInstalledModules( '<?php echo $available_payments; ?>' );
|
455 |
+
MA.post();
|
456 |
+
} catch(err) {}
|
457 |
</script>
|
458 |
<?php
|
459 |
}
|
469 |
$this->write_log( __FUNCTION__, 'updating order of ID ' . $order_id );
|
470 |
echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
|
471 |
<script type="text/javascript">
|
472 |
+
try {
|
473 |
+
var MA = ModuleAnalytics;
|
474 |
+
MA.setToken( ' . $access_token . ' );
|
475 |
+
MA.setPaymentType("ticket");
|
476 |
+
MA.setCheckoutType("custom");
|
477 |
+
MA.put();
|
478 |
+
} catch(err) {}
|
479 |
</script>';
|
480 |
}
|
481 |
|
493 |
}
|
494 |
|
495 |
$html = '<p>' .
|
496 |
+
__( 'Thank you for your order. Please, pay the ticket to get your order approved.', 'woocommerce-mercadopago' ) .
|
497 |
+
'</p>' .
|
498 |
+
'<p><iframe src="' . $transaction_details . '" style="width:100%; height:1000px;"></iframe></p>' .
|
499 |
+
'<a id="submit-payment" target="_blank" href="' . $transaction_details . '" class="button alt"' .
|
500 |
+
' style="font-size:1.25rem; width:75%; height:48px; line-height:24px; text-align:center;">' .
|
501 |
+
__( 'Print the Ticket', 'woocommerce-mercadopago' ) .
|
502 |
+
'</a> ';
|
503 |
$added_text = '<p>' . $html . '</p>';
|
504 |
echo $added_text;
|
505 |
}
|
845 |
$order->shipping_address_2
|
846 |
)
|
847 |
);
|
848 |
+
|
849 |
+
// Build the expiration date string.
|
850 |
+
$date_of_expiration = date( 'Y-m-d', strtotime( '+' . $this->date_expiration . ' days' ) ) . 'T00:00:00.000-00:00';
|
851 |
|
852 |
// The payment preference.
|
853 |
$preferences = array(
|
854 |
+
'date_of_expiration' => $date_of_expiration,
|
855 |
'transaction_amount' => ( $this->site_data['currency'] == 'COP' || $this->site_data['currency'] == 'CLP' ) ?
|
856 |
floor( $order_total * $currency_ratio ) :
|
857 |
floor( $order_total * $currency_ratio * 100 ) / 100,
|
1015 |
|
1016 |
// Display the discount in payment method title.
|
1017 |
public function get_payment_method_title_ticket( $title, $id ) {
|
|
|
1018 |
if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
|
1019 |
return $title;
|
1020 |
}
|
|
|
1021 |
if ( $title != $this->title || $this->gateway_discount == 0 ) {
|
1022 |
return $title;
|
1023 |
}
|
1024 |
+
if ( ! is_numeric( $this->gateway_discount ) || $this->gateway_discount < -99 || $this->gateway_discount > 99 ) {
|
1025 |
+
return $title;
|
1026 |
+
}
|
1027 |
$total = (float) WC()->cart->subtotal;
|
1028 |
+
$price_percent = $this->gateway_discount / 100;
|
1029 |
+
if ( $price_percent > 0 ) {
|
1030 |
+
$title .= ' (' . __( 'Discount of', 'woocommerce-mercadopago' ) . ' ' .
|
1031 |
+
strip_tags( wc_price( $total * $price_percent ) ) . ')';
|
1032 |
+
} elseif ( $price_percent < 0 ) {
|
1033 |
+
$title .= ' (' . __( 'Fee of', 'woocommerce-mercadopago' ) . ' ' .
|
1034 |
+
strip_tags( wc_price( -$total * $price_percent ) ) . ')';
|
|
|
1035 |
}
|
|
|
1036 |
return $title;
|
1037 |
}
|
1038 |
|
includes/sdk/lib/mercadopago.php
CHANGED
@@ -12,7 +12,7 @@ $GLOBALS['LIB_LOCATION'] = dirname( __FILE__ );
|
|
12 |
|
13 |
class MP {
|
14 |
|
15 |
-
private $version = '3.0.
|
16 |
private $client_id;
|
17 |
private $client_secret;
|
18 |
private $ll_access_token;
|
12 |
|
13 |
class MP {
|
14 |
|
15 |
+
private $version = '3.0.12';
|
16 |
private $client_id;
|
17 |
private $client_secret;
|
18 |
private $ll_access_token;
|
readme.txt
CHANGED
@@ -4,7 +4,7 @@ Tags: ecommerce, mercadopago, woocommerce
|
|
4 |
Requires at least: 4.8
|
5 |
Tested up to: 4.8
|
6 |
Requires PHP: 5.6
|
7 |
-
Stable tag: 3.0.
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
@@ -215,6 +215,12 @@ Features: LatAm Basic Checkout support. Great for merchants who want to get goin
|
|
215 |
|
216 |
== Changelog ==
|
217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
218 |
= v3.0.11 (19/02/2018) =
|
219 |
* Improvements
|
220 |
- Improved feedback messages when an order fails;
|
4 |
Requires at least: 4.8
|
5 |
Tested up to: 4.8
|
6 |
Requires PHP: 5.6
|
7 |
+
Stable tag: 3.0.12
|
8 |
License: GPLv2 or later
|
9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
10 |
|
215 |
|
216 |
== Changelog ==
|
217 |
|
218 |
+
= v3.0.12 (28/02/2018) =
|
219 |
+
* Improvements
|
220 |
+
- Added date limit for ticket payment;
|
221 |
+
- Added option for extra tax by payment gateway;
|
222 |
+
- Increased stability.
|
223 |
+
|
224 |
= v3.0.11 (19/02/2018) =
|
225 |
* Improvements
|
226 |
- Improved feedback messages when an order fails;
|
woocommerce-mercadopago.php
CHANGED
@@ -3,7 +3,7 @@
|
|
3 |
* Plugin Name: WooCommerce MercadoPago
|
4 |
* Plugin URI: https://github.com/mercadopago/cart-woocommerce
|
5 |
* Description: This is the <strong>oficial</strong> module of Mercado Pago for WooCommerce plugin. This module enables WooCommerce to use Mercado Pago as a payment Gateway for purchases made in your e-commerce store.
|
6 |
-
* Version: 3.0.
|
7 |
* Author: Mercado Pago
|
8 |
* Author URI: https://www.mercadopago.com.br/developers/
|
9 |
* Text Domain: woocommerce-mercadopago
|
@@ -106,7 +106,7 @@ if ( ! class_exists( 'WC_Woo_Mercado_Pago_Module' ) ) :
|
|
106 |
// ============================================================
|
107 |
|
108 |
// General constants.
|
109 |
-
const VERSION = '3.0.
|
110 |
const MIN_PHP = 5.6;
|
111 |
|
112 |
// Arrays to hold configurations for LatAm environment.
|
3 |
* Plugin Name: WooCommerce MercadoPago
|
4 |
* Plugin URI: https://github.com/mercadopago/cart-woocommerce
|
5 |
* Description: This is the <strong>oficial</strong> module of Mercado Pago for WooCommerce plugin. This module enables WooCommerce to use Mercado Pago as a payment Gateway for purchases made in your e-commerce store.
|
6 |
+
* Version: 3.0.12
|
7 |
* Author: Mercado Pago
|
8 |
* Author URI: https://www.mercadopago.com.br/developers/
|
9 |
* Text Domain: woocommerce-mercadopago
|
106 |
// ============================================================
|
107 |
|
108 |
// General constants.
|
109 |
+
const VERSION = '3.0.12';
|
110 |
const MIN_PHP = 5.6;
|
111 |
|
112 |
// Arrays to hold configurations for LatAm environment.
|