WooCommerce MercadoPago - Version old.2.2.18

Version Description

Download this release

Release Info

Developer mercadopago
Plugin Icon 128x128 WooCommerce MercadoPago
Version old.2.2.18
Comparing to
See all releases

Code changes from version old.1.0.3 to old.2.2.18

Files changed (96) hide show
  1. README.txt +315 -63
  2. admin/class-wc-mercadoenvios-admin-orders.php +88 -0
  3. assets/css/custom_checkout_mercadopago.css +308 -0
  4. images/MCO/CUPOM_MCO.jpg +0 -0
  5. images/{MCO.png → MCO/MCO.png} +0 -0
  6. images/MCO/banner_all_methods.png +0 -0
  7. images/{MCO.jpg → MCO/credit_card.png} +0 -0
  8. images/MCO/standard_mco.jpg +0 -0
  9. images/MLA/CUPOM_MLA.jpg +0 -0
  10. images/{MLA.png → MLA/MLA.png} +0 -0
  11. images/MLA/banner_all_methods.png +0 -0
  12. images/MLA/credit_card.png +0 -0
  13. images/{MLA.jpg → MLA/standard_mla.jpg} +0 -0
  14. images/MLB/CUPOM_MLB.jpg +0 -0
  15. images/{MLB.png → MLB/MLB.png} +0 -0
  16. images/MLB/banner_all_methods.png +0 -0
  17. images/{MLB.jpg → MLB/credit_card.png} +0 -0
  18. images/MLB/cupom1.jpg +0 -0
  19. images/MLB/cupom2.jpg +0 -0
  20. images/MLB/cupom3.jpg +0 -0
  21. images/MLB/desconto_MLB.jpg +0 -0
  22. images/MLB/standard_mlb.jpg +0 -0
  23. images/MLC/CUPOM_MLC.jpg +0 -0
  24. images/{MLC.png → MLC/MLC.png} +0 -0
  25. images/MLC/banner_all_methods.png +0 -0
  26. images/{MLC.gif → MLC/credit_card.png} +0 -0
  27. images/MLC/standard_mlc.gif +0 -0
  28. images/MLM/CUPOM_MLM.jpg +0 -0
  29. images/{MLM.png → MLM/MLM.png} +0 -0
  30. images/MLM/banner_all_methods.png +0 -0
  31. images/MLM/credit_card.png +0 -0
  32. images/{MLM.jpg → MLM/standard_mlm.jpg} +0 -0
  33. images/MLU/CUPOM_MLU.png +0 -0
  34. images/MLU/MLU.png +0 -0
  35. images/MLU/banner_all_methods.png +0 -0
  36. images/MLU/credit_card.png +0 -0
  37. images/MLU/standard_mlu.png +0 -0
  38. images/MLV/CUPOM_MLV.jpg +0 -0
  39. images/{MLV.png → MLV/MLV.png} +0 -0
  40. images/MLV/banner_all_methods.png +0 -0
  41. images/{MLV.jpg → MLV/credit_card.png} +0 -0
  42. images/MLV/standard_mlv.jpg +0 -0
  43. images/MPE/CUPOM_MPE.png +0 -0
  44. images/MPE/MPE.png +0 -0
  45. images/MPE/banner_all_methods.png +0 -0
  46. images/MPE/credit_card.png +0 -0
  47. images/MPE/standard_mpe.png +0 -0
  48. images/bandeiras/amex.png +0 -0
  49. images/bandeiras/boleto.png +0 -0
  50. images/bandeiras/cash.png +0 -0
  51. images/bandeiras/diners.png +0 -0
  52. images/bandeiras/elo.png +0 -0
  53. images/bandeiras/hipercard.png +0 -0
  54. images/bandeiras/master.png +0 -0
  55. images/bandeiras/melicard.png +0 -0
  56. images/bandeiras/visa.png +0 -0
  57. images/banner.png +0 -0
  58. images/bar_code.png +0 -0
  59. images/boleto.png +0 -0
  60. images/cart.png +0 -0
  61. images/credit_card.png +0 -0
  62. images/cvv.png +0 -0
  63. images/loading.gif +0 -0
  64. languages/woocommerce-mercadopago-module-es_AR.mo +0 -0
  65. languages/woocommerce-mercadopago-module-es_AR.po +934 -180
  66. languages/woocommerce-mercadopago-module-es_CL.mo +0 -0
  67. languages/woocommerce-mercadopago-module-es_CL.po +935 -181
  68. languages/woocommerce-mercadopago-module-es_CO.mo +0 -0
  69. languages/woocommerce-mercadopago-module-es_CO.po +935 -188
  70. languages/woocommerce-mercadopago-module-es_ES.mo +0 -0
  71. languages/woocommerce-mercadopago-module-es_ES.po +1102 -0
  72. languages/woocommerce-mercadopago-module-es_MX.mo +0 -0
  73. languages/woocommerce-mercadopago-module-es_MX.po +935 -181
  74. languages/woocommerce-mercadopago-module-es_PE.mo +0 -0
  75. languages/woocommerce-mercadopago-module-es_PE.po +1102 -0
  76. languages/woocommerce-mercadopago-module-es_UY.mo +0 -0
  77. languages/woocommerce-mercadopago-module-es_UY.po +1102 -0
  78. languages/woocommerce-mercadopago-module-es_VE.mo +0 -0
  79. languages/woocommerce-mercadopago-module-es_VE.po +935 -181
  80. languages/woocommerce-mercadopago-module-pt_BR.mo +0 -0
  81. languages/woocommerce-mercadopago-module-pt_BR.po +1002 -247
  82. languages/woocommerce-mercadopago-module.pot +902 -337
  83. mercadopago-module.php +522 -85
  84. mercadopago/class-wc-product-mp_recurrent.php +362 -0
  85. mercadopago/css/woo-mercadopago-module.css +0 -14
  86. mercadopago/mercadopago-custom-gateway.php +1952 -0
  87. mercadopago/mercadopago-gateway.php +1744 -620
  88. mercadopago/mercadopago-subscription-gateway.php +1481 -0
  89. mercadopago/mercadopago-ticket-gateway.php +1836 -0
  90. mercadopago/sdk/lib/mercadopago.php +1228 -561
  91. shipment/abstract-wc-mercadoenvios-shipping.php +356 -0
  92. shipment/class-wc-mercadoenvios-package.php +257 -0
  93. shipment/class-wc-mercadoenvios-shipping-express.php +35 -0
  94. shipment/class-wc-mercadoenvios-shipping-normal.php +35 -0
  95. templates/credit-card/payment-form.php +1378 -0
  96. templates/ticket/ticket-form.php +845 -0
README.txt CHANGED
@@ -1,92 +1,344 @@
1
- === Woo Mercado Pago Module ===
2
- Contributors: mercadopago, mercadolivre
3
  Donate link: https://www.mercadopago.com.br/developers/
4
- Tags: mercadopago, ecommerce, payment, checkout
5
- Requires at least: WooCommerce 2.1.x
6
- Tested up to: WooCommerce 2.5.x
7
- Stable tag: 1.0.3
8
  License: GPLv2 or later
9
- License URI: http://www.gnu.org/licenses/gpl-2.0.html
10
 
11
- This is the oficial module of Mercado Pago for WooCommerce plugin.
12
 
13
  == Description ==
14
 
15
- This module enables WooCommerce to use Mercado Pago as a payment Gateway for purchases made in your e-commerce store.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
16
 
17
  == Installation ==
18
 
19
- 1. Copy **woo-mercado-pago-module** folder to **[WordPressRootDirectory]/wp-content/plugins/** folder.
20
 
21
- 2. On your store administration, go to **Plugins** option in sidebar.
 
 
 
22
 
23
- 3. Search by **WooCommerce Mercado Pago** and click enable. <br />
24
- You will receive the following message: "Plugin enabled." as a notice in your WordPress.
 
 
25
 
26
- == Upgrade Notice ==
27
 
28
- Please refer to our github repo.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
29
 
30
- == Installation ==
 
 
31
 
32
- 1. Go to **WooCommerce > Configuration > Checkout Tab > Mercado Pago**. <br />
33
- Fist of all, you need to configure your client credentials. To make it, fill your **Client_id**, **Client_secret** in Mercado Pago Credentials section.
34
-
35
- You can obtain your **Client_id** and **Client_secret**, accordingly to your country, in the following links:
36
-
37
- * Argentina: https://www.mercadopago.com/mla/herramientas/aplicaciones
38
- * Brazil: https://www.mercadopago.com/mlb/ferramentas/aplicacoes
39
- * Chile: https://www.mercadopago.com/mlc/herramientas/aplicaciones
40
- * Colombia: https://www.mercadopago.com/mco/herramientas/aplicaciones
41
- * Mexico: https://www.mercadopago.com/mlm/herramientas/aplicaciones
42
- * Venezuela: https://www.mercadopago.com/mlv/herramientas/aplicaciones
43
-
44
- 2. Other general configurations. <br />
45
- * **Instant Payment Notification (IPN) URL**
46
- The highlighted URL is where you will get notified about payment updates.<br /><br />
47
- * **Checkout Options**
48
- **Title**: This is the title of the payment option that will be shown to your customers;<br />
49
- **Description**: This is the description of the payment option that will be shown to your customers;<br />
50
- **Store Category**: Sets up the category of the store;<br />
51
- **Store Identificator**: A prefix to identify your store, when you have multiple stores for only one Mercado Pago account;<br />
52
- **Integration Method**: How your customers will interact with Mercado Pago to pay their orders;<br />
53
- **iFrame Width**: The width, in pixels, of the iFrame (used only with iFrame Integration Method);<br />
54
- **iFrame Height**: The height, in pixels, of the iFrame (used only with iFrame Integration Method);<br />
55
- **Auto Return**: If set, the platform will return to your store when the payment is approved.<br /><br />
56
- * **Payment Options**
57
- **Max Installments**: The maximum installments allowed for your customers;<br />
58
- **Exclude Payment Methods**: Select the payment methods that you want to not work with Mercado Pago.<br /><br />
59
- * **Test and Debug Options**
60
- **Mercado Pago Sandboxs**: Test your payments in Mercado Pago sandbox environment;<br />
61
- **Debug and Log**: Enables/disables system logs.<br />
62
-
63
  == Frequently Asked Questions ==
64
 
65
- = Any questions? =
 
66
 
 
67
  Please, check our FAQ at: https://www.mercadopago.com.br/ajuda/
68
 
69
  == Screenshots ==
70
 
71
- 1. Settings page.
 
 
 
 
 
 
72
 
73
  == Changelog ==
74
 
75
- = v1.0.0 (16/03/2016) =
76
- * LatAm support;
77
- * Title, description, category, and external reference customizations;
78
- * Integrations via iframe, modal, and redirection, with configurable auto-returning;
79
- * Max installments and payment method exclusion setup;
80
- * Sandbox and debug options.
81
 
82
- = v1.0.1 (23/03/2016) =
83
- * Added payment ID in order custom fields information;
84
- * Removed some unused files/code;
85
- * Redesign of the logic of preferences when creating cart, separating items;
86
- * Proper information of shipment cost
87
 
88
- = v1.0.2 (23/03/2016) =
89
- * IPN URL wasn’t triggered when topic=payment
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
90
 
91
  = v1.0.3 (23/03/2016) =
92
- * Improving algorithm when processing IPN
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ === Woo Mercado Pago Module Oficial ===
2
+ Contributors: mercadopago, mercadolivre, claudiosanches
3
  Donate link: https://www.mercadopago.com.br/developers/
4
+ Tags: ecommerce, mercadopago, woocommerce
5
+ Requires at least: WooCommerce 2.6.x
6
+ Tested up to: WooCommerce 3.0.0
7
+ Stable tag: 2.2.18
8
  License: GPLv2 or later
9
+ License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
11
+ Offer to your clients the best experience in e-Commerce by using Mercado Pago as your payment method.
12
 
13
  == Description ==
14
 
15
+ This module enables WooCommerce to use Mercado Pago as a payment method for purchases in your e-commerce store. By offering a nice set of tools like LatAm support, several card acquires, tickets, discounts, subscriptions, and many others e-Commerce features, this plugin wants to bring the best experience in payment checkouts.
16
+
17
+ = Why chose Mercado Pago =
18
+ Mercado Pago owns the highest security standards with PCI certification level 1 and a specialized internal team working on fraud analysis. With Mercado Pago, you will be able to accept payments from the most common brands of credit card, offer purchase installments options and receive your payment with antecipation. You can also enable your customers to pay in the web or in their mobile devices.
19
+
20
+ = Mercado Pago Main Features =
21
+ * Online and real-time processment through IPN/Webhook mechanism;
22
+ * High approval rate with a robust fraud analysis;
23
+ * Potential new customers with a base of more than 120 millions of users in Latin America;
24
+ * PCI Level 1 Certification;
25
+ * Support to major credit card brands;
26
+ * Payment installments;
27
+ * Anticipation of receivables in D+2 or D+14 (According to Mercado Pago terms and conditions);
28
+ * Payment in one click with Mercado Pago basic and custom checkouts;
29
+ * Payment via tickets;
30
+ * Subscriptions;
31
+ * Seller's Protection Program.
32
 
33
  == Installation ==
34
 
35
+ You have two ways to install this module: from your WordPress Store, or by downloading and manually copying the module directory.
36
 
37
+ = Install from WordPress =
38
+ 1. On your store administration, go to **Plugins** option in sidebar;
39
+ 2. Click in **Add New** button and type "Woo Mercado Pago Module" in the **Search Plugins** text field. Press Enter;
40
+ 3. You should find the module read to be installed. Click install.
41
 
42
+ = Manual Download =
43
+ 1. Get the module sources from a repository (<a href="https://github.com/mercadopago/cart-woocommerce/archive/master.zip">Github</a> or <a href="https://downloads.wordpress.org/plugin/woo-mercado-pago-module.2.2.18.zip">WordPress Plugin Directory</a>);
44
+ 2. Unzip the folder and find "woo-mercado-pago-module" directory;
45
+ 3. Copy "woo-mercado-pago-module" directory to **[WordPressRootDirectory]/wp-content/plugins/** directory.
46
 
47
+ To confirm that your module is really installed, you can click in **Plugins** item in the store administration menu, and check your just installed module. Just click **enable** to activate it and you should receive the message "Plugin enabled." as a notice in your WordPress.
48
 
49
+ = Configuration =
50
+ 1. On your store administration, go to **WooCommerce > Settings > Checkout** tab. In **Checkout Options**, you can find configurations for **Mercado Pago - Basic Checkout**, **Mercado Pago - Custom Checkout**, and **Mercado Pago - Ticket**.
51
+ * To get your **Client_id** and **Client_secret** for your country, you can go to: <a href="https://www.mercadopago.com/mla/account/credentials?type=basic">Argentina</a>, <a href="https://www.mercadopago.com/mlb/account/credentials?type=basic">Brazil</a>, <a href="https://www.mercadopago.com/mlc/account/credentials?type=basic">Chile</a>, <a href="https://www.mercadopago.com/mco/account/credentials?type=basic">Colombia</a>, <a href="https://www.mercadopago.com/mlm/account/credentials?type=basic">Mexico</a>, <a href="https://www.mercadopago.com/mpe/account/credentials?type=basic">Peru</a>, <a href="https://www.mercadopago.com/mlu/account/credentials?type=basic">Uruguay</a>, and <a href="https://www.mercadopago.com/mlv/account/credentials?type=basic">Venezuela</a>.
52
+ * And to get your **Public Key**/**Access Token** you can go to: <a href="https://www.mercadopago.com/mla/account/credentials?type=custom">Argentina</a>, <a href="https://www.mercadopago.com/mlb/account/credentials?type=custom">Brazil</a>, <a href="https://www.mercadopago.com/mlc/account/credentials?type=custom">Chile</a>, <a href="https://www.mercadopago.com/mco/account/credentials?type=custom">Colombia</a>, <a href="https://www.mercadopago.com/mlm/account/credentials?type=custom">Mexico</a>, <a href="https://www.mercadopago.com/mpe/account/credentials?type=custom">Peru</a>, <a href="https://www.mercadopago.com/mlu/account/credentials?type=custom">Uruguay</a>, and <a href="https://www.mercadopago.com/mlv/account/credentials?type=custom">Venezuela</a>.
53
+ 2. For the solutions **Mercado Pago - Basic Checkout**, **Mercado Pago - Custom Checkout**, and **Mercado Pago - Ticket**, you can:
54
+ * Enable/Disable your plugin, so you can allow specific solutions for your business;
55
+ * Set up your credentials (Client_id/Client_secret for Basic Checkout and Subscriptions, Public Key/Access Token for Custom Checkout and Ticket);
56
+ * Check your IPN URL, where you will get notified about payment updates;
57
+ * Set the title of the payment option that will be shown to your customers;
58
+ * Set the description of the payment option that will be shown to your customers;
59
+ * Set the description that will be shown in your customer's invoice (for Custom Checkout and Ticket);
60
+ * Set binary mode that when charging a credit card, only [approved] or [reject] status will be taken (for Custom Checkout);
61
+ * Set the category of your store;
62
+ * Set stock reduction behavior (for Ticket);
63
+ * Set a prefix to identify your store, when you have multiple stores for only one Mercado Pago account;
64
+ * Define how your customers will interact with Mercado Pago to pay their orders (Basic Checkout and Subscriptions);
65
+ * Define discounts by payment method;
66
+ * Configure the after-pay return behavior (Basic Checkout);
67
+ * Configure the maximum installments allowed for your customers (for Basic Checkout);
68
+ * Configure the payment acquirers that you want to not work with Mercado Pago (for Basic Checkout);
69
+ * Configure call-back URLs for after-pay behavior (for Basic Checkout and Subscriptions);
70
+ * Enable coupon of campaigns for discounts (for Custom Checkout and Ticket);
71
+ * Enable currency conversion;
72
+ * Enable/disable sandbox mode, where you can test your payments in Mercado Pago sandbox environment (for Basic Checkout and Custom Checkout);
73
+ * Enables/disable system logs.
74
 
75
+ = In this video, we show how you can install and configure from your WordPress store =
76
+
77
+ [youtube https://www.youtube.com/watch?v=CgV9aVlx5SE]
78
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
79
  == Frequently Asked Questions ==
80
 
81
+ = What is Mercado Pago? =
82
+ Please, take a look: https://vimeo.com/125253122
83
 
84
+ = Any questions? =
85
  Please, check our FAQ at: https://www.mercadopago.com.br/ajuda/
86
 
87
  == Screenshots ==
88
 
89
+ 1. `Custom Checkout`
90
+
91
+ 2. `One Click Payment`
92
+
93
+ 3. `Tickets & Discounts`
94
+
95
+ 4. `Plugin Options`
96
 
97
  == Changelog ==
98
 
99
+ = v2.2.18 (22/11/2017) =
100
+ * Bug fixes
101
+ - Fixed a bug in the URL of javascript source for light-box window.
 
 
 
102
 
103
+ = v2.2.17 (13/11/2017) =
104
+ * Improvements
105
+ - Improved webhook of ticket printing to a less generic one.
106
+ * Bug fixes
107
+ - FIxed a bug related to payment status of tickets.
108
 
109
+ = v2.2.16 (23/10/2017) =
110
+ * Bug fixes
111
+ - Fixed the absence of [zip_code] field in registered tickets for Brazil.
112
+
113
+ = v2.2.15 (22/09/2017) =
114
+ * Bug fixes
115
+ - Synchronizing Mercado Pago account when WooCommerce back-office cancels an order.
116
+ * Improvements
117
+ - Added CNPJ document for brazilian tickets;
118
+ - Optimized error tracking.
119
+
120
+ = v2.2.14 (14/09/2017) =
121
+ * Bug fixes
122
+ - Fixed a bug in Ticket form related with inconsistent use of variables of Custom Checkout form;
123
+ - Not showing card issuer field for Chile as it is unnecessary.
124
+
125
+ = v2.2.13 (28/08/2017) =
126
+ * Bug fixes
127
+ - Fixing a bug in Custom Checkout, that wasn't showing the form.
128
+
129
+ = v2.2.12 (14/08/2017) =
130
+ * Improvements
131
+ - Improved layout alignment for custom checkout and tickets;
132
+ - Added a checklist for platform statuses of cURL, SSL and PHP verification;
133
+ - Added the ticket view after the checkout.
134
+ * Bug fixes
135
+ - Fixed a bug that was locking inputs in ticket fields for Brazil.
136
+
137
+ = v2.2.11 (24/07/2017) =
138
+ * Improvements
139
+ - Improved credential validation algorithm;
140
+ - Added FEBRABAN rules for brazilian tickets.
141
+ * Bug fixes
142
+ - Resolved a bug when converting currency.
143
+
144
+ = v2.2.10 (04/07/2017) =
145
+ * Bug fixes
146
+ - Fixed a bug in subscriptions, where a recurrent product wasn't possible to be bought if its end-date is blank.
147
+
148
+ = v2.2.9 (29/06/2017) =
149
+ * Bug fixes
150
+ - Fixed a bug in Mercado Envios for WooCommerce 3.x, involving use of undeclared variable.
151
+
152
+ = v2.2.8 (26/06/2017) =
153
+ * Improvements
154
+ - Integrated error log API. This can help to debug any cURL requests;
155
+ - Increased stability.
156
+
157
+ = v2.2.7 (01/06/2017) =
158
+ * Improvements
159
+ - Optimizations in checkout JavaScript;
160
+ - Additional checking for test users within checkout process.
161
+ * Bug fixes
162
+ - Properly changing order status when paying with Basic Checkout using two cards.
163
+
164
+ = v2.2.6 (18/05/2017) =
165
+ * Improvements
166
+ - Increased stability for internal payment process.
167
+ * Bug fixes
168
+ - Fixed a bug related to shipping value not added to total amount;
169
+ - Not showing ticket button when payment method is not applicable;
170
+ - Removed unused snippet from ticket solution, handling an unexpected warning.
171
+
172
+ = v2.2.5 (08/05/2017) =
173
+ * Bug fixes
174
+ - Added support for WooCommerce/WordPress functions to handle warnings;
175
+ - Algorithm of Chile/Colombia when removing decimals.
176
+
177
+ = v2.2.4 (03/05/2017) =
178
+ * Improvements
179
+ - Increased support to older versions of PHP;
180
+ - Optimized calls of WordPress/WooCommerce specific functions.
181
+
182
+ = v2.2.3 (02/05/2017) =
183
+ * Bug fixes
184
+ - Resolved a bug related to the missing menus in Appearance.
185
+
186
+ = v2.2.2 (27/04/2017) =
187
+ * Improvements
188
+ - When using Mercado Envios, the plugin now sends an email with tracking ID to the merchant and customer.
189
+ * Bug fixes
190
+ - Resolved a bug related with non-persisted data of Simple Products;
191
+ - Resolved the status update for "in_procerss" in the basic checkout.
192
+
193
+ = v2.2.1 (13/04/2017) =
194
+ * Features
195
+ - Discount by payment method. Merchants can give a discount to their customers if the payment is made with a given gateway.
196
+ * Improvements
197
+ - Support for WooCommerce 3.0.0.
198
+
199
+ = v2.2.0 (03/04/2017) =
200
+ * Features
201
+ - Recurrent Payments. This feature allow merchants to create subscriptions and charge their customers periodically. For now, available only to Argentina, Brazil and Mexico.
202
+
203
+ = v2.1.9 (23/03/2017) =
204
+ * Features
205
+ - Mercado Envios for Basic Checkout. Now, merchants can use Mercado Envios services to ship products to their customers. For now, only available to Argentina, Brazil, and Mexico.
206
+
207
+ = v2.1.8 (13/02/2017) =
208
+ * Features
209
+ - Rollout to Uruguay. This plugin is now supporting Uruguay for Basic Checkout and its local language translations.
210
+ * Improvements
211
+ - Conformity with Argentina's E 51/2017 resolution to show up CFT/TEA amounts;
212
+ - Removed decimals from Chile and Colombia currencies, as they aren't used.
213
+ * Bug fixes
214
+ - Fixed and improved the coupon algorithm.
215
+
216
+ = v2.1.7 (12/12/2016) =
217
+ * Bug fixes
218
+ - When ticket payment method was enabled, the button for print ticket was appearing for other methods.
219
+
220
+ = v2.1.6 (09/12/2016) =
221
+ * Features
222
+ - Cancel/Refund API integration. Now, merchants can cancel and refund orders through store back-office. Options available in order details, order actions;
223
+ - Back url (checkout callback) configurable in back-office for basic checkout solution.
224
+ * Improvements
225
+ - Added option to select when (payment approval or order generation) to reduce stocks for tickets solution;
226
+ - Payment with ticket with order description at finish.
227
+
228
+ = v2.1.5 (16/11/2016) =
229
+ * Improvements
230
+ - Analytics of module settings.
231
+ * Bug fixes
232
+ - Fixed issue in ticket solution that was printing [null] in ticket description.
233
+
234
+ = v2.1.4 (20/10/2016) =
235
+ * Features
236
+ - Two Card Payment Configuration. Merchants can configure this feature in back-office through settings page.
237
+ * Improvements
238
+ - Removed some redundant notice messages;
239
+ - Improved algorithm to process settings page flow and checkout;
240
+ - Refactored code to meet WordPress coding standards.
241
+ * Bug fixes
242
+ - Fixed a SSL issue related to ticket solution (the open locker) in gateway selection.
243
+
244
+ = v2.1.3 (15/09/2016) =
245
+ * Improvements
246
+ - A few improvements in performance;
247
+ - Improved translations;
248
+ - Improved security with URL access via SSL in all module flow.
249
+
250
+ = v2.1.2 (18/08/2016) =
251
+ * Improvements
252
+ - Improved performance for both client and server sides.
253
+ * Bug fixes
254
+ - Fixed the product list for multiple items in Basic Checkout form.
255
+
256
+ = v2.1.1 (02/08/2016) =
257
+ * Improvements
258
+ - Improved log messages when applying discounts;
259
+ - Added a link to reprint ticket in customer account order page.
260
+ * Bug fixes
261
+ - Fixed tax fee for shipments.
262
+
263
+ = v2.1.0 (25/07/2016) =
264
+ * Features
265
+ - Mercado Pago Discount Coupon. This feature lets Mercado Pago and merchants to use campaigns of discount created in their Mercado Pago accounts. Want to see how it works on-the-fly? Please check this video: <a href="https://www.youtube.com/watch?v=eQ2YYoWvzKQ">Discount Coupons</a>;
266
+ - Currency Conversion. Added an option to try to use Mercado Pago currency ratio, to automatically convert any currencies to supported/used currency.
267
+ * Improvements
268
+ - Improved credentials validation algorithm;
269
+ - Improved checkout data, with more clean and sanitized info for product image and description.
270
+
271
+ = v2.0.5 (07/07/2016) =
272
+ * Improvements
273
+ - Improved IPN behavior to handle consistent messages with absent IDs.
274
+ * Bug fixes
275
+ - Fixed the informative URL of ticket IPN in admin page.
276
+
277
+ = v2.0.4 (29/06/2016) =
278
+ * Improvements
279
+ - Added a message in admin view when currency is different from used locally (used in credential's country).
280
+ * Bug fixes
281
+ - We have wrote a snippet to handle the absent shipment cost problem;
282
+ - Fixed some URLs of the credentials link for Basic Checkout.
283
+
284
+ = v2.0.3 (21/06/2016) =
285
+ * Bug fixes
286
+ - Basic Checkout for WooCommerce v2.6.x. In WooCommerce v2.6.x, there was a bug related with the ampersand char that was wrongly converted to #38; on URLs and breaking the checkout flow. This update should place a fix to this problem.
287
+
288
+ = v2.0.2 (13/06/2016) =
289
+ * Features
290
+ - Rollout to Peru. This plugin is now supporting Peru, which includes Basic Checkout, Custom Checkout, Tickets, and local language translations.
291
+ * Bug fixes
292
+ - Fix a PHP version issue. It was reported to us an issue in a function that uses an assign made directly from an array field. This feature is available in PHP 5.4.x or above and we've made an update to support older versions;
293
+ - Fix a tax issue. It wasn't been correctly added to the total value in Mercado Pago gateway.
294
+
295
+ = v2.0.1 (09/06/2016) =
296
+ * Features
297
+ - Customer Cards (One Click Payment). This feature allows customers to proceed to checkout with only one click. As Mercado Pago owns PCI standards, it can securely store credit card sensitive data and so register the customer card in the first time he uses it. Next time the customer comes back, he can use his card again, only by inserting its CVV code. Want to see how it works on-the-fly? Please check this video: <a href="https://www.youtube.com/watch?v=_KB8CtDei_4">Custom Checkout + Customer Cards</a>.
298
+ * Improvements
299
+ - SSL verifications for custom checkout and ticket. Custom Checkout and Ticket solutions can only be used with SSL certification. As the module behaves inconsistently if there is no SSL, we've put a watchdog to lock the solution if it is active without SSL;
300
+ - Enabling any type of currency without disabling module (now, error message from API). Now, merchants have the option to use currencies of their choices in WooCommerce. Pay attention that Woo Mercado Pago will always set the currency related to the country of the Mercado Pago credentials.
301
+
302
+ = v2.0.0 (01/06/2016) =
303
+ * Features
304
+ - Custom Checkout for LatAm. Offer a checkout fully customized to your brand experience with our simple-to-use payments API. Want to see how it works on-the-fly? Please check this video: <a href="https://www.youtube.com/watch?v=_KB8CtDei_4">Custom Checkout + Customer Cards</a>;
305
+ - Ticket for LatAm. Now, customer can pay orders with bank tickets. Want to see how it works on-the-fly? Please check this video: <a href="https://www.youtube.com/watch?v=97VSVx5Uaj0">Tickets</a>.
306
+ * Improvements
307
+ - Removed possibility to setting supportable but invalid currency. We've made a fix to prevent users to select a valid currency (such as ARS), but for a different country set by credentials origin (such as MLB - Mercado Pago Brazil).
308
+
309
+ = v1.0.5 (29/04/2016) =
310
+ * Improvements
311
+ - Removal of extra shipment setup in checkout view. We have made a workaround to prevent an extra shipment screen to appear;
312
+ - Translation to es_ES. Users can select Spain as module country, and translation should be ok.
313
+ * Bug fixes
314
+ - Some bug fixes to stabilize the module.
315
+
316
+ = v1.0.4 (15/04/2016) =
317
+ * Improvements
318
+ - Added a link to module settings page in plugin page. We've increased the module description informations. Also we've put a link to make a vote on us. Please, VOTE US 5 STARS. Any feedback will be welcome!
319
+ - Fixed status change when processing with two cards. When using payments with two cards in Basic Checkout, the flow of order status wasn't correct in some cases when async IPN events occurs. We've made some adjustments to fix it.
320
 
321
  = v1.0.3 (23/03/2016) =
322
+ * Improving algorithm when processing IPN
323
+ Async calls and processment were refined.
324
+
325
+ = v1.0.2 (23/03/2016) =
326
+ * Bug fixes
327
+ - IPN URL wasn’t triggered when topic=payment. Fixed a bug for some specific IPN messages of Mercado Pago.
328
+
329
+ = v1.0.1 (23/03/2016) =
330
+ * Improvements
331
+ - Added payment ID in order custom fields information. Added some good informations about the payment in the order view;
332
+ - Removed some unused files/code. We've made some code cleaning;
333
+ - Redesign of the logic of preferences when creating cart, separating items. Itens are now separated in cart description. This increases the readability and consistency of informations in API level;
334
+ - Proper information of shipment cost. Previously, the shipment cost was passed together with the cart total order amount.
335
+
336
+ = v1.0.0 (16/03/2016) =
337
+ * Features
338
+ - LatAm Basic Checkout support. Great for merchants who want to get going quickly and easily. This is the basic payment integration with Mercado Pago. Want to see how it works on-the-fly? Please check this video: <a href="https://www.youtube.com/watch?v=DgOsX1eXjBU">Basic Checkout</a>;
339
+ - Set of configurable fields and customizations. Title, description, category, and external reference customizations, integrations via iframe, modal, and redirection, with configurable auto-returning, max installments and payment method exclusion setup;
340
+ - Sandbox and debug options. Basicer can test orders by enabling debug mode or using sandbox environment.
341
+
342
+ == Upgrade Notice ==
343
+
344
+ If you're migrating from version 1.x.x to 2.x.x, please be sure to make a backup of your site and database, as there are many additional features and modifications between these versions.
admin/class-wc-mercadoenvios-admin-orders.php ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin orders actions.
4
+ *
5
+ * @package WooCommerce_MercadoEnvios/Admin/Orders
6
+ * @version 2.2.2
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit;
11
+ }
12
+
13
+
14
+ include_once dirname( __FILE__ ) . '/../mercadopago/sdk/lib/mercadopago.php';
15
+
16
+ /**
17
+ * MercadoEnvios orders.
18
+ */
19
+ class WC_MercadoEnvios_Admin_Orders {
20
+
21
+ /**
22
+ * Initialize the order actions.
23
+ */
24
+ public function __construct() {
25
+ add_action( 'add_meta_boxes', array( $this, 'register_metabox' ) );
26
+ }
27
+
28
+ /**
29
+ * Register tracking code metabox.
30
+ */
31
+ public function register_metabox() {
32
+ add_meta_box(
33
+ 'wc_mercadoenvios',
34
+ 'Mercado Envios',
35
+ array( $this, 'metabox_content' ),
36
+ 'shop_order',
37
+ 'side',
38
+ 'high'
39
+ );
40
+ }
41
+
42
+ /**
43
+ * Tracking code metabox content.
44
+ *
45
+ * @param WC_Post $post Post data.
46
+ */
47
+ public function metabox_content( $post ) {
48
+
49
+ $order = wc_get_order( $post->ID );
50
+ // WooCommerce 3.0 or later.
51
+ if ( method_exists( $order, 'get_meta' ) ) {
52
+ $shipment_id = $order->get_meta( '_mercadoenvios_shipment_id' );
53
+ $status = $order->get_meta( '_mercadoenvios_status' );
54
+ $tracking_number = $order->get_meta( '_mercadoenvios_tracking_number' );
55
+ } else {
56
+ $shipment_id = get_post_meta( $post->ID, '_mercadoenvios_shipment_id', true );
57
+ $status = get_post_meta( $post->ID, '_mercadoenvios_status', true );
58
+ $tracking_number = get_post_meta( $post->ID, '_mercadoenvios_tracking_number', true );
59
+ }
60
+
61
+ if ( isset( $status ) && $status != '' && $status != 'pending' ) {
62
+ echo '<label for="mercadoenvios_tracking_code">' . esc_html__( 'Tracking code:', 'woocommerce-mercadopago-module' ) . '</label><br />';
63
+ echo '<input type="text" id="mercadoenvios_tracking_code" name="mercadoenvios_tracking_code" value="' . esc_attr( $tracking_number ) . '" style="width: 100%;" />';
64
+
65
+ // Check exist shipment_id
66
+ if ( isset( $shipment_id ) && $shipment_id != '' ) {
67
+ $checkout_standard = new WC_WooMercadoPago_Gateway();
68
+ $client_id = $checkout_standard->get_option( 'client_id' );
69
+ $client_secret = $checkout_standard->get_option( 'client_secret' );
70
+
71
+ $this->mp = new MP(
72
+ WC_WooMercadoPago_Module::get_module_version(),
73
+ $client_id,
74
+ $client_secret
75
+ );
76
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
77
+ $this->mp->set_email( $email );
78
+
79
+ echo '<label for="mercadoenvios_tracking_number">' . esc_html__( 'Tag:', 'woocommerce-mercadopago-module' ) . '</label><br />';
80
+ echo '<a href="https://api.mercadolibre.com/shipment_labels?shipment_ids=' . esc_attr( $shipment_id ) . '&savePdf=Y&access_token=' . $this->mp->get_access_token() . '" class="button-primary" target="_blank">' . esc_html__( 'Print', 'woocommerce-mercadopago-module' ) . '</a>';
81
+ }
82
+ } else {
83
+ echo '<label for="mercadoenvios_tracking_number">' . esc_html__( 'Shipping is pending', 'woocommerce-mercadopago-module' ) . '</label><br />';
84
+ }
85
+ }
86
+ }
87
+
88
+ new WC_MercadoEnvios_Admin_Orders();
assets/css/custom_checkout_mercadopago.css ADDED
@@ -0,0 +1,308 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ body{
2
+ background-color: #F5F5F5;
3
+ padding: 0;
4
+ margin: 0;
5
+ }
6
+
7
+ #mp-box-form{
8
+ padding: 15px 10px;
9
+ margin: 30px auto;
10
+ width: 400px;
11
+ background-color: #fff;
12
+ overflow: auto;
13
+ border-radius: 5px;
14
+ }
15
+
16
+ .mp-box-inputs{
17
+ float: left;
18
+ }
19
+
20
+ .mp-col-10{
21
+ width: 10%;
22
+ }
23
+
24
+ .mp-col-20{
25
+ width: 20%;
26
+ }
27
+
28
+ .mp-col-25{
29
+ width: 25%;
30
+ }
31
+
32
+ .mp-col-30{
33
+ width: 30%;
34
+ }
35
+
36
+ .mp-col-35{
37
+ width: 35%;
38
+ }
39
+
40
+ .mp-col-45{
41
+ width: 45%;
42
+ }
43
+
44
+ .mp-col-50{
45
+ width: 50%;
46
+ }
47
+
48
+ .mp-col-55{
49
+ width: 55%;
50
+ }
51
+
52
+ .mp-col-65{
53
+ width: 65%;
54
+ }
55
+
56
+ .mp-col-75{
57
+ width: 75%;
58
+ }
59
+
60
+ .mp-col-100{
61
+ width: 100%;
62
+ margin: 5px 0;
63
+ }
64
+
65
+ .mp-line{
66
+ width: 100%;
67
+ margin: 5px 0;
68
+ }
69
+
70
+ .mp-box-inputs label{
71
+ text-transform: uppercase;
72
+ font-size: 12px;
73
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
74
+ margin: 0 0 5px 0;
75
+ display: block;
76
+ }
77
+
78
+ .mp-box-inputs label em{
79
+ color: red;
80
+ }
81
+
82
+ .mp-box-inputs input, .mp-box-inputs select{
83
+ width: 100%;
84
+ background-color: #fff;
85
+ border: 1px solid #cecece;
86
+ padding: 5px;
87
+ border-radius: 3px;
88
+ color: #666;
89
+ height: 40px;
90
+ }
91
+
92
+ .mp-box-inputs input:focus, .mp-box-inputs select:focus{
93
+ border: 1px solid #999;
94
+ outline: 0;
95
+ }
96
+
97
+
98
+ .mp-box-inputs input.mp-error-input, .mp-box-inputs select.mp-error-input{
99
+ border: 1px solid red;
100
+ }
101
+
102
+ #mp-box-loading{
103
+ width: 30px;
104
+ height: 30px;
105
+ display: inline-block;
106
+ margin: -10px 0px;
107
+ }
108
+
109
+ #mp-separete-date{
110
+ vertical-align: middle;
111
+ line-height: 65px;
112
+ text-align: center;
113
+ height: 48px;
114
+ font-size: 24px;
115
+ font-weight: 100;
116
+ }
117
+
118
+ #mercadopago-utilities{
119
+ display: none;
120
+ }
121
+
122
+ .mp-btn, .ch-btn {
123
+ background-color: #009ee3;
124
+ border: 1px solid #009ee3;
125
+ border-radius: 4px;
126
+ color: #fff;
127
+ display: inline-block;
128
+ font-family: Arial,sans-serif;
129
+ font-size: 18px;
130
+ font-weight: normal;
131
+ margin: 0;
132
+ padding: 10px;
133
+ text-align: center;
134
+ width: 100%;
135
+ }
136
+
137
+ #submit{
138
+ color: #fff;
139
+ background-color: #337ab7;
140
+ border-color: #2e6da4;
141
+ padding: 6px 12px;
142
+ border: 1px solid transparent;
143
+ border-radius: 4px;
144
+ text-align: center;
145
+ font-size: 14px;
146
+ font-weight: 400;
147
+ }
148
+
149
+ #submit:hover {
150
+ color: #fff;
151
+ background-color: #286090;
152
+ border-color: #204d74;
153
+ }
154
+
155
+ .mp-discount{
156
+ text-transform: uppercase;
157
+ font-size: 12px;
158
+ /*color: #009EE3;*/
159
+ color: #333333;
160
+ display: none;
161
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
162
+ clear: both;
163
+ float: left;
164
+ }
165
+
166
+ #mpCouponApplyed{
167
+ display: none;
168
+ border-style: solid;
169
+ border-width: thin;
170
+ border-color: #009EE3;
171
+ padding: 8px 8px 8px 8px;
172
+ }
173
+
174
+ #mpCouponApplyedTicket{
175
+ display: none;
176
+ border-style: solid;
177
+ border-width: thin;
178
+ border-color: #009EE3;
179
+ padding: 8px 8px 8px 8px;
180
+ }
181
+
182
+ #mercadopago-form-coupon .mp-box-message{
183
+ margin: -5px 0 5px;
184
+ }
185
+
186
+ [class^=form-col-]{
187
+ position: relative;
188
+ min-height: 1px;
189
+ padding-right: 5px;
190
+ padding-left: 5px;
191
+ float: left;
192
+ -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
193
+ -moz-box-sizing: border-box; /* Firefox, other Gecko */
194
+ box-sizing: border-box;
195
+ }
196
+
197
+ .form-col-1{
198
+ width: 8.33333333%;
199
+ }
200
+ .form-col-2{
201
+ width: 16.66666667%;
202
+ }
203
+ .form-col-3{
204
+ width: 25%;
205
+ }
206
+ .form-col-4{
207
+ width: 33.33333333%;
208
+ }
209
+ .form-col-5{
210
+ width: 41.66666667%;
211
+ }
212
+ .form-col-6{
213
+ width: 50%;
214
+ }
215
+ .form-col-7{
216
+ width: 58.33333333%;
217
+ }
218
+ .form-col-8{
219
+ width: 66.66666667%;
220
+ }
221
+ .form-col-9{
222
+ width: 75%;
223
+ }
224
+ .form-col-10{
225
+ width: 83.33333333%;
226
+ }
227
+ .form-col-11{
228
+ width: 91.66666667%;
229
+ }
230
+ .form-col-12{
231
+ width: 100%;
232
+ }
233
+
234
+ .form-control-mine {
235
+ width: 100%;
236
+ padding: 5px;
237
+ font-size: 16px;
238
+ color: #555;
239
+ background-color: #fff;
240
+ background-image: none;
241
+ border: 1px solid #ccc;
242
+ border-radius: 4px;
243
+ margin-bottom: 12px;
244
+ }
245
+
246
+ select#fixed {
247
+ -webkit-appearance: none;
248
+ }
249
+
250
+ .mensagem-febraban{
251
+ text-transform: uppercase;
252
+ font-size: 12px;
253
+ display: block;
254
+ margin-top: 8px;
255
+ margin-bottom: 16px;
256
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
257
+ }
258
+
259
+ /*
260
+ *
261
+ *
262
+ * Error
263
+ *
264
+ *
265
+ */
266
+
267
+ .mp-error{
268
+ text-transform: uppercase;
269
+ font-size: 10px;
270
+ margin-bottom: 12px;
271
+ color: red;
272
+ font-weight: bold;
273
+ display: none;
274
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
275
+ clear: both;
276
+ float: left;
277
+ }
278
+
279
+ .erro_febraban{
280
+ text-transform: uppercase;
281
+ font-size: 10px;
282
+ margin-left: -10px;
283
+ margin-right: -10px;
284
+ margin-bottom: 12px;
285
+ color: red;
286
+ font-weight: bold;
287
+ display: none;
288
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
289
+ clear: both;
290
+ }
291
+
292
+ #mp-box-input-tax-tea{
293
+ font-weight: 300;
294
+ text-align: center;
295
+ color: #333;
296
+ font-size: 12px;
297
+ display: none;
298
+ }
299
+
300
+ #mp-box-input-tax-cft{
301
+ font-weight: 300;
302
+ text-align: center;
303
+ color: #333;
304
+ font-size: 20px;
305
+ margin-top: 16px;
306
+ display: none;
307
+ }
308
+
images/MCO/CUPOM_MCO.jpg ADDED
Binary file
images/{MCO.png → MCO/MCO.png} RENAMED
File without changes
images/MCO/banner_all_methods.png ADDED
Binary file
images/{MCO.jpg → MCO/credit_card.png} RENAMED
File without changes
images/MCO/standard_mco.jpg ADDED
Binary file
images/MLA/CUPOM_MLA.jpg ADDED
Binary file
images/{MLA.png → MLA/MLA.png} RENAMED
File without changes
images/MLA/banner_all_methods.png ADDED
Binary file
images/MLA/credit_card.png ADDED
Binary file
images/{MLA.jpg → MLA/standard_mla.jpg} RENAMED
File without changes
images/MLB/CUPOM_MLB.jpg ADDED
Binary file
images/{MLB.png → MLB/MLB.png} RENAMED
File without changes
images/MLB/banner_all_methods.png ADDED
Binary file
images/{MLB.jpg → MLB/credit_card.png} RENAMED
File without changes
images/MLB/cupom1.jpg ADDED
Binary file
images/MLB/cupom2.jpg ADDED
Binary file
images/MLB/cupom3.jpg ADDED
Binary file
images/MLB/desconto_MLB.jpg ADDED
Binary file
images/MLB/standard_mlb.jpg ADDED
Binary file
images/MLC/CUPOM_MLC.jpg ADDED
Binary file
images/{MLC.png → MLC/MLC.png} RENAMED
File without changes
images/MLC/banner_all_methods.png ADDED
Binary file
images/{MLC.gif → MLC/credit_card.png} RENAMED
File without changes
images/MLC/standard_mlc.gif ADDED
Binary file
images/MLM/CUPOM_MLM.jpg ADDED
Binary file
images/{MLM.png → MLM/MLM.png} RENAMED
File without changes
images/MLM/banner_all_methods.png ADDED
Binary file
images/MLM/credit_card.png ADDED
Binary file
images/{MLM.jpg → MLM/standard_mlm.jpg} RENAMED
File without changes
images/MLU/CUPOM_MLU.png ADDED
Binary file
images/MLU/MLU.png ADDED
Binary file
images/MLU/banner_all_methods.png ADDED
Binary file
images/MLU/credit_card.png ADDED
Binary file
images/MLU/standard_mlu.png ADDED
Binary file
images/MLV/CUPOM_MLV.jpg ADDED
Binary file
images/{MLV.png → MLV/MLV.png} RENAMED
File without changes
images/MLV/banner_all_methods.png ADDED
Binary file
images/{MLV.jpg → MLV/credit_card.png} RENAMED
File without changes
images/MLV/standard_mlv.jpg ADDED
Binary file
images/MPE/CUPOM_MPE.png ADDED
Binary file
images/MPE/MPE.png ADDED
Binary file
images/MPE/banner_all_methods.png ADDED
Binary file
images/MPE/credit_card.png ADDED
Binary file
images/MPE/standard_mpe.png ADDED
Binary file
images/bandeiras/amex.png ADDED
Binary file
images/bandeiras/boleto.png ADDED
Binary file
images/bandeiras/cash.png ADDED
Binary file
images/bandeiras/diners.png ADDED
Binary file
images/bandeiras/elo.png ADDED
Binary file
images/bandeiras/hipercard.png ADDED
Binary file
images/bandeiras/master.png ADDED
Binary file
images/bandeiras/melicard.png ADDED
Binary file
images/bandeiras/visa.png ADDED
Binary file
images/banner.png ADDED
Binary file
images/bar_code.png ADDED
Binary file
images/boleto.png ADDED
Binary file
images/cart.png ADDED
Binary file
images/credit_card.png ADDED
Binary file
images/cvv.png ADDED
Binary file
images/loading.gif ADDED
Binary file
languages/woocommerce-mercadopago-module-es_AR.mo CHANGED
Binary file
languages/woocommerce-mercadopago-module-es_AR.po CHANGED
@@ -4,9 +4,9 @@
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
- "POT-Creation-Date: 2016-03-04 20:48-0300\n"
8
  "PO-Revision-Date: \n"
9
- "Language-Team: Your Team <translations@example.com>\n"
10
  "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -14,8 +14,9 @@ msgstr ""
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
18
- "X-Poedit-Basepath: ..\n"
 
19
  "X-Generator: Poedit 1.8.7\n"
20
  "Last-Translator: \n"
21
  "Language: es_AR\n"
@@ -23,326 +24,1079 @@ msgstr ""
23
 
24
  #. Description of the plugin/theme
25
  msgid "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."
26
- msgstr "Este es el módulo <strong>oficial</strong> de Mercado Pago para el plugin WooCommerce. Este módulo habilita el uso de Mercado Pago en WooCommerce como método de pago para compras realizadas en su tienda virtual."
27
 
28
- #: mercadopago-module.php:66
29
  #, php-format
30
  msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
31
  msgstr "Woo Mercado Pago Module depende de la última versión de %s para ejecutarse!"
32
 
33
- #: mercadopago/mercadopago-gateway.php:63
 
 
 
 
 
 
 
 
 
 
 
 
34
  msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
35
- msgstr "Este módulo habilita el uso de Mercado Pago en WooCommerce como método de pago para compras realizadas en su tienda virtual."
36
 
37
- #: mercadopago/mercadopago-gateway.php:133
 
38
  msgid "Argentine"
39
  msgstr "Argentina"
40
 
41
- #: mercadopago/mercadopago-gateway.php:134
 
42
  msgid "Brazil"
43
  msgstr "Brasil"
44
 
45
- #: mercadopago/mercadopago-gateway.php:135
 
46
  msgid "Chile"
47
  msgstr "Chile"
48
 
49
- #: mercadopago/mercadopago-gateway.php:136
 
50
  msgid "Colombia"
51
  msgstr "Colombia"
52
 
53
- #: mercadopago/mercadopago-gateway.php:137
 
54
  msgid "Mexico"
55
  msgstr "México"
56
 
57
- #: mercadopago/mercadopago-gateway.php:138
58
  msgid "or"
59
  msgstr "o"
60
 
61
- #: mercadopago/mercadopago-gateway.php:139
 
62
  msgid "Venezuela"
63
  msgstr "Venezuela"
64
 
65
- #: mercadopago/mercadopago-gateway.php:154
66
- msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
67
- msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
68
-
69
- #: mercadopago/mercadopago-gateway.php:157
70
  msgid "Your credentials are <strong>valid</strong> for"
71
  msgstr "Sus credenciales <strong>son válidas</strong> para"
72
 
73
- #: mercadopago/mercadopago-gateway.php:164 mercadopago/mercadopago-gateway.php:173
74
- msgid "Configure your Client_id and Client_secret to have access to more options."
75
- msgstr "Configure su Client_id y Client_secret para tener acceso a más opciones."
76
-
77
- #: mercadopago/mercadopago-gateway.php:167 mercadopago/mercadopago-gateway.php:176
78
  msgid "Your credentials are <strong>not valid</strong>!"
79
  msgstr "Sus credenciales <strong>no son válidas</strong>!"
80
 
81
- #: mercadopago/mercadopago-gateway.php:190 mercadopago/mercadopago-gateway.php:198 mercadopago/mercadopago-gateway.php:208
82
- msgid "This field should be an integer."
83
- msgstr "Este campo debe ser un número."
84
-
85
- #: mercadopago/mercadopago-gateway.php:193
86
- msgid "If your integration method is iFrame, please inform the payment iFrame width."
87
- msgstr "Si su modo de apertura es iFrame, indique el ancho del iFrame."
88
-
89
- #: mercadopago/mercadopago-gateway.php:201
90
- msgid "If your integration method is iFrame, please inform the payment iFrame height."
91
- msgstr "Si su modo de apertura es iFrame, indique el alto del iFrame."
92
-
93
- #: mercadopago/mercadopago-gateway.php:211
94
- msgid "Select the max number of installments for your customers."
95
- msgstr "Seleccione el número máximo de cuotas posibles para sus clientes."
96
-
97
- #: mercadopago/mercadopago-gateway.php:217
98
  msgid "Enable/Disable"
99
  msgstr "Habilitar/Deshabilitar"
100
 
101
- #: mercadopago/mercadopago-gateway.php:219
102
- msgid "Enable Mercado Pago Module"
103
- msgstr "Habilitar Mercado Pago"
104
 
105
- #: mercadopago/mercadopago-gateway.php:223
106
  msgid "Mercado Pago Credentials"
107
  msgstr "Credenciales de Mercado Pago"
108
 
109
- #: mercadopago/mercadopago-gateway.php:225
110
  msgid "You can obtain your credentials for"
111
  msgstr "Puedes obtener tus credenciales para"
112
 
113
- #: mercadopago/mercadopago-gateway.php:228
114
- msgid "Mercado Pago Client_id"
115
- msgstr "Client_id de Mercado Pago"
116
-
117
- #: mercadopago/mercadopago-gateway.php:230
118
- msgid "Insert your Mercado Pago Client_id."
119
- msgstr "Inserte su Client_id de Mercado Pago."
120
-
121
- #: mercadopago/mercadopago-gateway.php:235
122
- msgid "Mercado Pago Client_secret"
123
- msgstr "Client_secret de Mercado Pago"
124
 
125
- #: mercadopago/mercadopago-gateway.php:237
126
- msgid "Insert your Mercado Pago Client_secret."
127
- msgstr "Inserte su Client_secret de Mercado Pago."
128
 
129
- #: mercadopago/mercadopago-gateway.php:242
130
  msgid "Instant Payment Notification (IPN) URL"
131
  msgstr "URL da Notificación Instantanea de Pago (IPN)"
132
 
133
- #: mercadopago/mercadopago-gateway.php:244
134
  msgid "Your IPN URL to receive instant payment notifications is"
135
  msgstr "Su URL de IPN para recibir notificaciones instantáneas de pago es"
136
 
137
- #: mercadopago/mercadopago-gateway.php:247
138
  msgid "Checkout Options"
139
  msgstr "Opciones de Checkout"
140
 
141
- #: mercadopago/mercadopago-gateway.php:252
142
  msgid "Title"
143
  msgstr "Título"
144
 
145
- #: mercadopago/mercadopago-gateway.php:254
146
  msgid "Title shown to the client in the checkout."
147
  msgstr "Título mostrado al cliente en el checkout."
148
 
149
- #: mercadopago/mercadopago-gateway.php:258
 
 
 
 
150
  msgid "Description"
151
  msgstr "Descripción"
152
 
153
- #: mercadopago/mercadopago-gateway.php:260
154
  msgid "Description shown to the client in the checkout."
155
  msgstr "Descripción mostrada al cliente en el checkout."
156
 
157
- #: mercadopago/mercadopago-gateway.php:261 mercadopago/mercadopago-gateway.php:406
158
  msgid "Pay with Mercado Pago"
159
  msgstr "Pagar con Mercado Pago"
160
 
161
- #: mercadopago/mercadopago-gateway.php:264
162
- msgid "Store Category"
163
- msgstr "Categoría de la tienda"
164
 
165
- #: mercadopago/mercadopago-gateway.php:266
166
- msgid "Define which type of products your store sells."
167
- msgstr "Defina el tipo de productos que su tienda vende."
168
 
169
- #: mercadopago/mercadopago-gateway.php:270
170
- msgid "Store Identificator"
171
- msgstr "Identificador de la tienda"
172
 
173
- #: mercadopago/mercadopago-gateway.php:272
174
- msgid "Please, inform a prefix to your store."
175
- msgstr "Por favor, informe un prefijo para su tienda."
176
 
177
- #: mercadopago/mercadopago-gateway.php:272
178
- msgid "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same identificators."
179
- msgstr "Si esta utilizando su cuenta Mercado Pago para múltiples tiendas, asegúrese que este prefijo sea único para no generar pedidos con el mismo identificador."
180
 
181
- #: mercadopago/mercadopago-gateway.php:276
182
- msgid "Integration Method"
183
- msgstr "Método de integración"
184
-
185
- #: mercadopago/mercadopago-gateway.php:278
186
- msgid "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an internal window is embedded to the page layout)."
187
- msgstr "Ventana Modal (Dentro de su tienda), Redireccionamiento (El cliente es redireccionado a Mercado Pago), o iFrame (Ventana de pago incorporada a su página)."
188
-
189
- #: mercadopago/mercadopago-gateway.php:281
190
- msgid "iFrame"
191
- msgstr "iFrame"
192
 
193
- #: mercadopago/mercadopago-gateway.php:282
194
- msgid "Modal Window"
195
- msgstr "Ventana modal"
196
 
197
- #: mercadopago/mercadopago-gateway.php:283
198
- msgid "Redirect"
199
- msgstr "Redireccionamiento"
200
 
201
- #: mercadopago/mercadopago-gateway.php:287
202
- msgid "iFrame Width"
203
- msgstr "Ancho del iFrame"
204
-
205
- #: mercadopago/mercadopago-gateway.php:293
206
- msgid "iFrame Height"
207
- msgstr "Alto del iFrame"
208
-
209
- #: mercadopago/mercadopago-gateway.php:299
210
- msgid "Auto Return"
211
- msgstr "Redirección automática"
212
-
213
- #: mercadopago/mercadopago-gateway.php:301
214
- msgid "Automatic Return After Payment"
215
- msgstr "Redirección Automática Luego del Pago"
216
 
217
- #: mercadopago/mercadopago-gateway.php:303
218
- msgid "After the payment, client is automatically redirected."
219
- msgstr "Después del pago, el cliente será redireccionado automáticamente."
220
 
221
- #: mercadopago/mercadopago-gateway.php:306
222
- msgid "Payment Options"
223
- msgstr "Opciones de Pago"
224
 
225
- #: mercadopago/mercadopago-gateway.php:311
226
- msgid "Max installments"
227
- msgstr "Número máximo de cuotas"
228
 
229
- #: mercadopago/mercadopago-gateway.php:317
230
- msgid "Exclude Payment Methods"
231
- msgstr "Excluir métodos de pago"
 
 
 
232
 
233
- #: mercadopago/mercadopago-gateway.php:324
234
  msgid "Test and Debug Options"
235
  msgstr "Opciones de Prueba y Debug"
236
 
237
- #: mercadopago/mercadopago-gateway.php:329
238
  msgid "Mercado Pago Sandbox"
239
  msgstr "Sandbox Mercado Pago"
240
 
241
- #: mercadopago/mercadopago-gateway.php:331
242
  msgid "Enable Mercado Pago Sandbox"
243
  msgstr "Habilitar el sandbox de Mercado Pago"
244
 
245
- #: mercadopago/mercadopago-gateway.php:333
246
- msgid "This options allows you to test payments inside a sandbox environment."
247
  msgstr "Esta opción permite simular un flujo de pagos completo en nuestro entorno Sandbox."
248
 
249
- #: mercadopago/mercadopago-gateway.php:336
250
  msgid "Debug and Log"
251
  msgstr "Debug y Log"
252
 
253
- #: mercadopago/mercadopago-gateway.php:338
254
  msgid "Enable log"
255
  msgstr "Habilitar Log"
256
 
257
- #: mercadopago/mercadopago-gateway.php:340
258
- #, php-format
259
  msgid "Register event logs of Mercado Pago, such as API requests, in the file"
260
  msgstr "Registrar logs de eventos de Mercado Pago, como llamadas a la API, dentro del archivo"
261
 
262
- #: mercadopago/mercadopago-gateway.php:402
263
- msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
264
- msgstr "Gracias por su compra. Por favor, prosiga a la página de pago haciendo click en el botón de abajo."
265
 
266
- #: mercadopago/mercadopago-gateway.php:410
267
- msgid "Cancel order &amp; Clear cart"
268
- msgstr "Cancelar &amp; Limpiar carrito"
 
269
 
270
- #: mercadopago/mercadopago-gateway.php:420
271
- msgid "Thank you for your order. Proceed with your payment completing the following information."
272
- msgstr "Gracias por su compra. Prosiga con su pago completando la información abajo."
273
 
274
- #: mercadopago/mercadopago-gateway.php:431
275
- msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
276
- msgstr "Un error ocurrió durante el procesamiento de su pago. Por favor intente nuevamente o contactenos para ayudarlo."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
 
278
- #: mercadopago/mercadopago-gateway.php:434
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  msgid "Click to try again"
280
- msgstr "Haga click para intentar de nuevo"
 
 
 
 
 
 
 
 
281
 
282
- #: mercadopago/mercadopago-gateway.php:675 mercadopago/mercadopago-gateway.php:686
 
 
 
 
 
 
 
 
 
283
  msgid "Mercado Pago is Inactive"
284
  msgstr "Mercado Pago Inactivo"
285
 
286
- #: mercadopago/mercadopago-gateway.php:678
287
- msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
288
  msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
289
 
290
- #: mercadopago/mercadopago-gateway.php:679
291
  msgid "Click here and configure!"
292
  msgstr "Haga click aquí y configure!"
293
 
294
- #: mercadopago/mercadopago-gateway.php:689
295
  msgid "The currency"
296
  msgstr "La moneda"
297
 
298
- #: mercadopago/mercadopago-gateway.php:689
299
- msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, USD, VEF."
300
- msgstr "no es soportada. Las monedas soportadas son: ARS, BRL, CLP, COP, MXN, USD, VEF."
301
 
302
- #: mercadopago/mercadopago-gateway.php:714
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  msgid "Mercado Pago Request Failure"
304
  msgstr "La solicitud de Mercado Pago ha fallado."
305
 
306
- #: mercadopago/mercadopago-gateway.php:791
307
- msgid "Mercado Pago Transaction ID"
308
- msgstr "ID de operación de Mercado Pago"
309
-
310
- #: mercadopago/mercadopago-gateway.php:798
311
  msgid "Payer email"
312
  msgstr "Email del comprador"
313
 
314
- #: mercadopago/mercadopago-gateway.php:805
315
  msgid "Payment type"
316
- msgstr "Método de pago"
317
 
318
- #: mercadopago/mercadopago-gateway.php:810
319
- msgid "Payment approved."
320
- msgstr "Pago aprobado."
321
 
322
- #: mercadopago/mercadopago-gateway.php:816
323
  msgid "Customer haven't paid yet."
324
  msgstr "El cliente todavía no efectuó el pago."
325
 
326
- #: mercadopago/mercadopago-gateway.php:821
327
  msgid "Payment under review."
328
  msgstr "El pago está pendiente de revisión."
329
 
330
- #: mercadopago/mercadopago-gateway.php:826
331
  msgid "The payment was refused. The customer can try again."
332
  msgstr "El pago fue rechazado. El cliente puede intentar nuevamente."
333
 
334
- #: mercadopago/mercadopago-gateway.php:832
335
  msgid "The payment was refunded to the customer."
336
  msgstr "El pago fue devuelto al cliente."
337
 
338
- #: mercadopago/mercadopago-gateway.php:838
339
  msgid "The payment was cancelled."
340
  msgstr "El pago fue cancelado."
341
 
342
- #: mercadopago/mercadopago-gateway.php:843
343
- msgid "Mercado Pago Payment ID"
344
- msgstr "ID de pago de Mercado Pago"
345
-
346
- #: mercadopago/mercadopago-gateway.php:843 mercadopago/mercadopago-gateway.php:848
347
  msgid "The payment is under mediation or it was charged-back."
348
  msgstr "El pago esta en mediación o la compra fue desconocida por el cliente."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
+ "POT-Creation-Date: 2016-05-23 14:52-0300\n"
8
  "PO-Revision-Date: \n"
9
+ "Language-Team: Product Development <translations@example.com>\n"
10
  "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;"
18
+ "_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
19
+ "X-Poedit-Basepath: ../Documents/woocommerce (MAMP)/wp-content/plugins/woo-mercado-pago-module\n"
20
  "X-Generator: Poedit 1.8.7\n"
21
  "Last-Translator: \n"
22
  "Language: es_AR\n"
24
 
25
  #. Description of the plugin/theme
26
  msgid "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."
27
+ msgstr "Este es el módulo <strong>oficial</strong> de Mercado Pago para el plugin WooCommerce. Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
28
 
29
+ #: mercadopago-module.php:69
30
  #, php-format
31
  msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
32
  msgstr "Woo Mercado Pago Module depende de la última versión de %s para ejecutarse!"
33
 
34
+ #: mercadopago-module.php:109
35
+ msgid "Basic Checkout"
36
+ msgstr "Checkout Básico"
37
+
38
+ #: mercadopago-module.php:113
39
+ msgid "Custom Checkout"
40
+ msgstr "Checkout Personalizado"
41
+
42
+ #: mercadopago/mercadopago-custom-gateway.php:48
43
+ msgid "Mercado Pago - Custom Checkout"
44
+ msgstr "Mercado Pago - Checkout Personalizado"
45
+
46
+ #: mercadopago/mercadopago-custom-gateway.php:51 mercadopago/mercadopago-gateway.php:54
47
  msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
48
+ msgstr "Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
49
 
50
+ #: mercadopago/mercadopago-custom-gateway.php:126 mercadopago/mercadopago-custom-gateway.php:791 mercadopago/mercadopago-gateway.php:125
51
+ #: mercadopago/mercadopago-gateway.php:716
52
  msgid "Argentine"
53
  msgstr "Argentina"
54
 
55
+ #: mercadopago/mercadopago-custom-gateway.php:127 mercadopago/mercadopago-custom-gateway.php:792 mercadopago/mercadopago-gateway.php:126
56
+ #: mercadopago/mercadopago-gateway.php:717
57
  msgid "Brazil"
58
  msgstr "Brasil"
59
 
60
+ #: mercadopago/mercadopago-custom-gateway.php:128 mercadopago/mercadopago-custom-gateway.php:794 mercadopago/mercadopago-gateway.php:127
61
+ #: mercadopago/mercadopago-gateway.php:719
62
  msgid "Chile"
63
  msgstr "Chile"
64
 
65
+ #: mercadopago/mercadopago-custom-gateway.php:129 mercadopago/mercadopago-custom-gateway.php:793 mercadopago/mercadopago-gateway.php:128
66
+ #: mercadopago/mercadopago-gateway.php:718
67
  msgid "Colombia"
68
  msgstr "Colombia"
69
 
70
+ #: mercadopago/mercadopago-custom-gateway.php:130 mercadopago/mercadopago-custom-gateway.php:795 mercadopago/mercadopago-gateway.php:129
71
+ #: mercadopago/mercadopago-gateway.php:720
72
  msgid "Mexico"
73
  msgstr "México"
74
 
75
+ #: mercadopago/mercadopago-custom-gateway.php:132 mercadopago/mercadopago-gateway.php:130
76
  msgid "or"
77
  msgstr "o"
78
 
79
+ #: mercadopago/mercadopago-custom-gateway.php:133 mercadopago/mercadopago-custom-gateway.php:796 mercadopago/mercadopago-gateway.php:131
80
+ #: mercadopago/mercadopago-gateway.php:721
81
  msgid "Venezuela"
82
  msgstr "Venezuela"
83
 
84
+ #: mercadopago/mercadopago-custom-gateway.php:145 mercadopago/mercadopago-gateway.php:151
 
 
 
 
85
  msgid "Your credentials are <strong>valid</strong> for"
86
  msgstr "Sus credenciales <strong>son válidas</strong> para"
87
 
88
+ #: mercadopago/mercadopago-custom-gateway.php:151 mercadopago/mercadopago-custom-gateway.php:156 mercadopago/mercadopago-gateway.php:161
89
+ #: mercadopago/mercadopago-gateway.php:170
 
 
 
90
  msgid "Your credentials are <strong>not valid</strong>!"
91
  msgstr "Sus credenciales <strong>no son válidas</strong>!"
92
 
93
+ #: mercadopago/mercadopago-custom-gateway.php:169 mercadopago/mercadopago-gateway.php:211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  msgid "Enable/Disable"
95
  msgstr "Habilitar/Deshabilitar"
96
 
97
+ #: mercadopago/mercadopago-custom-gateway.php:171
98
+ msgid "Enable Custom Checkout"
99
+ msgstr "Habilitar Checkout Personalizado"
100
 
101
+ #: mercadopago/mercadopago-custom-gateway.php:175 mercadopago/mercadopago-gateway.php:217
102
  msgid "Mercado Pago Credentials"
103
  msgstr "Credenciales de Mercado Pago"
104
 
105
+ #: mercadopago/mercadopago-custom-gateway.php:177 mercadopago/mercadopago-gateway.php:219
106
  msgid "You can obtain your credentials for"
107
  msgstr "Puedes obtener tus credenciales para"
108
 
109
+ #: mercadopago/mercadopago-custom-gateway.php:182
110
+ msgid "Insert your Mercado Pago Public key."
111
+ msgstr "Inserte su Public Key de Mercado Pago."
 
 
 
 
 
 
 
 
112
 
113
+ #: mercadopago/mercadopago-custom-gateway.php:189
114
+ msgid "Insert your Mercado Pago Access token."
115
+ msgstr "Inserte su Access Token de Mercado Pago."
116
 
117
+ #: mercadopago/mercadopago-custom-gateway.php:194 mercadopago/mercadopago-gateway.php:236
118
  msgid "Instant Payment Notification (IPN) URL"
119
  msgstr "URL da Notificación Instantanea de Pago (IPN)"
120
 
121
+ #: mercadopago/mercadopago-custom-gateway.php:196 mercadopago/mercadopago-gateway.php:238
122
  msgid "Your IPN URL to receive instant payment notifications is"
123
  msgstr "Su URL de IPN para recibir notificaciones instantáneas de pago es"
124
 
125
+ #: mercadopago/mercadopago-custom-gateway.php:199 mercadopago/mercadopago-gateway.php:241
126
  msgid "Checkout Options"
127
  msgstr "Opciones de Checkout"
128
 
129
+ #: mercadopago/mercadopago-custom-gateway.php:204 mercadopago/mercadopago-gateway.php:246
130
  msgid "Title"
131
  msgstr "Título"
132
 
133
+ #: mercadopago/mercadopago-custom-gateway.php:206 mercadopago/mercadopago-gateway.php:248
134
  msgid "Title shown to the client in the checkout."
135
  msgstr "Título mostrado al cliente en el checkout."
136
 
137
+ #: mercadopago/mercadopago-custom-gateway.php:207 mercadopago/mercadopago-custom-gateway.php:219 mercadopago/mercadopago-gateway.php:249
138
+ msgid "Mercado Pago"
139
+ msgstr "Mercado Pago"
140
+
141
+ #: mercadopago/mercadopago-custom-gateway.php:210 mercadopago/mercadopago-gateway.php:252
142
  msgid "Description"
143
  msgstr "Descripción"
144
 
145
+ #: mercadopago/mercadopago-custom-gateway.php:212 mercadopago/mercadopago-gateway.php:254
146
  msgid "Description shown to the client in the checkout."
147
  msgstr "Descripción mostrada al cliente en el checkout."
148
 
149
+ #: mercadopago/mercadopago-custom-gateway.php:213 mercadopago/mercadopago-gateway.php:255 mercadopago/mercadopago-gateway.php:432
150
  msgid "Pay with Mercado Pago"
151
  msgstr "Pagar con Mercado Pago"
152
 
153
+ #: mercadopago/mercadopago-custom-gateway.php:216
154
+ msgid "Statement Descriptor"
155
+ msgstr "Descripción de la Factura"
156
 
157
+ #: mercadopago/mercadopago-custom-gateway.php:218
158
+ msgid "The description that will be shown in your customer's invoice."
159
+ msgstr "La descripción que se muestra en la factura de su cliente."
160
 
161
+ #: mercadopago/mercadopago-custom-gateway.php:222
162
+ msgid "Binary Mode"
163
+ msgstr "Modo binario"
164
 
165
+ #: mercadopago/mercadopago-custom-gateway.php:224
166
+ msgid "Enable binary mode for checkout status"
167
+ msgstr "Activar el modo binario para el estado del checkout"
168
 
169
+ #: mercadopago/mercadopago-custom-gateway.php:226
170
+ msgid "When charging a credit card, only [approved] or [reject] status will be taken."
171
+ msgstr "Al cargar una tarjeta de crédito, sólo los estados [aprobado] o [rechazar] seran tomados."
172
 
173
+ #: mercadopago/mercadopago-custom-gateway.php:229
174
+ msgid "Ticket"
175
+ msgstr "Ticket"
 
 
 
 
 
 
 
 
176
 
177
+ #: mercadopago/mercadopago-custom-gateway.php:231
178
+ msgid "Enable Ticket for Custom Checkout"
179
+ msgstr "Habilitar Ticket para Checkout Personalizado"
180
 
181
+ #: mercadopago/mercadopago-custom-gateway.php:233
182
+ msgid "Let your customer pay you with tickets"
183
+ msgstr "Deje que su cliente le paga con tickets"
184
 
185
+ #: mercadopago/mercadopago-custom-gateway.php:236 mercadopago/mercadopago-gateway.php:258
186
+ msgid "Store Category"
187
+ msgstr "Categoría de la tienda"
 
 
 
 
 
 
 
 
 
 
 
 
188
 
189
+ #: mercadopago/mercadopago-custom-gateway.php:238 mercadopago/mercadopago-gateway.php:260
190
+ msgid "Define which type of products your store sells."
191
+ msgstr "Defina el tipo de productos que su tienda vende."
192
 
193
+ #: mercadopago/mercadopago-custom-gateway.php:242 mercadopago/mercadopago-gateway.php:264
194
+ msgid "Store Identificator"
195
+ msgstr "Identificador de la tienda"
196
 
197
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
198
+ msgid "Please, inform a prefix to your store."
199
+ msgstr "Por favor, informe un prefijo para su tienda."
200
 
201
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
202
+ msgid ""
203
+ "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same "
204
+ "identificators."
205
+ msgstr ""
206
+ "Si esta utilizando su cuenta Mercado Pago para múltiples tiendas, asegúrese que este prefijo sea único para no generar pedidos con el mismo identificador."
207
 
208
+ #: mercadopago/mercadopago-custom-gateway.php:248 mercadopago/mercadopago-gateway.php:318
209
  msgid "Test and Debug Options"
210
  msgstr "Opciones de Prueba y Debug"
211
 
212
+ #: mercadopago/mercadopago-custom-gateway.php:253 mercadopago/mercadopago-gateway.php:323
213
  msgid "Mercado Pago Sandbox"
214
  msgstr "Sandbox Mercado Pago"
215
 
216
+ #: mercadopago/mercadopago-custom-gateway.php:255 mercadopago/mercadopago-gateway.php:325
217
  msgid "Enable Mercado Pago Sandbox"
218
  msgstr "Habilitar el sandbox de Mercado Pago"
219
 
220
+ #: mercadopago/mercadopago-custom-gateway.php:257 mercadopago/mercadopago-gateway.php:327
221
+ msgid "This option allows you to test payments inside a sandbox environment."
222
  msgstr "Esta opción permite simular un flujo de pagos completo en nuestro entorno Sandbox."
223
 
224
+ #: mercadopago/mercadopago-custom-gateway.php:260 mercadopago/mercadopago-gateway.php:330
225
  msgid "Debug and Log"
226
  msgstr "Debug y Log"
227
 
228
+ #: mercadopago/mercadopago-custom-gateway.php:262 mercadopago/mercadopago-gateway.php:332
229
  msgid "Enable log"
230
  msgstr "Habilitar Log"
231
 
232
+ #: mercadopago/mercadopago-custom-gateway.php:264 mercadopago/mercadopago-gateway.php:334
 
233
  msgid "Register event logs of Mercado Pago, such as API requests, in the file"
234
  msgstr "Registrar logs de eventos de Mercado Pago, como llamadas a la API, dentro del archivo"
235
 
236
+ #: mercadopago/mercadopago-custom-gateway.php:265 mercadopago/mercadopago-gateway.php:335
237
+ msgid "File location: "
238
+ msgstr "Local del archivo: "
239
 
240
+ #: mercadopago/mercadopago-custom-gateway.php:281 mercadopago/mercadopago-gateway.php:351
241
+ #, php-format
242
+ msgid "Please, rate us %s on WordPress.org and give your feedback to help improve this module!"
243
+ msgstr "Por favor, califíquenos con %s en WordPress.org y de su feedback para ayudar a mejorar este módulo!"
244
 
245
+ #: mercadopago/mercadopago-custom-gateway.php:332
246
+ msgid "Payment Method"
247
+ msgstr "Medios de Pago"
248
 
249
+ #: mercadopago/mercadopago-custom-gateway.php:333
250
+ msgid "Credit card number"
251
+ msgstr "Número de tarjeta de crédito"
252
+
253
+ #: mercadopago/mercadopago-custom-gateway.php:334
254
+ msgid "Expiration month"
255
+ msgstr "Mes de expiración"
256
+
257
+ #: mercadopago/mercadopago-custom-gateway.php:335
258
+ msgid "Expiration year"
259
+ msgstr "Año de expiración"
260
+
261
+ #: mercadopago/mercadopago-custom-gateway.php:336
262
+ msgid "Year"
263
+ msgstr "Año"
264
+
265
+ #: mercadopago/mercadopago-custom-gateway.php:337
266
+ msgid "Month"
267
+ msgstr "Mes"
268
+
269
+ #: mercadopago/mercadopago-custom-gateway.php:338
270
+ msgid "Card holder name"
271
+ msgstr "Nombre del titular de la tarjeta"
272
+
273
+ #: mercadopago/mercadopago-custom-gateway.php:339
274
+ msgid "Security code"
275
+ msgstr "Código de seguridad"
276
+
277
+ #: mercadopago/mercadopago-custom-gateway.php:340
278
+ msgid "Document Type"
279
+ msgstr "Tipo de Documento"
280
+
281
+ #: mercadopago/mercadopago-custom-gateway.php:341
282
+ msgid "Document number"
283
+ msgstr "Número de Documento"
284
+
285
+ #: mercadopago/mercadopago-custom-gateway.php:342
286
+ msgid "Issuer"
287
+ msgstr "Emisor"
288
+
289
+ #: mercadopago/mercadopago-custom-gateway.php:343
290
+ msgid "Installments"
291
+ msgstr "Cuotas"
292
 
293
+ #: mercadopago/mercadopago-custom-gateway.php:347
294
+ msgid "Parameter cardNumber can not be null/empty"
295
+ msgstr "Parámetro [Número de tarjeta] no puede ser nulo/vacío"
296
+
297
+ #: mercadopago/mercadopago-custom-gateway.php:348
298
+ msgid "Invalid Card Number"
299
+ msgstr "Número de tarjeta inválido"
300
+
301
+ #: mercadopago/mercadopago-custom-gateway.php:350 mercadopago/mercadopago-custom-gateway.php:351 mercadopago/mercadopago-custom-gateway.php:352
302
+ #: mercadopago/mercadopago-custom-gateway.php:353
303
+ msgid "Invalid Expiration Date"
304
+ msgstr "Fecha de expiración inválida"
305
+
306
+ #: mercadopago/mercadopago-custom-gateway.php:355
307
+ msgid "Parameter cardholderName can not be null/empty"
308
+ msgstr "Parámetro [Nombre del titular] no puede ser nulo/vacío"
309
+
310
+ #: mercadopago/mercadopago-custom-gateway.php:356
311
+ msgid "Invalid Card Holder Name"
312
+ msgstr "Nombre del titular de la tarjeta inválido"
313
+
314
+ #: mercadopago/mercadopago-custom-gateway.php:358
315
+ msgid "Parameter securityCode can not be null/empty"
316
+ msgstr "Parámetro [Código de seguridad] no puede ser nulo/vacío"
317
+
318
+ #: mercadopago/mercadopago-custom-gateway.php:359
319
+ msgid "Invalid Security Code"
320
+ msgstr "Código de seguridad inválido"
321
+
322
+ #: mercadopago/mercadopago-custom-gateway.php:361
323
+ msgid "Parameter docType can not be null/empty"
324
+ msgstr "Parámetro [Tipo de Documento] no puede ser nulo/vacío"
325
+
326
+ #: mercadopago/mercadopago-custom-gateway.php:362
327
+ msgid "Invalid Document Type"
328
+ msgstr "Tipo de Documento inválido"
329
+
330
+ #: mercadopago/mercadopago-custom-gateway.php:364
331
+ msgid "Parameter docNumber can not be null/empty"
332
+ msgstr "Parámetro [Número del Documento] no puede ser nulo/vacío"
333
+
334
+ #: mercadopago/mercadopago-custom-gateway.php:365
335
+ msgid "Invalid Document Number"
336
+ msgstr "Número del Documento inválido"
337
+
338
+ #: mercadopago/mercadopago-custom-gateway.php:367
339
+ msgid "The parameter cardholder.document.subtype can not be null or empty"
340
+ msgstr "Parámetro [Subtipo del documento] no puede ser nulo/vacío"
341
+
342
+ #: mercadopago/mercadopago-custom-gateway.php:368
343
+ msgid "Invalid Document Sub Type"
344
+ msgstr "Subtipo del documento inválido"
345
+
346
+ #: mercadopago/mercadopago-custom-gateway.php:370
347
+ msgid "Parameter cardIssuerId can not be null/empty"
348
+ msgstr "Parámetro [Emisor] no puede ser nulo/vacío"
349
+
350
+ #: mercadopago/mercadopago-custom-gateway.php:402 mercadopago/mercadopago-custom-gateway.php:943 mercadopago/mercadopago-gateway.php:869
351
+ msgid "Payment approved."
352
+ msgstr "Pago aprobado."
353
+
354
+ #: mercadopago/mercadopago-custom-gateway.php:416 mercadopago/mercadopago-custom-gateway.php:805
355
+ msgid "Your payment is under review. In less than 1h, you should be notified by email."
356
+ msgstr "Su pago está en revisión. En menos de 1 hora, usted será notificado por correo electrónico."
357
+
358
+ #: mercadopago/mercadopago-custom-gateway.php:418
359
+ msgid "Check your order resume"
360
+ msgstr "Ver su hoja de pedido"
361
+
362
+ #: mercadopago/mercadopago-custom-gateway.php:431
363
+ msgid "Your payment was refused. You can try again."
364
+ msgstr "Su pago fue rechazado. Puede intentarlo de nuevo."
365
+
366
+ #: mercadopago/mercadopago-custom-gateway.php:435 mercadopago/mercadopago-custom-gateway.php:819 mercadopago/mercadopago-gateway.php:460
367
  msgid "Click to try again"
368
+ msgstr "Haga clic para intentarlo de nuevo"
369
+
370
+ #: mercadopago/mercadopago-custom-gateway.php:455
371
+ msgid "A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?"
372
+ msgstr "Un problema se produjo al procesar su pago. ¿Esta seguro que ha rellenado correctamente toda la información en el formulario de checkout?"
373
+
374
+ #: mercadopago/mercadopago-custom-gateway.php:544
375
+ msgid "Shipping"
376
+ msgstr "Envío"
377
 
378
+ #: mercadopago/mercadopago-custom-gateway.php:545
379
+ msgid "Shipping service used by store"
380
+ msgstr "Servicio de envío utilizado por la tienda"
381
+
382
+ #: mercadopago/mercadopago-custom-gateway.php:721 mercadopago/mercadopago-gateway.php:649
383
+ msgid "WooCommerce &gt; System Status &gt; Logs"
384
+ msgstr "WooCommerce &gt; Estado del Sistema &gt; Logs"
385
+
386
+ #: mercadopago/mercadopago-custom-gateway.php:766 mercadopago/mercadopago-custom-gateway.php:779 mercadopago/mercadopago-gateway.php:694
387
+ #: mercadopago/mercadopago-gateway.php:705
388
  msgid "Mercado Pago is Inactive"
389
  msgstr "Mercado Pago Inactivo"
390
 
391
+ #: mercadopago/mercadopago-custom-gateway.php:769
392
+ msgid "Your Mercado Pago credentials Public Key/Access Token appears to be misconfigured."
393
  msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
394
 
395
+ #: mercadopago/mercadopago-custom-gateway.php:771 mercadopago/mercadopago-gateway.php:698
396
  msgid "Click here and configure!"
397
  msgstr "Haga click aquí y configure!"
398
 
399
+ #: mercadopago/mercadopago-custom-gateway.php:782 mercadopago/mercadopago-gateway.php:708
400
  msgid "The currency"
401
  msgstr "La moneda"
402
 
403
+ #: mercadopago/mercadopago-custom-gateway.php:783 mercadopago/mercadopago-gateway.php:708
404
+ msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, PEN, VEF."
405
+ msgstr "no es soportada. Las monedas soportadas son: ARS, BRL, CLP, COP, MXN, PEN, VEF."
406
 
407
+ #: mercadopago/mercadopago-custom-gateway.php:797
408
+ msgid "Peru"
409
+ msgstr "Perú"
410
+
411
+ #: mercadopago/mercadopago-custom-gateway.php:809
412
+ msgid "Click to check your order"
413
+ msgstr "Haga clic para comprobar su pedido"
414
+
415
+ #: mercadopago/mercadopago-custom-gateway.php:814 mercadopago/mercadopago-gateway.php:457
416
+ msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
417
+ msgstr "Se ha producido un error en el procesamiento de su pago. Por favor, inténtelo de nuevo o póngase en contacto con nosotros para Asistencia."
418
+
419
+ #: mercadopago/mercadopago-custom-gateway.php:816
420
+ msgid "Reason is: "
421
+ msgstr "La razón es:"
422
+
423
+ #: mercadopago/mercadopago-custom-gateway.php:849 mercadopago/mercadopago-gateway.php:748
424
  msgid "Mercado Pago Request Failure"
425
  msgstr "La solicitud de Mercado Pago ha fallado."
426
 
427
+ #: mercadopago/mercadopago-custom-gateway.php:918 mercadopago/mercadopago-gateway.php:822
 
 
 
 
428
  msgid "Payer email"
429
  msgstr "Email del comprador"
430
 
431
+ #: mercadopago/mercadopago-custom-gateway.php:926 mercadopago/mercadopago-gateway.php:829
432
  msgid "Payment type"
433
+ msgstr "Medio de pago"
434
 
435
+ #: mercadopago/mercadopago-custom-gateway.php:934 mercadopago/mercadopago-gateway.php:841
436
+ msgid "Mercado Pago Payment ID"
437
+ msgstr "ID de pago de Mercado Pago"
438
 
439
+ #: mercadopago/mercadopago-custom-gateway.php:950 mercadopago/mercadopago-gateway.php:875
440
  msgid "Customer haven't paid yet."
441
  msgstr "El cliente todavía no efectuó el pago."
442
 
443
+ #: mercadopago/mercadopago-custom-gateway.php:957 mercadopago/mercadopago-gateway.php:881
444
  msgid "Payment under review."
445
  msgstr "El pago está pendiente de revisión."
446
 
447
+ #: mercadopago/mercadopago-custom-gateway.php:964 mercadopago/mercadopago-gateway.php:887
448
  msgid "The payment was refused. The customer can try again."
449
  msgstr "El pago fue rechazado. El cliente puede intentar nuevamente."
450
 
451
+ #: mercadopago/mercadopago-custom-gateway.php:971 mercadopago/mercadopago-gateway.php:893
452
  msgid "The payment was refunded to the customer."
453
  msgstr "El pago fue devuelto al cliente."
454
 
455
+ #: mercadopago/mercadopago-custom-gateway.php:978 mercadopago/mercadopago-gateway.php:899
456
  msgid "The payment was cancelled."
457
  msgstr "El pago fue cancelado."
458
 
459
+ #: mercadopago/mercadopago-custom-gateway.php:984 mercadopago/mercadopago-custom-gateway.php:990 mercadopago/mercadopago-gateway.php:904
460
+ #: mercadopago/mercadopago-gateway.php:909
 
 
 
461
  msgid "The payment is under mediation or it was charged-back."
462
  msgstr "El pago esta en mediación o la compra fue desconocida por el cliente."
463
+
464
+ #: mercadopago/mercadopago-gateway.php:51
465
+ msgid "Mercado Pago - Basic Checkout"
466
+ msgstr "Mercado Pago - Checkout Básico"
467
+
468
+ #: mercadopago/mercadopago-gateway.php:148
469
+ msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
470
+ msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
471
+
472
+ #: mercadopago/mercadopago-gateway.php:158 mercadopago/mercadopago-gateway.php:167
473
+ msgid "Configure your Client_id and Client_secret to have access to more options."
474
+ msgstr "Configure su Client_id y Client_secret para tener acceso a más opciones."
475
+
476
+ #: mercadopago/mercadopago-gateway.php:184 mercadopago/mercadopago-gateway.php:192 mercadopago/mercadopago-gateway.php:202
477
+ msgid "This field should be an integer."
478
+ msgstr "Este campo debe ser un número."
479
+
480
+ #: mercadopago/mercadopago-gateway.php:187
481
+ msgid "If your integration method is iFrame, please inform the payment iFrame width."
482
+ msgstr "Si su modo de apertura es iFrame, indique el ancho del iFrame."
483
+
484
+ #: mercadopago/mercadopago-gateway.php:195
485
+ msgid "If your integration method is iFrame, please inform the payment iFrame height."
486
+ msgstr "Si su modo de apertura es iFrame, indique el alto del iFrame."
487
+
488
+ #: mercadopago/mercadopago-gateway.php:205
489
+ msgid "Select the max number of installments for your customers."
490
+ msgstr "Seleccione el número máximo de cuotas disponibles para sus clientes."
491
+
492
+ #: mercadopago/mercadopago-gateway.php:213
493
+ msgid "Enable Basic Checkout"
494
+ msgstr "Habilitar el Checkout Básico"
495
+
496
+ #: mercadopago/mercadopago-gateway.php:224
497
+ msgid "Insert your Mercado Pago Client_id."
498
+ msgstr "Inserte su Client_id de Mercado Pago."
499
+
500
+ #: mercadopago/mercadopago-gateway.php:231
501
+ msgid "Insert your Mercado Pago Client_secret."
502
+ msgstr "Inserte su Client_secret de Mercado Pago."
503
+
504
+ #: mercadopago/mercadopago-gateway.php:270
505
+ msgid "Integration Method"
506
+ msgstr "Método de integración"
507
+
508
+ #: mercadopago/mercadopago-gateway.php:272
509
+ msgid ""
510
+ "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an "
511
+ "internal window is embedded to the page layout)."
512
+ msgstr ""
513
+ "Seleccione la forma en que sus clientes deben interactuar con Mercado Pago. Ventana Modal (Dentro de su tienda), Redireccionamiento (El cliente es "
514
+ "redireccionado a Mercado Pago), o iFrame (Ventana de pago incorporada a su página)."
515
+
516
+ #: mercadopago/mercadopago-gateway.php:275
517
+ msgid "iFrame"
518
+ msgstr "iFrame"
519
+
520
+ #: mercadopago/mercadopago-gateway.php:276
521
+ msgid "Modal Window"
522
+ msgstr "Ventana modal"
523
+
524
+ #: mercadopago/mercadopago-gateway.php:277
525
+ msgid "Redirect"
526
+ msgstr "Redireccionamiento"
527
+
528
+ #: mercadopago/mercadopago-gateway.php:281
529
+ msgid "iFrame Width"
530
+ msgstr "Ancho del iFrame"
531
+
532
+ #: mercadopago/mercadopago-gateway.php:287
533
+ msgid "iFrame Height"
534
+ msgstr "Alto del iFrame"
535
+
536
+ #: mercadopago/mercadopago-gateway.php:293
537
+ msgid "Auto Return"
538
+ msgstr "Redirección automática"
539
+
540
+ #: mercadopago/mercadopago-gateway.php:295
541
+ msgid "Automatic Return After Payment"
542
+ msgstr "Redirección Automática luego del pago"
543
+
544
+ #: mercadopago/mercadopago-gateway.php:297
545
+ msgid "After the payment, client is automatically redirected."
546
+ msgstr "Después del pago, el cliente será redireccionado automáticamente."
547
+
548
+ #: mercadopago/mercadopago-gateway.php:300
549
+ msgid "Payment Options"
550
+ msgstr "Opciones de Pago"
551
+
552
+ #: mercadopago/mercadopago-gateway.php:305
553
+ msgid "Max installments"
554
+ msgstr "Número máximo de cuotas"
555
+
556
+ #: mercadopago/mercadopago-gateway.php:311
557
+ msgid "Exclude Payment Methods"
558
+ msgstr "Excluir medios de pago"
559
+
560
+ #: mercadopago/mercadopago-gateway.php:428
561
+ msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
562
+ msgstr "Gracias por su compra. Por favor, prosiga a la página de pago haciendo click en el botón de abajo."
563
+
564
+ #: mercadopago/mercadopago-gateway.php:436
565
+ msgid "Cancel order &amp; Clear cart"
566
+ msgstr "Cancelar &amp; Limpiar carrito"
567
+
568
+ #: mercadopago/mercadopago-gateway.php:446
569
+ msgid "Thank you for your order. Proceed with your payment completing the following information."
570
+ msgstr "Gracias por su compra. Prosiga con su pago completando la información abajo."
571
+
572
+ #: mercadopago/mercadopago-gateway.php:697
573
+ msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
574
+ msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
575
+
576
+ msgid " as it appears in your card ..."
577
+ msgstr " tal como aparece en su tarjeta ..."
578
+
579
+ msgid "Done, your payment was accredited!"
580
+ msgstr "Listo, su pago ha sido aceptado!"
581
+
582
+ msgid "We are processing the payment. In less than an hour we will e-mail you the results."
583
+ msgstr "Estamos procesando su pago. En menos de una hora le enviaremos el resultado por correo electrónico."
584
+
585
+ msgid "We are processing the payment. In less than 2 business days we will tell you by e-mail whether it has accredited or we need more information."
586
+ msgstr "Estamos procesando su pago. En menos de 2 días le enviaremos por correo electrónico si se ha aprobado el pago o si se necesita información adicional."
587
+
588
+ msgid "Check the card number."
589
+ msgstr "Compruebe el número de tarjeta."
590
+
591
+ msgid "Check the expiration date."
592
+ msgstr "Compruebe la fecha de expiración."
593
+
594
+ msgid "Check the information."
595
+ msgstr "Compruebe la información informada."
596
+
597
+ msgid "Check the security code."
598
+ msgstr "Compruebe el código de seguridad informado."
599
+
600
+ msgid "We could not process your payment."
601
+ msgstr "No se puede procesar su pago."
602
+
603
+ msgid "You must authorize the payment of your orders."
604
+ msgstr "Usted debe autorizar los pagos de sus órdenes."
605
+
606
+ msgid "Call your card issuer to activate your card. The phone is on the back of your card."
607
+ msgstr "Póngase en contacto con el emisor de su tarjeta para activarla. El teléfono se encuentra en la parte posterior de su tarjeta."
608
+
609
+ msgid "You already made a payment for that amount. If you need to repay, use another card or other payment method."
610
+ msgstr "Usted ya realizó un pago de este importe. Si tiene que pagar de nuevo, utilizar otra tarjeta u otro medio de pago."
611
+
612
+ msgid "Your payment was rejected. Choose another payment method. We recommend cash."
613
+ msgstr "Su pago fue rechazado. Por favor seleccione otro medio de pago. Se recomienda en efectivo."
614
+
615
+ msgid "Your payment do not have sufficient funds."
616
+ msgstr "Su pago no tiene fondos suficientes."
617
+
618
+ msgid "Your payment does not process payments with selected installments."
619
+ msgstr "El pago no puede procesar la cuota seleccionada."
620
+
621
+ msgid "You have reached the limit of allowed attempts. Choose another card or another payment method."
622
+ msgstr "Has alcanzado el límite de intentos permitidos. Elija otra tarjeta u otro medio de pago."
623
+
624
+ msgid "This payment method did not process the payment."
625
+ msgstr "Esta medio de pago no puede procesar su pago."
626
+
627
+ msgid "Mercado Pago - Ticket"
628
+ msgstr "Mercado Pago - Ticket"
629
+
630
+ msgid "Mercado Pago - Credit Card"
631
+ msgstr "Mercado Pago - Tarjeta de Crédito"
632
+
633
+ msgid "Ticket Options"
634
+ msgstr "Opciones de Ticket"
635
+
636
+ msgid "Enable Ticket Payment Method"
637
+ msgstr "Habilitar Pago con Ticket"
638
+
639
+ msgid "Other Bank"
640
+ msgstr "Otro Banco"
641
+
642
+ msgid "Choose"
643
+ msgstr "Escoger"
644
+
645
+ msgid "A problem was occurred when processing your payment. Please, try again."
646
+ msgstr "Un problema se produjo al procesar su pago. Por favor, inténtelo de nuevo."
647
+
648
+ msgid "Thank you for your order. Please, pay the ticket to get your order approved."
649
+ msgstr "Gracias por su orden. Por favor, realice el pago del ticket para tener su orden aprobada."
650
+
651
+ msgid "Waiting for the ticket payment."
652
+ msgstr "Esperando el pago del ticket."
653
+
654
+ msgid "Print the Ticket"
655
+ msgstr "Imprimir el ticket"
656
+
657
+ msgid "To reprint the ticket click "
658
+ msgstr "Para imprimir nuevamente el ticket hace clic "
659
+
660
+ msgid "here"
661
+ msgstr "aquí"
662
+
663
+ msgid "Custom Checkout is Inactive"
664
+ msgstr "Checkout Personalizado Inactivo"
665
+
666
+ msgid "Basic Checkout is Inactive"
667
+ msgstr "Checkout Básico Inactivo"
668
+
669
+ msgid "Ticket is Inactive"
670
+ msgstr "Ticket Inactivo"
671
+
672
+ msgid "Please, select the ticket issuer of your preference."
673
+ msgstr "Por favor, seleccione el emisor de su elección."
674
+
675
+ msgid "Click "Place order" button. The ticket will be generated and you will be redirected to print it."
676
+ msgstr "Haga clic en el botón "Realizar el pedido". El ticket será generado y usted será redirigido a imprimirlo."
677
+
678
+ msgid "Important: The order will be confirmed only after the payment approval."
679
+ msgstr "Importante: La solicitud sólo será confirmada después de la aprobación del pago."
680
+
681
+ msgid "Your Mercado Pago credential Access Token appears to be misconfigured."
682
+ msgstr "Su credencial Access Token de Mercado de Pago parece estar desconfigurada."
683
+
684
+ msgid "Your Card"
685
+ msgstr "Sus Tarjetas"
686
+
687
+ msgid "Other Cards"
688
+ msgstr "Otras Tarjetas"
689
+
690
+ msgid "Other Card"
691
+ msgstr "Otra Tarjeta"
692
+
693
+ msgid "ended in"
694
+ msgstr "terminado en"
695
+
696
+ msgid "Your site appears to not have SSL certification. SSL is a pre-requisite because the payment process is made in your server."
697
+ msgstr "Su sitio parece no tener certificación SSL. SSL es un requisito para transaccionar desde su servidor."
698
+
699
+ msgid "ATTENTION: The currency"
700
+ msgstr "ATENCIÓN: La moneda"
701
+
702
+ msgid "defined in WooCommerce is different from the one used in your credentials country.<br>The currency for transactions in this payment method will be"
703
+ msgstr "que se define en WooCommerce es diferente de la utilizada en el país de sus credenciales.<br>La moneda para las transacciones realizadas por este medio de pago será"
704
+
705
+ msgid "Currency conversions should be made outside this module."
706
+ msgstr "Conversiones de monedas deben hacerse fuera de este módulo."
707
+
708
+ msgid "Coupons"
709
+ msgstr "Cupones"
710
+
711
+ msgid "Enable coupons of discounts"
712
+ msgstr "Activar los cupones de descuento"
713
+
714
+ msgid "If there is a Mercado Pago campaign, allow your store to give discounts to customers."
715
+ msgstr "Si hay una campaña de Mercado Pago, permitir a su tienda hacer descuentos para los clientes."
716
+
717
+ msgid "You will save"
718
+ msgstr "Usted ahorrará"
719
+
720
+ msgid "Apply"
721
+ msgstr "Aplicar"
722
+
723
+ msgid "Remove"
724
+ msgstr "Eliminar"
725
+
726
+ msgid "Please, inform your coupon code"
727
+ msgstr "Por favor, introduzca el código de su cupón"
728
+
729
+ msgid "Please, inform your email in billing address to use this feature"
730
+ msgstr "Por favor, introduzca su email en la dirección de facturación para utilizar este servicio"
731
+
732
+ msgid "Discount for %s coupon"
733
+ msgstr "Descuento para el cupón %s"
734
+
735
+ msgid "Discount provided by store"
736
+ msgstr "Descuento dado por la tienda"
737
+
738
+ msgid "Discount Coupon"
739
+ msgstr "Cupón de Descuento"
740
+
741
+ msgid "CURRENCY CONVERTED: The currency conversion ratio from"
742
+ msgstr "MONEDA CONVERTIDA: La tasa de conversión de moneda de"
743
+
744
+ msgid "ERROR: It was not possible to convert the unsupported currency"
745
+ msgstr "ERROR: No fue posible convertir la moneda no soportada"
746
+
747
+ msgid "to"
748
+ msgstr "para"
749
+
750
+ msgid "If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio."
751
+ msgstr "Si la moneda utilizada en WooCommerce es diferente o no soportada por Mercado Pago, convierte los importes de sus transacciones con la tasa de conversión de Mercado Pago."
752
+
753
+ msgid " is: "
754
+ msgstr " es: "
755
+
756
+ msgid "Currency Conversion"
757
+ msgstr "Conversión de Moneda"
758
+
759
+ msgid "with discount from"
760
+ msgstr "con descuento de"
761
+
762
+ msgid "Total of your purchase:"
763
+ msgstr "Total de su compra:"
764
+
765
+ msgid "Total of your purchase with discount:"
766
+ msgstr "Total de su compra con descuento:"
767
+
768
+ msgid "*Uppon payment approval"
769
+ msgstr "*Con la aprobación de pago"
770
+
771
+ msgid "Terms and Conditions of Use"
772
+ msgstr "Términos y Condiciones de Uso"
773
+
774
+ msgid "Payment converted from"
775
+ msgstr "Pago convertido de"
776
+
777
+ msgid "Rate Us"
778
+ msgstr "Calificar"
779
+
780
+ msgid "Report Issue"
781
+ msgstr "Informar Problema"
782
+
783
+ msgid "Two Cards Mode"
784
+ msgstr "Modo de Dos Tarjetas"
785
+
786
+ msgid "Payments with Two Cards"
787
+ msgstr "Pagos con Dos Tarjetas"
788
+
789
+ msgid "Your customer will be able to use two different cards to pay the order."
790
+ msgstr "Su cliente será capaz de utilizar dos tarjetas diferentes para pagar el pedido."
791
+
792
+ msgid "Your Mercado Pago credentials Access Token appears to be misconfigured."
793
+ msgstr "La credencial Mercado Pago Access Token parece estar mal configurada."
794
+
795
+ msgid "Cancel Order"
796
+ msgstr "Cancelar la Compra"
797
+
798
+ msgid "Refund Order"
799
+ msgstr "Reembolso de Compra"
800
+
801
+ msgid "Back URL Options"
802
+ msgstr "Opciones de URL de Callback"
803
+
804
+ msgid "Sucess URL"
805
+ msgstr "URL de Éxito"
806
+
807
+ msgid "Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page."
808
+ msgstr "Donde los clientes serán redirigidos después de una compra exitosa. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
809
+
810
+ msgid "Failure URL"
811
+ msgstr "URL de Pago Rechazado"
812
+
813
+ msgid "Where customers should be redirected after a failed purchase. Let blank to redirect to the default store order resume page."
814
+ msgstr "Donde los clientes serán redirigidos después de una compra rechazada. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
815
+
816
+ msgid "Pending URL"
817
+ msgstr "URL de Pago Pendiente"
818
+
819
+ msgid "Where customers should be redirected after a pending purchase. Let blank to redirect to the default store order resume page."
820
+ msgstr "Donde los clientes ​serán redirigidos después de una compra pendiente. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
821
+
822
+ msgid "Stock Reduce"
823
+ msgstr "Reducir Inventario"
824
+
825
+ msgid "Reduce Stock in Order Generation"
826
+ msgstr "Reducir Inventario en la Orden"
827
+
828
+ msgid "Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval."
829
+ msgstr "Activar esta opción para reducir el inventario mediante la creación de un pedido. Desactivar para reducir sólo <strong>después</strong> de la aprobación del pago."
830
+
831
+ msgid "Recurrent Product"
832
+ msgstr "Producto Recurrente"
833
+
834
+ msgid "Frequency"
835
+ msgstr "Frecuencia"
836
+
837
+ msgid "Amount of time (in days or months) for the execution of the next payment."
838
+ msgstr "Cantidad de tiempo (en días o meses) para la ejecución del próximo pago."
839
+
840
+ msgid "Start date"
841
+ msgstr "Fecha de inicio"
842
+
843
+ msgid "First payment date (effective debit). Defaults to now if blank."
844
+ msgstr "Primera fecha de pago (débito efectivo). De forma predeterminada ahora, si está en blanco."
845
+
846
+ msgid "End date"
847
+ msgstr "Fecha final"
848
+
849
+ msgid "Deadline to generate new charges. Defaults to never if blank."
850
+ msgstr "Fecha límite para generar nuevos cargos. De forma predeterminada como nunca, si está en blanco."
851
+
852
+ msgid "Days"
853
+ msgstr "Días"
854
+
855
+ msgid "Months"
856
+ msgstr "Meses"
857
+
858
+ msgid "Indicates the period of time."
859
+ msgstr "Indica el período de tiempo."
860
+
861
+ msgid "The amount to charge the payer each period. Should be informed including taxes and discounts."
862
+ msgstr "La cantidad para cobrar el pagador en cada período. Debe ser informada incluyendo impuestos y descuentos."
863
+
864
+ msgid "Amount charged"
865
+ msgstr "Cantidad de cobro"
866
+
867
+ msgid "Uruguay"
868
+ msgstr "Uruguay"
869
+
870
+ msgid "Frequency type"
871
+ msgstr "Tipo de frecuencia"
872
+
873
+ msgid "Transaction amount"
874
+ msgstr "Valor de la transacción"
875
+
876
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
877
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
878
+
879
+ msgid "Subscription"
880
+ msgstr "Suscripción"
881
+
882
+ msgid "Enable Subscription"
883
+ msgstr "Habilitar Suscripción"
884
+
885
+ msgid "Subscription is Inactive"
886
+ msgstr "La Suscripción está Inactiva"
887
+
888
+ msgid "Subscribe with Mercado Pago"
889
+ msgstr "Suscribirse con Mercado Pago"
890
+
891
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
892
+ msgstr "Para esta solución, usted debe configurar su URL de IPN. Puede acceder a ella en su cuenta para su específico país en:"
893
+
894
+ msgid "Discount by Gateway"
895
+ msgstr "Descuento por Gateway"
896
+
897
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
898
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
899
+
900
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
901
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
902
+
903
+ msgid "Discount Of"
904
+ msgstr "Descuento de"
905
+
906
+ msgid "Mercado Pago Subscription"
907
+ msgstr "Suscripción Mercado Pago"
908
+
909
+ msgid "Payment ID:"
910
+ msgstr "ID de Pago:"
911
+
912
+ msgid "Amount:"
913
+ msgstr "Cantidad:"
914
+
915
+ msgid "This operation could not be completed."
916
+ msgstr "Esta operación no se puede completar."
917
+
918
+ msgid "Operation successfully completed."
919
+ msgstr "La operación se realizó con éxito."
920
+
921
+ msgid "Refund Payment"
922
+ msgstr "Reembolso de Pago"
923
+
924
+ msgid "Cancel Payment"
925
+ msgstr "Cancelar Pago"
926
+
927
+ msgid "Mercado Pago - Subscription"
928
+ msgstr "Mercado Pago - Suscripcións"
929
+
930
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
931
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
932
+
933
+ msgid "Free Shipping"
934
+ msgstr "Envío Gratuito"
935
+
936
+ msgid "Day"
937
+ msgstr "Día"
938
+
939
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
940
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
941
+
942
+ msgid "Mercado Envios"
943
+ msgstr "Mercado Envios"
944
+
945
+ msgid "This controls the title which the user sees during checkout."
946
+ msgstr "Controla el título que se muestra al cliente durante el pago."
947
+
948
+ msgid "Enable free shipping for this shipping method"
949
+ msgstr "Habilitar el envío gratuito para este método de envío"
950
+
951
+ msgid "Delivery Time"
952
+ msgstr "Tiempo de Entrega"
953
+
954
+ msgid "Show estimated delivery time"
955
+ msgstr "Mostrar el tiempo estimado de entrega"
956
+
957
+ msgid "Display the estimated delivery time in working days."
958
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
959
+
960
+ msgid "Buyer initiates complaint and requested a refund."
961
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
962
+
963
+ msgid "In return to sender"
964
+ msgstr "Volviendo al remitente"
965
+
966
+ msgid "Missing recipient for delivery"
967
+ msgstr "Destinatario ausente para envío"
968
+
969
+ msgid "Delayed shipping"
970
+ msgstr "Envío retrasado"
971
+
972
+ msgid "Unsuccessful"
973
+ msgstr "Fracasado"
974
+
975
+ msgid "Tag printed"
976
+ msgstr "Etiqueta impresa"
977
+
978
+ msgid "Tag ready to print"
979
+ msgstr "Etiquetar lista para imprimir"
980
+
981
+ msgid "Tracking code:"
982
+ msgstr "Código de rastreamiento:"
983
+
984
+ msgid "Tag:"
985
+ msgstr "Etiqueta:"
986
+
987
+ msgid "Shipping is pending"
988
+ msgstr "Envío pendiente"
989
+
990
+ msgid "Tutorial"
991
+ msgstr "Tutorial"
992
+
993
+ msgid "Discount Of "
994
+ msgstr "Descuento De "
995
+
996
+ msgid "Make this product a subscription."
997
+ msgstr "Hacer deste producto una suscripción."
998
+
999
+ msgid "Order"
1000
+ msgstr "Pedido"
1001
+
1002
+ msgid "Mercado Envios Tracking ID"
1003
+ msgstr "Código de rastreamiento de Mercado Envíos"
1004
+
1005
+ msgid "Hello,"
1006
+ msgstr "Hola,"
1007
+
1008
+ msgid "Your order"
1009
+ msgstr "Su pedido"
1010
+
1011
+ msgid "made in"
1012
+ msgstr "hecho en"
1013
+
1014
+ msgid "used Mercado Envios as its shipment method."
1015
+ msgstr "utilizó el Mercado Envíos como su medio de envío."
1016
+
1017
+ msgid "You can track it with the following Tracking ID:"
1018
+ msgstr "Usted puedes rastrearlo con lo siguiente código de rastreamiento:"
1019
+
1020
+ msgid "Best regards."
1021
+ msgstr "Saludos."
1022
+
1023
+ msgid "SELECT..."
1024
+ msgstr "SELECCIONE..."
1025
+
1026
+ msgid "NAME"
1027
+ msgstr "NOMBRE"
1028
+
1029
+ msgid "SURNAME"
1030
+ msgstr "APELLIDO"
1031
+
1032
+ msgid "DOCUMENT"
1033
+ msgstr "DOCUMENTO"
1034
+
1035
+ msgid "ADDRESS"
1036
+ msgstr "DIRECCIÓN"
1037
+
1038
+ msgid "NUMBER"
1039
+ msgstr "NÚMERO"
1040
+
1041
+ msgid "CITY"
1042
+ msgstr "CIUDAD"
1043
+
1044
+ msgid "STATE"
1045
+ msgstr "ESTADO"
1046
+
1047
+ msgid "ZIP"
1048
+ msgstr "CÓDIGO POSTAL"
1049
+
1050
+ msgid "You must inform you NAME"
1051
+ msgstr "Obligatorio informar su NOMBRE"
1052
+
1053
+ msgid "You must inform your SURNAME"
1054
+ msgstr "Obligatorio informar su APELLIDO"
1055
+
1056
+ msgid "You must inform your DOCUMENT"
1057
+ msgstr "Obligatorio informar su DOCUMENTO"
1058
+
1059
+ msgid "You must inform your ADDRESS"
1060
+ msgstr "Obligatorio informar su DIRECCIÓN"
1061
+
1062
+ msgid "You must inform your ADDRESS NUMBER"
1063
+ msgstr "Obligatorio informar su NÚMERO"
1064
+
1065
+ msgid "You must inform your CITY"
1066
+ msgstr "Obligatorio informar su CIUDAD"
1067
+
1068
+ msgid "You must inform your STATE"
1069
+ msgstr "Obligatorio informar su ESTADO"
1070
+
1071
+ msgid "You must inform your ZIP"
1072
+ msgstr "Obligatorio informar su CÓDIGO POSTAL"
1073
+
1074
+ msgid "Your PHP version is OK."
1075
+ msgstr "Su versión de PHP está bien."
1076
+
1077
+ msgid "Your PHP version do not support this module. You have %s, minimal required is %s."
1078
+ msgstr "Su versión de PHP no soporta este módulo. Tienes %s, la mínima requerida es %s."
1079
+
1080
+ msgid "cURL is installed."
1081
+ msgstr "cURL está instalado."
1082
+
1083
+ msgid "cURL is not installed."
1084
+ msgstr "cURL no está instalado."
1085
+
1086
+ msgid "SSL is missing in your site."
1087
+ msgstr "Falta el SSL en su sitio."
1088
+
1089
+ msgid "Your site has SSL enabled."
1090
+ msgstr "Su sitio tiene SSL habilitado."
1091
+
1092
+ msgid "Fisical Person"
1093
+ msgstr "Persona Física"
1094
+
1095
+ msgid "Legal Person"
1096
+ msgstr "Persona Jurídica"
1097
+
1098
+ msgid "SOCIAL NAME"
1099
+ msgstr "RAZÓN SOCIAL"
1100
+
1101
+ msgid "CNPJ"
1102
+ msgstr "CNPJ"
languages/woocommerce-mercadopago-module-es_CL.mo CHANGED
Binary file
languages/woocommerce-mercadopago-module-es_CL.po CHANGED
@@ -4,9 +4,9 @@
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
- "POT-Creation-Date: 2016-03-04 20:48-0300\n"
8
  "PO-Revision-Date: \n"
9
- "Language-Team: Your Team <translations@example.com>\n"
10
  "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -14,335 +14,1089 @@ msgstr ""
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
18
- "X-Poedit-Basepath: ..\n"
 
19
  "X-Generator: Poedit 1.8.7\n"
20
  "Last-Translator: \n"
21
- "Language: es_AR\n"
22
  "X-Poedit-SearchPath-0: .\n"
23
 
24
  #. Description of the plugin/theme
25
  msgid "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."
26
- msgstr "Este es el módulo <strong>oficial</strong> de Mercado Pago para el plugin WooCommerce. Este módulo habilita el uso de Mercado Pago en WooCommerce como método de pago para compras realizadas en su tienda virtual."
27
 
28
- #: mercadopago-module.php:66
29
  #, php-format
30
  msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
31
  msgstr "Woo Mercado Pago Module depende de la última versión de %s para ejecutarse!"
32
 
33
- #: mercadopago/mercadopago-gateway.php:63
 
 
 
 
 
 
 
 
 
 
 
 
34
  msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
35
- msgstr "Este módulo habilita el uso de Mercado Pago en WooCommerce como método de pago para compras realizadas en su tienda virtual."
36
 
37
- #: mercadopago/mercadopago-gateway.php:133
 
38
  msgid "Argentine"
39
  msgstr "Argentina"
40
 
41
- #: mercadopago/mercadopago-gateway.php:134
 
42
  msgid "Brazil"
43
  msgstr "Brasil"
44
 
45
- #: mercadopago/mercadopago-gateway.php:135
 
46
  msgid "Chile"
47
  msgstr "Chile"
48
 
49
- #: mercadopago/mercadopago-gateway.php:136
 
50
  msgid "Colombia"
51
  msgstr "Colombia"
52
 
53
- #: mercadopago/mercadopago-gateway.php:137
 
54
  msgid "Mexico"
55
  msgstr "México"
56
 
57
- #: mercadopago/mercadopago-gateway.php:138
58
  msgid "or"
59
  msgstr "o"
60
 
61
- #: mercadopago/mercadopago-gateway.php:139
 
62
  msgid "Venezuela"
63
  msgstr "Venezuela"
64
 
65
- #: mercadopago/mercadopago-gateway.php:154
66
- msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
67
- msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
68
-
69
- #: mercadopago/mercadopago-gateway.php:157
70
  msgid "Your credentials are <strong>valid</strong> for"
71
  msgstr "Sus credenciales <strong>son válidas</strong> para"
72
 
73
- #: mercadopago/mercadopago-gateway.php:164 mercadopago/mercadopago-gateway.php:173
74
- msgid "Configure your Client_id and Client_secret to have access to more options."
75
- msgstr "Configure su Client_id y Client_secret para tener acceso a más opciones."
76
-
77
- #: mercadopago/mercadopago-gateway.php:167 mercadopago/mercadopago-gateway.php:176
78
  msgid "Your credentials are <strong>not valid</strong>!"
79
  msgstr "Sus credenciales <strong>no son válidas</strong>!"
80
 
81
- #: mercadopago/mercadopago-gateway.php:190 mercadopago/mercadopago-gateway.php:198 mercadopago/mercadopago-gateway.php:208
82
- msgid "This field should be an integer."
83
- msgstr "Este campo debe ser un número."
84
-
85
- #: mercadopago/mercadopago-gateway.php:193
86
- msgid "If your integration method is iFrame, please inform the payment iFrame width."
87
- msgstr "Si su modo de apertura es iFrame, indique el ancho del iFrame."
88
-
89
- #: mercadopago/mercadopago-gateway.php:201
90
- msgid "If your integration method is iFrame, please inform the payment iFrame height."
91
- msgstr "Si su modo de apertura es iFrame, indique el alto del iFrame."
92
-
93
- #: mercadopago/mercadopago-gateway.php:211
94
- msgid "Select the max number of installments for your customers."
95
- msgstr "Seleccione el número máximo de cuotas posibles para sus clientes."
96
-
97
- #: mercadopago/mercadopago-gateway.php:217
98
  msgid "Enable/Disable"
99
  msgstr "Habilitar/Deshabilitar"
100
 
101
- #: mercadopago/mercadopago-gateway.php:219
102
- msgid "Enable Mercado Pago Module"
103
- msgstr "Habilitar Mercado Pago"
104
 
105
- #: mercadopago/mercadopago-gateway.php:223
106
  msgid "Mercado Pago Credentials"
107
  msgstr "Credenciales de Mercado Pago"
108
 
109
- #: mercadopago/mercadopago-gateway.php:225
110
  msgid "You can obtain your credentials for"
111
  msgstr "Puedes obtener tus credenciales para"
112
 
113
- #: mercadopago/mercadopago-gateway.php:228
114
- msgid "Mercado Pago Client_id"
115
- msgstr "Client_id de Mercado Pago"
116
-
117
- #: mercadopago/mercadopago-gateway.php:230
118
- msgid "Insert your Mercado Pago Client_id."
119
- msgstr "Inserte su Client_id de Mercado Pago."
120
-
121
- #: mercadopago/mercadopago-gateway.php:235
122
- msgid "Mercado Pago Client_secret"
123
- msgstr "Client_secret de Mercado Pago"
124
 
125
- #: mercadopago/mercadopago-gateway.php:237
126
- msgid "Insert your Mercado Pago Client_secret."
127
- msgstr "Inserte su Client_secret de Mercado Pago."
128
 
129
- #: mercadopago/mercadopago-gateway.php:242
130
  msgid "Instant Payment Notification (IPN) URL"
131
  msgstr "URL da Notificación Instantanea de Pago (IPN)"
132
 
133
- #: mercadopago/mercadopago-gateway.php:244
134
  msgid "Your IPN URL to receive instant payment notifications is"
135
  msgstr "Su URL de IPN para recibir notificaciones instantáneas de pago es"
136
 
137
- #: mercadopago/mercadopago-gateway.php:247
138
  msgid "Checkout Options"
139
  msgstr "Opciones de Checkout"
140
 
141
- #: mercadopago/mercadopago-gateway.php:252
142
  msgid "Title"
143
  msgstr "Título"
144
 
145
- #: mercadopago/mercadopago-gateway.php:254
146
  msgid "Title shown to the client in the checkout."
147
  msgstr "Título mostrado al cliente en el checkout."
148
 
149
- #: mercadopago/mercadopago-gateway.php:258
 
 
 
 
150
  msgid "Description"
151
  msgstr "Descripción"
152
 
153
- #: mercadopago/mercadopago-gateway.php:260
154
  msgid "Description shown to the client in the checkout."
155
  msgstr "Descripción mostrada al cliente en el checkout."
156
 
157
- #: mercadopago/mercadopago-gateway.php:261 mercadopago/mercadopago-gateway.php:406
158
  msgid "Pay with Mercado Pago"
159
  msgstr "Pagar con Mercado Pago"
160
 
161
- #: mercadopago/mercadopago-gateway.php:264
162
- msgid "Store Category"
163
- msgstr "Categoría de la tienda"
164
 
165
- #: mercadopago/mercadopago-gateway.php:266
166
- msgid "Define which type of products your store sells."
167
- msgstr "Defina el tipo de productos que su tienda vende."
168
 
169
- #: mercadopago/mercadopago-gateway.php:270
170
- msgid "Store Identificator"
171
- msgstr "Identificador de la tienda"
172
 
173
- #: mercadopago/mercadopago-gateway.php:272
174
- msgid "Please, inform a prefix to your store."
175
- msgstr "Por favor, informe un prefijo para su tienda."
176
 
177
- #: mercadopago/mercadopago-gateway.php:272
178
- msgid "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same identificators."
179
- msgstr "Si esta utilizando su cuenta Mercado Pago para múltiples tiendas, asegúrese que este prefijo sea único para no generar pedidos con el mismo identificador."
180
 
181
- #: mercadopago/mercadopago-gateway.php:276
182
- msgid "Integration Method"
183
- msgstr "Método de integración"
184
-
185
- #: mercadopago/mercadopago-gateway.php:278
186
- msgid "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an internal window is embedded to the page layout)."
187
- msgstr "Ventana Modal (Dentro de su tienda), Redireccionamiento (El cliente es redireccionado a Mercado Pago), o iFrame (Ventana de pago incorporada a su página)."
188
-
189
- #: mercadopago/mercadopago-gateway.php:281
190
- msgid "iFrame"
191
- msgstr "iFrame"
192
 
193
- #: mercadopago/mercadopago-gateway.php:282
194
- msgid "Modal Window"
195
- msgstr "Ventana modal"
196
 
197
- #: mercadopago/mercadopago-gateway.php:283
198
- msgid "Redirect"
199
- msgstr "Redireccionamiento"
200
 
201
- #: mercadopago/mercadopago-gateway.php:287
202
- msgid "iFrame Width"
203
- msgstr "Ancho del iFrame"
204
-
205
- #: mercadopago/mercadopago-gateway.php:293
206
- msgid "iFrame Height"
207
- msgstr "Alto del iFrame"
208
-
209
- #: mercadopago/mercadopago-gateway.php:299
210
- msgid "Auto Return"
211
- msgstr "Redirección automática"
212
-
213
- #: mercadopago/mercadopago-gateway.php:301
214
- msgid "Automatic Return After Payment"
215
- msgstr "Redirección Automática Luego del Pago"
216
 
217
- #: mercadopago/mercadopago-gateway.php:303
218
- msgid "After the payment, client is automatically redirected."
219
- msgstr "Después del pago, el cliente será redireccionado automáticamente."
220
 
221
- #: mercadopago/mercadopago-gateway.php:306
222
- msgid "Payment Options"
223
- msgstr "Opciones de Pago"
224
 
225
- #: mercadopago/mercadopago-gateway.php:311
226
- msgid "Max installments"
227
- msgstr "Número máximo de cuotas"
228
 
229
- #: mercadopago/mercadopago-gateway.php:317
230
- msgid "Exclude Payment Methods"
231
- msgstr "Excluir métodos de pago"
 
 
 
232
 
233
- #: mercadopago/mercadopago-gateway.php:324
234
  msgid "Test and Debug Options"
235
  msgstr "Opciones de Prueba y Debug"
236
 
237
- #: mercadopago/mercadopago-gateway.php:329
238
  msgid "Mercado Pago Sandbox"
239
  msgstr "Sandbox Mercado Pago"
240
 
241
- #: mercadopago/mercadopago-gateway.php:331
242
  msgid "Enable Mercado Pago Sandbox"
243
  msgstr "Habilitar el sandbox de Mercado Pago"
244
 
245
- #: mercadopago/mercadopago-gateway.php:333
246
- msgid "This options allows you to test payments inside a sandbox environment."
247
  msgstr "Esta opción permite simular un flujo de pagos completo en nuestro entorno Sandbox."
248
 
249
- #: mercadopago/mercadopago-gateway.php:336
250
  msgid "Debug and Log"
251
  msgstr "Debug y Log"
252
 
253
- #: mercadopago/mercadopago-gateway.php:338
254
  msgid "Enable log"
255
  msgstr "Habilitar Log"
256
 
257
- #: mercadopago/mercadopago-gateway.php:340
258
- #, php-format
259
  msgid "Register event logs of Mercado Pago, such as API requests, in the file"
260
  msgstr "Registrar logs de eventos de Mercado Pago, como llamadas a la API, dentro del archivo"
261
 
262
- #: mercadopago/mercadopago-gateway.php:402
263
- msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
264
- msgstr "Gracias por su compra. Por favor, prosiga a la página de pago haciendo click en el botón de abajo."
265
 
266
- #: mercadopago/mercadopago-gateway.php:410
267
- msgid "Cancel order &amp; Clear cart"
268
- msgstr "Cancelar &amp; Limpiar carrito"
 
269
 
270
- #: mercadopago/mercadopago-gateway.php:420
271
- msgid "Thank you for your order. Proceed with your payment completing the following information."
272
- msgstr "Gracias por su compra. Prosiga con su pago completando la información abajo."
273
 
274
- #: mercadopago/mercadopago-gateway.php:431
275
- msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
276
- msgstr "Un error ocurrió durante el procesamiento de su pago. Por favor intente nuevamente o contactenos para ayudarlo."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
 
278
- #: mercadopago/mercadopago-gateway.php:434
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  msgid "Click to try again"
280
- msgstr "Haga click para intentar de nuevo"
 
 
 
 
 
 
 
 
281
 
282
- #: mercadopago/mercadopago-gateway.php:675 mercadopago/mercadopago-gateway.php:686
 
 
 
 
 
 
 
 
 
283
  msgid "Mercado Pago is Inactive"
284
  msgstr "Mercado Pago Inactivo"
285
 
286
- #: mercadopago/mercadopago-gateway.php:678
287
- msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
288
  msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
289
 
290
- #: mercadopago/mercadopago-gateway.php:679
291
  msgid "Click here and configure!"
292
  msgstr "Haga click aquí y configure!"
293
 
294
- #: mercadopago/mercadopago-gateway.php:689
295
  msgid "The currency"
296
  msgstr "La moneda"
297
 
298
- #: mercadopago/mercadopago-gateway.php:689
299
- msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, USD, VEF."
300
- msgstr "no es soportada. Las monedas soportadas son: ARS, BRL, CLP, COP, MXN, USD, VEF."
301
 
302
- #: mercadopago/mercadopago-gateway.php:714
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  msgid "Mercado Pago Request Failure"
304
  msgstr "La solicitud de Mercado Pago ha fallado."
305
 
306
- #: mercadopago/mercadopago-gateway.php:791
307
- msgid "Mercado Pago Transaction ID"
308
- msgstr "ID de operación de Mercado Pago"
309
-
310
- #: mercadopago/mercadopago-gateway.php:798
311
  msgid "Payer email"
312
  msgstr "Email del comprador"
313
 
314
- #: mercadopago/mercadopago-gateway.php:805
315
  msgid "Payment type"
316
- msgstr "Método de pago"
317
 
318
- #: mercadopago/mercadopago-gateway.php:810
319
- msgid "Payment approved."
320
- msgstr "Pago aprobado."
321
 
322
- #: mercadopago/mercadopago-gateway.php:816
323
  msgid "Customer haven't paid yet."
324
  msgstr "El cliente todavía no efectuó el pago."
325
 
326
- #: mercadopago/mercadopago-gateway.php:821
327
  msgid "Payment under review."
328
  msgstr "El pago está pendiente de revisión."
329
 
330
- #: mercadopago/mercadopago-gateway.php:826
331
  msgid "The payment was refused. The customer can try again."
332
  msgstr "El pago fue rechazado. El cliente puede intentar nuevamente."
333
 
334
- #: mercadopago/mercadopago-gateway.php:832
335
  msgid "The payment was refunded to the customer."
336
  msgstr "El pago fue devuelto al cliente."
337
 
338
- #: mercadopago/mercadopago-gateway.php:838
339
  msgid "The payment was cancelled."
340
  msgstr "El pago fue cancelado."
341
 
342
- #: mercadopago/mercadopago-gateway.php:843
343
- msgid "Mercado Pago Payment ID"
344
- msgstr "ID de pago de Mercado Pago"
345
-
346
- #: mercadopago/mercadopago-gateway.php:843 mercadopago/mercadopago-gateway.php:848
347
  msgid "The payment is under mediation or it was charged-back."
348
  msgstr "El pago esta en mediación o la compra fue desconocida por el cliente."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
+ "POT-Creation-Date: 2016-05-23 14:52-0300\n"
8
  "PO-Revision-Date: \n"
9
+ "Language-Team: Product Development <translations@example.com>\n"
10
  "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;"
18
+ "_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
19
+ "X-Poedit-Basepath: ../Documents/woocommerce (MAMP)/wp-content/plugins/woo-mercado-pago-module\n"
20
  "X-Generator: Poedit 1.8.7\n"
21
  "Last-Translator: \n"
22
+ "Language: es_CL\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
25
  #. Description of the plugin/theme
26
  msgid "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."
27
+ msgstr "Este es el módulo <strong>oficial</strong> de Mercado Pago para el plugin WooCommerce. Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
28
 
29
+ #: mercadopago-module.php:69
30
  #, php-format
31
  msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
32
  msgstr "Woo Mercado Pago Module depende de la última versión de %s para ejecutarse!"
33
 
34
+ #: mercadopago-module.php:109
35
+ msgid "Basic Checkout"
36
+ msgstr "Checkout Básico"
37
+
38
+ #: mercadopago-module.php:113
39
+ msgid "Custom Checkout"
40
+ msgstr "Checkout Personalizado"
41
+
42
+ #: mercadopago/mercadopago-custom-gateway.php:48
43
+ msgid "Mercado Pago - Custom Checkout"
44
+ msgstr "Mercado Pago - Checkout Personalizado"
45
+
46
+ #: mercadopago/mercadopago-custom-gateway.php:51 mercadopago/mercadopago-gateway.php:54
47
  msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
48
+ msgstr "Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
49
 
50
+ #: mercadopago/mercadopago-custom-gateway.php:126 mercadopago/mercadopago-custom-gateway.php:791 mercadopago/mercadopago-gateway.php:125
51
+ #: mercadopago/mercadopago-gateway.php:716
52
  msgid "Argentine"
53
  msgstr "Argentina"
54
 
55
+ #: mercadopago/mercadopago-custom-gateway.php:127 mercadopago/mercadopago-custom-gateway.php:792 mercadopago/mercadopago-gateway.php:126
56
+ #: mercadopago/mercadopago-gateway.php:717
57
  msgid "Brazil"
58
  msgstr "Brasil"
59
 
60
+ #: mercadopago/mercadopago-custom-gateway.php:128 mercadopago/mercadopago-custom-gateway.php:794 mercadopago/mercadopago-gateway.php:127
61
+ #: mercadopago/mercadopago-gateway.php:719
62
  msgid "Chile"
63
  msgstr "Chile"
64
 
65
+ #: mercadopago/mercadopago-custom-gateway.php:129 mercadopago/mercadopago-custom-gateway.php:793 mercadopago/mercadopago-gateway.php:128
66
+ #: mercadopago/mercadopago-gateway.php:718
67
  msgid "Colombia"
68
  msgstr "Colombia"
69
 
70
+ #: mercadopago/mercadopago-custom-gateway.php:130 mercadopago/mercadopago-custom-gateway.php:795 mercadopago/mercadopago-gateway.php:129
71
+ #: mercadopago/mercadopago-gateway.php:720
72
  msgid "Mexico"
73
  msgstr "México"
74
 
75
+ #: mercadopago/mercadopago-custom-gateway.php:132 mercadopago/mercadopago-gateway.php:130
76
  msgid "or"
77
  msgstr "o"
78
 
79
+ #: mercadopago/mercadopago-custom-gateway.php:133 mercadopago/mercadopago-custom-gateway.php:796 mercadopago/mercadopago-gateway.php:131
80
+ #: mercadopago/mercadopago-gateway.php:721
81
  msgid "Venezuela"
82
  msgstr "Venezuela"
83
 
84
+ #: mercadopago/mercadopago-custom-gateway.php:145 mercadopago/mercadopago-gateway.php:151
 
 
 
 
85
  msgid "Your credentials are <strong>valid</strong> for"
86
  msgstr "Sus credenciales <strong>son válidas</strong> para"
87
 
88
+ #: mercadopago/mercadopago-custom-gateway.php:151 mercadopago/mercadopago-custom-gateway.php:156 mercadopago/mercadopago-gateway.php:161
89
+ #: mercadopago/mercadopago-gateway.php:170
 
 
 
90
  msgid "Your credentials are <strong>not valid</strong>!"
91
  msgstr "Sus credenciales <strong>no son válidas</strong>!"
92
 
93
+ #: mercadopago/mercadopago-custom-gateway.php:169 mercadopago/mercadopago-gateway.php:211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  msgid "Enable/Disable"
95
  msgstr "Habilitar/Deshabilitar"
96
 
97
+ #: mercadopago/mercadopago-custom-gateway.php:171
98
+ msgid "Enable Custom Checkout"
99
+ msgstr "Habilitar Checkout Personalizado"
100
 
101
+ #: mercadopago/mercadopago-custom-gateway.php:175 mercadopago/mercadopago-gateway.php:217
102
  msgid "Mercado Pago Credentials"
103
  msgstr "Credenciales de Mercado Pago"
104
 
105
+ #: mercadopago/mercadopago-custom-gateway.php:177 mercadopago/mercadopago-gateway.php:219
106
  msgid "You can obtain your credentials for"
107
  msgstr "Puedes obtener tus credenciales para"
108
 
109
+ #: mercadopago/mercadopago-custom-gateway.php:182
110
+ msgid "Insert your Mercado Pago Public key."
111
+ msgstr "Inserte su Public Key de Mercado Pago."
 
 
 
 
 
 
 
 
112
 
113
+ #: mercadopago/mercadopago-custom-gateway.php:189
114
+ msgid "Insert your Mercado Pago Access token."
115
+ msgstr "Inserte su Access Token de Mercado Pago."
116
 
117
+ #: mercadopago/mercadopago-custom-gateway.php:194 mercadopago/mercadopago-gateway.php:236
118
  msgid "Instant Payment Notification (IPN) URL"
119
  msgstr "URL da Notificación Instantanea de Pago (IPN)"
120
 
121
+ #: mercadopago/mercadopago-custom-gateway.php:196 mercadopago/mercadopago-gateway.php:238
122
  msgid "Your IPN URL to receive instant payment notifications is"
123
  msgstr "Su URL de IPN para recibir notificaciones instantáneas de pago es"
124
 
125
+ #: mercadopago/mercadopago-custom-gateway.php:199 mercadopago/mercadopago-gateway.php:241
126
  msgid "Checkout Options"
127
  msgstr "Opciones de Checkout"
128
 
129
+ #: mercadopago/mercadopago-custom-gateway.php:204 mercadopago/mercadopago-gateway.php:246
130
  msgid "Title"
131
  msgstr "Título"
132
 
133
+ #: mercadopago/mercadopago-custom-gateway.php:206 mercadopago/mercadopago-gateway.php:248
134
  msgid "Title shown to the client in the checkout."
135
  msgstr "Título mostrado al cliente en el checkout."
136
 
137
+ #: mercadopago/mercadopago-custom-gateway.php:207 mercadopago/mercadopago-custom-gateway.php:219 mercadopago/mercadopago-gateway.php:249
138
+ msgid "Mercado Pago"
139
+ msgstr "Mercado Pago"
140
+
141
+ #: mercadopago/mercadopago-custom-gateway.php:210 mercadopago/mercadopago-gateway.php:252
142
  msgid "Description"
143
  msgstr "Descripción"
144
 
145
+ #: mercadopago/mercadopago-custom-gateway.php:212 mercadopago/mercadopago-gateway.php:254
146
  msgid "Description shown to the client in the checkout."
147
  msgstr "Descripción mostrada al cliente en el checkout."
148
 
149
+ #: mercadopago/mercadopago-custom-gateway.php:213 mercadopago/mercadopago-gateway.php:255 mercadopago/mercadopago-gateway.php:432
150
  msgid "Pay with Mercado Pago"
151
  msgstr "Pagar con Mercado Pago"
152
 
153
+ #: mercadopago/mercadopago-custom-gateway.php:216
154
+ msgid "Statement Descriptor"
155
+ msgstr "Descripción de la Factura"
156
 
157
+ #: mercadopago/mercadopago-custom-gateway.php:218
158
+ msgid "The description that will be shown in your customer's invoice."
159
+ msgstr "La descripción que se muestra en la factura de su cliente."
160
 
161
+ #: mercadopago/mercadopago-custom-gateway.php:222
162
+ msgid "Binary Mode"
163
+ msgstr "Modo binario"
164
 
165
+ #: mercadopago/mercadopago-custom-gateway.php:224
166
+ msgid "Enable binary mode for checkout status"
167
+ msgstr "Activar el modo binario para el estado del checkout"
168
 
169
+ #: mercadopago/mercadopago-custom-gateway.php:226
170
+ msgid "When charging a credit card, only [approved] or [reject] status will be taken."
171
+ msgstr "Al cargar una tarjeta de crédito, sólo los estados [aprobado] o [rechazar] seran tomados."
172
 
173
+ #: mercadopago/mercadopago-custom-gateway.php:229
174
+ msgid "Ticket"
175
+ msgstr "Ticket"
 
 
 
 
 
 
 
 
176
 
177
+ #: mercadopago/mercadopago-custom-gateway.php:231
178
+ msgid "Enable Ticket for Custom Checkout"
179
+ msgstr "Habilitar Ticket para Checkout Personalizado"
180
 
181
+ #: mercadopago/mercadopago-custom-gateway.php:233
182
+ msgid "Let your customer pay you with tickets"
183
+ msgstr "Deje que su cliente le paga con tickets"
184
 
185
+ #: mercadopago/mercadopago-custom-gateway.php:236 mercadopago/mercadopago-gateway.php:258
186
+ msgid "Store Category"
187
+ msgstr "Categoría de la tienda"
 
 
 
 
 
 
 
 
 
 
 
 
188
 
189
+ #: mercadopago/mercadopago-custom-gateway.php:238 mercadopago/mercadopago-gateway.php:260
190
+ msgid "Define which type of products your store sells."
191
+ msgstr "Defina el tipo de productos que su tienda vende."
192
 
193
+ #: mercadopago/mercadopago-custom-gateway.php:242 mercadopago/mercadopago-gateway.php:264
194
+ msgid "Store Identificator"
195
+ msgstr "Identificador de la tienda"
196
 
197
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
198
+ msgid "Please, inform a prefix to your store."
199
+ msgstr "Por favor, informe un prefijo para su tienda."
200
 
201
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
202
+ msgid ""
203
+ "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same "
204
+ "identificators."
205
+ msgstr ""
206
+ "Si esta utilizando su cuenta Mercado Pago para múltiples tiendas, asegúrese que este prefijo sea único para no generar pedidos con el mismo identificador."
207
 
208
+ #: mercadopago/mercadopago-custom-gateway.php:248 mercadopago/mercadopago-gateway.php:318
209
  msgid "Test and Debug Options"
210
  msgstr "Opciones de Prueba y Debug"
211
 
212
+ #: mercadopago/mercadopago-custom-gateway.php:253 mercadopago/mercadopago-gateway.php:323
213
  msgid "Mercado Pago Sandbox"
214
  msgstr "Sandbox Mercado Pago"
215
 
216
+ #: mercadopago/mercadopago-custom-gateway.php:255 mercadopago/mercadopago-gateway.php:325
217
  msgid "Enable Mercado Pago Sandbox"
218
  msgstr "Habilitar el sandbox de Mercado Pago"
219
 
220
+ #: mercadopago/mercadopago-custom-gateway.php:257 mercadopago/mercadopago-gateway.php:327
221
+ msgid "This option allows you to test payments inside a sandbox environment."
222
  msgstr "Esta opción permite simular un flujo de pagos completo en nuestro entorno Sandbox."
223
 
224
+ #: mercadopago/mercadopago-custom-gateway.php:260 mercadopago/mercadopago-gateway.php:330
225
  msgid "Debug and Log"
226
  msgstr "Debug y Log"
227
 
228
+ #: mercadopago/mercadopago-custom-gateway.php:262 mercadopago/mercadopago-gateway.php:332
229
  msgid "Enable log"
230
  msgstr "Habilitar Log"
231
 
232
+ #: mercadopago/mercadopago-custom-gateway.php:264 mercadopago/mercadopago-gateway.php:334
 
233
  msgid "Register event logs of Mercado Pago, such as API requests, in the file"
234
  msgstr "Registrar logs de eventos de Mercado Pago, como llamadas a la API, dentro del archivo"
235
 
236
+ #: mercadopago/mercadopago-custom-gateway.php:265 mercadopago/mercadopago-gateway.php:335
237
+ msgid "File location: "
238
+ msgstr "Local del archivo: "
239
 
240
+ #: mercadopago/mercadopago-custom-gateway.php:281 mercadopago/mercadopago-gateway.php:351
241
+ #, php-format
242
+ msgid "Please, rate us %s on WordPress.org and give your feedback to help improve this module!"
243
+ msgstr "Por favor, califíquenos con %s en WordPress.org y de su feedback para ayudar a mejorar este módulo!"
244
 
245
+ #: mercadopago/mercadopago-custom-gateway.php:332
246
+ msgid "Payment Method"
247
+ msgstr "Medios de Pago"
248
 
249
+ #: mercadopago/mercadopago-custom-gateway.php:333
250
+ msgid "Credit card number"
251
+ msgstr "Número de tarjeta de crédito"
252
+
253
+ #: mercadopago/mercadopago-custom-gateway.php:334
254
+ msgid "Expiration month"
255
+ msgstr "Mes de expiración"
256
+
257
+ #: mercadopago/mercadopago-custom-gateway.php:335
258
+ msgid "Expiration year"
259
+ msgstr "Año de expiración"
260
+
261
+ #: mercadopago/mercadopago-custom-gateway.php:336
262
+ msgid "Year"
263
+ msgstr "Año"
264
+
265
+ #: mercadopago/mercadopago-custom-gateway.php:337
266
+ msgid "Month"
267
+ msgstr "Mes"
268
+
269
+ #: mercadopago/mercadopago-custom-gateway.php:338
270
+ msgid "Card holder name"
271
+ msgstr "Nombre del titular de la tarjeta"
272
+
273
+ #: mercadopago/mercadopago-custom-gateway.php:339
274
+ msgid "Security code"
275
+ msgstr "Código de seguridad"
276
+
277
+ #: mercadopago/mercadopago-custom-gateway.php:340
278
+ msgid "Document Type"
279
+ msgstr "Tipo de Documento"
280
+
281
+ #: mercadopago/mercadopago-custom-gateway.php:341
282
+ msgid "Document number"
283
+ msgstr "Número de Documento"
284
+
285
+ #: mercadopago/mercadopago-custom-gateway.php:342
286
+ msgid "Issuer"
287
+ msgstr "Emisor"
288
+
289
+ #: mercadopago/mercadopago-custom-gateway.php:343
290
+ msgid "Installments"
291
+ msgstr "Cuotas"
292
 
293
+ #: mercadopago/mercadopago-custom-gateway.php:347
294
+ msgid "Parameter cardNumber can not be null/empty"
295
+ msgstr "Parámetro [Número de tarjeta] no puede ser nulo/vacío"
296
+
297
+ #: mercadopago/mercadopago-custom-gateway.php:348
298
+ msgid "Invalid Card Number"
299
+ msgstr "Número de tarjeta inválido"
300
+
301
+ #: mercadopago/mercadopago-custom-gateway.php:350 mercadopago/mercadopago-custom-gateway.php:351 mercadopago/mercadopago-custom-gateway.php:352
302
+ #: mercadopago/mercadopago-custom-gateway.php:353
303
+ msgid "Invalid Expiration Date"
304
+ msgstr "Fecha de expiración inválida"
305
+
306
+ #: mercadopago/mercadopago-custom-gateway.php:355
307
+ msgid "Parameter cardholderName can not be null/empty"
308
+ msgstr "Parámetro [Nombre del titular] no puede ser nulo/vacío"
309
+
310
+ #: mercadopago/mercadopago-custom-gateway.php:356
311
+ msgid "Invalid Card Holder Name"
312
+ msgstr "Nombre del titular de la tarjeta inválido"
313
+
314
+ #: mercadopago/mercadopago-custom-gateway.php:358
315
+ msgid "Parameter securityCode can not be null/empty"
316
+ msgstr "Parámetro [Código de seguridad] no puede ser nulo/vacío"
317
+
318
+ #: mercadopago/mercadopago-custom-gateway.php:359
319
+ msgid "Invalid Security Code"
320
+ msgstr "Código de seguridad inválido"
321
+
322
+ #: mercadopago/mercadopago-custom-gateway.php:361
323
+ msgid "Parameter docType can not be null/empty"
324
+ msgstr "Parámetro [Tipo de Documento] no puede ser nulo/vacío"
325
+
326
+ #: mercadopago/mercadopago-custom-gateway.php:362
327
+ msgid "Invalid Document Type"
328
+ msgstr "Tipo de Documento inválido"
329
+
330
+ #: mercadopago/mercadopago-custom-gateway.php:364
331
+ msgid "Parameter docNumber can not be null/empty"
332
+ msgstr "Parámetro [Número del Documento] no puede ser nulo/vacío"
333
+
334
+ #: mercadopago/mercadopago-custom-gateway.php:365
335
+ msgid "Invalid Document Number"
336
+ msgstr "Número del Documento inválido"
337
+
338
+ #: mercadopago/mercadopago-custom-gateway.php:367
339
+ msgid "The parameter cardholder.document.subtype can not be null or empty"
340
+ msgstr "Parámetro [Subtipo del documento] no puede ser nulo/vacío"
341
+
342
+ #: mercadopago/mercadopago-custom-gateway.php:368
343
+ msgid "Invalid Document Sub Type"
344
+ msgstr "Subtipo del documento inválido"
345
+
346
+ #: mercadopago/mercadopago-custom-gateway.php:370
347
+ msgid "Parameter cardIssuerId can not be null/empty"
348
+ msgstr "Parámetro [Emisor] no puede ser nulo/vacío"
349
+
350
+ #: mercadopago/mercadopago-custom-gateway.php:402 mercadopago/mercadopago-custom-gateway.php:943 mercadopago/mercadopago-gateway.php:869
351
+ msgid "Payment approved."
352
+ msgstr "Pago aprobado."
353
+
354
+ #: mercadopago/mercadopago-custom-gateway.php:416 mercadopago/mercadopago-custom-gateway.php:805
355
+ msgid "Your payment is under review. In less than 1h, you should be notified by email."
356
+ msgstr "Su pago está en revisión. En menos de 1 hora, usted será notificado por correo electrónico."
357
+
358
+ #: mercadopago/mercadopago-custom-gateway.php:418
359
+ msgid "Check your order resume"
360
+ msgstr "Ver su hoja de pedido"
361
+
362
+ #: mercadopago/mercadopago-custom-gateway.php:431
363
+ msgid "Your payment was refused. You can try again."
364
+ msgstr "Su pago fue rechazado. Puede intentarlo de nuevo."
365
+
366
+ #: mercadopago/mercadopago-custom-gateway.php:435 mercadopago/mercadopago-custom-gateway.php:819 mercadopago/mercadopago-gateway.php:460
367
  msgid "Click to try again"
368
+ msgstr "Haga clic para intentarlo de nuevo"
369
+
370
+ #: mercadopago/mercadopago-custom-gateway.php:455
371
+ msgid "A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?"
372
+ msgstr "Un problema se produjo al procesar su pago. ¿Esta seguro que ha rellenado correctamente toda la información en el formulario de checkout?"
373
+
374
+ #: mercadopago/mercadopago-custom-gateway.php:544
375
+ msgid "Shipping"
376
+ msgstr "Envío"
377
 
378
+ #: mercadopago/mercadopago-custom-gateway.php:545
379
+ msgid "Shipping service used by store"
380
+ msgstr "Servicio de envío utilizado por la tienda"
381
+
382
+ #: mercadopago/mercadopago-custom-gateway.php:721 mercadopago/mercadopago-gateway.php:649
383
+ msgid "WooCommerce &gt; System Status &gt; Logs"
384
+ msgstr "WooCommerce &gt; Estado del Sistema &gt; Logs"
385
+
386
+ #: mercadopago/mercadopago-custom-gateway.php:766 mercadopago/mercadopago-custom-gateway.php:779 mercadopago/mercadopago-gateway.php:694
387
+ #: mercadopago/mercadopago-gateway.php:705
388
  msgid "Mercado Pago is Inactive"
389
  msgstr "Mercado Pago Inactivo"
390
 
391
+ #: mercadopago/mercadopago-custom-gateway.php:769
392
+ msgid "Your Mercado Pago credentials Public Key/Access Token appears to be misconfigured."
393
  msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
394
 
395
+ #: mercadopago/mercadopago-custom-gateway.php:771 mercadopago/mercadopago-gateway.php:698
396
  msgid "Click here and configure!"
397
  msgstr "Haga click aquí y configure!"
398
 
399
+ #: mercadopago/mercadopago-custom-gateway.php:782 mercadopago/mercadopago-gateway.php:708
400
  msgid "The currency"
401
  msgstr "La moneda"
402
 
403
+ #: mercadopago/mercadopago-custom-gateway.php:783 mercadopago/mercadopago-gateway.php:708
404
+ msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, PEN, VEF."
405
+ msgstr "no es soportada. Las monedas soportadas son: ARS, BRL, CLP, COP, MXN, PEN, VEF."
406
 
407
+ #: mercadopago/mercadopago-custom-gateway.php:797
408
+ msgid "Peru"
409
+ msgstr "Perú"
410
+
411
+ #: mercadopago/mercadopago-custom-gateway.php:809
412
+ msgid "Click to check your order"
413
+ msgstr "Haga clic para comprobar su pedido"
414
+
415
+ #: mercadopago/mercadopago-custom-gateway.php:814 mercadopago/mercadopago-gateway.php:457
416
+ msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
417
+ msgstr "Se ha producido un error en el procesamiento de su pago. Por favor, inténtelo de nuevo o póngase en contacto con nosotros para Asistencia."
418
+
419
+ #: mercadopago/mercadopago-custom-gateway.php:816
420
+ msgid "Reason is: "
421
+ msgstr "La razón es:"
422
+
423
+ #: mercadopago/mercadopago-custom-gateway.php:849 mercadopago/mercadopago-gateway.php:748
424
  msgid "Mercado Pago Request Failure"
425
  msgstr "La solicitud de Mercado Pago ha fallado."
426
 
427
+ #: mercadopago/mercadopago-custom-gateway.php:918 mercadopago/mercadopago-gateway.php:822
 
 
 
 
428
  msgid "Payer email"
429
  msgstr "Email del comprador"
430
 
431
+ #: mercadopago/mercadopago-custom-gateway.php:926 mercadopago/mercadopago-gateway.php:829
432
  msgid "Payment type"
433
+ msgstr "Medio de pago"
434
 
435
+ #: mercadopago/mercadopago-custom-gateway.php:934 mercadopago/mercadopago-gateway.php:841
436
+ msgid "Mercado Pago Payment ID"
437
+ msgstr "ID de pago de Mercado Pago"
438
 
439
+ #: mercadopago/mercadopago-custom-gateway.php:950 mercadopago/mercadopago-gateway.php:875
440
  msgid "Customer haven't paid yet."
441
  msgstr "El cliente todavía no efectuó el pago."
442
 
443
+ #: mercadopago/mercadopago-custom-gateway.php:957 mercadopago/mercadopago-gateway.php:881
444
  msgid "Payment under review."
445
  msgstr "El pago está pendiente de revisión."
446
 
447
+ #: mercadopago/mercadopago-custom-gateway.php:964 mercadopago/mercadopago-gateway.php:887
448
  msgid "The payment was refused. The customer can try again."
449
  msgstr "El pago fue rechazado. El cliente puede intentar nuevamente."
450
 
451
+ #: mercadopago/mercadopago-custom-gateway.php:971 mercadopago/mercadopago-gateway.php:893
452
  msgid "The payment was refunded to the customer."
453
  msgstr "El pago fue devuelto al cliente."
454
 
455
+ #: mercadopago/mercadopago-custom-gateway.php:978 mercadopago/mercadopago-gateway.php:899
456
  msgid "The payment was cancelled."
457
  msgstr "El pago fue cancelado."
458
 
459
+ #: mercadopago/mercadopago-custom-gateway.php:984 mercadopago/mercadopago-custom-gateway.php:990 mercadopago/mercadopago-gateway.php:904
460
+ #: mercadopago/mercadopago-gateway.php:909
 
 
 
461
  msgid "The payment is under mediation or it was charged-back."
462
  msgstr "El pago esta en mediación o la compra fue desconocida por el cliente."
463
+
464
+ #: mercadopago/mercadopago-gateway.php:51
465
+ msgid "Mercado Pago - Basic Checkout"
466
+ msgstr "Mercado Pago - Checkout Básico"
467
+
468
+ #: mercadopago/mercadopago-gateway.php:148
469
+ msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
470
+ msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
471
+
472
+ #: mercadopago/mercadopago-gateway.php:158 mercadopago/mercadopago-gateway.php:167
473
+ msgid "Configure your Client_id and Client_secret to have access to more options."
474
+ msgstr "Configure su Client_id y Client_secret para tener acceso a más opciones."
475
+
476
+ #: mercadopago/mercadopago-gateway.php:184 mercadopago/mercadopago-gateway.php:192 mercadopago/mercadopago-gateway.php:202
477
+ msgid "This field should be an integer."
478
+ msgstr "Este campo debe ser un número."
479
+
480
+ #: mercadopago/mercadopago-gateway.php:187
481
+ msgid "If your integration method is iFrame, please inform the payment iFrame width."
482
+ msgstr "Si su modo de apertura es iFrame, indique el ancho del iFrame."
483
+
484
+ #: mercadopago/mercadopago-gateway.php:195
485
+ msgid "If your integration method is iFrame, please inform the payment iFrame height."
486
+ msgstr "Si su modo de apertura es iFrame, indique el alto del iFrame."
487
+
488
+ #: mercadopago/mercadopago-gateway.php:205
489
+ msgid "Select the max number of installments for your customers."
490
+ msgstr "Seleccione el número máximo de cuotas disponibles para sus clientes."
491
+
492
+ #: mercadopago/mercadopago-gateway.php:213
493
+ msgid "Enable Basic Checkout"
494
+ msgstr "Habilitar el Checkout Básico"
495
+
496
+ #: mercadopago/mercadopago-gateway.php:224
497
+ msgid "Insert your Mercado Pago Client_id."
498
+ msgstr "Inserte su Client_id de Mercado Pago."
499
+
500
+ #: mercadopago/mercadopago-gateway.php:231
501
+ msgid "Insert your Mercado Pago Client_secret."
502
+ msgstr "Inserte su Client_secret de Mercado Pago."
503
+
504
+ #: mercadopago/mercadopago-gateway.php:270
505
+ msgid "Integration Method"
506
+ msgstr "Método de integración"
507
+
508
+ #: mercadopago/mercadopago-gateway.php:272
509
+ msgid ""
510
+ "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an "
511
+ "internal window is embedded to the page layout)."
512
+ msgstr ""
513
+ "Seleccione la forma en que sus clientes deben interactuar con Mercado Pago. Ventana Modal (Dentro de su tienda), Redireccionamiento (El cliente es "
514
+ "redireccionado a Mercado Pago), o iFrame (Ventana de pago incorporada a su página)."
515
+
516
+ #: mercadopago/mercadopago-gateway.php:275
517
+ msgid "iFrame"
518
+ msgstr "iFrame"
519
+
520
+ #: mercadopago/mercadopago-gateway.php:276
521
+ msgid "Modal Window"
522
+ msgstr "Ventana modal"
523
+
524
+ #: mercadopago/mercadopago-gateway.php:277
525
+ msgid "Redirect"
526
+ msgstr "Redireccionamiento"
527
+
528
+ #: mercadopago/mercadopago-gateway.php:281
529
+ msgid "iFrame Width"
530
+ msgstr "Ancho del iFrame"
531
+
532
+ #: mercadopago/mercadopago-gateway.php:287
533
+ msgid "iFrame Height"
534
+ msgstr "Alto del iFrame"
535
+
536
+ #: mercadopago/mercadopago-gateway.php:293
537
+ msgid "Auto Return"
538
+ msgstr "Redirección automática"
539
+
540
+ #: mercadopago/mercadopago-gateway.php:295
541
+ msgid "Automatic Return After Payment"
542
+ msgstr "Redirección Automática luego del pago"
543
+
544
+ #: mercadopago/mercadopago-gateway.php:297
545
+ msgid "After the payment, client is automatically redirected."
546
+ msgstr "Después del pago, el cliente será redireccionado automáticamente."
547
+
548
+ #: mercadopago/mercadopago-gateway.php:300
549
+ msgid "Payment Options"
550
+ msgstr "Opciones de Pago"
551
+
552
+ #: mercadopago/mercadopago-gateway.php:305
553
+ msgid "Max installments"
554
+ msgstr "Número máximo de cuotas"
555
+
556
+ #: mercadopago/mercadopago-gateway.php:311
557
+ msgid "Exclude Payment Methods"
558
+ msgstr "Excluir medios de pago"
559
+
560
+ #: mercadopago/mercadopago-gateway.php:428
561
+ msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
562
+ msgstr "Gracias por su compra. Por favor, prosiga a la página de pago haciendo click en el botón de abajo."
563
+
564
+ #: mercadopago/mercadopago-gateway.php:436
565
+ msgid "Cancel order &amp; Clear cart"
566
+ msgstr "Cancelar &amp; Limpiar carrito"
567
+
568
+ #: mercadopago/mercadopago-gateway.php:446
569
+ msgid "Thank you for your order. Proceed with your payment completing the following information."
570
+ msgstr "Gracias por su compra. Prosiga con su pago completando la información abajo."
571
+
572
+ #: mercadopago/mercadopago-gateway.php:697
573
+ msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
574
+ msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
575
+
576
+ msgid " as it appears in your card ..."
577
+ msgstr " tal como aparece en su tarjeta ..."
578
+
579
+ msgid "Done, your payment was accredited!"
580
+ msgstr "Listo, su pago ha sido aceptado!"
581
+
582
+ msgid "We are processing the payment. In less than an hour we will e-mail you the results."
583
+ msgstr "Estamos procesando su pago. En menos de una hora le enviaremos el resultado por correo electrónico."
584
+
585
+ msgid "We are processing the payment. In less than 2 business days we will tell you by e-mail whether it has accredited or we need more information."
586
+ msgstr "Estamos procesando su pago. En menos de 2 días le enviaremos por correo electrónico si se ha aprobado el pago o si se necesita información adicional."
587
+
588
+ msgid "Check the card number."
589
+ msgstr "Compruebe el número de tarjeta."
590
+
591
+ msgid "Check the expiration date."
592
+ msgstr "Compruebe la fecha de expiración."
593
+
594
+ msgid "Check the information."
595
+ msgstr "Compruebe la información informada."
596
+
597
+ msgid "Check the security code."
598
+ msgstr "Compruebe el código de seguridad informado."
599
+
600
+ msgid "We could not process your payment."
601
+ msgstr "No se puede procesar su pago."
602
+
603
+ msgid "You must authorize the payment of your orders."
604
+ msgstr "Usted debe autorizar los pagos de sus órdenes."
605
+
606
+ msgid "Call your card issuer to activate your card. The phone is on the back of your card."
607
+ msgstr "Póngase en contacto con el emisor de su tarjeta para activarla. El teléfono se encuentra en la parte posterior de su tarjeta."
608
+
609
+ msgid "You already made a payment for that amount. If you need to repay, use another card or other payment method."
610
+ msgstr "Usted ya realizó un pago de este importe. Si tiene que pagar de nuevo, utilizar otra tarjeta u otro medio de pago."
611
+
612
+ msgid "Your payment was rejected. Choose another payment method. We recommend cash."
613
+ msgstr "Su pago fue rechazado. Por favor seleccione otro medio de pago. Se recomienda en efectivo."
614
+
615
+ msgid "Your payment do not have sufficient funds."
616
+ msgstr "Su pago no tiene fondos suficientes."
617
+
618
+ msgid "Your payment does not process payments with selected installments."
619
+ msgstr "El pago no puede procesar la cuota seleccionada."
620
+
621
+ msgid "You have reached the limit of allowed attempts. Choose another card or another payment method."
622
+ msgstr "Has alcanzado el límite de intentos permitidos. Elija otra tarjeta u otro medio de pago."
623
+
624
+ msgid "This payment method did not process the payment."
625
+ msgstr "Esta medio de pago no puede procesar su pago."
626
+
627
+ msgid "Mercado Pago - Ticket"
628
+ msgstr "Mercado Pago - Ticket"
629
+
630
+ msgid "Mercado Pago - Credit Card"
631
+ msgstr "Mercado Pago - Tarjeta de Crédito"
632
+
633
+ msgid "Ticket Options"
634
+ msgstr "Opciones de Ticket"
635
+
636
+ msgid "Enable Ticket Payment Method"
637
+ msgstr "Habilitar Pago con Ticket"
638
+
639
+ msgid "Other Bank"
640
+ msgstr "Otro Banco"
641
+
642
+ msgid "Choose"
643
+ msgstr "Escoger"
644
+
645
+ msgid "A problem was occurred when processing your payment. Please, try again."
646
+ msgstr "Un problema se produjo al procesar su pago. Por favor, inténtelo de nuevo."
647
+
648
+ msgid "Thank you for your order. Please, pay the ticket to get your order approved."
649
+ msgstr "Gracias por su orden. Por favor, realice el pago del ticket para tener su orden aprobada."
650
+
651
+ msgid "Waiting for the ticket payment."
652
+ msgstr "Esperando el pago del ticket."
653
+
654
+ msgid "Print the Ticket"
655
+ msgstr "Imprimir el ticket"
656
+
657
+ msgid "To reprint the ticket click "
658
+ msgstr "Para imprimir nuevamente el ticket hace clic "
659
+
660
+ msgid "here"
661
+ msgstr "aquí"
662
+
663
+ msgid "Custom Checkout is Inactive"
664
+ msgstr "Checkout Personalizado Inactivo"
665
+
666
+ msgid "Basic Checkout is Inactive"
667
+ msgstr "Checkout Básico Inactivo"
668
+
669
+ msgid "Ticket is Inactive"
670
+ msgstr "Ticket Inactivo"
671
+
672
+ msgid "Please, select the ticket issuer of your preference."
673
+ msgstr "Por favor, seleccione el emisor de su elección."
674
+
675
+ msgid "Click "Place order" button. The ticket will be generated and you will be redirected to print it."
676
+ msgstr "Haga clic en el botón "Realizar el pedido". El ticket será generado y usted será redirigido a imprimirlo."
677
+
678
+ msgid "Important: The order will be confirmed only after the payment approval."
679
+ msgstr "Importante: La solicitud sólo será confirmada después de la aprobación del pago."
680
+
681
+ msgid "Your Mercado Pago credential Access Token appears to be misconfigured."
682
+ msgstr "Su credencial Access Token de Mercado de Pago parece estar desconfigurada."
683
+
684
+ msgid "Your Card"
685
+ msgstr "Sus Tarjetas"
686
+
687
+ msgid "Other Cards"
688
+ msgstr "Otras Tarjetas"
689
+
690
+ msgid "Other Card"
691
+ msgstr "Otra Tarjeta"
692
+
693
+ msgid "ended in"
694
+ msgstr "terminado en"
695
+
696
+ msgid "Your site appears to not have SSL certification. SSL is a pre-requisite because the payment process is made in your server."
697
+ msgstr "Su sitio parece no tener certificación SSL. SSL es un requisito para transaccionar desde su servidor."
698
+
699
+ msgid "ATTENTION: The currency"
700
+ msgstr "ATENCIÓN: La moneda"
701
+
702
+ msgid "defined in WooCommerce is different from the one used in your credentials country.<br>The currency for transactions in this payment method will be"
703
+ msgstr "que se define en WooCommerce es diferente de la utilizada en el país de sus credenciales.<br>La moneda para las transacciones realizadas por este medio de pago será"
704
+
705
+ msgid "Currency conversions should be made outside this module."
706
+ msgstr "Conversiones de monedas deben hacerse fuera de este módulo."
707
+
708
+ msgid "Coupons"
709
+ msgstr "Cupones"
710
+
711
+ msgid "Enable coupons of discounts"
712
+ msgstr "Activar los cupones de descuento"
713
+
714
+ msgid "If there is a Mercado Pago campaign, allow your store to give discounts to customers."
715
+ msgstr "Si hay una campaña de Mercado Pago, permitir a su tienda hacer descuentos para los clientes."
716
+
717
+ msgid "You will save"
718
+ msgstr "Usted ahorrará"
719
+
720
+ msgid "Apply"
721
+ msgstr "Aplicar"
722
+
723
+ msgid "Remove"
724
+ msgstr "Eliminar"
725
+
726
+ msgid "Please, inform your coupon code"
727
+ msgstr "Por favor, introduzca el código de su cupón"
728
+
729
+ msgid "Please, inform your email in billing address to use this feature"
730
+ msgstr "Por favor, introduzca su email en la dirección de facturación para utilizar este servicio"
731
+
732
+ msgid "Discount for %s coupon"
733
+ msgstr "Descuento para el cupón %s"
734
+
735
+ msgid "Discount provided by store"
736
+ msgstr "Descuento dado por la tienda"
737
+
738
+ msgid "Discount Coupon"
739
+ msgstr "Cupón de Descuento"
740
+
741
+ msgid "CURRENCY CONVERTED: The currency conversion ratio from"
742
+ msgstr "MONEDA CONVERTIDA: La tasa de conversión de moneda de"
743
+
744
+ msgid "ERROR: It was not possible to convert the unsupported currency"
745
+ msgstr "ERROR: No fue posible convertir la moneda no soportada"
746
+
747
+ msgid "to"
748
+ msgstr "para"
749
+
750
+ msgid "If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio."
751
+ msgstr "Si la moneda utilizada en WooCommerce es diferente o no soportada por Mercado Pago, convierte los importes de sus transacciones con la tasa de conversión de Mercado Pago."
752
+
753
+ msgid " is: "
754
+ msgstr " es: "
755
+
756
+ msgid "Currency Conversion"
757
+ msgstr "Conversión de Moneda"
758
+
759
+ msgid "with discount from"
760
+ msgstr "con descuento de"
761
+
762
+ msgid "Total of your purchase:"
763
+ msgstr "Total de su compra:"
764
+
765
+ msgid "Total of your purchase with discount:"
766
+ msgstr "Total de su compra con descuento:"
767
+
768
+ msgid "*Uppon payment approval"
769
+ msgstr "*Con la aprobación de pago"
770
+
771
+ msgid "Terms and Conditions of Use"
772
+ msgstr "Términos y Condiciones de Uso"
773
+
774
+ msgid "Payment converted from"
775
+ msgstr "Pago convertido de"
776
+
777
+ msgid "Rate Us"
778
+ msgstr "Calificar"
779
+
780
+ msgid "Report Issue"
781
+ msgstr "Informar Problema"
782
+
783
+ msgid "Two Cards Mode"
784
+ msgstr "Modo de Dos Tarjetas"
785
+
786
+ msgid "Payments with Two Cards"
787
+ msgstr "Pagos con Dos Tarjetas"
788
+
789
+ msgid "Your customer will be able to use two different cards to pay the order."
790
+ msgstr "Su cliente será capaz de utilizar dos tarjetas diferentes para pagar el pedido."
791
+
792
+ msgid "Your Mercado Pago credentials Access Token appears to be misconfigured."
793
+ msgstr "La credencial Mercado Pago Access Token parece estar mal configurada."
794
+
795
+ msgid "Cancel Order"
796
+ msgstr "Cancelar la Compra"
797
+
798
+ msgid "Refund Order"
799
+ msgstr "Reembolso de Compra"
800
+
801
+ msgid "Back URL Options"
802
+ msgstr "Opciones de URL de Callback"
803
+
804
+ msgid "Sucess URL"
805
+ msgstr "URL de Éxito"
806
+
807
+ msgid "Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page."
808
+ msgstr "Donde los clientes serán redirigidos después de una compra exitosa. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
809
+
810
+ msgid "Failure URL"
811
+ msgstr "URL de Pago Rechazado"
812
+
813
+ msgid "Where customers should be redirected after a failed purchase. Let blank to redirect to the default store order resume page."
814
+ msgstr "Donde los clientes serán redirigidos después de una compra rechazada. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
815
+
816
+ msgid "Pending URL"
817
+ msgstr "URL de Pago Pendiente"
818
+
819
+ msgid "Where customers should be redirected after a pending purchase. Let blank to redirect to the default store order resume page."
820
+ msgstr "Donde los clientes ​serán redirigidos después de una compra pendiente. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
821
+
822
+ msgid "Stock Reduce"
823
+ msgstr "Reducir Inventario"
824
+
825
+ msgid "Reduce Stock in Order Generation"
826
+ msgstr "Reducir Inventario en la Orden"
827
+
828
+ msgid "Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval."
829
+ msgstr "Activar esta opción para reducir el inventario mediante la creación de un pedido. Desactivar para reducir sólo <strong>después</strong> de la aprobación del pago."
830
+
831
+ msgid "Recurrent Product"
832
+ msgstr "Producto Recurrente"
833
+
834
+ msgid "Frequency"
835
+ msgstr "Frecuencia"
836
+
837
+ msgid "Amount of time (in days or months) for the execution of the next payment."
838
+ msgstr "Cantidad de tiempo (en días o meses) para la ejecución del próximo pago."
839
+
840
+ msgid "Start date"
841
+ msgstr "Fecha de inicio"
842
+
843
+ msgid "First payment date (effective debit). Defaults to now if blank."
844
+ msgstr "Primera fecha de pago (débito efectivo). De forma predeterminada ahora, si está en blanco."
845
+
846
+ msgid "End date"
847
+ msgstr "Fecha final"
848
+
849
+ msgid "Deadline to generate new charges. Defaults to never if blank."
850
+ msgstr "Fecha límite para generar nuevos cargos. De forma predeterminada como nunca, si está en blanco."
851
+
852
+ msgid "Days"
853
+ msgstr "Días"
854
+
855
+ msgid "Months"
856
+ msgstr "Meses"
857
+
858
+ msgid "Indicates the period of time."
859
+ msgstr "Indica el período de tiempo."
860
+
861
+ msgid "The amount to charge the payer each period. Should be informed including taxes and discounts."
862
+ msgstr "La cantidad para cobrar el pagador en cada período. Debe ser informada incluyendo impuestos y descuentos."
863
+
864
+ msgid "Amount charged"
865
+ msgstr "Cantidad de cobro"
866
+
867
+ msgid "Uruguay"
868
+ msgstr "Uruguay"
869
+
870
+ msgid "Frequency type"
871
+ msgstr "Tipo de frecuencia"
872
+
873
+ msgid "Transaction amount"
874
+ msgstr "Valor de la transacción"
875
+
876
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
877
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
878
+
879
+ msgid "Subscription"
880
+ msgstr "Suscripción"
881
+
882
+ msgid "Enable Subscription"
883
+ msgstr "Habilitar Suscripción"
884
+
885
+ msgid "Subscription is Inactive"
886
+ msgstr "La Suscripción está Inactiva"
887
+
888
+ msgid "Subscribe with Mercado Pago"
889
+ msgstr "Suscribirse con Mercado Pago"
890
+
891
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
892
+ msgstr "Para esta solución, usted debe configurar su URL de IPN. Puede acceder a ella en su cuenta para su específico país en:"
893
+
894
+ msgid "Discount by Gateway"
895
+ msgstr "Descuento por Gateway"
896
+
897
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
898
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
899
+
900
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
901
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
902
+
903
+ msgid "Discount Of"
904
+ msgstr "Descuento de"
905
+
906
+ msgid "Mercado Pago Subscription"
907
+ msgstr "Suscripción Mercado Pago"
908
+
909
+ msgid "Payment ID:"
910
+ msgstr "ID de Pago:"
911
+
912
+ msgid "Amount:"
913
+ msgstr "Cantidad:"
914
+
915
+ msgid "This operation could not be completed."
916
+ msgstr "Esta operación no se puede completar."
917
+
918
+ msgid "Operation successfully completed."
919
+ msgstr "La operación se realizó con éxito."
920
+
921
+ msgid "Refund Payment"
922
+ msgstr "Reembolso de Pago"
923
+
924
+ msgid "Cancel Payment"
925
+ msgstr "Cancelar Pago"
926
+
927
+ msgid "Mercado Pago - Subscription"
928
+ msgstr "Mercado Pago - Suscripcións"
929
+
930
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
931
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
932
+
933
+ msgid "Free Shipping"
934
+ msgstr "Envío Gratuito"
935
+
936
+ msgid "Day"
937
+ msgstr "Día"
938
+
939
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
940
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
941
+
942
+ msgid "Mercado Envios"
943
+ msgstr "Mercado Envios"
944
+
945
+ msgid "This controls the title which the user sees during checkout."
946
+ msgstr "Controla el título que se muestra al cliente durante el pago."
947
+
948
+ msgid "Enable free shipping for this shipping method"
949
+ msgstr "Habilitar el envío gratuito para este método de envío"
950
+
951
+ msgid "Delivery Time"
952
+ msgstr "Tiempo de Entrega"
953
+
954
+ msgid "Show estimated delivery time"
955
+ msgstr "Mostrar el tiempo estimado de entrega"
956
+
957
+ msgid "Display the estimated delivery time in working days."
958
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
959
+
960
+ msgid "Buyer initiates complaint and requested a refund."
961
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
962
+
963
+ msgid "In return to sender"
964
+ msgstr "Volviendo al remitente"
965
+
966
+ msgid "Missing recipient for delivery"
967
+ msgstr "Destinatario ausente para envío"
968
+
969
+ msgid "Delayed shipping"
970
+ msgstr "Envío retrasado"
971
+
972
+ msgid "Unsuccessful"
973
+ msgstr "Fracasado"
974
+
975
+ msgid "Tag printed"
976
+ msgstr "Etiqueta impresa"
977
+
978
+ msgid "Tag ready to print"
979
+ msgstr "Etiquetar lista para imprimir"
980
+
981
+ msgid "Tracking code:"
982
+ msgstr "Código de rastreamiento:"
983
+
984
+ msgid "Tag:"
985
+ msgstr "Etiqueta:"
986
+
987
+ msgid "Shipping is pending"
988
+ msgstr "Envío pendiente"
989
+
990
+ msgid "Tutorial"
991
+ msgstr "Tutorial"
992
+
993
+ msgid "Discount Of "
994
+ msgstr "Descuento De "
995
+
996
+ msgid "Make this product a subscription."
997
+ msgstr "Hacer deste producto una suscripción."
998
+
999
+ msgid "Order"
1000
+ msgstr "Pedido"
1001
+
1002
+ msgid "Mercado Envios Tracking ID"
1003
+ msgstr "Código de rastreamiento de Mercado Envíos"
1004
+
1005
+ msgid "Hello,"
1006
+ msgstr "Hola,"
1007
+
1008
+ msgid "Your order"
1009
+ msgstr "Su pedido"
1010
+
1011
+ msgid "made in"
1012
+ msgstr "hecho en"
1013
+
1014
+ msgid "used Mercado Envios as its shipment method."
1015
+ msgstr "utilizó el Mercado Envíos como su medio de envío."
1016
+
1017
+ msgid "You can track it with the following Tracking ID:"
1018
+ msgstr "Usted puedes rastrearlo con lo siguiente código de rastreamiento:"
1019
+
1020
+ msgid "Best regards."
1021
+ msgstr "Saludos."
1022
+
1023
+ msgid "SELECT..."
1024
+ msgstr "SELECCIONE..."
1025
+
1026
+ msgid "NAME"
1027
+ msgstr "NOMBRE"
1028
+
1029
+ msgid "SURNAME"
1030
+ msgstr "APELLIDO"
1031
+
1032
+ msgid "DOCUMENT"
1033
+ msgstr "DOCUMENTO"
1034
+
1035
+ msgid "ADDRESS"
1036
+ msgstr "DIRECCIÓN"
1037
+
1038
+ msgid "NUMBER"
1039
+ msgstr "NÚMERO"
1040
+
1041
+ msgid "CITY"
1042
+ msgstr "CIUDAD"
1043
+
1044
+ msgid "STATE"
1045
+ msgstr "ESTADO"
1046
+
1047
+ msgid "ZIP"
1048
+ msgstr "CÓDIGO POSTAL"
1049
+
1050
+ msgid "You must inform you NAME"
1051
+ msgstr "Obligatorio informar su NOMBRE"
1052
+
1053
+ msgid "You must inform your SURNAME"
1054
+ msgstr "Obligatorio informar su APELLIDO"
1055
+
1056
+ msgid "You must inform your DOCUMENT"
1057
+ msgstr "Obligatorio informar su DOCUMENTO"
1058
+
1059
+ msgid "You must inform your ADDRESS"
1060
+ msgstr "Obligatorio informar su DIRECCIÓN"
1061
+
1062
+ msgid "You must inform your ADDRESS NUMBER"
1063
+ msgstr "Obligatorio informar su NÚMERO"
1064
+
1065
+ msgid "You must inform your CITY"
1066
+ msgstr "Obligatorio informar su CIUDAD"
1067
+
1068
+ msgid "You must inform your STATE"
1069
+ msgstr "Obligatorio informar su ESTADO"
1070
+
1071
+ msgid "You must inform your ZIP"
1072
+ msgstr "Obligatorio informar su CÓDIGO POSTAL"
1073
+
1074
+ msgid "Your PHP version is OK."
1075
+ msgstr "Su versión de PHP está bien."
1076
+
1077
+ msgid "Your PHP version do not support this module. You have %s, minimal required is %s."
1078
+ msgstr "Su versión de PHP no soporta este módulo. Tienes %s, la mínima requerida es %s."
1079
+
1080
+ msgid "cURL is installed."
1081
+ msgstr "cURL está instalado."
1082
+
1083
+ msgid "cURL is not installed."
1084
+ msgstr "cURL no está instalado."
1085
+
1086
+ msgid "SSL is missing in your site."
1087
+ msgstr "Falta el SSL en su sitio."
1088
+
1089
+ msgid "Your site has SSL enabled."
1090
+ msgstr "Su sitio tiene SSL habilitado."
1091
+
1092
+ msgid "Fisical Person"
1093
+ msgstr "Persona Física"
1094
+
1095
+ msgid "Legal Person"
1096
+ msgstr "Persona Jurídica"
1097
+
1098
+ msgid "SOCIAL NAME"
1099
+ msgstr "RAZÓN SOCIAL"
1100
+
1101
+ msgid "CNPJ"
1102
+ msgstr "CNPJ"
languages/woocommerce-mercadopago-module-es_CO.mo CHANGED
Binary file
languages/woocommerce-mercadopago-module-es_CO.po CHANGED
@@ -4,9 +4,9 @@
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
- "POT-Creation-Date: 2016-03-04 20:48-0300\n"
8
  "PO-Revision-Date: \n"
9
- "Language-Team: Your Team <translations@example.com>\n"
10
  "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -14,342 +14,1089 @@ msgstr ""
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
18
- "X-Poedit-Basepath: ..\n"
 
19
  "X-Generator: Poedit 1.8.7\n"
20
  "Last-Translator: \n"
21
- "Language: es_AR\n"
22
  "X-Poedit-SearchPath-0: .\n"
23
 
24
  #. Description of the plugin/theme
25
  msgid "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."
26
- msgstr "Este es el módulo <strong>oficial</strong> de Mercado Pago para el plugin WooCommerce. Este módulo habilita el uso de Mercado Pago en WooCommerce como método de pago para compras realizadas en su tienda virtual."
27
 
28
- #: mercadopago-module.php:66
29
  #, php-format
30
  msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
31
  msgstr "Woo Mercado Pago Module depende de la última versión de %s para ejecutarse!"
32
 
33
- #: mercadopago/mercadopago-gateway.php:63
 
 
 
 
 
 
 
 
 
 
 
 
34
  msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
35
- msgstr "Este módulo habilita el uso de Mercado Pago en WooCommerce como método de pago para compras realizadas en su tienda virtual."
36
 
37
- #: mercadopago/mercadopago-gateway.php:133
 
38
  msgid "Argentine"
39
  msgstr "Argentina"
40
 
41
- #: mercadopago/mercadopago-gateway.php:134
 
42
  msgid "Brazil"
43
  msgstr "Brasil"
44
 
45
- #: mercadopago/mercadopago-gateway.php:135
 
46
  msgid "Chile"
47
  msgstr "Chile"
48
 
49
- #: mercadopago/mercadopago-gateway.php:136
 
50
  msgid "Colombia"
51
  msgstr "Colombia"
52
 
53
- #: mercadopago/mercadopago-gateway.php:137
 
54
  msgid "Mexico"
55
  msgstr "México"
56
 
57
- #: mercadopago/mercadopago-gateway.php:138
58
  msgid "or"
59
  msgstr "o"
60
 
61
- #: mercadopago/mercadopago-gateway.php:139
 
62
  msgid "Venezuela"
63
  msgstr "Venezuela"
64
 
65
- #: mercadopago/mercadopago-gateway.php:154
66
- msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
67
- msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
68
-
69
- #: mercadopago/mercadopago-gateway.php:157
70
  msgid "Your credentials are <strong>valid</strong> for"
71
  msgstr "Sus credenciales <strong>son válidas</strong> para"
72
 
73
- #: mercadopago/mercadopago-gateway.php:164
74
- #: mercadopago/mercadopago-gateway.php:173
75
- msgid "Configure your Client_id and Client_secret to have access to more options."
76
- msgstr "Configure su Client_id y Client_secret para tener acceso a más opciones."
77
-
78
- #: mercadopago/mercadopago-gateway.php:167
79
- #: mercadopago/mercadopago-gateway.php:176
80
  msgid "Your credentials are <strong>not valid</strong>!"
81
  msgstr "Sus credenciales <strong>no son válidas</strong>!"
82
 
83
- #: mercadopago/mercadopago-gateway.php:190
84
- #: mercadopago/mercadopago-gateway.php:198
85
- #: mercadopago/mercadopago-gateway.php:208
86
- msgid "This field should be an integer."
87
- msgstr "Este campo debe ser un número."
88
-
89
- #: mercadopago/mercadopago-gateway.php:193
90
- msgid "If your integration method is iFrame, please inform the payment iFrame width."
91
- msgstr "Si su modo de apertura es iFrame, indique el ancho del iFrame."
92
-
93
- #: mercadopago/mercadopago-gateway.php:201
94
- msgid "If your integration method is iFrame, please inform the payment iFrame height."
95
- msgstr "Si su modo de apertura es iFrame, indique el alto del iFrame."
96
-
97
- #: mercadopago/mercadopago-gateway.php:211
98
- msgid "Select the max number of installments for your customers."
99
- msgstr "Seleccione el número máximo de cuotas posibles para sus clientes."
100
-
101
- #: mercadopago/mercadopago-gateway.php:217
102
  msgid "Enable/Disable"
103
  msgstr "Habilitar/Deshabilitar"
104
 
105
- #: mercadopago/mercadopago-gateway.php:219
106
- msgid "Enable Mercado Pago Module"
107
- msgstr "Habilitar Mercado Pago"
108
 
109
- #: mercadopago/mercadopago-gateway.php:223
110
  msgid "Mercado Pago Credentials"
111
  msgstr "Credenciales de Mercado Pago"
112
 
113
- #: mercadopago/mercadopago-gateway.php:225
114
  msgid "You can obtain your credentials for"
115
  msgstr "Puedes obtener tus credenciales para"
116
 
117
- #: mercadopago/mercadopago-gateway.php:228
118
- msgid "Mercado Pago Client_id"
119
- msgstr "Client_id de Mercado Pago"
120
-
121
- #: mercadopago/mercadopago-gateway.php:230
122
- msgid "Insert your Mercado Pago Client_id."
123
- msgstr "Inserte su Client_id de Mercado Pago."
124
-
125
- #: mercadopago/mercadopago-gateway.php:235
126
- msgid "Mercado Pago Client_secret"
127
- msgstr "Client_secret de Mercado Pago"
128
 
129
- #: mercadopago/mercadopago-gateway.php:237
130
- msgid "Insert your Mercado Pago Client_secret."
131
- msgstr "Inserte su Client_secret de Mercado Pago."
132
 
133
- #: mercadopago/mercadopago-gateway.php:242
134
  msgid "Instant Payment Notification (IPN) URL"
135
  msgstr "URL da Notificación Instantanea de Pago (IPN)"
136
 
137
- #: mercadopago/mercadopago-gateway.php:244
138
  msgid "Your IPN URL to receive instant payment notifications is"
139
  msgstr "Su URL de IPN para recibir notificaciones instantáneas de pago es"
140
 
141
- #: mercadopago/mercadopago-gateway.php:247
142
  msgid "Checkout Options"
143
  msgstr "Opciones de Checkout"
144
 
145
- #: mercadopago/mercadopago-gateway.php:252
146
  msgid "Title"
147
  msgstr "Título"
148
 
149
- #: mercadopago/mercadopago-gateway.php:254
150
  msgid "Title shown to the client in the checkout."
151
  msgstr "Título mostrado al cliente en el checkout."
152
 
153
- #: mercadopago/mercadopago-gateway.php:258
 
 
 
 
154
  msgid "Description"
155
  msgstr "Descripción"
156
 
157
- #: mercadopago/mercadopago-gateway.php:260
158
  msgid "Description shown to the client in the checkout."
159
  msgstr "Descripción mostrada al cliente en el checkout."
160
 
161
- #: mercadopago/mercadopago-gateway.php:261
162
- #: mercadopago/mercadopago-gateway.php:406
163
  msgid "Pay with Mercado Pago"
164
  msgstr "Pagar con Mercado Pago"
165
 
166
- #: mercadopago/mercadopago-gateway.php:264
167
- msgid "Store Category"
168
- msgstr "Categoría de la tienda"
169
 
170
- #: mercadopago/mercadopago-gateway.php:266
171
- msgid "Define which type of products your store sells."
172
- msgstr "Defina el tipo de productos que su tienda vende."
173
 
174
- #: mercadopago/mercadopago-gateway.php:270
175
- msgid "Store Identificator"
176
- msgstr "Identificador de la tienda"
177
 
178
- #: mercadopago/mercadopago-gateway.php:272
179
- msgid "Please, inform a prefix to your store."
180
- msgstr "Por favor, informe un prefijo para su tienda."
181
 
182
- #: mercadopago/mercadopago-gateway.php:272
183
- msgid "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same identificators."
184
- msgstr "Si esta utilizando su cuenta Mercado Pago para múltiples tiendas, asegúrese que este prefijo sea único para no generar pedidos con el mismo identificador."
185
 
186
- #: mercadopago/mercadopago-gateway.php:276
187
- msgid "Integration Method"
188
- msgstr "Método de integración"
189
-
190
- #: mercadopago/mercadopago-gateway.php:278
191
- msgid "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an internal window is embedded to the page layout)."
192
- msgstr "Ventana Modal (Dentro de su tienda), Redireccionamiento (El cliente es redireccionado a Mercado Pago), o iFrame (Ventana de pago incorporada a su página)."
193
-
194
- #: mercadopago/mercadopago-gateway.php:281
195
- msgid "iFrame"
196
- msgstr "iFrame"
197
 
198
- #: mercadopago/mercadopago-gateway.php:282
199
- msgid "Modal Window"
200
- msgstr "Ventana modal"
201
 
202
- #: mercadopago/mercadopago-gateway.php:283
203
- msgid "Redirect"
204
- msgstr "Redireccionamiento"
205
 
206
- #: mercadopago/mercadopago-gateway.php:287
207
- msgid "iFrame Width"
208
- msgstr "Ancho del iFrame"
209
-
210
- #: mercadopago/mercadopago-gateway.php:293
211
- msgid "iFrame Height"
212
- msgstr "Alto del iFrame"
213
-
214
- #: mercadopago/mercadopago-gateway.php:299
215
- msgid "Auto Return"
216
- msgstr "Redirección automática"
217
-
218
- #: mercadopago/mercadopago-gateway.php:301
219
- msgid "Automatic Return After Payment"
220
- msgstr "Redirección Automática Luego del Pago"
221
 
222
- #: mercadopago/mercadopago-gateway.php:303
223
- msgid "After the payment, client is automatically redirected."
224
- msgstr "Después del pago, el cliente será redireccionado automáticamente."
225
 
226
- #: mercadopago/mercadopago-gateway.php:306
227
- msgid "Payment Options"
228
- msgstr "Opciones de Pago"
229
 
230
- #: mercadopago/mercadopago-gateway.php:311
231
- msgid "Max installments"
232
- msgstr "Número máximo de cuotas"
233
 
234
- #: mercadopago/mercadopago-gateway.php:317
235
- msgid "Exclude Payment Methods"
236
- msgstr "Excluir métodos de pago"
 
 
 
237
 
238
- #: mercadopago/mercadopago-gateway.php:324
239
  msgid "Test and Debug Options"
240
  msgstr "Opciones de Prueba y Debug"
241
 
242
- #: mercadopago/mercadopago-gateway.php:329
243
  msgid "Mercado Pago Sandbox"
244
  msgstr "Sandbox Mercado Pago"
245
 
246
- #: mercadopago/mercadopago-gateway.php:331
247
  msgid "Enable Mercado Pago Sandbox"
248
  msgstr "Habilitar el sandbox de Mercado Pago"
249
 
250
- #: mercadopago/mercadopago-gateway.php:333
251
- msgid "This options allows you to test payments inside a sandbox environment."
252
  msgstr "Esta opción permite simular un flujo de pagos completo en nuestro entorno Sandbox."
253
 
254
- #: mercadopago/mercadopago-gateway.php:336
255
  msgid "Debug and Log"
256
  msgstr "Debug y Log"
257
 
258
- #: mercadopago/mercadopago-gateway.php:338
259
  msgid "Enable log"
260
  msgstr "Habilitar Log"
261
 
262
- #: mercadopago/mercadopago-gateway.php:340
263
- #, php-format
264
  msgid "Register event logs of Mercado Pago, such as API requests, in the file"
265
  msgstr "Registrar logs de eventos de Mercado Pago, como llamadas a la API, dentro del archivo"
266
 
267
- #: mercadopago/mercadopago-gateway.php:402
268
- msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
269
- msgstr "Gracias por su compra. Por favor, prosiga a la página de pago haciendo click en el botón de abajo."
270
 
271
- #: mercadopago/mercadopago-gateway.php:410
272
- msgid "Cancel order &amp; Clear cart"
273
- msgstr "Cancelar &amp; Limpiar carrito"
 
274
 
275
- #: mercadopago/mercadopago-gateway.php:420
276
- msgid "Thank you for your order. Proceed with your payment completing the following information."
277
- msgstr "Gracias por su compra. Prosiga con su pago completando la información abajo."
278
 
279
- #: mercadopago/mercadopago-gateway.php:431
280
- msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
281
- msgstr "Un error ocurrió durante el procesamiento de su pago. Por favor intente nuevamente o contactenos para ayudarlo."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
282
 
283
- #: mercadopago/mercadopago-gateway.php:434
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
284
  msgid "Click to try again"
285
- msgstr "Haga click para intentar de nuevo"
 
 
 
 
 
 
 
 
286
 
287
- #: mercadopago/mercadopago-gateway.php:675
288
- #: mercadopago/mercadopago-gateway.php:686
 
 
 
 
 
 
 
 
289
  msgid "Mercado Pago is Inactive"
290
  msgstr "Mercado Pago Inactivo"
291
 
292
- #: mercadopago/mercadopago-gateway.php:678
293
- msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
294
  msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
295
 
296
- #: mercadopago/mercadopago-gateway.php:679
297
  msgid "Click here and configure!"
298
  msgstr "Haga click aquí y configure!"
299
 
300
- #: mercadopago/mercadopago-gateway.php:689
301
  msgid "The currency"
302
  msgstr "La moneda"
303
 
304
- #: mercadopago/mercadopago-gateway.php:689
305
- msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, USD, VEF."
306
- msgstr "no es soportada. Las monedas soportadas son: ARS, BRL, CLP, COP, MXN, USD, VEF."
307
 
308
- #: mercadopago/mercadopago-gateway.php:714
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
309
  msgid "Mercado Pago Request Failure"
310
  msgstr "La solicitud de Mercado Pago ha fallado."
311
 
312
- #: mercadopago/mercadopago-gateway.php:791
313
- msgid "Mercado Pago Transaction ID"
314
- msgstr "ID de operación de Mercado Pago"
315
-
316
- #: mercadopago/mercadopago-gateway.php:798
317
  msgid "Payer email"
318
  msgstr "Email del comprador"
319
 
320
- #: mercadopago/mercadopago-gateway.php:805
321
  msgid "Payment type"
322
- msgstr "Método de pago"
323
 
324
- #: mercadopago/mercadopago-gateway.php:810
325
- msgid "Payment approved."
326
- msgstr "Pago aprobado."
327
 
328
- #: mercadopago/mercadopago-gateway.php:816
329
  msgid "Customer haven't paid yet."
330
  msgstr "El cliente todavía no efectuó el pago."
331
 
332
- #: mercadopago/mercadopago-gateway.php:821
333
  msgid "Payment under review."
334
  msgstr "El pago está pendiente de revisión."
335
 
336
- #: mercadopago/mercadopago-gateway.php:826
337
  msgid "The payment was refused. The customer can try again."
338
  msgstr "El pago fue rechazado. El cliente puede intentar nuevamente."
339
 
340
- #: mercadopago/mercadopago-gateway.php:832
341
  msgid "The payment was refunded to the customer."
342
  msgstr "El pago fue devuelto al cliente."
343
 
344
- #: mercadopago/mercadopago-gateway.php:838
345
  msgid "The payment was cancelled."
346
  msgstr "El pago fue cancelado."
347
 
348
- #: mercadopago/mercadopago-gateway.php:843
349
- msgid "Mercado Pago Payment ID"
350
- msgstr "ID de pago de Mercado Pago"
351
-
352
- #: mercadopago/mercadopago-gateway.php:843
353
- #: mercadopago/mercadopago-gateway.php:848
354
  msgid "The payment is under mediation or it was charged-back."
355
  msgstr "El pago esta en mediación o la compra fue desconocida por el cliente."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
+ "POT-Creation-Date: 2016-05-23 14:52-0300\n"
8
  "PO-Revision-Date: \n"
9
+ "Language-Team: Product Development <translations@example.com>\n"
10
  "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;"
18
+ "_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
19
+ "X-Poedit-Basepath: ../Documents/woocommerce (MAMP)/wp-content/plugins/woo-mercado-pago-module\n"
20
  "X-Generator: Poedit 1.8.7\n"
21
  "Last-Translator: \n"
22
+ "Language: es_CO\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
25
  #. Description of the plugin/theme
26
  msgid "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."
27
+ msgstr "Este es el módulo <strong>oficial</strong> de Mercado Pago para el plugin WooCommerce. Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
28
 
29
+ #: mercadopago-module.php:69
30
  #, php-format
31
  msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
32
  msgstr "Woo Mercado Pago Module depende de la última versión de %s para ejecutarse!"
33
 
34
+ #: mercadopago-module.php:109
35
+ msgid "Basic Checkout"
36
+ msgstr "Checkout Básico"
37
+
38
+ #: mercadopago-module.php:113
39
+ msgid "Custom Checkout"
40
+ msgstr "Checkout Personalizado"
41
+
42
+ #: mercadopago/mercadopago-custom-gateway.php:48
43
+ msgid "Mercado Pago - Custom Checkout"
44
+ msgstr "Mercado Pago - Checkout Personalizado"
45
+
46
+ #: mercadopago/mercadopago-custom-gateway.php:51 mercadopago/mercadopago-gateway.php:54
47
  msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
48
+ msgstr "Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
49
 
50
+ #: mercadopago/mercadopago-custom-gateway.php:126 mercadopago/mercadopago-custom-gateway.php:791 mercadopago/mercadopago-gateway.php:125
51
+ #: mercadopago/mercadopago-gateway.php:716
52
  msgid "Argentine"
53
  msgstr "Argentina"
54
 
55
+ #: mercadopago/mercadopago-custom-gateway.php:127 mercadopago/mercadopago-custom-gateway.php:792 mercadopago/mercadopago-gateway.php:126
56
+ #: mercadopago/mercadopago-gateway.php:717
57
  msgid "Brazil"
58
  msgstr "Brasil"
59
 
60
+ #: mercadopago/mercadopago-custom-gateway.php:128 mercadopago/mercadopago-custom-gateway.php:794 mercadopago/mercadopago-gateway.php:127
61
+ #: mercadopago/mercadopago-gateway.php:719
62
  msgid "Chile"
63
  msgstr "Chile"
64
 
65
+ #: mercadopago/mercadopago-custom-gateway.php:129 mercadopago/mercadopago-custom-gateway.php:793 mercadopago/mercadopago-gateway.php:128
66
+ #: mercadopago/mercadopago-gateway.php:718
67
  msgid "Colombia"
68
  msgstr "Colombia"
69
 
70
+ #: mercadopago/mercadopago-custom-gateway.php:130 mercadopago/mercadopago-custom-gateway.php:795 mercadopago/mercadopago-gateway.php:129
71
+ #: mercadopago/mercadopago-gateway.php:720
72
  msgid "Mexico"
73
  msgstr "México"
74
 
75
+ #: mercadopago/mercadopago-custom-gateway.php:132 mercadopago/mercadopago-gateway.php:130
76
  msgid "or"
77
  msgstr "o"
78
 
79
+ #: mercadopago/mercadopago-custom-gateway.php:133 mercadopago/mercadopago-custom-gateway.php:796 mercadopago/mercadopago-gateway.php:131
80
+ #: mercadopago/mercadopago-gateway.php:721
81
  msgid "Venezuela"
82
  msgstr "Venezuela"
83
 
84
+ #: mercadopago/mercadopago-custom-gateway.php:145 mercadopago/mercadopago-gateway.php:151
 
 
 
 
85
  msgid "Your credentials are <strong>valid</strong> for"
86
  msgstr "Sus credenciales <strong>son válidas</strong> para"
87
 
88
+ #: mercadopago/mercadopago-custom-gateway.php:151 mercadopago/mercadopago-custom-gateway.php:156 mercadopago/mercadopago-gateway.php:161
89
+ #: mercadopago/mercadopago-gateway.php:170
 
 
 
 
 
90
  msgid "Your credentials are <strong>not valid</strong>!"
91
  msgstr "Sus credenciales <strong>no son válidas</strong>!"
92
 
93
+ #: mercadopago/mercadopago-custom-gateway.php:169 mercadopago/mercadopago-gateway.php:211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  msgid "Enable/Disable"
95
  msgstr "Habilitar/Deshabilitar"
96
 
97
+ #: mercadopago/mercadopago-custom-gateway.php:171
98
+ msgid "Enable Custom Checkout"
99
+ msgstr "Habilitar Checkout Personalizado"
100
 
101
+ #: mercadopago/mercadopago-custom-gateway.php:175 mercadopago/mercadopago-gateway.php:217
102
  msgid "Mercado Pago Credentials"
103
  msgstr "Credenciales de Mercado Pago"
104
 
105
+ #: mercadopago/mercadopago-custom-gateway.php:177 mercadopago/mercadopago-gateway.php:219
106
  msgid "You can obtain your credentials for"
107
  msgstr "Puedes obtener tus credenciales para"
108
 
109
+ #: mercadopago/mercadopago-custom-gateway.php:182
110
+ msgid "Insert your Mercado Pago Public key."
111
+ msgstr "Inserte su Public Key de Mercado Pago."
 
 
 
 
 
 
 
 
112
 
113
+ #: mercadopago/mercadopago-custom-gateway.php:189
114
+ msgid "Insert your Mercado Pago Access token."
115
+ msgstr "Inserte su Access Token de Mercado Pago."
116
 
117
+ #: mercadopago/mercadopago-custom-gateway.php:194 mercadopago/mercadopago-gateway.php:236
118
  msgid "Instant Payment Notification (IPN) URL"
119
  msgstr "URL da Notificación Instantanea de Pago (IPN)"
120
 
121
+ #: mercadopago/mercadopago-custom-gateway.php:196 mercadopago/mercadopago-gateway.php:238
122
  msgid "Your IPN URL to receive instant payment notifications is"
123
  msgstr "Su URL de IPN para recibir notificaciones instantáneas de pago es"
124
 
125
+ #: mercadopago/mercadopago-custom-gateway.php:199 mercadopago/mercadopago-gateway.php:241
126
  msgid "Checkout Options"
127
  msgstr "Opciones de Checkout"
128
 
129
+ #: mercadopago/mercadopago-custom-gateway.php:204 mercadopago/mercadopago-gateway.php:246
130
  msgid "Title"
131
  msgstr "Título"
132
 
133
+ #: mercadopago/mercadopago-custom-gateway.php:206 mercadopago/mercadopago-gateway.php:248
134
  msgid "Title shown to the client in the checkout."
135
  msgstr "Título mostrado al cliente en el checkout."
136
 
137
+ #: mercadopago/mercadopago-custom-gateway.php:207 mercadopago/mercadopago-custom-gateway.php:219 mercadopago/mercadopago-gateway.php:249
138
+ msgid "Mercado Pago"
139
+ msgstr "Mercado Pago"
140
+
141
+ #: mercadopago/mercadopago-custom-gateway.php:210 mercadopago/mercadopago-gateway.php:252
142
  msgid "Description"
143
  msgstr "Descripción"
144
 
145
+ #: mercadopago/mercadopago-custom-gateway.php:212 mercadopago/mercadopago-gateway.php:254
146
  msgid "Description shown to the client in the checkout."
147
  msgstr "Descripción mostrada al cliente en el checkout."
148
 
149
+ #: mercadopago/mercadopago-custom-gateway.php:213 mercadopago/mercadopago-gateway.php:255 mercadopago/mercadopago-gateway.php:432
 
150
  msgid "Pay with Mercado Pago"
151
  msgstr "Pagar con Mercado Pago"
152
 
153
+ #: mercadopago/mercadopago-custom-gateway.php:216
154
+ msgid "Statement Descriptor"
155
+ msgstr "Descripción de la Factura"
156
 
157
+ #: mercadopago/mercadopago-custom-gateway.php:218
158
+ msgid "The description that will be shown in your customer's invoice."
159
+ msgstr "La descripción que se muestra en la factura de su cliente."
160
 
161
+ #: mercadopago/mercadopago-custom-gateway.php:222
162
+ msgid "Binary Mode"
163
+ msgstr "Modo binario"
164
 
165
+ #: mercadopago/mercadopago-custom-gateway.php:224
166
+ msgid "Enable binary mode for checkout status"
167
+ msgstr "Activar el modo binario para el estado del checkout"
168
 
169
+ #: mercadopago/mercadopago-custom-gateway.php:226
170
+ msgid "When charging a credit card, only [approved] or [reject] status will be taken."
171
+ msgstr "Al cargar una tarjeta de crédito, sólo los estados [aprobado] o [rechazar] seran tomados."
172
 
173
+ #: mercadopago/mercadopago-custom-gateway.php:229
174
+ msgid "Ticket"
175
+ msgstr "Ticket"
 
 
 
 
 
 
 
 
176
 
177
+ #: mercadopago/mercadopago-custom-gateway.php:231
178
+ msgid "Enable Ticket for Custom Checkout"
179
+ msgstr "Habilitar Ticket para Checkout Personalizado"
180
 
181
+ #: mercadopago/mercadopago-custom-gateway.php:233
182
+ msgid "Let your customer pay you with tickets"
183
+ msgstr "Deje que su cliente le paga con tickets"
184
 
185
+ #: mercadopago/mercadopago-custom-gateway.php:236 mercadopago/mercadopago-gateway.php:258
186
+ msgid "Store Category"
187
+ msgstr "Categoría de la tienda"
 
 
 
 
 
 
 
 
 
 
 
 
188
 
189
+ #: mercadopago/mercadopago-custom-gateway.php:238 mercadopago/mercadopago-gateway.php:260
190
+ msgid "Define which type of products your store sells."
191
+ msgstr "Defina el tipo de productos que su tienda vende."
192
 
193
+ #: mercadopago/mercadopago-custom-gateway.php:242 mercadopago/mercadopago-gateway.php:264
194
+ msgid "Store Identificator"
195
+ msgstr "Identificador de la tienda"
196
 
197
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
198
+ msgid "Please, inform a prefix to your store."
199
+ msgstr "Por favor, informe un prefijo para su tienda."
200
 
201
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
202
+ msgid ""
203
+ "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same "
204
+ "identificators."
205
+ msgstr ""
206
+ "Si esta utilizando su cuenta Mercado Pago para múltiples tiendas, asegúrese que este prefijo sea único para no generar pedidos con el mismo identificador."
207
 
208
+ #: mercadopago/mercadopago-custom-gateway.php:248 mercadopago/mercadopago-gateway.php:318
209
  msgid "Test and Debug Options"
210
  msgstr "Opciones de Prueba y Debug"
211
 
212
+ #: mercadopago/mercadopago-custom-gateway.php:253 mercadopago/mercadopago-gateway.php:323
213
  msgid "Mercado Pago Sandbox"
214
  msgstr "Sandbox Mercado Pago"
215
 
216
+ #: mercadopago/mercadopago-custom-gateway.php:255 mercadopago/mercadopago-gateway.php:325
217
  msgid "Enable Mercado Pago Sandbox"
218
  msgstr "Habilitar el sandbox de Mercado Pago"
219
 
220
+ #: mercadopago/mercadopago-custom-gateway.php:257 mercadopago/mercadopago-gateway.php:327
221
+ msgid "This option allows you to test payments inside a sandbox environment."
222
  msgstr "Esta opción permite simular un flujo de pagos completo en nuestro entorno Sandbox."
223
 
224
+ #: mercadopago/mercadopago-custom-gateway.php:260 mercadopago/mercadopago-gateway.php:330
225
  msgid "Debug and Log"
226
  msgstr "Debug y Log"
227
 
228
+ #: mercadopago/mercadopago-custom-gateway.php:262 mercadopago/mercadopago-gateway.php:332
229
  msgid "Enable log"
230
  msgstr "Habilitar Log"
231
 
232
+ #: mercadopago/mercadopago-custom-gateway.php:264 mercadopago/mercadopago-gateway.php:334
 
233
  msgid "Register event logs of Mercado Pago, such as API requests, in the file"
234
  msgstr "Registrar logs de eventos de Mercado Pago, como llamadas a la API, dentro del archivo"
235
 
236
+ #: mercadopago/mercadopago-custom-gateway.php:265 mercadopago/mercadopago-gateway.php:335
237
+ msgid "File location: "
238
+ msgstr "Local del archivo: "
239
 
240
+ #: mercadopago/mercadopago-custom-gateway.php:281 mercadopago/mercadopago-gateway.php:351
241
+ #, php-format
242
+ msgid "Please, rate us %s on WordPress.org and give your feedback to help improve this module!"
243
+ msgstr "Por favor, califíquenos con %s en WordPress.org y de su feedback para ayudar a mejorar este módulo!"
244
 
245
+ #: mercadopago/mercadopago-custom-gateway.php:332
246
+ msgid "Payment Method"
247
+ msgstr "Medios de Pago"
248
 
249
+ #: mercadopago/mercadopago-custom-gateway.php:333
250
+ msgid "Credit card number"
251
+ msgstr "Número de tarjeta de crédito"
252
+
253
+ #: mercadopago/mercadopago-custom-gateway.php:334
254
+ msgid "Expiration month"
255
+ msgstr "Mes de expiración"
256
+
257
+ #: mercadopago/mercadopago-custom-gateway.php:335
258
+ msgid "Expiration year"
259
+ msgstr "Año de expiración"
260
+
261
+ #: mercadopago/mercadopago-custom-gateway.php:336
262
+ msgid "Year"
263
+ msgstr "Año"
264
+
265
+ #: mercadopago/mercadopago-custom-gateway.php:337
266
+ msgid "Month"
267
+ msgstr "Mes"
268
+
269
+ #: mercadopago/mercadopago-custom-gateway.php:338
270
+ msgid "Card holder name"
271
+ msgstr "Nombre del titular de la tarjeta"
272
+
273
+ #: mercadopago/mercadopago-custom-gateway.php:339
274
+ msgid "Security code"
275
+ msgstr "Código de seguridad"
276
+
277
+ #: mercadopago/mercadopago-custom-gateway.php:340
278
+ msgid "Document Type"
279
+ msgstr "Tipo de Documento"
280
+
281
+ #: mercadopago/mercadopago-custom-gateway.php:341
282
+ msgid "Document number"
283
+ msgstr "Número de Documento"
284
+
285
+ #: mercadopago/mercadopago-custom-gateway.php:342
286
+ msgid "Issuer"
287
+ msgstr "Emisor"
288
+
289
+ #: mercadopago/mercadopago-custom-gateway.php:343
290
+ msgid "Installments"
291
+ msgstr "Cuotas"
292
 
293
+ #: mercadopago/mercadopago-custom-gateway.php:347
294
+ msgid "Parameter cardNumber can not be null/empty"
295
+ msgstr "Parámetro [Número de tarjeta] no puede ser nulo/vacío"
296
+
297
+ #: mercadopago/mercadopago-custom-gateway.php:348
298
+ msgid "Invalid Card Number"
299
+ msgstr "Número de tarjeta inválido"
300
+
301
+ #: mercadopago/mercadopago-custom-gateway.php:350 mercadopago/mercadopago-custom-gateway.php:351 mercadopago/mercadopago-custom-gateway.php:352
302
+ #: mercadopago/mercadopago-custom-gateway.php:353
303
+ msgid "Invalid Expiration Date"
304
+ msgstr "Fecha de expiración inválida"
305
+
306
+ #: mercadopago/mercadopago-custom-gateway.php:355
307
+ msgid "Parameter cardholderName can not be null/empty"
308
+ msgstr "Parámetro [Nombre del titular] no puede ser nulo/vacío"
309
+
310
+ #: mercadopago/mercadopago-custom-gateway.php:356
311
+ msgid "Invalid Card Holder Name"
312
+ msgstr "Nombre del titular de la tarjeta inválido"
313
+
314
+ #: mercadopago/mercadopago-custom-gateway.php:358
315
+ msgid "Parameter securityCode can not be null/empty"
316
+ msgstr "Parámetro [Código de seguridad] no puede ser nulo/vacío"
317
+
318
+ #: mercadopago/mercadopago-custom-gateway.php:359
319
+ msgid "Invalid Security Code"
320
+ msgstr "Código de seguridad inválido"
321
+
322
+ #: mercadopago/mercadopago-custom-gateway.php:361
323
+ msgid "Parameter docType can not be null/empty"
324
+ msgstr "Parámetro [Tipo de Documento] no puede ser nulo/vacío"
325
+
326
+ #: mercadopago/mercadopago-custom-gateway.php:362
327
+ msgid "Invalid Document Type"
328
+ msgstr "Tipo de Documento inválido"
329
+
330
+ #: mercadopago/mercadopago-custom-gateway.php:364
331
+ msgid "Parameter docNumber can not be null/empty"
332
+ msgstr "Parámetro [Número del Documento] no puede ser nulo/vacío"
333
+
334
+ #: mercadopago/mercadopago-custom-gateway.php:365
335
+ msgid "Invalid Document Number"
336
+ msgstr "Número del Documento inválido"
337
+
338
+ #: mercadopago/mercadopago-custom-gateway.php:367
339
+ msgid "The parameter cardholder.document.subtype can not be null or empty"
340
+ msgstr "Parámetro [Subtipo del documento] no puede ser nulo/vacío"
341
+
342
+ #: mercadopago/mercadopago-custom-gateway.php:368
343
+ msgid "Invalid Document Sub Type"
344
+ msgstr "Subtipo del documento inválido"
345
+
346
+ #: mercadopago/mercadopago-custom-gateway.php:370
347
+ msgid "Parameter cardIssuerId can not be null/empty"
348
+ msgstr "Parámetro [Emisor] no puede ser nulo/vacío"
349
+
350
+ #: mercadopago/mercadopago-custom-gateway.php:402 mercadopago/mercadopago-custom-gateway.php:943 mercadopago/mercadopago-gateway.php:869
351
+ msgid "Payment approved."
352
+ msgstr "Pago aprobado."
353
+
354
+ #: mercadopago/mercadopago-custom-gateway.php:416 mercadopago/mercadopago-custom-gateway.php:805
355
+ msgid "Your payment is under review. In less than 1h, you should be notified by email."
356
+ msgstr "Su pago está en revisión. En menos de 1 hora, usted será notificado por correo electrónico."
357
+
358
+ #: mercadopago/mercadopago-custom-gateway.php:418
359
+ msgid "Check your order resume"
360
+ msgstr "Ver su hoja de pedido"
361
+
362
+ #: mercadopago/mercadopago-custom-gateway.php:431
363
+ msgid "Your payment was refused. You can try again."
364
+ msgstr "Su pago fue rechazado. Puede intentarlo de nuevo."
365
+
366
+ #: mercadopago/mercadopago-custom-gateway.php:435 mercadopago/mercadopago-custom-gateway.php:819 mercadopago/mercadopago-gateway.php:460
367
  msgid "Click to try again"
368
+ msgstr "Haga clic para intentarlo de nuevo"
369
+
370
+ #: mercadopago/mercadopago-custom-gateway.php:455
371
+ msgid "A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?"
372
+ msgstr "Un problema se produjo al procesar su pago. ¿Esta seguro que ha rellenado correctamente toda la información en el formulario de checkout?"
373
+
374
+ #: mercadopago/mercadopago-custom-gateway.php:544
375
+ msgid "Shipping"
376
+ msgstr "Envío"
377
 
378
+ #: mercadopago/mercadopago-custom-gateway.php:545
379
+ msgid "Shipping service used by store"
380
+ msgstr "Servicio de envío utilizado por la tienda"
381
+
382
+ #: mercadopago/mercadopago-custom-gateway.php:721 mercadopago/mercadopago-gateway.php:649
383
+ msgid "WooCommerce &gt; System Status &gt; Logs"
384
+ msgstr "WooCommerce &gt; Estado del Sistema &gt; Logs"
385
+
386
+ #: mercadopago/mercadopago-custom-gateway.php:766 mercadopago/mercadopago-custom-gateway.php:779 mercadopago/mercadopago-gateway.php:694
387
+ #: mercadopago/mercadopago-gateway.php:705
388
  msgid "Mercado Pago is Inactive"
389
  msgstr "Mercado Pago Inactivo"
390
 
391
+ #: mercadopago/mercadopago-custom-gateway.php:769
392
+ msgid "Your Mercado Pago credentials Public Key/Access Token appears to be misconfigured."
393
  msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
394
 
395
+ #: mercadopago/mercadopago-custom-gateway.php:771 mercadopago/mercadopago-gateway.php:698
396
  msgid "Click here and configure!"
397
  msgstr "Haga click aquí y configure!"
398
 
399
+ #: mercadopago/mercadopago-custom-gateway.php:782 mercadopago/mercadopago-gateway.php:708
400
  msgid "The currency"
401
  msgstr "La moneda"
402
 
403
+ #: mercadopago/mercadopago-custom-gateway.php:783 mercadopago/mercadopago-gateway.php:708
404
+ msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, PEN, VEF."
405
+ msgstr "no es soportada. Las monedas soportadas son: ARS, BRL, CLP, COP, MXN, PEN, VEF."
406
 
407
+ #: mercadopago/mercadopago-custom-gateway.php:797
408
+ msgid "Peru"
409
+ msgstr "Perú"
410
+
411
+ #: mercadopago/mercadopago-custom-gateway.php:809
412
+ msgid "Click to check your order"
413
+ msgstr "Haga clic para comprobar su pedido"
414
+
415
+ #: mercadopago/mercadopago-custom-gateway.php:814 mercadopago/mercadopago-gateway.php:457
416
+ msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
417
+ msgstr "Se ha producido un error en el procesamiento de su pago. Por favor, inténtelo de nuevo o póngase en contacto con nosotros para Asistencia."
418
+
419
+ #: mercadopago/mercadopago-custom-gateway.php:816
420
+ msgid "Reason is: "
421
+ msgstr "La razón es:"
422
+
423
+ #: mercadopago/mercadopago-custom-gateway.php:849 mercadopago/mercadopago-gateway.php:748
424
  msgid "Mercado Pago Request Failure"
425
  msgstr "La solicitud de Mercado Pago ha fallado."
426
 
427
+ #: mercadopago/mercadopago-custom-gateway.php:918 mercadopago/mercadopago-gateway.php:822
 
 
 
 
428
  msgid "Payer email"
429
  msgstr "Email del comprador"
430
 
431
+ #: mercadopago/mercadopago-custom-gateway.php:926 mercadopago/mercadopago-gateway.php:829
432
  msgid "Payment type"
433
+ msgstr "Medio de pago"
434
 
435
+ #: mercadopago/mercadopago-custom-gateway.php:934 mercadopago/mercadopago-gateway.php:841
436
+ msgid "Mercado Pago Payment ID"
437
+ msgstr "ID de pago de Mercado Pago"
438
 
439
+ #: mercadopago/mercadopago-custom-gateway.php:950 mercadopago/mercadopago-gateway.php:875
440
  msgid "Customer haven't paid yet."
441
  msgstr "El cliente todavía no efectuó el pago."
442
 
443
+ #: mercadopago/mercadopago-custom-gateway.php:957 mercadopago/mercadopago-gateway.php:881
444
  msgid "Payment under review."
445
  msgstr "El pago está pendiente de revisión."
446
 
447
+ #: mercadopago/mercadopago-custom-gateway.php:964 mercadopago/mercadopago-gateway.php:887
448
  msgid "The payment was refused. The customer can try again."
449
  msgstr "El pago fue rechazado. El cliente puede intentar nuevamente."
450
 
451
+ #: mercadopago/mercadopago-custom-gateway.php:971 mercadopago/mercadopago-gateway.php:893
452
  msgid "The payment was refunded to the customer."
453
  msgstr "El pago fue devuelto al cliente."
454
 
455
+ #: mercadopago/mercadopago-custom-gateway.php:978 mercadopago/mercadopago-gateway.php:899
456
  msgid "The payment was cancelled."
457
  msgstr "El pago fue cancelado."
458
 
459
+ #: mercadopago/mercadopago-custom-gateway.php:984 mercadopago/mercadopago-custom-gateway.php:990 mercadopago/mercadopago-gateway.php:904
460
+ #: mercadopago/mercadopago-gateway.php:909
 
 
 
 
461
  msgid "The payment is under mediation or it was charged-back."
462
  msgstr "El pago esta en mediación o la compra fue desconocida por el cliente."
463
+
464
+ #: mercadopago/mercadopago-gateway.php:51
465
+ msgid "Mercado Pago - Basic Checkout"
466
+ msgstr "Mercado Pago - Checkout Básico"
467
+
468
+ #: mercadopago/mercadopago-gateway.php:148
469
+ msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
470
+ msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
471
+
472
+ #: mercadopago/mercadopago-gateway.php:158 mercadopago/mercadopago-gateway.php:167
473
+ msgid "Configure your Client_id and Client_secret to have access to more options."
474
+ msgstr "Configure su Client_id y Client_secret para tener acceso a más opciones."
475
+
476
+ #: mercadopago/mercadopago-gateway.php:184 mercadopago/mercadopago-gateway.php:192 mercadopago/mercadopago-gateway.php:202
477
+ msgid "This field should be an integer."
478
+ msgstr "Este campo debe ser un número."
479
+
480
+ #: mercadopago/mercadopago-gateway.php:187
481
+ msgid "If your integration method is iFrame, please inform the payment iFrame width."
482
+ msgstr "Si su modo de apertura es iFrame, indique el ancho del iFrame."
483
+
484
+ #: mercadopago/mercadopago-gateway.php:195
485
+ msgid "If your integration method is iFrame, please inform the payment iFrame height."
486
+ msgstr "Si su modo de apertura es iFrame, indique el alto del iFrame."
487
+
488
+ #: mercadopago/mercadopago-gateway.php:205
489
+ msgid "Select the max number of installments for your customers."
490
+ msgstr "Seleccione el número máximo de cuotas disponibles para sus clientes."
491
+
492
+ #: mercadopago/mercadopago-gateway.php:213
493
+ msgid "Enable Basic Checkout"
494
+ msgstr "Habilitar el Checkout Básico"
495
+
496
+ #: mercadopago/mercadopago-gateway.php:224
497
+ msgid "Insert your Mercado Pago Client_id."
498
+ msgstr "Inserte su Client_id de Mercado Pago."
499
+
500
+ #: mercadopago/mercadopago-gateway.php:231
501
+ msgid "Insert your Mercado Pago Client_secret."
502
+ msgstr "Inserte su Client_secret de Mercado Pago."
503
+
504
+ #: mercadopago/mercadopago-gateway.php:270
505
+ msgid "Integration Method"
506
+ msgstr "Método de integración"
507
+
508
+ #: mercadopago/mercadopago-gateway.php:272
509
+ msgid ""
510
+ "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an "
511
+ "internal window is embedded to the page layout)."
512
+ msgstr ""
513
+ "Seleccione la forma en que sus clientes deben interactuar con Mercado Pago. Ventana Modal (Dentro de su tienda), Redireccionamiento (El cliente es "
514
+ "redireccionado a Mercado Pago), o iFrame (Ventana de pago incorporada a su página)."
515
+
516
+ #: mercadopago/mercadopago-gateway.php:275
517
+ msgid "iFrame"
518
+ msgstr "iFrame"
519
+
520
+ #: mercadopago/mercadopago-gateway.php:276
521
+ msgid "Modal Window"
522
+ msgstr "Ventana modal"
523
+
524
+ #: mercadopago/mercadopago-gateway.php:277
525
+ msgid "Redirect"
526
+ msgstr "Redireccionamiento"
527
+
528
+ #: mercadopago/mercadopago-gateway.php:281
529
+ msgid "iFrame Width"
530
+ msgstr "Ancho del iFrame"
531
+
532
+ #: mercadopago/mercadopago-gateway.php:287
533
+ msgid "iFrame Height"
534
+ msgstr "Alto del iFrame"
535
+
536
+ #: mercadopago/mercadopago-gateway.php:293
537
+ msgid "Auto Return"
538
+ msgstr "Redirección automática"
539
+
540
+ #: mercadopago/mercadopago-gateway.php:295
541
+ msgid "Automatic Return After Payment"
542
+ msgstr "Redirección Automática luego del pago"
543
+
544
+ #: mercadopago/mercadopago-gateway.php:297
545
+ msgid "After the payment, client is automatically redirected."
546
+ msgstr "Después del pago, el cliente será redireccionado automáticamente."
547
+
548
+ #: mercadopago/mercadopago-gateway.php:300
549
+ msgid "Payment Options"
550
+ msgstr "Opciones de Pago"
551
+
552
+ #: mercadopago/mercadopago-gateway.php:305
553
+ msgid "Max installments"
554
+ msgstr "Número máximo de cuotas"
555
+
556
+ #: mercadopago/mercadopago-gateway.php:311
557
+ msgid "Exclude Payment Methods"
558
+ msgstr "Excluir medios de pago"
559
+
560
+ #: mercadopago/mercadopago-gateway.php:428
561
+ msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
562
+ msgstr "Gracias por su compra. Por favor, prosiga a la página de pago haciendo click en el botón de abajo."
563
+
564
+ #: mercadopago/mercadopago-gateway.php:436
565
+ msgid "Cancel order &amp; Clear cart"
566
+ msgstr "Cancelar &amp; Limpiar carrito"
567
+
568
+ #: mercadopago/mercadopago-gateway.php:446
569
+ msgid "Thank you for your order. Proceed with your payment completing the following information."
570
+ msgstr "Gracias por su compra. Prosiga con su pago completando la información abajo."
571
+
572
+ #: mercadopago/mercadopago-gateway.php:697
573
+ msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
574
+ msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
575
+
576
+ msgid " as it appears in your card ..."
577
+ msgstr " tal como aparece en su tarjeta ..."
578
+
579
+ msgid "Done, your payment was accredited!"
580
+ msgstr "Listo, su pago ha sido aceptado!"
581
+
582
+ msgid "We are processing the payment. In less than an hour we will e-mail you the results."
583
+ msgstr "Estamos procesando su pago. En menos de una hora le enviaremos el resultado por correo electrónico."
584
+
585
+ msgid "We are processing the payment. In less than 2 business days we will tell you by e-mail whether it has accredited or we need more information."
586
+ msgstr "Estamos procesando su pago. En menos de 2 días le enviaremos por correo electrónico si se ha aprobado el pago o si se necesita información adicional."
587
+
588
+ msgid "Check the card number."
589
+ msgstr "Compruebe el número de tarjeta."
590
+
591
+ msgid "Check the expiration date."
592
+ msgstr "Compruebe la fecha de expiración."
593
+
594
+ msgid "Check the information."
595
+ msgstr "Compruebe la información informada."
596
+
597
+ msgid "Check the security code."
598
+ msgstr "Compruebe el código de seguridad informado."
599
+
600
+ msgid "We could not process your payment."
601
+ msgstr "No se puede procesar su pago."
602
+
603
+ msgid "You must authorize the payment of your orders."
604
+ msgstr "Usted debe autorizar los pagos de sus órdenes."
605
+
606
+ msgid "Call your card issuer to activate your card. The phone is on the back of your card."
607
+ msgstr "Póngase en contacto con el emisor de su tarjeta para activarla. El teléfono se encuentra en la parte posterior de su tarjeta."
608
+
609
+ msgid "You already made a payment for that amount. If you need to repay, use another card or other payment method."
610
+ msgstr "Usted ya realizó un pago de este importe. Si tiene que pagar de nuevo, utilizar otra tarjeta u otro medio de pago."
611
+
612
+ msgid "Your payment was rejected. Choose another payment method. We recommend cash."
613
+ msgstr "Su pago fue rechazado. Por favor seleccione otro medio de pago. Se recomienda en efectivo."
614
+
615
+ msgid "Your payment do not have sufficient funds."
616
+ msgstr "Su pago no tiene fondos suficientes."
617
+
618
+ msgid "Your payment does not process payments with selected installments."
619
+ msgstr "El pago no puede procesar la cuota seleccionada."
620
+
621
+ msgid "You have reached the limit of allowed attempts. Choose another card or another payment method."
622
+ msgstr "Has alcanzado el límite de intentos permitidos. Elija otra tarjeta u otro medio de pago."
623
+
624
+ msgid "This payment method did not process the payment."
625
+ msgstr "Esta medio de pago no puede procesar su pago."
626
+
627
+ msgid "Mercado Pago - Ticket"
628
+ msgstr "Mercado Pago - Ticket"
629
+
630
+ msgid "Mercado Pago - Credit Card"
631
+ msgstr "Mercado Pago - Tarjeta de Crédito"
632
+
633
+ msgid "Ticket Options"
634
+ msgstr "Opciones de Ticket"
635
+
636
+ msgid "Enable Ticket Payment Method"
637
+ msgstr "Habilitar Pago con Ticket"
638
+
639
+ msgid "Other Bank"
640
+ msgstr "Otro Banco"
641
+
642
+ msgid "Choose"
643
+ msgstr "Escoger"
644
+
645
+ msgid "A problem was occurred when processing your payment. Please, try again."
646
+ msgstr "Un problema se produjo al procesar su pago. Por favor, inténtelo de nuevo."
647
+
648
+ msgid "Thank you for your order. Please, pay the ticket to get your order approved."
649
+ msgstr "Gracias por su orden. Por favor, realice el pago del ticket para tener su orden aprobada."
650
+
651
+ msgid "Waiting for the ticket payment."
652
+ msgstr "Esperando el pago del ticket."
653
+
654
+ msgid "Print the Ticket"
655
+ msgstr "Imprimir el ticket"
656
+
657
+ msgid "To reprint the ticket click "
658
+ msgstr "Para imprimir nuevamente el ticket hace clic "
659
+
660
+ msgid "here"
661
+ msgstr "aquí"
662
+
663
+ msgid "Custom Checkout is Inactive"
664
+ msgstr "Checkout Personalizado Inactivo"
665
+
666
+ msgid "Basic Checkout is Inactive"
667
+ msgstr "Checkout Básico Inactivo"
668
+
669
+ msgid "Ticket is Inactive"
670
+ msgstr "Ticket Inactivo"
671
+
672
+ msgid "Please, select the ticket issuer of your preference."
673
+ msgstr "Por favor, seleccione el emisor de su elección."
674
+
675
+ msgid "Click "Place order" button. The ticket will be generated and you will be redirected to print it."
676
+ msgstr "Haga clic en el botón "Realizar el pedido". El ticket será generado y usted será redirigido a imprimirlo."
677
+
678
+ msgid "Important: The order will be confirmed only after the payment approval."
679
+ msgstr "Importante: La solicitud sólo será confirmada después de la aprobación del pago."
680
+
681
+ msgid "Your Mercado Pago credential Access Token appears to be misconfigured."
682
+ msgstr "Su credencial Access Token de Mercado de Pago parece estar desconfigurada."
683
+
684
+ msgid "Your Card"
685
+ msgstr "Sus Tarjetas"
686
+
687
+ msgid "Other Cards"
688
+ msgstr "Otras Tarjetas"
689
+
690
+ msgid "Other Card"
691
+ msgstr "Otra Tarjeta"
692
+
693
+ msgid "ended in"
694
+ msgstr "terminado en"
695
+
696
+ msgid "Your site appears to not have SSL certification. SSL is a pre-requisite because the payment process is made in your server."
697
+ msgstr "Su sitio parece no tener certificación SSL. SSL es un requisito para transaccionar desde su servidor."
698
+
699
+ msgid "ATTENTION: The currency"
700
+ msgstr "ATENCIÓN: La moneda"
701
+
702
+ msgid "defined in WooCommerce is different from the one used in your credentials country.<br>The currency for transactions in this payment method will be"
703
+ msgstr "que se define en WooCommerce es diferente de la utilizada en el país de sus credenciales.<br>La moneda para las transacciones realizadas por este medio de pago será"
704
+
705
+ msgid "Currency conversions should be made outside this module."
706
+ msgstr "Conversiones de monedas deben hacerse fuera de este módulo."
707
+
708
+ msgid "Coupons"
709
+ msgstr "Cupones"
710
+
711
+ msgid "Enable coupons of discounts"
712
+ msgstr "Activar los cupones de descuento"
713
+
714
+ msgid "If there is a Mercado Pago campaign, allow your store to give discounts to customers."
715
+ msgstr "Si hay una campaña de Mercado Pago, permitir a su tienda hacer descuentos para los clientes."
716
+
717
+ msgid "You will save"
718
+ msgstr "Usted ahorrará"
719
+
720
+ msgid "Apply"
721
+ msgstr "Aplicar"
722
+
723
+ msgid "Remove"
724
+ msgstr "Eliminar"
725
+
726
+ msgid "Please, inform your coupon code"
727
+ msgstr "Por favor, introduzca el código de su cupón"
728
+
729
+ msgid "Please, inform your email in billing address to use this feature"
730
+ msgstr "Por favor, introduzca su email en la dirección de facturación para utilizar este servicio"
731
+
732
+ msgid "Discount for %s coupon"
733
+ msgstr "Descuento para el cupón %s"
734
+
735
+ msgid "Discount provided by store"
736
+ msgstr "Descuento dado por la tienda"
737
+
738
+ msgid "Discount Coupon"
739
+ msgstr "Cupón de Descuento"
740
+
741
+ msgid "CURRENCY CONVERTED: The currency conversion ratio from"
742
+ msgstr "MONEDA CONVERTIDA: La tasa de conversión de moneda de"
743
+
744
+ msgid "ERROR: It was not possible to convert the unsupported currency"
745
+ msgstr "ERROR: No fue posible convertir la moneda no soportada"
746
+
747
+ msgid "to"
748
+ msgstr "para"
749
+
750
+ msgid "If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio."
751
+ msgstr "Si la moneda utilizada en WooCommerce es diferente o no soportada por Mercado Pago, convierte los importes de sus transacciones con la tasa de conversión de Mercado Pago."
752
+
753
+ msgid " is: "
754
+ msgstr " es: "
755
+
756
+ msgid "Currency Conversion"
757
+ msgstr "Conversión de Moneda"
758
+
759
+ msgid "with discount from"
760
+ msgstr "con descuento de"
761
+
762
+ msgid "Total of your purchase:"
763
+ msgstr "Total de su compra:"
764
+
765
+ msgid "Total of your purchase with discount:"
766
+ msgstr "Total de su compra con descuento:"
767
+
768
+ msgid "*Uppon payment approval"
769
+ msgstr "*Con la aprobación de pago"
770
+
771
+ msgid "Terms and Conditions of Use"
772
+ msgstr "Términos y Condiciones de Uso"
773
+
774
+ msgid "Payment converted from"
775
+ msgstr "Pago convertido de"
776
+
777
+ msgid "Rate Us"
778
+ msgstr "Calificar"
779
+
780
+ msgid "Report Issue"
781
+ msgstr "Informar Problema"
782
+
783
+ msgid "Two Cards Mode"
784
+ msgstr "Modo de Dos Tarjetas"
785
+
786
+ msgid "Payments with Two Cards"
787
+ msgstr "Pagos con Dos Tarjetas"
788
+
789
+ msgid "Your customer will be able to use two different cards to pay the order."
790
+ msgstr "Su cliente será capaz de utilizar dos tarjetas diferentes para pagar el pedido."
791
+
792
+ msgid "Your Mercado Pago credentials Access Token appears to be misconfigured."
793
+ msgstr "La credencial Mercado Pago Access Token parece estar mal configurada."
794
+
795
+ msgid "Cancel Order"
796
+ msgstr "Cancelar la Compra"
797
+
798
+ msgid "Refund Order"
799
+ msgstr "Reembolso de Compra"
800
+
801
+ msgid "Back URL Options"
802
+ msgstr "Opciones de URL de Callback"
803
+
804
+ msgid "Sucess URL"
805
+ msgstr "URL de Éxito"
806
+
807
+ msgid "Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page."
808
+ msgstr "Donde los clientes serán redirigidos después de una compra exitosa. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
809
+
810
+ msgid "Failure URL"
811
+ msgstr "URL de Pago Rechazado"
812
+
813
+ msgid "Where customers should be redirected after a failed purchase. Let blank to redirect to the default store order resume page."
814
+ msgstr "Donde los clientes serán redirigidos después de una compra rechazada. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
815
+
816
+ msgid "Pending URL"
817
+ msgstr "URL de Pago Pendiente"
818
+
819
+ msgid "Where customers should be redirected after a pending purchase. Let blank to redirect to the default store order resume page."
820
+ msgstr "Donde los clientes ​serán redirigidos después de una compra pendiente. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
821
+
822
+ msgid "Stock Reduce"
823
+ msgstr "Reducir Inventario"
824
+
825
+ msgid "Reduce Stock in Order Generation"
826
+ msgstr "Reducir Inventario en la Orden"
827
+
828
+ msgid "Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval."
829
+ msgstr "Activar esta opción para reducir el inventario mediante la creación de un pedido. Desactivar para reducir sólo <strong>después</strong> de la aprobación del pago."
830
+
831
+ msgid "Recurrent Product"
832
+ msgstr "Producto Recurrente"
833
+
834
+ msgid "Frequency"
835
+ msgstr "Frecuencia"
836
+
837
+ msgid "Amount of time (in days or months) for the execution of the next payment."
838
+ msgstr "Cantidad de tiempo (en días o meses) para la ejecución del próximo pago."
839
+
840
+ msgid "Start date"
841
+ msgstr "Fecha de inicio"
842
+
843
+ msgid "First payment date (effective debit). Defaults to now if blank."
844
+ msgstr "Primera fecha de pago (débito efectivo). De forma predeterminada ahora, si está en blanco."
845
+
846
+ msgid "End date"
847
+ msgstr "Fecha final"
848
+
849
+ msgid "Deadline to generate new charges. Defaults to never if blank."
850
+ msgstr "Fecha límite para generar nuevos cargos. De forma predeterminada como nunca, si está en blanco."
851
+
852
+ msgid "Days"
853
+ msgstr "Días"
854
+
855
+ msgid "Months"
856
+ msgstr "Meses"
857
+
858
+ msgid "Indicates the period of time."
859
+ msgstr "Indica el período de tiempo."
860
+
861
+ msgid "The amount to charge the payer each period. Should be informed including taxes and discounts."
862
+ msgstr "La cantidad para cobrar el pagador en cada período. Debe ser informada incluyendo impuestos y descuentos."
863
+
864
+ msgid "Amount charged"
865
+ msgstr "Cantidad de cobro"
866
+
867
+ msgid "Uruguay"
868
+ msgstr "Uruguay"
869
+
870
+ msgid "Frequency type"
871
+ msgstr "Tipo de frecuencia"
872
+
873
+ msgid "Transaction amount"
874
+ msgstr "Valor de la transacción"
875
+
876
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
877
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
878
+
879
+ msgid "Subscription"
880
+ msgstr "Suscripción"
881
+
882
+ msgid "Enable Subscription"
883
+ msgstr "Habilitar Suscripción"
884
+
885
+ msgid "Subscription is Inactive"
886
+ msgstr "La Suscripción está Inactiva"
887
+
888
+ msgid "Subscribe with Mercado Pago"
889
+ msgstr "Suscribirse con Mercado Pago"
890
+
891
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
892
+ msgstr "Para esta solución, usted debe configurar su URL de IPN. Puede acceder a ella en su cuenta para su específico país en:"
893
+
894
+ msgid "Discount by Gateway"
895
+ msgstr "Descuento por Gateway"
896
+
897
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
898
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
899
+
900
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
901
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
902
+
903
+ msgid "Discount Of"
904
+ msgstr "Descuento de"
905
+
906
+ msgid "Mercado Pago Subscription"
907
+ msgstr "Suscripción Mercado Pago"
908
+
909
+ msgid "Payment ID:"
910
+ msgstr "ID de Pago:"
911
+
912
+ msgid "Amount:"
913
+ msgstr "Cantidad:"
914
+
915
+ msgid "This operation could not be completed."
916
+ msgstr "Esta operación no se puede completar."
917
+
918
+ msgid "Operation successfully completed."
919
+ msgstr "La operación se realizó con éxito."
920
+
921
+ msgid "Refund Payment"
922
+ msgstr "Reembolso de Pago"
923
+
924
+ msgid "Cancel Payment"
925
+ msgstr "Cancelar Pago"
926
+
927
+ msgid "Mercado Pago - Subscription"
928
+ msgstr "Mercado Pago - Suscripcións"
929
+
930
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
931
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
932
+
933
+ msgid "Free Shipping"
934
+ msgstr "Envío Gratuito"
935
+
936
+ msgid "Day"
937
+ msgstr "Día"
938
+
939
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
940
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
941
+
942
+ msgid "Mercado Envios"
943
+ msgstr "Mercado Envios"
944
+
945
+ msgid "This controls the title which the user sees during checkout."
946
+ msgstr "Controla el título que se muestra al cliente durante el pago."
947
+
948
+ msgid "Enable free shipping for this shipping method"
949
+ msgstr "Habilitar el envío gratuito para este método de envío"
950
+
951
+ msgid "Delivery Time"
952
+ msgstr "Tiempo de Entrega"
953
+
954
+ msgid "Show estimated delivery time"
955
+ msgstr "Mostrar el tiempo estimado de entrega"
956
+
957
+ msgid "Display the estimated delivery time in working days."
958
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
959
+
960
+ msgid "Buyer initiates complaint and requested a refund."
961
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
962
+
963
+ msgid "In return to sender"
964
+ msgstr "Volviendo al remitente"
965
+
966
+ msgid "Missing recipient for delivery"
967
+ msgstr "Destinatario ausente para envío"
968
+
969
+ msgid "Delayed shipping"
970
+ msgstr "Envío retrasado"
971
+
972
+ msgid "Unsuccessful"
973
+ msgstr "Fracasado"
974
+
975
+ msgid "Tag printed"
976
+ msgstr "Etiqueta impresa"
977
+
978
+ msgid "Tag ready to print"
979
+ msgstr "Etiquetar lista para imprimir"
980
+
981
+ msgid "Tracking code:"
982
+ msgstr "Código de rastreamiento:"
983
+
984
+ msgid "Tag:"
985
+ msgstr "Etiqueta:"
986
+
987
+ msgid "Shipping is pending"
988
+ msgstr "Envío pendiente"
989
+
990
+ msgid "Tutorial"
991
+ msgstr "Tutorial"
992
+
993
+ msgid "Discount Of "
994
+ msgstr "Descuento De "
995
+
996
+ msgid "Make this product a subscription."
997
+ msgstr "Hacer deste producto una suscripción."
998
+
999
+ msgid "Order"
1000
+ msgstr "Pedido"
1001
+
1002
+ msgid "Mercado Envios Tracking ID"
1003
+ msgstr "Código de rastreamiento de Mercado Envíos"
1004
+
1005
+ msgid "Hello,"
1006
+ msgstr "Hola,"
1007
+
1008
+ msgid "Your order"
1009
+ msgstr "Su pedido"
1010
+
1011
+ msgid "made in"
1012
+ msgstr "hecho en"
1013
+
1014
+ msgid "used Mercado Envios as its shipment method."
1015
+ msgstr "utilizó el Mercado Envíos como su medio de envío."
1016
+
1017
+ msgid "You can track it with the following Tracking ID:"
1018
+ msgstr "Usted puedes rastrearlo con lo siguiente código de rastreamiento:"
1019
+
1020
+ msgid "Best regards."
1021
+ msgstr "Saludos."
1022
+
1023
+ msgid "SELECT..."
1024
+ msgstr "SELECCIONE..."
1025
+
1026
+ msgid "NAME"
1027
+ msgstr "NOMBRE"
1028
+
1029
+ msgid "SURNAME"
1030
+ msgstr "APELLIDO"
1031
+
1032
+ msgid "DOCUMENT"
1033
+ msgstr "DOCUMENTO"
1034
+
1035
+ msgid "ADDRESS"
1036
+ msgstr "DIRECCIÓN"
1037
+
1038
+ msgid "NUMBER"
1039
+ msgstr "NÚMERO"
1040
+
1041
+ msgid "CITY"
1042
+ msgstr "CIUDAD"
1043
+
1044
+ msgid "STATE"
1045
+ msgstr "ESTADO"
1046
+
1047
+ msgid "ZIP"
1048
+ msgstr "CÓDIGO POSTAL"
1049
+
1050
+ msgid "You must inform you NAME"
1051
+ msgstr "Obligatorio informar su NOMBRE"
1052
+
1053
+ msgid "You must inform your SURNAME"
1054
+ msgstr "Obligatorio informar su APELLIDO"
1055
+
1056
+ msgid "You must inform your DOCUMENT"
1057
+ msgstr "Obligatorio informar su DOCUMENTO"
1058
+
1059
+ msgid "You must inform your ADDRESS"
1060
+ msgstr "Obligatorio informar su DIRECCIÓN"
1061
+
1062
+ msgid "You must inform your ADDRESS NUMBER"
1063
+ msgstr "Obligatorio informar su NÚMERO"
1064
+
1065
+ msgid "You must inform your CITY"
1066
+ msgstr "Obligatorio informar su CIUDAD"
1067
+
1068
+ msgid "You must inform your STATE"
1069
+ msgstr "Obligatorio informar su ESTADO"
1070
+
1071
+ msgid "You must inform your ZIP"
1072
+ msgstr "Obligatorio informar su CÓDIGO POSTAL"
1073
+
1074
+ msgid "Your PHP version is OK."
1075
+ msgstr "Su versión de PHP está bien."
1076
+
1077
+ msgid "Your PHP version do not support this module. You have %s, minimal required is %s."
1078
+ msgstr "Su versión de PHP no soporta este módulo. Tienes %s, la mínima requerida es %s."
1079
+
1080
+ msgid "cURL is installed."
1081
+ msgstr "cURL está instalado."
1082
+
1083
+ msgid "cURL is not installed."
1084
+ msgstr "cURL no está instalado."
1085
+
1086
+ msgid "SSL is missing in your site."
1087
+ msgstr "Falta el SSL en su sitio."
1088
+
1089
+ msgid "Your site has SSL enabled."
1090
+ msgstr "Su sitio tiene SSL habilitado."
1091
+
1092
+ msgid "Fisical Person"
1093
+ msgstr "Persona Física"
1094
+
1095
+ msgid "Legal Person"
1096
+ msgstr "Persona Jurídica"
1097
+
1098
+ msgid "SOCIAL NAME"
1099
+ msgstr "RAZÓN SOCIAL"
1100
+
1101
+ msgid "CNPJ"
1102
+ msgstr "CNPJ"
languages/woocommerce-mercadopago-module-es_ES.mo ADDED
Binary file
languages/woocommerce-mercadopago-module-es_ES.po ADDED
@@ -0,0 +1,1102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WordPress Blank Pot
2
+ # Copyright (C) 2014 ...
3
+ # This file is distributed under the GNU General Public License v2 or later.
4
+ msgid ""
5
+ msgstr ""
6
+ "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
+ "POT-Creation-Date: 2016-05-23 14:52-0300\n"
8
+ "PO-Revision-Date: \n"
9
+ "Language-Team: Product Development <translations@example.com>\n"
10
+ "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;"
18
+ "_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
19
+ "X-Poedit-Basepath: ../Documents/woocommerce (MAMP)/wp-content/plugins/woo-mercado-pago-module\n"
20
+ "X-Generator: Poedit 1.8.7\n"
21
+ "Last-Translator: \n"
22
+ "Language: es_ES\n"
23
+ "X-Poedit-SearchPath-0: .\n"
24
+
25
+ #. Description of the plugin/theme
26
+ msgid "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."
27
+ msgstr "Este es el módulo <strong>oficial</strong> de Mercado Pago para el plugin WooCommerce. Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
28
+
29
+ #: mercadopago-module.php:69
30
+ #, php-format
31
+ msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
32
+ msgstr "Woo Mercado Pago Module depende de la última versión de %s para ejecutarse!"
33
+
34
+ #: mercadopago-module.php:109
35
+ msgid "Basic Checkout"
36
+ msgstr "Checkout Básico"
37
+
38
+ #: mercadopago-module.php:113
39
+ msgid "Custom Checkout"
40
+ msgstr "Checkout Personalizado"
41
+
42
+ #: mercadopago/mercadopago-custom-gateway.php:48
43
+ msgid "Mercado Pago - Custom Checkout"
44
+ msgstr "Mercado Pago - Checkout Personalizado"
45
+
46
+ #: mercadopago/mercadopago-custom-gateway.php:51 mercadopago/mercadopago-gateway.php:54
47
+ msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
48
+ msgstr "Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
49
+
50
+ #: mercadopago/mercadopago-custom-gateway.php:126 mercadopago/mercadopago-custom-gateway.php:791 mercadopago/mercadopago-gateway.php:125
51
+ #: mercadopago/mercadopago-gateway.php:716
52
+ msgid "Argentine"
53
+ msgstr "Argentina"
54
+
55
+ #: mercadopago/mercadopago-custom-gateway.php:127 mercadopago/mercadopago-custom-gateway.php:792 mercadopago/mercadopago-gateway.php:126
56
+ #: mercadopago/mercadopago-gateway.php:717
57
+ msgid "Brazil"
58
+ msgstr "Brasil"
59
+
60
+ #: mercadopago/mercadopago-custom-gateway.php:128 mercadopago/mercadopago-custom-gateway.php:794 mercadopago/mercadopago-gateway.php:127
61
+ #: mercadopago/mercadopago-gateway.php:719
62
+ msgid "Chile"
63
+ msgstr "Chile"
64
+
65
+ #: mercadopago/mercadopago-custom-gateway.php:129 mercadopago/mercadopago-custom-gateway.php:793 mercadopago/mercadopago-gateway.php:128
66
+ #: mercadopago/mercadopago-gateway.php:718
67
+ msgid "Colombia"
68
+ msgstr "Colombia"
69
+
70
+ #: mercadopago/mercadopago-custom-gateway.php:130 mercadopago/mercadopago-custom-gateway.php:795 mercadopago/mercadopago-gateway.php:129
71
+ #: mercadopago/mercadopago-gateway.php:720
72
+ msgid "Mexico"
73
+ msgstr "México"
74
+
75
+ #: mercadopago/mercadopago-custom-gateway.php:132 mercadopago/mercadopago-gateway.php:130
76
+ msgid "or"
77
+ msgstr "o"
78
+
79
+ #: mercadopago/mercadopago-custom-gateway.php:133 mercadopago/mercadopago-custom-gateway.php:796 mercadopago/mercadopago-gateway.php:131
80
+ #: mercadopago/mercadopago-gateway.php:721
81
+ msgid "Venezuela"
82
+ msgstr "Venezuela"
83
+
84
+ #: mercadopago/mercadopago-custom-gateway.php:145 mercadopago/mercadopago-gateway.php:151
85
+ msgid "Your credentials are <strong>valid</strong> for"
86
+ msgstr "Sus credenciales <strong>son válidas</strong> para"
87
+
88
+ #: mercadopago/mercadopago-custom-gateway.php:151 mercadopago/mercadopago-custom-gateway.php:156 mercadopago/mercadopago-gateway.php:161
89
+ #: mercadopago/mercadopago-gateway.php:170
90
+ msgid "Your credentials are <strong>not valid</strong>!"
91
+ msgstr "Sus credenciales <strong>no son válidas</strong>!"
92
+
93
+ #: mercadopago/mercadopago-custom-gateway.php:169 mercadopago/mercadopago-gateway.php:211
94
+ msgid "Enable/Disable"
95
+ msgstr "Habilitar/Deshabilitar"
96
+
97
+ #: mercadopago/mercadopago-custom-gateway.php:171
98
+ msgid "Enable Custom Checkout"
99
+ msgstr "Habilitar Checkout Personalizado"
100
+
101
+ #: mercadopago/mercadopago-custom-gateway.php:175 mercadopago/mercadopago-gateway.php:217
102
+ msgid "Mercado Pago Credentials"
103
+ msgstr "Credenciales de Mercado Pago"
104
+
105
+ #: mercadopago/mercadopago-custom-gateway.php:177 mercadopago/mercadopago-gateway.php:219
106
+ msgid "You can obtain your credentials for"
107
+ msgstr "Puedes obtener tus credenciales para"
108
+
109
+ #: mercadopago/mercadopago-custom-gateway.php:182
110
+ msgid "Insert your Mercado Pago Public key."
111
+ msgstr "Inserte su Public Key de Mercado Pago."
112
+
113
+ #: mercadopago/mercadopago-custom-gateway.php:189
114
+ msgid "Insert your Mercado Pago Access token."
115
+ msgstr "Inserte su Access Token de Mercado Pago."
116
+
117
+ #: mercadopago/mercadopago-custom-gateway.php:194 mercadopago/mercadopago-gateway.php:236
118
+ msgid "Instant Payment Notification (IPN) URL"
119
+ msgstr "URL da Notificación Instantanea de Pago (IPN)"
120
+
121
+ #: mercadopago/mercadopago-custom-gateway.php:196 mercadopago/mercadopago-gateway.php:238
122
+ msgid "Your IPN URL to receive instant payment notifications is"
123
+ msgstr "Su URL de IPN para recibir notificaciones instantáneas de pago es"
124
+
125
+ #: mercadopago/mercadopago-custom-gateway.php:199 mercadopago/mercadopago-gateway.php:241
126
+ msgid "Checkout Options"
127
+ msgstr "Opciones de Checkout"
128
+
129
+ #: mercadopago/mercadopago-custom-gateway.php:204 mercadopago/mercadopago-gateway.php:246
130
+ msgid "Title"
131
+ msgstr "Título"
132
+
133
+ #: mercadopago/mercadopago-custom-gateway.php:206 mercadopago/mercadopago-gateway.php:248
134
+ msgid "Title shown to the client in the checkout."
135
+ msgstr "Título mostrado al cliente en el checkout."
136
+
137
+ #: mercadopago/mercadopago-custom-gateway.php:207 mercadopago/mercadopago-custom-gateway.php:219 mercadopago/mercadopago-gateway.php:249
138
+ msgid "Mercado Pago"
139
+ msgstr "Mercado Pago"
140
+
141
+ #: mercadopago/mercadopago-custom-gateway.php:210 mercadopago/mercadopago-gateway.php:252
142
+ msgid "Description"
143
+ msgstr "Descripción"
144
+
145
+ #: mercadopago/mercadopago-custom-gateway.php:212 mercadopago/mercadopago-gateway.php:254
146
+ msgid "Description shown to the client in the checkout."
147
+ msgstr "Descripción mostrada al cliente en el checkout."
148
+
149
+ #: mercadopago/mercadopago-custom-gateway.php:213 mercadopago/mercadopago-gateway.php:255 mercadopago/mercadopago-gateway.php:432
150
+ msgid "Pay with Mercado Pago"
151
+ msgstr "Pagar con Mercado Pago"
152
+
153
+ #: mercadopago/mercadopago-custom-gateway.php:216
154
+ msgid "Statement Descriptor"
155
+ msgstr "Descripción de la Factura"
156
+
157
+ #: mercadopago/mercadopago-custom-gateway.php:218
158
+ msgid "The description that will be shown in your customer's invoice."
159
+ msgstr "La descripción que se muestra en la factura de su cliente."
160
+
161
+ #: mercadopago/mercadopago-custom-gateway.php:222
162
+ msgid "Binary Mode"
163
+ msgstr "Modo binario"
164
+
165
+ #: mercadopago/mercadopago-custom-gateway.php:224
166
+ msgid "Enable binary mode for checkout status"
167
+ msgstr "Activar el modo binario para el estado del checkout"
168
+
169
+ #: mercadopago/mercadopago-custom-gateway.php:226
170
+ msgid "When charging a credit card, only [approved] or [reject] status will be taken."
171
+ msgstr "Al cargar una tarjeta de crédito, sólo los estados [aprobado] o [rechazar] seran tomados."
172
+
173
+ #: mercadopago/mercadopago-custom-gateway.php:229
174
+ msgid "Ticket"
175
+ msgstr "Ticket"
176
+
177
+ #: mercadopago/mercadopago-custom-gateway.php:231
178
+ msgid "Enable Ticket for Custom Checkout"
179
+ msgstr "Habilitar Ticket para Checkout Personalizado"
180
+
181
+ #: mercadopago/mercadopago-custom-gateway.php:233
182
+ msgid "Let your customer pay you with tickets"
183
+ msgstr "Deje que su cliente le paga con tickets"
184
+
185
+ #: mercadopago/mercadopago-custom-gateway.php:236 mercadopago/mercadopago-gateway.php:258
186
+ msgid "Store Category"
187
+ msgstr "Categoría de la tienda"
188
+
189
+ #: mercadopago/mercadopago-custom-gateway.php:238 mercadopago/mercadopago-gateway.php:260
190
+ msgid "Define which type of products your store sells."
191
+ msgstr "Defina el tipo de productos que su tienda vende."
192
+
193
+ #: mercadopago/mercadopago-custom-gateway.php:242 mercadopago/mercadopago-gateway.php:264
194
+ msgid "Store Identificator"
195
+ msgstr "Identificador de la tienda"
196
+
197
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
198
+ msgid "Please, inform a prefix to your store."
199
+ msgstr "Por favor, informe un prefijo para su tienda."
200
+
201
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
202
+ msgid ""
203
+ "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same "
204
+ "identificators."
205
+ msgstr ""
206
+ "Si esta utilizando su cuenta Mercado Pago para múltiples tiendas, asegúrese que este prefijo sea único para no generar pedidos con el mismo identificador."
207
+
208
+ #: mercadopago/mercadopago-custom-gateway.php:248 mercadopago/mercadopago-gateway.php:318
209
+ msgid "Test and Debug Options"
210
+ msgstr "Opciones de Prueba y Debug"
211
+
212
+ #: mercadopago/mercadopago-custom-gateway.php:253 mercadopago/mercadopago-gateway.php:323
213
+ msgid "Mercado Pago Sandbox"
214
+ msgstr "Sandbox Mercado Pago"
215
+
216
+ #: mercadopago/mercadopago-custom-gateway.php:255 mercadopago/mercadopago-gateway.php:325
217
+ msgid "Enable Mercado Pago Sandbox"
218
+ msgstr "Habilitar el sandbox de Mercado Pago"
219
+
220
+ #: mercadopago/mercadopago-custom-gateway.php:257 mercadopago/mercadopago-gateway.php:327
221
+ msgid "This option allows you to test payments inside a sandbox environment."
222
+ msgstr "Esta opción permite simular un flujo de pagos completo en nuestro entorno Sandbox."
223
+
224
+ #: mercadopago/mercadopago-custom-gateway.php:260 mercadopago/mercadopago-gateway.php:330
225
+ msgid "Debug and Log"
226
+ msgstr "Debug y Log"
227
+
228
+ #: mercadopago/mercadopago-custom-gateway.php:262 mercadopago/mercadopago-gateway.php:332
229
+ msgid "Enable log"
230
+ msgstr "Habilitar Log"
231
+
232
+ #: mercadopago/mercadopago-custom-gateway.php:264 mercadopago/mercadopago-gateway.php:334
233
+ msgid "Register event logs of Mercado Pago, such as API requests, in the file"
234
+ msgstr "Registrar logs de eventos de Mercado Pago, como llamadas a la API, dentro del archivo"
235
+
236
+ #: mercadopago/mercadopago-custom-gateway.php:265 mercadopago/mercadopago-gateway.php:335
237
+ msgid "File location: "
238
+ msgstr "Local del archivo: "
239
+
240
+ #: mercadopago/mercadopago-custom-gateway.php:281 mercadopago/mercadopago-gateway.php:351
241
+ #, php-format
242
+ msgid "Please, rate us %s on WordPress.org and give your feedback to help improve this module!"
243
+ msgstr "Por favor, califíquenos con %s en WordPress.org y de su feedback para ayudar a mejorar este módulo!"
244
+
245
+ #: mercadopago/mercadopago-custom-gateway.php:332
246
+ msgid "Payment Method"
247
+ msgstr "Medios de Pago"
248
+
249
+ #: mercadopago/mercadopago-custom-gateway.php:333
250
+ msgid "Credit card number"
251
+ msgstr "Número de tarjeta de crédito"
252
+
253
+ #: mercadopago/mercadopago-custom-gateway.php:334
254
+ msgid "Expiration month"
255
+ msgstr "Mes de expiración"
256
+
257
+ #: mercadopago/mercadopago-custom-gateway.php:335
258
+ msgid "Expiration year"
259
+ msgstr "Año de expiración"
260
+
261
+ #: mercadopago/mercadopago-custom-gateway.php:336
262
+ msgid "Year"
263
+ msgstr "Año"
264
+
265
+ #: mercadopago/mercadopago-custom-gateway.php:337
266
+ msgid "Month"
267
+ msgstr "Mes"
268
+
269
+ #: mercadopago/mercadopago-custom-gateway.php:338
270
+ msgid "Card holder name"
271
+ msgstr "Nombre del titular de la tarjeta"
272
+
273
+ #: mercadopago/mercadopago-custom-gateway.php:339
274
+ msgid "Security code"
275
+ msgstr "Código de seguridad"
276
+
277
+ #: mercadopago/mercadopago-custom-gateway.php:340
278
+ msgid "Document Type"
279
+ msgstr "Tipo de Documento"
280
+
281
+ #: mercadopago/mercadopago-custom-gateway.php:341
282
+ msgid "Document number"
283
+ msgstr "Número de Documento"
284
+
285
+ #: mercadopago/mercadopago-custom-gateway.php:342
286
+ msgid "Issuer"
287
+ msgstr "Emisor"
288
+
289
+ #: mercadopago/mercadopago-custom-gateway.php:343
290
+ msgid "Installments"
291
+ msgstr "Cuotas"
292
+
293
+ #: mercadopago/mercadopago-custom-gateway.php:347
294
+ msgid "Parameter cardNumber can not be null/empty"
295
+ msgstr "Parámetro [Número de tarjeta] no puede ser nulo/vacío"
296
+
297
+ #: mercadopago/mercadopago-custom-gateway.php:348
298
+ msgid "Invalid Card Number"
299
+ msgstr "Número de tarjeta inválido"
300
+
301
+ #: mercadopago/mercadopago-custom-gateway.php:350 mercadopago/mercadopago-custom-gateway.php:351 mercadopago/mercadopago-custom-gateway.php:352
302
+ #: mercadopago/mercadopago-custom-gateway.php:353
303
+ msgid "Invalid Expiration Date"
304
+ msgstr "Fecha de expiración inválida"
305
+
306
+ #: mercadopago/mercadopago-custom-gateway.php:355
307
+ msgid "Parameter cardholderName can not be null/empty"
308
+ msgstr "Parámetro [Nombre del titular] no puede ser nulo/vacío"
309
+
310
+ #: mercadopago/mercadopago-custom-gateway.php:356
311
+ msgid "Invalid Card Holder Name"
312
+ msgstr "Nombre del titular de la tarjeta inválido"
313
+
314
+ #: mercadopago/mercadopago-custom-gateway.php:358
315
+ msgid "Parameter securityCode can not be null/empty"
316
+ msgstr "Parámetro [Código de seguridad] no puede ser nulo/vacío"
317
+
318
+ #: mercadopago/mercadopago-custom-gateway.php:359
319
+ msgid "Invalid Security Code"
320
+ msgstr "Código de seguridad inválido"
321
+
322
+ #: mercadopago/mercadopago-custom-gateway.php:361
323
+ msgid "Parameter docType can not be null/empty"
324
+ msgstr "Parámetro [Tipo de Documento] no puede ser nulo/vacío"
325
+
326
+ #: mercadopago/mercadopago-custom-gateway.php:362
327
+ msgid "Invalid Document Type"
328
+ msgstr "Tipo de Documento inválido"
329
+
330
+ #: mercadopago/mercadopago-custom-gateway.php:364
331
+ msgid "Parameter docNumber can not be null/empty"
332
+ msgstr "Parámetro [Número del Documento] no puede ser nulo/vacío"
333
+
334
+ #: mercadopago/mercadopago-custom-gateway.php:365
335
+ msgid "Invalid Document Number"
336
+ msgstr "Número del Documento inválido"
337
+
338
+ #: mercadopago/mercadopago-custom-gateway.php:367
339
+ msgid "The parameter cardholder.document.subtype can not be null or empty"
340
+ msgstr "Parámetro [Subtipo del documento] no puede ser nulo/vacío"
341
+
342
+ #: mercadopago/mercadopago-custom-gateway.php:368
343
+ msgid "Invalid Document Sub Type"
344
+ msgstr "Subtipo del documento inválido"
345
+
346
+ #: mercadopago/mercadopago-custom-gateway.php:370
347
+ msgid "Parameter cardIssuerId can not be null/empty"
348
+ msgstr "Parámetro [Emisor] no puede ser nulo/vacío"
349
+
350
+ #: mercadopago/mercadopago-custom-gateway.php:402 mercadopago/mercadopago-custom-gateway.php:943 mercadopago/mercadopago-gateway.php:869
351
+ msgid "Payment approved."
352
+ msgstr "Pago aprobado."
353
+
354
+ #: mercadopago/mercadopago-custom-gateway.php:416 mercadopago/mercadopago-custom-gateway.php:805
355
+ msgid "Your payment is under review. In less than 1h, you should be notified by email."
356
+ msgstr "Su pago está en revisión. En menos de 1 hora, usted será notificado por correo electrónico."
357
+
358
+ #: mercadopago/mercadopago-custom-gateway.php:418
359
+ msgid "Check your order resume"
360
+ msgstr "Ver su hoja de pedido"
361
+
362
+ #: mercadopago/mercadopago-custom-gateway.php:431
363
+ msgid "Your payment was refused. You can try again."
364
+ msgstr "Su pago fue rechazado. Puede intentarlo de nuevo."
365
+
366
+ #: mercadopago/mercadopago-custom-gateway.php:435 mercadopago/mercadopago-custom-gateway.php:819 mercadopago/mercadopago-gateway.php:460
367
+ msgid "Click to try again"
368
+ msgstr "Haga clic para intentarlo de nuevo"
369
+
370
+ #: mercadopago/mercadopago-custom-gateway.php:455
371
+ msgid "A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?"
372
+ msgstr "Un problema se produjo al procesar su pago. ¿Esta seguro que ha rellenado correctamente toda la información en el formulario de checkout?"
373
+
374
+ #: mercadopago/mercadopago-custom-gateway.php:544
375
+ msgid "Shipping"
376
+ msgstr "Envío"
377
+
378
+ #: mercadopago/mercadopago-custom-gateway.php:545
379
+ msgid "Shipping service used by store"
380
+ msgstr "Servicio de envío utilizado por la tienda"
381
+
382
+ #: mercadopago/mercadopago-custom-gateway.php:721 mercadopago/mercadopago-gateway.php:649
383
+ msgid "WooCommerce &gt; System Status &gt; Logs"
384
+ msgstr "WooCommerce &gt; Estado del Sistema &gt; Logs"
385
+
386
+ #: mercadopago/mercadopago-custom-gateway.php:766 mercadopago/mercadopago-custom-gateway.php:779 mercadopago/mercadopago-gateway.php:694
387
+ #: mercadopago/mercadopago-gateway.php:705
388
+ msgid "Mercado Pago is Inactive"
389
+ msgstr "Mercado Pago Inactivo"
390
+
391
+ #: mercadopago/mercadopago-custom-gateway.php:769
392
+ msgid "Your Mercado Pago credentials Public Key/Access Token appears to be misconfigured."
393
+ msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
394
+
395
+ #: mercadopago/mercadopago-custom-gateway.php:771 mercadopago/mercadopago-gateway.php:698
396
+ msgid "Click here and configure!"
397
+ msgstr "Haga click aquí y configure!"
398
+
399
+ #: mercadopago/mercadopago-custom-gateway.php:782 mercadopago/mercadopago-gateway.php:708
400
+ msgid "The currency"
401
+ msgstr "La moneda"
402
+
403
+ #: mercadopago/mercadopago-custom-gateway.php:783 mercadopago/mercadopago-gateway.php:708
404
+ msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, PEN, VEF."
405
+ msgstr "no es soportada. Las monedas soportadas son: ARS, BRL, CLP, COP, MXN, PEN, VEF."
406
+
407
+ #: mercadopago/mercadopago-custom-gateway.php:797
408
+ msgid "Peru"
409
+ msgstr "Perú"
410
+
411
+ #: mercadopago/mercadopago-custom-gateway.php:809
412
+ msgid "Click to check your order"
413
+ msgstr "Haga clic para comprobar su pedido"
414
+
415
+ #: mercadopago/mercadopago-custom-gateway.php:814 mercadopago/mercadopago-gateway.php:457
416
+ msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
417
+ msgstr "Se ha producido un error en el procesamiento de su pago. Por favor, inténtelo de nuevo o póngase en contacto con nosotros para Asistencia."
418
+
419
+ #: mercadopago/mercadopago-custom-gateway.php:816
420
+ msgid "Reason is: "
421
+ msgstr "La razón es:"
422
+
423
+ #: mercadopago/mercadopago-custom-gateway.php:849 mercadopago/mercadopago-gateway.php:748
424
+ msgid "Mercado Pago Request Failure"
425
+ msgstr "La solicitud de Mercado Pago ha fallado."
426
+
427
+ #: mercadopago/mercadopago-custom-gateway.php:918 mercadopago/mercadopago-gateway.php:822
428
+ msgid "Payer email"
429
+ msgstr "Email del comprador"
430
+
431
+ #: mercadopago/mercadopago-custom-gateway.php:926 mercadopago/mercadopago-gateway.php:829
432
+ msgid "Payment type"
433
+ msgstr "Medio de pago"
434
+
435
+ #: mercadopago/mercadopago-custom-gateway.php:934 mercadopago/mercadopago-gateway.php:841
436
+ msgid "Mercado Pago Payment ID"
437
+ msgstr "ID de pago de Mercado Pago"
438
+
439
+ #: mercadopago/mercadopago-custom-gateway.php:950 mercadopago/mercadopago-gateway.php:875
440
+ msgid "Customer haven't paid yet."
441
+ msgstr "El cliente todavía no efectuó el pago."
442
+
443
+ #: mercadopago/mercadopago-custom-gateway.php:957 mercadopago/mercadopago-gateway.php:881
444
+ msgid "Payment under review."
445
+ msgstr "El pago está pendiente de revisión."
446
+
447
+ #: mercadopago/mercadopago-custom-gateway.php:964 mercadopago/mercadopago-gateway.php:887
448
+ msgid "The payment was refused. The customer can try again."
449
+ msgstr "El pago fue rechazado. El cliente puede intentar nuevamente."
450
+
451
+ #: mercadopago/mercadopago-custom-gateway.php:971 mercadopago/mercadopago-gateway.php:893
452
+ msgid "The payment was refunded to the customer."
453
+ msgstr "El pago fue devuelto al cliente."
454
+
455
+ #: mercadopago/mercadopago-custom-gateway.php:978 mercadopago/mercadopago-gateway.php:899
456
+ msgid "The payment was cancelled."
457
+ msgstr "El pago fue cancelado."
458
+
459
+ #: mercadopago/mercadopago-custom-gateway.php:984 mercadopago/mercadopago-custom-gateway.php:990 mercadopago/mercadopago-gateway.php:904
460
+ #: mercadopago/mercadopago-gateway.php:909
461
+ msgid "The payment is under mediation or it was charged-back."
462
+ msgstr "El pago esta en mediación o la compra fue desconocida por el cliente."
463
+
464
+ #: mercadopago/mercadopago-gateway.php:51
465
+ msgid "Mercado Pago - Basic Checkout"
466
+ msgstr "Mercado Pago - Checkout Básico"
467
+
468
+ #: mercadopago/mercadopago-gateway.php:148
469
+ msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
470
+ msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
471
+
472
+ #: mercadopago/mercadopago-gateway.php:158 mercadopago/mercadopago-gateway.php:167
473
+ msgid "Configure your Client_id and Client_secret to have access to more options."
474
+ msgstr "Configure su Client_id y Client_secret para tener acceso a más opciones."
475
+
476
+ #: mercadopago/mercadopago-gateway.php:184 mercadopago/mercadopago-gateway.php:192 mercadopago/mercadopago-gateway.php:202
477
+ msgid "This field should be an integer."
478
+ msgstr "Este campo debe ser un número."
479
+
480
+ #: mercadopago/mercadopago-gateway.php:187
481
+ msgid "If your integration method is iFrame, please inform the payment iFrame width."
482
+ msgstr "Si su modo de apertura es iFrame, indique el ancho del iFrame."
483
+
484
+ #: mercadopago/mercadopago-gateway.php:195
485
+ msgid "If your integration method is iFrame, please inform the payment iFrame height."
486
+ msgstr "Si su modo de apertura es iFrame, indique el alto del iFrame."
487
+
488
+ #: mercadopago/mercadopago-gateway.php:205
489
+ msgid "Select the max number of installments for your customers."
490
+ msgstr "Seleccione el número máximo de cuotas disponibles para sus clientes."
491
+
492
+ #: mercadopago/mercadopago-gateway.php:213
493
+ msgid "Enable Basic Checkout"
494
+ msgstr "Habilitar el Checkout Básico"
495
+
496
+ #: mercadopago/mercadopago-gateway.php:224
497
+ msgid "Insert your Mercado Pago Client_id."
498
+ msgstr "Inserte su Client_id de Mercado Pago."
499
+
500
+ #: mercadopago/mercadopago-gateway.php:231
501
+ msgid "Insert your Mercado Pago Client_secret."
502
+ msgstr "Inserte su Client_secret de Mercado Pago."
503
+
504
+ #: mercadopago/mercadopago-gateway.php:270
505
+ msgid "Integration Method"
506
+ msgstr "Método de integración"
507
+
508
+ #: mercadopago/mercadopago-gateway.php:272
509
+ msgid ""
510
+ "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an "
511
+ "internal window is embedded to the page layout)."
512
+ msgstr ""
513
+ "Seleccione la forma en que sus clientes deben interactuar con Mercado Pago. Ventana Modal (Dentro de su tienda), Redireccionamiento (El cliente es "
514
+ "redireccionado a Mercado Pago), o iFrame (Ventana de pago incorporada a su página)."
515
+
516
+ #: mercadopago/mercadopago-gateway.php:275
517
+ msgid "iFrame"
518
+ msgstr "iFrame"
519
+
520
+ #: mercadopago/mercadopago-gateway.php:276
521
+ msgid "Modal Window"
522
+ msgstr "Ventana modal"
523
+
524
+ #: mercadopago/mercadopago-gateway.php:277
525
+ msgid "Redirect"
526
+ msgstr "Redireccionamiento"
527
+
528
+ #: mercadopago/mercadopago-gateway.php:281
529
+ msgid "iFrame Width"
530
+ msgstr "Ancho del iFrame"
531
+
532
+ #: mercadopago/mercadopago-gateway.php:287
533
+ msgid "iFrame Height"
534
+ msgstr "Alto del iFrame"
535
+
536
+ #: mercadopago/mercadopago-gateway.php:293
537
+ msgid "Auto Return"
538
+ msgstr "Redirección automática"
539
+
540
+ #: mercadopago/mercadopago-gateway.php:295
541
+ msgid "Automatic Return After Payment"
542
+ msgstr "Redirección Automática luego del pago"
543
+
544
+ #: mercadopago/mercadopago-gateway.php:297
545
+ msgid "After the payment, client is automatically redirected."
546
+ msgstr "Después del pago, el cliente será redireccionado automáticamente."
547
+
548
+ #: mercadopago/mercadopago-gateway.php:300
549
+ msgid "Payment Options"
550
+ msgstr "Opciones de Pago"
551
+
552
+ #: mercadopago/mercadopago-gateway.php:305
553
+ msgid "Max installments"
554
+ msgstr "Número máximo de cuotas"
555
+
556
+ #: mercadopago/mercadopago-gateway.php:311
557
+ msgid "Exclude Payment Methods"
558
+ msgstr "Excluir medios de pago"
559
+
560
+ #: mercadopago/mercadopago-gateway.php:428
561
+ msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
562
+ msgstr "Gracias por su compra. Por favor, prosiga a la página de pago haciendo click en el botón de abajo."
563
+
564
+ #: mercadopago/mercadopago-gateway.php:436
565
+ msgid "Cancel order &amp; Clear cart"
566
+ msgstr "Cancelar &amp; Limpiar carrito"
567
+
568
+ #: mercadopago/mercadopago-gateway.php:446
569
+ msgid "Thank you for your order. Proceed with your payment completing the following information."
570
+ msgstr "Gracias por su compra. Prosiga con su pago completando la información abajo."
571
+
572
+ #: mercadopago/mercadopago-gateway.php:697
573
+ msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
574
+ msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
575
+
576
+ msgid " as it appears in your card ..."
577
+ msgstr " tal como aparece en su tarjeta ..."
578
+
579
+ msgid "Done, your payment was accredited!"
580
+ msgstr "Listo, su pago ha sido aceptado!"
581
+
582
+ msgid "We are processing the payment. In less than an hour we will e-mail you the results."
583
+ msgstr "Estamos procesando su pago. En menos de una hora le enviaremos el resultado por correo electrónico."
584
+
585
+ msgid "We are processing the payment. In less than 2 business days we will tell you by e-mail whether it has accredited or we need more information."
586
+ msgstr "Estamos procesando su pago. En menos de 2 días le enviaremos por correo electrónico si se ha aprobado el pago o si se necesita información adicional."
587
+
588
+ msgid "Check the card number."
589
+ msgstr "Compruebe el número de tarjeta."
590
+
591
+ msgid "Check the expiration date."
592
+ msgstr "Compruebe la fecha de expiración."
593
+
594
+ msgid "Check the information."
595
+ msgstr "Compruebe la información informada."
596
+
597
+ msgid "Check the security code."
598
+ msgstr "Compruebe el código de seguridad informado."
599
+
600
+ msgid "We could not process your payment."
601
+ msgstr "No se puede procesar su pago."
602
+
603
+ msgid "You must authorize the payment of your orders."
604
+ msgstr "Usted debe autorizar los pagos de sus órdenes."
605
+
606
+ msgid "Call your card issuer to activate your card. The phone is on the back of your card."
607
+ msgstr "Póngase en contacto con el emisor de su tarjeta para activarla. El teléfono se encuentra en la parte posterior de su tarjeta."
608
+
609
+ msgid "You already made a payment for that amount. If you need to repay, use another card or other payment method."
610
+ msgstr "Usted ya realizó un pago de este importe. Si tiene que pagar de nuevo, utilizar otra tarjeta u otro medio de pago."
611
+
612
+ msgid "Your payment was rejected. Choose another payment method. We recommend cash."
613
+ msgstr "Su pago fue rechazado. Por favor seleccione otro medio de pago. Se recomienda en efectivo."
614
+
615
+ msgid "Your payment do not have sufficient funds."
616
+ msgstr "Su pago no tiene fondos suficientes."
617
+
618
+ msgid "Your payment does not process payments with selected installments."
619
+ msgstr "El pago no puede procesar la cuota seleccionada."
620
+
621
+ msgid "You have reached the limit of allowed attempts. Choose another card or another payment method."
622
+ msgstr "Has alcanzado el límite de intentos permitidos. Elija otra tarjeta u otro medio de pago."
623
+
624
+ msgid "This payment method did not process the payment."
625
+ msgstr "Esta medio de pago no puede procesar su pago."
626
+
627
+ msgid "Mercado Pago - Ticket"
628
+ msgstr "Mercado Pago - Ticket"
629
+
630
+ msgid "Mercado Pago - Credit Card"
631
+ msgstr "Mercado Pago - Tarjeta de Crédito"
632
+
633
+ msgid "Ticket Options"
634
+ msgstr "Opciones de Ticket"
635
+
636
+ msgid "Enable Ticket Payment Method"
637
+ msgstr "Habilitar Pago con Ticket"
638
+
639
+ msgid "Other Bank"
640
+ msgstr "Otro Banco"
641
+
642
+ msgid "Choose"
643
+ msgstr "Escoger"
644
+
645
+ msgid "A problem was occurred when processing your payment. Please, try again."
646
+ msgstr "Un problema se produjo al procesar su pago. Por favor, inténtelo de nuevo."
647
+
648
+ msgid "Thank you for your order. Please, pay the ticket to get your order approved."
649
+ msgstr "Gracias por su orden. Por favor, realice el pago del ticket para tener su orden aprobada."
650
+
651
+ msgid "Waiting for the ticket payment."
652
+ msgstr "Esperando el pago del ticket."
653
+
654
+ msgid "Print the Ticket"
655
+ msgstr "Imprimir el ticket"
656
+
657
+ msgid "To reprint the ticket click "
658
+ msgstr "Para imprimir nuevamente el ticket hace clic "
659
+
660
+ msgid "here"
661
+ msgstr "aquí"
662
+
663
+ msgid "Custom Checkout is Inactive"
664
+ msgstr "Checkout Personalizado Inactivo"
665
+
666
+ msgid "Basic Checkout is Inactive"
667
+ msgstr "Checkout Básico Inactivo"
668
+
669
+ msgid "Ticket is Inactive"
670
+ msgstr "Ticket Inactivo"
671
+
672
+ msgid "Please, select the ticket issuer of your preference."
673
+ msgstr "Por favor, seleccione el emisor de su elección."
674
+
675
+ msgid "Click "Place order" button. The ticket will be generated and you will be redirected to print it."
676
+ msgstr "Haga clic en el botón "Realizar el pedido". El ticket será generado y usted será redirigido a imprimirlo."
677
+
678
+ msgid "Important: The order will be confirmed only after the payment approval."
679
+ msgstr "Importante: La solicitud sólo será confirmada después de la aprobación del pago."
680
+
681
+ msgid "Your Mercado Pago credential Access Token appears to be misconfigured."
682
+ msgstr "Su credencial Access Token de Mercado de Pago parece estar desconfigurada."
683
+
684
+ msgid "Your Card"
685
+ msgstr "Sus Tarjetas"
686
+
687
+ msgid "Other Cards"
688
+ msgstr "Otras Tarjetas"
689
+
690
+ msgid "Other Card"
691
+ msgstr "Otra Tarjeta"
692
+
693
+ msgid "ended in"
694
+ msgstr "terminado en"
695
+
696
+ msgid "Your site appears to not have SSL certification. SSL is a pre-requisite because the payment process is made in your server."
697
+ msgstr "Su sitio parece no tener certificación SSL. SSL es un requisito para transaccionar desde su servidor."
698
+
699
+ msgid "ATTENTION: The currency"
700
+ msgstr "ATENCIÓN: La moneda"
701
+
702
+ msgid "defined in WooCommerce is different from the one used in your credentials country.<br>The currency for transactions in this payment method will be"
703
+ msgstr "que se define en WooCommerce es diferente de la utilizada en el país de sus credenciales.<br>La moneda para las transacciones realizadas por este medio de pago será"
704
+
705
+ msgid "Currency conversions should be made outside this module."
706
+ msgstr "Conversiones de monedas deben hacerse fuera de este módulo."
707
+
708
+ msgid "Coupons"
709
+ msgstr "Cupones"
710
+
711
+ msgid "Enable coupons of discounts"
712
+ msgstr "Activar los cupones de descuento"
713
+
714
+ msgid "If there is a Mercado Pago campaign, allow your store to give discounts to customers."
715
+ msgstr "Si hay una campaña de Mercado Pago, permitir a su tienda hacer descuentos para los clientes."
716
+
717
+ msgid "You will save"
718
+ msgstr "Usted ahorrará"
719
+
720
+ msgid "Apply"
721
+ msgstr "Aplicar"
722
+
723
+ msgid "Remove"
724
+ msgstr "Eliminar"
725
+
726
+ msgid "Please, inform your coupon code"
727
+ msgstr "Por favor, introduzca el código de su cupón"
728
+
729
+ msgid "Please, inform your email in billing address to use this feature"
730
+ msgstr "Por favor, introduzca su email en la dirección de facturación para utilizar este servicio"
731
+
732
+ msgid "Discount for %s coupon"
733
+ msgstr "Descuento para el cupón %s"
734
+
735
+ msgid "Discount provided by store"
736
+ msgstr "Descuento dado por la tienda"
737
+
738
+ msgid "Discount Coupon"
739
+ msgstr "Cupón de Descuento"
740
+
741
+ msgid "CURRENCY CONVERTED: The currency conversion ratio from"
742
+ msgstr "MONEDA CONVERTIDA: La tasa de conversión de moneda de"
743
+
744
+ msgid "ERROR: It was not possible to convert the unsupported currency"
745
+ msgstr "ERROR: No fue posible convertir la moneda no soportada"
746
+
747
+ msgid "to"
748
+ msgstr "para"
749
+
750
+ msgid "If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio."
751
+ msgstr "Si la moneda utilizada en WooCommerce es diferente o no soportada por Mercado Pago, convierte los importes de sus transacciones con la tasa de conversión de Mercado Pago."
752
+
753
+ msgid " is: "
754
+ msgstr " es: "
755
+
756
+ msgid "Currency Conversion"
757
+ msgstr "Conversión de Moneda"
758
+
759
+ msgid "with discount from"
760
+ msgstr "con descuento de"
761
+
762
+ msgid "Total of your purchase:"
763
+ msgstr "Total de su compra:"
764
+
765
+ msgid "Total of your purchase with discount:"
766
+ msgstr "Total de su compra con descuento:"
767
+
768
+ msgid "*Uppon payment approval"
769
+ msgstr "*Con la aprobación de pago"
770
+
771
+ msgid "Terms and Conditions of Use"
772
+ msgstr "Términos y Condiciones de Uso"
773
+
774
+ msgid "Payment converted from"
775
+ msgstr "Pago convertido de"
776
+
777
+ msgid "Rate Us"
778
+ msgstr "Calificar"
779
+
780
+ msgid "Report Issue"
781
+ msgstr "Informar Problema"
782
+
783
+ msgid "Two Cards Mode"
784
+ msgstr "Modo de Dos Tarjetas"
785
+
786
+ msgid "Payments with Two Cards"
787
+ msgstr "Pagos con Dos Tarjetas"
788
+
789
+ msgid "Your customer will be able to use two different cards to pay the order."
790
+ msgstr "Su cliente será capaz de utilizar dos tarjetas diferentes para pagar el pedido."
791
+
792
+ msgid "Your Mercado Pago credentials Access Token appears to be misconfigured."
793
+ msgstr "La credencial Mercado Pago Access Token parece estar mal configurada."
794
+
795
+ msgid "Cancel Order"
796
+ msgstr "Cancelar la Compra"
797
+
798
+ msgid "Refund Order"
799
+ msgstr "Reembolso de Compra"
800
+
801
+ msgid "Back URL Options"
802
+ msgstr "Opciones de URL de Callback"
803
+
804
+ msgid "Sucess URL"
805
+ msgstr "URL de Éxito"
806
+
807
+ msgid "Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page."
808
+ msgstr "Donde los clientes serán redirigidos después de una compra exitosa. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
809
+
810
+ msgid "Failure URL"
811
+ msgstr "URL de Pago Rechazado"
812
+
813
+ msgid "Where customers should be redirected after a failed purchase. Let blank to redirect to the default store order resume page."
814
+ msgstr "Donde los clientes serán redirigidos después de una compra rechazada. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
815
+
816
+ msgid "Pending URL"
817
+ msgstr "URL de Pago Pendiente"
818
+
819
+ msgid "Where customers should be redirected after a pending purchase. Let blank to redirect to the default store order resume page."
820
+ msgstr "Donde los clientes ​serán redirigidos después de una compra pendiente. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
821
+
822
+ msgid "Stock Reduce"
823
+ msgstr "Reducir Inventario"
824
+
825
+ msgid "Reduce Stock in Order Generation"
826
+ msgstr "Reducir Inventario en la Orden"
827
+
828
+ msgid "Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval."
829
+ msgstr "Activar esta opción para reducir el inventario mediante la creación de un pedido. Desactivar para reducir sólo <strong>después</strong> de la aprobación del pago."
830
+
831
+ msgid "Recurrent Product"
832
+ msgstr "Producto Recurrente"
833
+
834
+ msgid "Frequency"
835
+ msgstr "Frecuencia"
836
+
837
+ msgid "Amount of time (in days or months) for the execution of the next payment."
838
+ msgstr "Cantidad de tiempo (en días o meses) para la ejecución del próximo pago."
839
+
840
+ msgid "Start date"
841
+ msgstr "Fecha de inicio"
842
+
843
+ msgid "First payment date (effective debit). Defaults to now if blank."
844
+ msgstr "Primera fecha de pago (débito efectivo). De forma predeterminada ahora, si está en blanco."
845
+
846
+ msgid "End date"
847
+ msgstr "Fecha final"
848
+
849
+ msgid "Deadline to generate new charges. Defaults to never if blank."
850
+ msgstr "Fecha límite para generar nuevos cargos. De forma predeterminada como nunca, si está en blanco."
851
+
852
+ msgid "Days"
853
+ msgstr "Días"
854
+
855
+ msgid "Months"
856
+ msgstr "Meses"
857
+
858
+ msgid "Indicates the period of time."
859
+ msgstr "Indica el período de tiempo."
860
+
861
+ msgid "The amount to charge the payer each period. Should be informed including taxes and discounts."
862
+ msgstr "La cantidad para cobrar el pagador en cada período. Debe ser informada incluyendo impuestos y descuentos."
863
+
864
+ msgid "Amount charged"
865
+ msgstr "Cantidad de cobro"
866
+
867
+ msgid "Uruguay"
868
+ msgstr "Uruguay"
869
+
870
+ msgid "Frequency type"
871
+ msgstr "Tipo de frecuencia"
872
+
873
+ msgid "Transaction amount"
874
+ msgstr "Valor de la transacción"
875
+
876
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
877
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
878
+
879
+ msgid "Subscription"
880
+ msgstr "Suscripción"
881
+
882
+ msgid "Enable Subscription"
883
+ msgstr "Habilitar Suscripción"
884
+
885
+ msgid "Subscription is Inactive"
886
+ msgstr "La Suscripción está Inactiva"
887
+
888
+ msgid "Subscribe with Mercado Pago"
889
+ msgstr "Suscribirse con Mercado Pago"
890
+
891
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
892
+ msgstr "Para esta solución, usted debe configurar su URL de IPN. Puede acceder a ella en su cuenta para su específico país en:"
893
+
894
+ msgid "Discount by Gateway"
895
+ msgstr "Descuento por Gateway"
896
+
897
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
898
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
899
+
900
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
901
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
902
+
903
+ msgid "Discount Of"
904
+ msgstr "Descuento de"
905
+
906
+ msgid "Mercado Pago Subscription"
907
+ msgstr "Suscripción Mercado Pago"
908
+
909
+ msgid "Payment ID:"
910
+ msgstr "ID de Pago:"
911
+
912
+ msgid "Amount:"
913
+ msgstr "Cantidad:"
914
+
915
+ msgid "This operation could not be completed."
916
+ msgstr "Esta operación no se puede completar."
917
+
918
+ msgid "Operation successfully completed."
919
+ msgstr "La operación se realizó con éxito."
920
+
921
+ msgid "Refund Payment"
922
+ msgstr "Reembolso de Pago"
923
+
924
+ msgid "Cancel Payment"
925
+ msgstr "Cancelar Pago"
926
+
927
+ msgid "Mercado Pago - Subscription"
928
+ msgstr "Mercado Pago - Suscripcións"
929
+
930
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
931
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
932
+
933
+ msgid "Free Shipping"
934
+ msgstr "Envío Gratuito"
935
+
936
+ msgid "Day"
937
+ msgstr "Día"
938
+
939
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
940
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
941
+
942
+ msgid "Mercado Envios"
943
+ msgstr "Mercado Envios"
944
+
945
+ msgid "This controls the title which the user sees during checkout."
946
+ msgstr "Controla el título que se muestra al cliente durante el pago."
947
+
948
+ msgid "Enable free shipping for this shipping method"
949
+ msgstr "Habilitar el envío gratuito para este método de envío"
950
+
951
+ msgid "Delivery Time"
952
+ msgstr "Tiempo de Entrega"
953
+
954
+ msgid "Show estimated delivery time"
955
+ msgstr "Mostrar el tiempo estimado de entrega"
956
+
957
+ msgid "Display the estimated delivery time in working days."
958
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
959
+
960
+ msgid "Buyer initiates complaint and requested a refund."
961
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
962
+
963
+ msgid "In return to sender"
964
+ msgstr "Volviendo al remitente"
965
+
966
+ msgid "Missing recipient for delivery"
967
+ msgstr "Destinatario ausente para envío"
968
+
969
+ msgid "Delayed shipping"
970
+ msgstr "Envío retrasado"
971
+
972
+ msgid "Unsuccessful"
973
+ msgstr "Fracasado"
974
+
975
+ msgid "Tag printed"
976
+ msgstr "Etiqueta impresa"
977
+
978
+ msgid "Tag ready to print"
979
+ msgstr "Etiquetar lista para imprimir"
980
+
981
+ msgid "Tracking code:"
982
+ msgstr "Código de rastreamiento:"
983
+
984
+ msgid "Tag:"
985
+ msgstr "Etiqueta:"
986
+
987
+ msgid "Shipping is pending"
988
+ msgstr "Envío pendiente"
989
+
990
+ msgid "Tutorial"
991
+ msgstr "Tutorial"
992
+
993
+ msgid "Discount Of "
994
+ msgstr "Descuento De "
995
+
996
+ msgid "Make this product a subscription."
997
+ msgstr "Hacer deste producto una suscripción."
998
+
999
+ msgid "Order"
1000
+ msgstr "Pedido"
1001
+
1002
+ msgid "Mercado Envios Tracking ID"
1003
+ msgstr "Código de rastreamiento de Mercado Envíos"
1004
+
1005
+ msgid "Hello,"
1006
+ msgstr "Hola,"
1007
+
1008
+ msgid "Your order"
1009
+ msgstr "Su pedido"
1010
+
1011
+ msgid "made in"
1012
+ msgstr "hecho en"
1013
+
1014
+ msgid "used Mercado Envios as its shipment method."
1015
+ msgstr "utilizó el Mercado Envíos como su medio de envío."
1016
+
1017
+ msgid "You can track it with the following Tracking ID:"
1018
+ msgstr "Usted puedes rastrearlo con lo siguiente código de rastreamiento:"
1019
+
1020
+ msgid "Best regards."
1021
+ msgstr "Saludos."
1022
+
1023
+ msgid "SELECT..."
1024
+ msgstr "SELECCIONE..."
1025
+
1026
+ msgid "NAME"
1027
+ msgstr "NOMBRE"
1028
+
1029
+ msgid "SURNAME"
1030
+ msgstr "APELLIDO"
1031
+
1032
+ msgid "DOCUMENT"
1033
+ msgstr "DOCUMENTO"
1034
+
1035
+ msgid "ADDRESS"
1036
+ msgstr "DIRECCIÓN"
1037
+
1038
+ msgid "NUMBER"
1039
+ msgstr "NÚMERO"
1040
+
1041
+ msgid "CITY"
1042
+ msgstr "CIUDAD"
1043
+
1044
+ msgid "STATE"
1045
+ msgstr "ESTADO"
1046
+
1047
+ msgid "ZIP"
1048
+ msgstr "CÓDIGO POSTAL"
1049
+
1050
+ msgid "You must inform you NAME"
1051
+ msgstr "Obligatorio informar su NOMBRE"
1052
+
1053
+ msgid "You must inform your SURNAME"
1054
+ msgstr "Obligatorio informar su APELLIDO"
1055
+
1056
+ msgid "You must inform your DOCUMENT"
1057
+ msgstr "Obligatorio informar su DOCUMENTO"
1058
+
1059
+ msgid "You must inform your ADDRESS"
1060
+ msgstr "Obligatorio informar su DIRECCIÓN"
1061
+
1062
+ msgid "You must inform your ADDRESS NUMBER"
1063
+ msgstr "Obligatorio informar su NÚMERO"
1064
+
1065
+ msgid "You must inform your CITY"
1066
+ msgstr "Obligatorio informar su CIUDAD"
1067
+
1068
+ msgid "You must inform your STATE"
1069
+ msgstr "Obligatorio informar su ESTADO"
1070
+
1071
+ msgid "You must inform your ZIP"
1072
+ msgstr "Obligatorio informar su CÓDIGO POSTAL"
1073
+
1074
+ msgid "Your PHP version is OK."
1075
+ msgstr "Su versión de PHP está bien."
1076
+
1077
+ msgid "Your PHP version do not support this module. You have %s, minimal required is %s."
1078
+ msgstr "Su versión de PHP no soporta este módulo. Tienes %s, la mínima requerida es %s."
1079
+
1080
+ msgid "cURL is installed."
1081
+ msgstr "cURL está instalado."
1082
+
1083
+ msgid "cURL is not installed."
1084
+ msgstr "cURL no está instalado."
1085
+
1086
+ msgid "SSL is missing in your site."
1087
+ msgstr "Falta el SSL en su sitio."
1088
+
1089
+ msgid "Your site has SSL enabled."
1090
+ msgstr "Su sitio tiene SSL habilitado."
1091
+
1092
+ msgid "Fisical Person"
1093
+ msgstr "Persona Física"
1094
+
1095
+ msgid "Legal Person"
1096
+ msgstr "Persona Jurídica"
1097
+
1098
+ msgid "SOCIAL NAME"
1099
+ msgstr "RAZÓN SOCIAL"
1100
+
1101
+ msgid "CNPJ"
1102
+ msgstr "CNPJ"
languages/woocommerce-mercadopago-module-es_MX.mo CHANGED
Binary file
languages/woocommerce-mercadopago-module-es_MX.po CHANGED
@@ -4,9 +4,9 @@
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
- "POT-Creation-Date: 2016-03-04 20:48-0300\n"
8
  "PO-Revision-Date: \n"
9
- "Language-Team: Your Team <translations@example.com>\n"
10
  "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -14,335 +14,1089 @@ msgstr ""
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
18
- "X-Poedit-Basepath: ..\n"
 
19
  "X-Generator: Poedit 1.8.7\n"
20
  "Last-Translator: \n"
21
- "Language: es_AR\n"
22
  "X-Poedit-SearchPath-0: .\n"
23
 
24
  #. Description of the plugin/theme
25
  msgid "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."
26
- msgstr "Este es el módulo <strong>oficial</strong> de Mercado Pago para el plugin WooCommerce. Este módulo habilita el uso de Mercado Pago en WooCommerce como método de pago para compras realizadas en su tienda virtual."
27
 
28
- #: mercadopago-module.php:66
29
  #, php-format
30
  msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
31
  msgstr "Woo Mercado Pago Module depende de la última versión de %s para ejecutarse!"
32
 
33
- #: mercadopago/mercadopago-gateway.php:63
 
 
 
 
 
 
 
 
 
 
 
 
34
  msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
35
- msgstr "Este módulo habilita el uso de Mercado Pago en WooCommerce como método de pago para compras realizadas en su tienda virtual."
36
 
37
- #: mercadopago/mercadopago-gateway.php:133
 
38
  msgid "Argentine"
39
  msgstr "Argentina"
40
 
41
- #: mercadopago/mercadopago-gateway.php:134
 
42
  msgid "Brazil"
43
  msgstr "Brasil"
44
 
45
- #: mercadopago/mercadopago-gateway.php:135
 
46
  msgid "Chile"
47
  msgstr "Chile"
48
 
49
- #: mercadopago/mercadopago-gateway.php:136
 
50
  msgid "Colombia"
51
  msgstr "Colombia"
52
 
53
- #: mercadopago/mercadopago-gateway.php:137
 
54
  msgid "Mexico"
55
  msgstr "México"
56
 
57
- #: mercadopago/mercadopago-gateway.php:138
58
  msgid "or"
59
  msgstr "o"
60
 
61
- #: mercadopago/mercadopago-gateway.php:139
 
62
  msgid "Venezuela"
63
  msgstr "Venezuela"
64
 
65
- #: mercadopago/mercadopago-gateway.php:154
66
- msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
67
- msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
68
-
69
- #: mercadopago/mercadopago-gateway.php:157
70
  msgid "Your credentials are <strong>valid</strong> for"
71
  msgstr "Sus credenciales <strong>son válidas</strong> para"
72
 
73
- #: mercadopago/mercadopago-gateway.php:164 mercadopago/mercadopago-gateway.php:173
74
- msgid "Configure your Client_id and Client_secret to have access to more options."
75
- msgstr "Configure su Client_id y Client_secret para tener acceso a más opciones."
76
-
77
- #: mercadopago/mercadopago-gateway.php:167 mercadopago/mercadopago-gateway.php:176
78
  msgid "Your credentials are <strong>not valid</strong>!"
79
  msgstr "Sus credenciales <strong>no son válidas</strong>!"
80
 
81
- #: mercadopago/mercadopago-gateway.php:190 mercadopago/mercadopago-gateway.php:198 mercadopago/mercadopago-gateway.php:208
82
- msgid "This field should be an integer."
83
- msgstr "Este campo debe ser un número."
84
-
85
- #: mercadopago/mercadopago-gateway.php:193
86
- msgid "If your integration method is iFrame, please inform the payment iFrame width."
87
- msgstr "Si su modo de apertura es iFrame, indique el ancho del iFrame."
88
-
89
- #: mercadopago/mercadopago-gateway.php:201
90
- msgid "If your integration method is iFrame, please inform the payment iFrame height."
91
- msgstr "Si su modo de apertura es iFrame, indique el alto del iFrame."
92
-
93
- #: mercadopago/mercadopago-gateway.php:211
94
- msgid "Select the max number of installments for your customers."
95
- msgstr "Seleccione el número máximo de mensualidades posibles para sus clientes."
96
-
97
- #: mercadopago/mercadopago-gateway.php:217
98
  msgid "Enable/Disable"
99
  msgstr "Habilitar/Deshabilitar"
100
 
101
- #: mercadopago/mercadopago-gateway.php:219
102
- msgid "Enable Mercado Pago Module"
103
- msgstr "Habilitar Mercado Pago"
104
 
105
- #: mercadopago/mercadopago-gateway.php:223
106
  msgid "Mercado Pago Credentials"
107
  msgstr "Credenciales de Mercado Pago"
108
 
109
- #: mercadopago/mercadopago-gateway.php:225
110
  msgid "You can obtain your credentials for"
111
  msgstr "Puedes obtener tus credenciales para"
112
 
113
- #: mercadopago/mercadopago-gateway.php:228
114
- msgid "Mercado Pago Client_id"
115
- msgstr "Client_id de Mercado Pago"
116
-
117
- #: mercadopago/mercadopago-gateway.php:230
118
- msgid "Insert your Mercado Pago Client_id."
119
- msgstr "Inserte su Client_id de Mercado Pago."
120
-
121
- #: mercadopago/mercadopago-gateway.php:235
122
- msgid "Mercado Pago Client_secret"
123
- msgstr "Client_secret de Mercado Pago"
124
 
125
- #: mercadopago/mercadopago-gateway.php:237
126
- msgid "Insert your Mercado Pago Client_secret."
127
- msgstr "Inserte su Client_secret de Mercado Pago."
128
 
129
- #: mercadopago/mercadopago-gateway.php:242
130
  msgid "Instant Payment Notification (IPN) URL"
131
  msgstr "URL da Notificación Instantanea de Pago (IPN)"
132
 
133
- #: mercadopago/mercadopago-gateway.php:244
134
  msgid "Your IPN URL to receive instant payment notifications is"
135
  msgstr "Su URL de IPN para recibir notificaciones instantáneas de pago es"
136
 
137
- #: mercadopago/mercadopago-gateway.php:247
138
  msgid "Checkout Options"
139
  msgstr "Opciones de Checkout"
140
 
141
- #: mercadopago/mercadopago-gateway.php:252
142
  msgid "Title"
143
  msgstr "Título"
144
 
145
- #: mercadopago/mercadopago-gateway.php:254
146
  msgid "Title shown to the client in the checkout."
147
  msgstr "Título mostrado al cliente en el checkout."
148
 
149
- #: mercadopago/mercadopago-gateway.php:258
 
 
 
 
150
  msgid "Description"
151
  msgstr "Descripción"
152
 
153
- #: mercadopago/mercadopago-gateway.php:260
154
  msgid "Description shown to the client in the checkout."
155
  msgstr "Descripción mostrada al cliente en el checkout."
156
 
157
- #: mercadopago/mercadopago-gateway.php:261 mercadopago/mercadopago-gateway.php:406
158
  msgid "Pay with Mercado Pago"
159
  msgstr "Pagar con Mercado Pago"
160
 
161
- #: mercadopago/mercadopago-gateway.php:264
162
- msgid "Store Category"
163
- msgstr "Categoría de la tienda"
164
 
165
- #: mercadopago/mercadopago-gateway.php:266
166
- msgid "Define which type of products your store sells."
167
- msgstr "Defina el tipo de productos que su tienda vende."
168
 
169
- #: mercadopago/mercadopago-gateway.php:270
170
- msgid "Store Identificator"
171
- msgstr "Identificador de la tienda"
172
 
173
- #: mercadopago/mercadopago-gateway.php:272
174
- msgid "Please, inform a prefix to your store."
175
- msgstr "Por favor, informe un prefijo para su tienda."
176
 
177
- #: mercadopago/mercadopago-gateway.php:272
178
- msgid "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same identificators."
179
- msgstr "Si esta utilizando su cuenta Mercado Pago para múltiples tiendas, asegúrese que este prefijo sea único para no generar pedidos con el mismo identificador."
180
 
181
- #: mercadopago/mercadopago-gateway.php:276
182
- msgid "Integration Method"
183
- msgstr "Método de integración"
184
-
185
- #: mercadopago/mercadopago-gateway.php:278
186
- msgid "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an internal window is embedded to the page layout)."
187
- msgstr "Ventana Modal (Dentro de su tienda), Redireccionamiento (El cliente es redireccionado a Mercado Pago), o iFrame (Ventana de pago incorporada a su página)."
188
-
189
- #: mercadopago/mercadopago-gateway.php:281
190
- msgid "iFrame"
191
- msgstr "iFrame"
192
 
193
- #: mercadopago/mercadopago-gateway.php:282
194
- msgid "Modal Window"
195
- msgstr "Ventana modal"
196
 
197
- #: mercadopago/mercadopago-gateway.php:283
198
- msgid "Redirect"
199
- msgstr "Redireccionamiento"
200
 
201
- #: mercadopago/mercadopago-gateway.php:287
202
- msgid "iFrame Width"
203
- msgstr "Ancho del iFrame"
204
-
205
- #: mercadopago/mercadopago-gateway.php:293
206
- msgid "iFrame Height"
207
- msgstr "Alto del iFrame"
208
-
209
- #: mercadopago/mercadopago-gateway.php:299
210
- msgid "Auto Return"
211
- msgstr "Redirección automática"
212
-
213
- #: mercadopago/mercadopago-gateway.php:301
214
- msgid "Automatic Return After Payment"
215
- msgstr "Redirección Automática Luego del Pago"
216
 
217
- #: mercadopago/mercadopago-gateway.php:303
218
- msgid "After the payment, client is automatically redirected."
219
- msgstr "Después del pago, el cliente será redireccionado automáticamente."
220
 
221
- #: mercadopago/mercadopago-gateway.php:306
222
- msgid "Payment Options"
223
- msgstr "Opciones de Pago"
224
 
225
- #: mercadopago/mercadopago-gateway.php:311
226
- msgid "Max installments"
227
- msgstr "Número máximo de mensualidades"
228
 
229
- #: mercadopago/mercadopago-gateway.php:317
230
- msgid "Exclude Payment Methods"
231
- msgstr "Excluir métodos de pago"
 
 
 
232
 
233
- #: mercadopago/mercadopago-gateway.php:324
234
  msgid "Test and Debug Options"
235
  msgstr "Opciones de Prueba y Debug"
236
 
237
- #: mercadopago/mercadopago-gateway.php:329
238
  msgid "Mercado Pago Sandbox"
239
  msgstr "Sandbox Mercado Pago"
240
 
241
- #: mercadopago/mercadopago-gateway.php:331
242
  msgid "Enable Mercado Pago Sandbox"
243
  msgstr "Habilitar el sandbox de Mercado Pago"
244
 
245
- #: mercadopago/mercadopago-gateway.php:333
246
- msgid "This options allows you to test payments inside a sandbox environment."
247
  msgstr "Esta opción permite simular un flujo de pagos completo en nuestro entorno Sandbox."
248
 
249
- #: mercadopago/mercadopago-gateway.php:336
250
  msgid "Debug and Log"
251
  msgstr "Debug y Log"
252
 
253
- #: mercadopago/mercadopago-gateway.php:338
254
  msgid "Enable log"
255
  msgstr "Habilitar Log"
256
 
257
- #: mercadopago/mercadopago-gateway.php:340
258
- #, php-format
259
  msgid "Register event logs of Mercado Pago, such as API requests, in the file"
260
  msgstr "Registrar logs de eventos de Mercado Pago, como llamadas a la API, dentro del archivo"
261
 
262
- #: mercadopago/mercadopago-gateway.php:402
263
- msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
264
- msgstr "Gracias por su compra. Por favor, prosiga a la página de pago haciendo click en el botón de abajo."
265
 
266
- #: mercadopago/mercadopago-gateway.php:410
267
- msgid "Cancel order &amp; Clear cart"
268
- msgstr "Cancelar &amp; Limpiar carrito"
 
269
 
270
- #: mercadopago/mercadopago-gateway.php:420
271
- msgid "Thank you for your order. Proceed with your payment completing the following information."
272
- msgstr "Gracias por su compra. Prosiga con su pago completando la información abajo."
273
 
274
- #: mercadopago/mercadopago-gateway.php:431
275
- msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
276
- msgstr "Un error ocurrió durante el procesamiento de su pago. Por favor intente nuevamente o contactenos para ayudarlo."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
 
278
- #: mercadopago/mercadopago-gateway.php:434
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  msgid "Click to try again"
280
- msgstr "Haga click para intentar de nuevo"
 
 
 
 
 
 
 
 
281
 
282
- #: mercadopago/mercadopago-gateway.php:675 mercadopago/mercadopago-gateway.php:686
 
 
 
 
 
 
 
 
 
283
  msgid "Mercado Pago is Inactive"
284
  msgstr "Mercado Pago Inactivo"
285
 
286
- #: mercadopago/mercadopago-gateway.php:678
287
- msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
288
  msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
289
 
290
- #: mercadopago/mercadopago-gateway.php:679
291
  msgid "Click here and configure!"
292
  msgstr "Haga click aquí y configure!"
293
 
294
- #: mercadopago/mercadopago-gateway.php:689
295
  msgid "The currency"
296
  msgstr "La moneda"
297
 
298
- #: mercadopago/mercadopago-gateway.php:689
299
- msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, USD, VEF."
300
- msgstr "no es soportada. Las monedas soportadas son: ARS, BRL, CLP, COP, MXN, USD, VEF."
301
 
302
- #: mercadopago/mercadopago-gateway.php:714
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  msgid "Mercado Pago Request Failure"
304
  msgstr "La solicitud de Mercado Pago ha fallado."
305
 
306
- #: mercadopago/mercadopago-gateway.php:791
307
- msgid "Mercado Pago Transaction ID"
308
- msgstr "ID de operación de Mercado Pago"
309
-
310
- #: mercadopago/mercadopago-gateway.php:798
311
  msgid "Payer email"
312
  msgstr "Email del comprador"
313
 
314
- #: mercadopago/mercadopago-gateway.php:805
315
  msgid "Payment type"
316
- msgstr "Método de pago"
317
 
318
- #: mercadopago/mercadopago-gateway.php:810
319
- msgid "Payment approved."
320
- msgstr "Pago aprobado."
321
 
322
- #: mercadopago/mercadopago-gateway.php:816
323
  msgid "Customer haven't paid yet."
324
  msgstr "El cliente todavía no efectuó el pago."
325
 
326
- #: mercadopago/mercadopago-gateway.php:821
327
  msgid "Payment under review."
328
  msgstr "El pago está pendiente de revisión."
329
 
330
- #: mercadopago/mercadopago-gateway.php:826
331
  msgid "The payment was refused. The customer can try again."
332
  msgstr "El pago fue rechazado. El cliente puede intentar nuevamente."
333
 
334
- #: mercadopago/mercadopago-gateway.php:832
335
  msgid "The payment was refunded to the customer."
336
  msgstr "El pago fue devuelto al cliente."
337
 
338
- #: mercadopago/mercadopago-gateway.php:838
339
  msgid "The payment was cancelled."
340
  msgstr "El pago fue cancelado."
341
 
342
- #: mercadopago/mercadopago-gateway.php:843
343
- msgid "Mercado Pago Payment ID"
344
- msgstr "ID de pago de Mercado Pago"
345
-
346
- #: mercadopago/mercadopago-gateway.php:843 mercadopago/mercadopago-gateway.php:848
347
  msgid "The payment is under mediation or it was charged-back."
348
  msgstr "El pago esta en mediación o la compra fue desconocida por el cliente."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
+ "POT-Creation-Date: 2016-05-23 14:52-0300\n"
8
  "PO-Revision-Date: \n"
9
+ "Language-Team: Product Development <translations@example.com>\n"
10
  "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;"
18
+ "_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
19
+ "X-Poedit-Basepath: ../Documents/woocommerce (MAMP)/wp-content/plugins/woo-mercado-pago-module\n"
20
  "X-Generator: Poedit 1.8.7\n"
21
  "Last-Translator: \n"
22
+ "Language: es_MX\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
25
  #. Description of the plugin/theme
26
  msgid "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."
27
+ msgstr "Este es el módulo <strong>oficial</strong> de Mercado Pago para el plugin WooCommerce. Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
28
 
29
+ #: mercadopago-module.php:69
30
  #, php-format
31
  msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
32
  msgstr "Woo Mercado Pago Module depende de la última versión de %s para ejecutarse!"
33
 
34
+ #: mercadopago-module.php:109
35
+ msgid "Basic Checkout"
36
+ msgstr "Checkout Básico"
37
+
38
+ #: mercadopago-module.php:113
39
+ msgid "Custom Checkout"
40
+ msgstr "Checkout Personalizado"
41
+
42
+ #: mercadopago/mercadopago-custom-gateway.php:48
43
+ msgid "Mercado Pago - Custom Checkout"
44
+ msgstr "Mercado Pago - Checkout Personalizado"
45
+
46
+ #: mercadopago/mercadopago-custom-gateway.php:51 mercadopago/mercadopago-gateway.php:54
47
  msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
48
+ msgstr "Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
49
 
50
+ #: mercadopago/mercadopago-custom-gateway.php:126 mercadopago/mercadopago-custom-gateway.php:791 mercadopago/mercadopago-gateway.php:125
51
+ #: mercadopago/mercadopago-gateway.php:716
52
  msgid "Argentine"
53
  msgstr "Argentina"
54
 
55
+ #: mercadopago/mercadopago-custom-gateway.php:127 mercadopago/mercadopago-custom-gateway.php:792 mercadopago/mercadopago-gateway.php:126
56
+ #: mercadopago/mercadopago-gateway.php:717
57
  msgid "Brazil"
58
  msgstr "Brasil"
59
 
60
+ #: mercadopago/mercadopago-custom-gateway.php:128 mercadopago/mercadopago-custom-gateway.php:794 mercadopago/mercadopago-gateway.php:127
61
+ #: mercadopago/mercadopago-gateway.php:719
62
  msgid "Chile"
63
  msgstr "Chile"
64
 
65
+ #: mercadopago/mercadopago-custom-gateway.php:129 mercadopago/mercadopago-custom-gateway.php:793 mercadopago/mercadopago-gateway.php:128
66
+ #: mercadopago/mercadopago-gateway.php:718
67
  msgid "Colombia"
68
  msgstr "Colombia"
69
 
70
+ #: mercadopago/mercadopago-custom-gateway.php:130 mercadopago/mercadopago-custom-gateway.php:795 mercadopago/mercadopago-gateway.php:129
71
+ #: mercadopago/mercadopago-gateway.php:720
72
  msgid "Mexico"
73
  msgstr "México"
74
 
75
+ #: mercadopago/mercadopago-custom-gateway.php:132 mercadopago/mercadopago-gateway.php:130
76
  msgid "or"
77
  msgstr "o"
78
 
79
+ #: mercadopago/mercadopago-custom-gateway.php:133 mercadopago/mercadopago-custom-gateway.php:796 mercadopago/mercadopago-gateway.php:131
80
+ #: mercadopago/mercadopago-gateway.php:721
81
  msgid "Venezuela"
82
  msgstr "Venezuela"
83
 
84
+ #: mercadopago/mercadopago-custom-gateway.php:145 mercadopago/mercadopago-gateway.php:151
 
 
 
 
85
  msgid "Your credentials are <strong>valid</strong> for"
86
  msgstr "Sus credenciales <strong>son válidas</strong> para"
87
 
88
+ #: mercadopago/mercadopago-custom-gateway.php:151 mercadopago/mercadopago-custom-gateway.php:156 mercadopago/mercadopago-gateway.php:161
89
+ #: mercadopago/mercadopago-gateway.php:170
 
 
 
90
  msgid "Your credentials are <strong>not valid</strong>!"
91
  msgstr "Sus credenciales <strong>no son válidas</strong>!"
92
 
93
+ #: mercadopago/mercadopago-custom-gateway.php:169 mercadopago/mercadopago-gateway.php:211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  msgid "Enable/Disable"
95
  msgstr "Habilitar/Deshabilitar"
96
 
97
+ #: mercadopago/mercadopago-custom-gateway.php:171
98
+ msgid "Enable Custom Checkout"
99
+ msgstr "Habilitar Checkout Personalizado"
100
 
101
+ #: mercadopago/mercadopago-custom-gateway.php:175 mercadopago/mercadopago-gateway.php:217
102
  msgid "Mercado Pago Credentials"
103
  msgstr "Credenciales de Mercado Pago"
104
 
105
+ #: mercadopago/mercadopago-custom-gateway.php:177 mercadopago/mercadopago-gateway.php:219
106
  msgid "You can obtain your credentials for"
107
  msgstr "Puedes obtener tus credenciales para"
108
 
109
+ #: mercadopago/mercadopago-custom-gateway.php:182
110
+ msgid "Insert your Mercado Pago Public key."
111
+ msgstr "Inserte su Public Key de Mercado Pago."
 
 
 
 
 
 
 
 
112
 
113
+ #: mercadopago/mercadopago-custom-gateway.php:189
114
+ msgid "Insert your Mercado Pago Access token."
115
+ msgstr "Inserte su Access Token de Mercado Pago."
116
 
117
+ #: mercadopago/mercadopago-custom-gateway.php:194 mercadopago/mercadopago-gateway.php:236
118
  msgid "Instant Payment Notification (IPN) URL"
119
  msgstr "URL da Notificación Instantanea de Pago (IPN)"
120
 
121
+ #: mercadopago/mercadopago-custom-gateway.php:196 mercadopago/mercadopago-gateway.php:238
122
  msgid "Your IPN URL to receive instant payment notifications is"
123
  msgstr "Su URL de IPN para recibir notificaciones instantáneas de pago es"
124
 
125
+ #: mercadopago/mercadopago-custom-gateway.php:199 mercadopago/mercadopago-gateway.php:241
126
  msgid "Checkout Options"
127
  msgstr "Opciones de Checkout"
128
 
129
+ #: mercadopago/mercadopago-custom-gateway.php:204 mercadopago/mercadopago-gateway.php:246
130
  msgid "Title"
131
  msgstr "Título"
132
 
133
+ #: mercadopago/mercadopago-custom-gateway.php:206 mercadopago/mercadopago-gateway.php:248
134
  msgid "Title shown to the client in the checkout."
135
  msgstr "Título mostrado al cliente en el checkout."
136
 
137
+ #: mercadopago/mercadopago-custom-gateway.php:207 mercadopago/mercadopago-custom-gateway.php:219 mercadopago/mercadopago-gateway.php:249
138
+ msgid "Mercado Pago"
139
+ msgstr "Mercado Pago"
140
+
141
+ #: mercadopago/mercadopago-custom-gateway.php:210 mercadopago/mercadopago-gateway.php:252
142
  msgid "Description"
143
  msgstr "Descripción"
144
 
145
+ #: mercadopago/mercadopago-custom-gateway.php:212 mercadopago/mercadopago-gateway.php:254
146
  msgid "Description shown to the client in the checkout."
147
  msgstr "Descripción mostrada al cliente en el checkout."
148
 
149
+ #: mercadopago/mercadopago-custom-gateway.php:213 mercadopago/mercadopago-gateway.php:255 mercadopago/mercadopago-gateway.php:432
150
  msgid "Pay with Mercado Pago"
151
  msgstr "Pagar con Mercado Pago"
152
 
153
+ #: mercadopago/mercadopago-custom-gateway.php:216
154
+ msgid "Statement Descriptor"
155
+ msgstr "Descripción de la Factura"
156
 
157
+ #: mercadopago/mercadopago-custom-gateway.php:218
158
+ msgid "The description that will be shown in your customer's invoice."
159
+ msgstr "La descripción que se muestra en la factura de su cliente."
160
 
161
+ #: mercadopago/mercadopago-custom-gateway.php:222
162
+ msgid "Binary Mode"
163
+ msgstr "Modo binario"
164
 
165
+ #: mercadopago/mercadopago-custom-gateway.php:224
166
+ msgid "Enable binary mode for checkout status"
167
+ msgstr "Activar el modo binario para el estado del checkout"
168
 
169
+ #: mercadopago/mercadopago-custom-gateway.php:226
170
+ msgid "When charging a credit card, only [approved] or [reject] status will be taken."
171
+ msgstr "Al cargar una tarjeta de crédito, sólo los estados [aprobado] o [rechazar] seran tomados."
172
 
173
+ #: mercadopago/mercadopago-custom-gateway.php:229
174
+ msgid "Ticket"
175
+ msgstr "Ticket"
 
 
 
 
 
 
 
 
176
 
177
+ #: mercadopago/mercadopago-custom-gateway.php:231
178
+ msgid "Enable Ticket for Custom Checkout"
179
+ msgstr "Habilitar Ticket para Checkout Personalizado"
180
 
181
+ #: mercadopago/mercadopago-custom-gateway.php:233
182
+ msgid "Let your customer pay you with tickets"
183
+ msgstr "Deje que su cliente le paga con tickets"
184
 
185
+ #: mercadopago/mercadopago-custom-gateway.php:236 mercadopago/mercadopago-gateway.php:258
186
+ msgid "Store Category"
187
+ msgstr "Categoría de la tienda"
 
 
 
 
 
 
 
 
 
 
 
 
188
 
189
+ #: mercadopago/mercadopago-custom-gateway.php:238 mercadopago/mercadopago-gateway.php:260
190
+ msgid "Define which type of products your store sells."
191
+ msgstr "Defina el tipo de productos que su tienda vende."
192
 
193
+ #: mercadopago/mercadopago-custom-gateway.php:242 mercadopago/mercadopago-gateway.php:264
194
+ msgid "Store Identificator"
195
+ msgstr "Identificador de la tienda"
196
 
197
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
198
+ msgid "Please, inform a prefix to your store."
199
+ msgstr "Por favor, informe un prefijo para su tienda."
200
 
201
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
202
+ msgid ""
203
+ "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same "
204
+ "identificators."
205
+ msgstr ""
206
+ "Si esta utilizando su cuenta Mercado Pago para múltiples tiendas, asegúrese que este prefijo sea único para no generar pedidos con el mismo identificador."
207
 
208
+ #: mercadopago/mercadopago-custom-gateway.php:248 mercadopago/mercadopago-gateway.php:318
209
  msgid "Test and Debug Options"
210
  msgstr "Opciones de Prueba y Debug"
211
 
212
+ #: mercadopago/mercadopago-custom-gateway.php:253 mercadopago/mercadopago-gateway.php:323
213
  msgid "Mercado Pago Sandbox"
214
  msgstr "Sandbox Mercado Pago"
215
 
216
+ #: mercadopago/mercadopago-custom-gateway.php:255 mercadopago/mercadopago-gateway.php:325
217
  msgid "Enable Mercado Pago Sandbox"
218
  msgstr "Habilitar el sandbox de Mercado Pago"
219
 
220
+ #: mercadopago/mercadopago-custom-gateway.php:257 mercadopago/mercadopago-gateway.php:327
221
+ msgid "This option allows you to test payments inside a sandbox environment."
222
  msgstr "Esta opción permite simular un flujo de pagos completo en nuestro entorno Sandbox."
223
 
224
+ #: mercadopago/mercadopago-custom-gateway.php:260 mercadopago/mercadopago-gateway.php:330
225
  msgid "Debug and Log"
226
  msgstr "Debug y Log"
227
 
228
+ #: mercadopago/mercadopago-custom-gateway.php:262 mercadopago/mercadopago-gateway.php:332
229
  msgid "Enable log"
230
  msgstr "Habilitar Log"
231
 
232
+ #: mercadopago/mercadopago-custom-gateway.php:264 mercadopago/mercadopago-gateway.php:334
 
233
  msgid "Register event logs of Mercado Pago, such as API requests, in the file"
234
  msgstr "Registrar logs de eventos de Mercado Pago, como llamadas a la API, dentro del archivo"
235
 
236
+ #: mercadopago/mercadopago-custom-gateway.php:265 mercadopago/mercadopago-gateway.php:335
237
+ msgid "File location: "
238
+ msgstr "Local del archivo: "
239
 
240
+ #: mercadopago/mercadopago-custom-gateway.php:281 mercadopago/mercadopago-gateway.php:351
241
+ #, php-format
242
+ msgid "Please, rate us %s on WordPress.org and give your feedback to help improve this module!"
243
+ msgstr "Por favor, califíquenos con %s en WordPress.org y de su feedback para ayudar a mejorar este módulo!"
244
 
245
+ #: mercadopago/mercadopago-custom-gateway.php:332
246
+ msgid "Payment Method"
247
+ msgstr "Medios de Pago"
248
 
249
+ #: mercadopago/mercadopago-custom-gateway.php:333
250
+ msgid "Credit card number"
251
+ msgstr "Número de tarjeta de crédito"
252
+
253
+ #: mercadopago/mercadopago-custom-gateway.php:334
254
+ msgid "Expiration month"
255
+ msgstr "Mes de expiración"
256
+
257
+ #: mercadopago/mercadopago-custom-gateway.php:335
258
+ msgid "Expiration year"
259
+ msgstr "Año de expiración"
260
+
261
+ #: mercadopago/mercadopago-custom-gateway.php:336
262
+ msgid "Year"
263
+ msgstr "Año"
264
+
265
+ #: mercadopago/mercadopago-custom-gateway.php:337
266
+ msgid "Month"
267
+ msgstr "Mes"
268
+
269
+ #: mercadopago/mercadopago-custom-gateway.php:338
270
+ msgid "Card holder name"
271
+ msgstr "Nombre del titular de la tarjeta"
272
+
273
+ #: mercadopago/mercadopago-custom-gateway.php:339
274
+ msgid "Security code"
275
+ msgstr "Código de seguridad"
276
+
277
+ #: mercadopago/mercadopago-custom-gateway.php:340
278
+ msgid "Document Type"
279
+ msgstr "Tipo de Documento"
280
+
281
+ #: mercadopago/mercadopago-custom-gateway.php:341
282
+ msgid "Document number"
283
+ msgstr "Número de Documento"
284
+
285
+ #: mercadopago/mercadopago-custom-gateway.php:342
286
+ msgid "Issuer"
287
+ msgstr "Emisor"
288
+
289
+ #: mercadopago/mercadopago-custom-gateway.php:343
290
+ msgid "Installments"
291
+ msgstr "Mensualidades"
292
 
293
+ #: mercadopago/mercadopago-custom-gateway.php:347
294
+ msgid "Parameter cardNumber can not be null/empty"
295
+ msgstr "Parámetro [Número de tarjeta] no puede ser nulo/vacío"
296
+
297
+ #: mercadopago/mercadopago-custom-gateway.php:348
298
+ msgid "Invalid Card Number"
299
+ msgstr "Número de tarjeta inválido"
300
+
301
+ #: mercadopago/mercadopago-custom-gateway.php:350 mercadopago/mercadopago-custom-gateway.php:351 mercadopago/mercadopago-custom-gateway.php:352
302
+ #: mercadopago/mercadopago-custom-gateway.php:353
303
+ msgid "Invalid Expiration Date"
304
+ msgstr "Fecha de expiración inválida"
305
+
306
+ #: mercadopago/mercadopago-custom-gateway.php:355
307
+ msgid "Parameter cardholderName can not be null/empty"
308
+ msgstr "Parámetro [Nombre del titular] no puede ser nulo/vacío"
309
+
310
+ #: mercadopago/mercadopago-custom-gateway.php:356
311
+ msgid "Invalid Card Holder Name"
312
+ msgstr "Nombre del titular de la tarjeta inválido"
313
+
314
+ #: mercadopago/mercadopago-custom-gateway.php:358
315
+ msgid "Parameter securityCode can not be null/empty"
316
+ msgstr "Parámetro [Código de seguridad] no puede ser nulo/vacío"
317
+
318
+ #: mercadopago/mercadopago-custom-gateway.php:359
319
+ msgid "Invalid Security Code"
320
+ msgstr "Código de seguridad inválido"
321
+
322
+ #: mercadopago/mercadopago-custom-gateway.php:361
323
+ msgid "Parameter docType can not be null/empty"
324
+ msgstr "Parámetro [Tipo de Documento] no puede ser nulo/vacío"
325
+
326
+ #: mercadopago/mercadopago-custom-gateway.php:362
327
+ msgid "Invalid Document Type"
328
+ msgstr "Tipo de Documento inválido"
329
+
330
+ #: mercadopago/mercadopago-custom-gateway.php:364
331
+ msgid "Parameter docNumber can not be null/empty"
332
+ msgstr "Parámetro [Número del Documento] no puede ser nulo/vacío"
333
+
334
+ #: mercadopago/mercadopago-custom-gateway.php:365
335
+ msgid "Invalid Document Number"
336
+ msgstr "Número del Documento inválido"
337
+
338
+ #: mercadopago/mercadopago-custom-gateway.php:367
339
+ msgid "The parameter cardholder.document.subtype can not be null or empty"
340
+ msgstr "Parámetro [Subtipo del documento] no puede ser nulo/vacío"
341
+
342
+ #: mercadopago/mercadopago-custom-gateway.php:368
343
+ msgid "Invalid Document Sub Type"
344
+ msgstr "Subtipo del documento inválido"
345
+
346
+ #: mercadopago/mercadopago-custom-gateway.php:370
347
+ msgid "Parameter cardIssuerId can not be null/empty"
348
+ msgstr "Parámetro [Emisor] no puede ser nulo/vacío"
349
+
350
+ #: mercadopago/mercadopago-custom-gateway.php:402 mercadopago/mercadopago-custom-gateway.php:943 mercadopago/mercadopago-gateway.php:869
351
+ msgid "Payment approved."
352
+ msgstr "Pago aprobado."
353
+
354
+ #: mercadopago/mercadopago-custom-gateway.php:416 mercadopago/mercadopago-custom-gateway.php:805
355
+ msgid "Your payment is under review. In less than 1h, you should be notified by email."
356
+ msgstr "Su pago está en revisión. En menos de 1 hora, usted será notificado por correo electrónico."
357
+
358
+ #: mercadopago/mercadopago-custom-gateway.php:418
359
+ msgid "Check your order resume"
360
+ msgstr "Ver su hoja de pedido"
361
+
362
+ #: mercadopago/mercadopago-custom-gateway.php:431
363
+ msgid "Your payment was refused. You can try again."
364
+ msgstr "Su pago fue rechazado. Puede intentarlo de nuevo."
365
+
366
+ #: mercadopago/mercadopago-custom-gateway.php:435 mercadopago/mercadopago-custom-gateway.php:819 mercadopago/mercadopago-gateway.php:460
367
  msgid "Click to try again"
368
+ msgstr "Haga clic para intentarlo de nuevo"
369
+
370
+ #: mercadopago/mercadopago-custom-gateway.php:455
371
+ msgid "A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?"
372
+ msgstr "Un problema se produjo al procesar su pago. ¿Esta seguro que ha rellenado correctamente toda la información en el formulario de checkout?"
373
+
374
+ #: mercadopago/mercadopago-custom-gateway.php:544
375
+ msgid "Shipping"
376
+ msgstr "Envío"
377
 
378
+ #: mercadopago/mercadopago-custom-gateway.php:545
379
+ msgid "Shipping service used by store"
380
+ msgstr "Servicio de envío utilizado por la tienda"
381
+
382
+ #: mercadopago/mercadopago-custom-gateway.php:721 mercadopago/mercadopago-gateway.php:649
383
+ msgid "WooCommerce &gt; System Status &gt; Logs"
384
+ msgstr "WooCommerce &gt; Estado del Sistema &gt; Logs"
385
+
386
+ #: mercadopago/mercadopago-custom-gateway.php:766 mercadopago/mercadopago-custom-gateway.php:779 mercadopago/mercadopago-gateway.php:694
387
+ #: mercadopago/mercadopago-gateway.php:705
388
  msgid "Mercado Pago is Inactive"
389
  msgstr "Mercado Pago Inactivo"
390
 
391
+ #: mercadopago/mercadopago-custom-gateway.php:769
392
+ msgid "Your Mercado Pago credentials Public Key/Access Token appears to be misconfigured."
393
  msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
394
 
395
+ #: mercadopago/mercadopago-custom-gateway.php:771 mercadopago/mercadopago-gateway.php:698
396
  msgid "Click here and configure!"
397
  msgstr "Haga click aquí y configure!"
398
 
399
+ #: mercadopago/mercadopago-custom-gateway.php:782 mercadopago/mercadopago-gateway.php:708
400
  msgid "The currency"
401
  msgstr "La moneda"
402
 
403
+ #: mercadopago/mercadopago-custom-gateway.php:783 mercadopago/mercadopago-gateway.php:708
404
+ msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, PEN, VEF."
405
+ msgstr "no es soportada. Las monedas soportadas son: ARS, BRL, CLP, COP, MXN, PEN, VEF."
406
 
407
+ #: mercadopago/mercadopago-custom-gateway.php:797
408
+ msgid "Peru"
409
+ msgstr "Perú"
410
+
411
+ #: mercadopago/mercadopago-custom-gateway.php:809
412
+ msgid "Click to check your order"
413
+ msgstr "Haga clic para comprobar su pedido"
414
+
415
+ #: mercadopago/mercadopago-custom-gateway.php:814 mercadopago/mercadopago-gateway.php:457
416
+ msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
417
+ msgstr "Se ha producido un error en el procesamiento de su pago. Por favor, inténtelo de nuevo o póngase en contacto con nosotros para Asistencia."
418
+
419
+ #: mercadopago/mercadopago-custom-gateway.php:816
420
+ msgid "Reason is: "
421
+ msgstr "La razón es:"
422
+
423
+ #: mercadopago/mercadopago-custom-gateway.php:849 mercadopago/mercadopago-gateway.php:748
424
  msgid "Mercado Pago Request Failure"
425
  msgstr "La solicitud de Mercado Pago ha fallado."
426
 
427
+ #: mercadopago/mercadopago-custom-gateway.php:918 mercadopago/mercadopago-gateway.php:822
 
 
 
 
428
  msgid "Payer email"
429
  msgstr "Email del comprador"
430
 
431
+ #: mercadopago/mercadopago-custom-gateway.php:926 mercadopago/mercadopago-gateway.php:829
432
  msgid "Payment type"
433
+ msgstr "Medio de pago"
434
 
435
+ #: mercadopago/mercadopago-custom-gateway.php:934 mercadopago/mercadopago-gateway.php:841
436
+ msgid "Mercado Pago Payment ID"
437
+ msgstr "ID de pago de Mercado Pago"
438
 
439
+ #: mercadopago/mercadopago-custom-gateway.php:950 mercadopago/mercadopago-gateway.php:875
440
  msgid "Customer haven't paid yet."
441
  msgstr "El cliente todavía no efectuó el pago."
442
 
443
+ #: mercadopago/mercadopago-custom-gateway.php:957 mercadopago/mercadopago-gateway.php:881
444
  msgid "Payment under review."
445
  msgstr "El pago está pendiente de revisión."
446
 
447
+ #: mercadopago/mercadopago-custom-gateway.php:964 mercadopago/mercadopago-gateway.php:887
448
  msgid "The payment was refused. The customer can try again."
449
  msgstr "El pago fue rechazado. El cliente puede intentar nuevamente."
450
 
451
+ #: mercadopago/mercadopago-custom-gateway.php:971 mercadopago/mercadopago-gateway.php:893
452
  msgid "The payment was refunded to the customer."
453
  msgstr "El pago fue devuelto al cliente."
454
 
455
+ #: mercadopago/mercadopago-custom-gateway.php:978 mercadopago/mercadopago-gateway.php:899
456
  msgid "The payment was cancelled."
457
  msgstr "El pago fue cancelado."
458
 
459
+ #: mercadopago/mercadopago-custom-gateway.php:984 mercadopago/mercadopago-custom-gateway.php:990 mercadopago/mercadopago-gateway.php:904
460
+ #: mercadopago/mercadopago-gateway.php:909
 
 
 
461
  msgid "The payment is under mediation or it was charged-back."
462
  msgstr "El pago esta en mediación o la compra fue desconocida por el cliente."
463
+
464
+ #: mercadopago/mercadopago-gateway.php:51
465
+ msgid "Mercado Pago - Basic Checkout"
466
+ msgstr "Mercado Pago - Checkout Básico"
467
+
468
+ #: mercadopago/mercadopago-gateway.php:148
469
+ msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
470
+ msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
471
+
472
+ #: mercadopago/mercadopago-gateway.php:158 mercadopago/mercadopago-gateway.php:167
473
+ msgid "Configure your Client_id and Client_secret to have access to more options."
474
+ msgstr "Configure su Client_id y Client_secret para tener acceso a más opciones."
475
+
476
+ #: mercadopago/mercadopago-gateway.php:184 mercadopago/mercadopago-gateway.php:192 mercadopago/mercadopago-gateway.php:202
477
+ msgid "This field should be an integer."
478
+ msgstr "Este campo debe ser un número."
479
+
480
+ #: mercadopago/mercadopago-gateway.php:187
481
+ msgid "If your integration method is iFrame, please inform the payment iFrame width."
482
+ msgstr "Si su modo de apertura es iFrame, indique el ancho del iFrame."
483
+
484
+ #: mercadopago/mercadopago-gateway.php:195
485
+ msgid "If your integration method is iFrame, please inform the payment iFrame height."
486
+ msgstr "Si su modo de apertura es iFrame, indique el alto del iFrame."
487
+
488
+ #: mercadopago/mercadopago-gateway.php:205
489
+ msgid "Select the max number of installments for your customers."
490
+ msgstr "Seleccione el número máximo de mensualidades disponibles para sus clientes."
491
+
492
+ #: mercadopago/mercadopago-gateway.php:213
493
+ msgid "Enable Basic Checkout"
494
+ msgstr "Habilitar el Checkout Básico"
495
+
496
+ #: mercadopago/mercadopago-gateway.php:224
497
+ msgid "Insert your Mercado Pago Client_id."
498
+ msgstr "Inserte su Client_id de Mercado Pago."
499
+
500
+ #: mercadopago/mercadopago-gateway.php:231
501
+ msgid "Insert your Mercado Pago Client_secret."
502
+ msgstr "Inserte su Client_secret de Mercado Pago."
503
+
504
+ #: mercadopago/mercadopago-gateway.php:270
505
+ msgid "Integration Method"
506
+ msgstr "Método de integración"
507
+
508
+ #: mercadopago/mercadopago-gateway.php:272
509
+ msgid ""
510
+ "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an "
511
+ "internal window is embedded to the page layout)."
512
+ msgstr ""
513
+ "Seleccione la forma en que sus clientes deben interactuar con Mercado Pago. Ventana Modal (Dentro de su tienda), Redireccionamiento (El cliente es "
514
+ "redireccionado a Mercado Pago), o iFrame (Ventana de pago incorporada a su página)."
515
+
516
+ #: mercadopago/mercadopago-gateway.php:275
517
+ msgid "iFrame"
518
+ msgstr "iFrame"
519
+
520
+ #: mercadopago/mercadopago-gateway.php:276
521
+ msgid "Modal Window"
522
+ msgstr "Ventana modal"
523
+
524
+ #: mercadopago/mercadopago-gateway.php:277
525
+ msgid "Redirect"
526
+ msgstr "Redireccionamiento"
527
+
528
+ #: mercadopago/mercadopago-gateway.php:281
529
+ msgid "iFrame Width"
530
+ msgstr "Ancho del iFrame"
531
+
532
+ #: mercadopago/mercadopago-gateway.php:287
533
+ msgid "iFrame Height"
534
+ msgstr "Alto del iFrame"
535
+
536
+ #: mercadopago/mercadopago-gateway.php:293
537
+ msgid "Auto Return"
538
+ msgstr "Redirección automática"
539
+
540
+ #: mercadopago/mercadopago-gateway.php:295
541
+ msgid "Automatic Return After Payment"
542
+ msgstr "Redirección Automática luego del pago"
543
+
544
+ #: mercadopago/mercadopago-gateway.php:297
545
+ msgid "After the payment, client is automatically redirected."
546
+ msgstr "Después del pago, el cliente será redireccionado automáticamente."
547
+
548
+ #: mercadopago/mercadopago-gateway.php:300
549
+ msgid "Payment Options"
550
+ msgstr "Opciones de Pago"
551
+
552
+ #: mercadopago/mercadopago-gateway.php:305
553
+ msgid "Max installments"
554
+ msgstr "Número máximo de mensualidades"
555
+
556
+ #: mercadopago/mercadopago-gateway.php:311
557
+ msgid "Exclude Payment Methods"
558
+ msgstr "Excluir medios de pago"
559
+
560
+ #: mercadopago/mercadopago-gateway.php:428
561
+ msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
562
+ msgstr "Gracias por su compra. Por favor, prosiga a la página de pago haciendo click en el botón de abajo."
563
+
564
+ #: mercadopago/mercadopago-gateway.php:436
565
+ msgid "Cancel order &amp; Clear cart"
566
+ msgstr "Cancelar &amp; Limpiar carrito"
567
+
568
+ #: mercadopago/mercadopago-gateway.php:446
569
+ msgid "Thank you for your order. Proceed with your payment completing the following information."
570
+ msgstr "Gracias por su compra. Prosiga con su pago completando la información abajo."
571
+
572
+ #: mercadopago/mercadopago-gateway.php:697
573
+ msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
574
+ msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
575
+
576
+ msgid " as it appears in your card ..."
577
+ msgstr " tal como aparece en su tarjeta ..."
578
+
579
+ msgid "Done, your payment was accredited!"
580
+ msgstr "Listo, su pago ha sido aceptado!"
581
+
582
+ msgid "We are processing the payment. In less than an hour we will e-mail you the results."
583
+ msgstr "Estamos procesando su pago. En menos de una hora le enviaremos el resultado por correo electrónico."
584
+
585
+ msgid "We are processing the payment. In less than 2 business days we will tell you by e-mail whether it has accredited or we need more information."
586
+ msgstr "Estamos procesando su pago. En menos de 2 días le enviaremos por correo electrónico si se ha aprobado el pago o si se necesita información adicional."
587
+
588
+ msgid "Check the card number."
589
+ msgstr "Compruebe el número de tarjeta."
590
+
591
+ msgid "Check the expiration date."
592
+ msgstr "Compruebe la fecha de expiración."
593
+
594
+ msgid "Check the information."
595
+ msgstr "Compruebe la información informada."
596
+
597
+ msgid "Check the security code."
598
+ msgstr "Compruebe el código de seguridad informado."
599
+
600
+ msgid "We could not process your payment."
601
+ msgstr "No se puede procesar su pago."
602
+
603
+ msgid "You must authorize the payment of your orders."
604
+ msgstr "Usted debe autorizar los pagos de sus órdenes."
605
+
606
+ msgid "Call your card issuer to activate your card. The phone is on the back of your card."
607
+ msgstr "Póngase en contacto con el emisor de su tarjeta para activarla. El teléfono se encuentra en la parte posterior de su tarjeta."
608
+
609
+ msgid "You already made a payment for that amount. If you need to repay, use another card or other payment method."
610
+ msgstr "Usted ya realizó un pago de este importe. Si tiene que pagar de nuevo, utilizar otra tarjeta u otro medio de pago."
611
+
612
+ msgid "Your payment was rejected. Choose another payment method. We recommend cash."
613
+ msgstr "Su pago fue rechazado. Por favor seleccione otro medio de pago. Se recomienda en efectivo."
614
+
615
+ msgid "Your payment do not have sufficient funds."
616
+ msgstr "Su pago no tiene fondos suficientes."
617
+
618
+ msgid "Your payment does not process payments with selected installments."
619
+ msgstr "El pago no puede procesar la mensualidad seleccionada."
620
+
621
+ msgid "You have reached the limit of allowed attempts. Choose another card or another payment method."
622
+ msgstr "Has alcanzado el límite de intentos permitidos. Elija otra tarjeta u otro medio de pago."
623
+
624
+ msgid "This payment method did not process the payment."
625
+ msgstr "Esta medio de pago no puede procesar su pago."
626
+
627
+ msgid "Mercado Pago - Ticket"
628
+ msgstr "Mercado Pago - Ticket"
629
+
630
+ msgid "Mercado Pago - Credit Card"
631
+ msgstr "Mercado Pago - Tarjeta de Crédito"
632
+
633
+ msgid "Ticket Options"
634
+ msgstr "Opciones de Ticket"
635
+
636
+ msgid "Enable Ticket Payment Method"
637
+ msgstr "Habilitar Pago con Ticket"
638
+
639
+ msgid "Other Bank"
640
+ msgstr "Otro Banco"
641
+
642
+ msgid "Choose"
643
+ msgstr "Escoger"
644
+
645
+ msgid "A problem was occurred when processing your payment. Please, try again."
646
+ msgstr "Un problema se produjo al procesar su pago. Por favor, inténtelo de nuevo."
647
+
648
+ msgid "Thank you for your order. Please, pay the ticket to get your order approved."
649
+ msgstr "Gracias por su orden. Por favor, realice el pago del ticket para tener su orden aprobada."
650
+
651
+ msgid "Waiting for the ticket payment."
652
+ msgstr "Esperando el pago del ticket."
653
+
654
+ msgid "Print the Ticket"
655
+ msgstr "Imprimir el ticket"
656
+
657
+ msgid "To reprint the ticket click "
658
+ msgstr "Para imprimir nuevamente el ticket hace clic "
659
+
660
+ msgid "here"
661
+ msgstr "aquí"
662
+
663
+ msgid "Custom Checkout is Inactive"
664
+ msgstr "Checkout Personalizado Inactivo"
665
+
666
+ msgid "Basic Checkout is Inactive"
667
+ msgstr "Checkout Básico Inactivo"
668
+
669
+ msgid "Ticket is Inactive"
670
+ msgstr "Ticket Inactivo"
671
+
672
+ msgid "Please, select the ticket issuer of your preference."
673
+ msgstr "Por favor, seleccione el emisor de su elección."
674
+
675
+ msgid "Click "Place order" button. The ticket will be generated and you will be redirected to print it."
676
+ msgstr "Haga clic en el botón "Realizar el pedido". El ticket será generado y usted será redirigido a imprimirlo."
677
+
678
+ msgid "Important: The order will be confirmed only after the payment approval."
679
+ msgstr "Importante: La solicitud sólo será confirmada después de la aprobación del pago."
680
+
681
+ msgid "Your Mercado Pago credential Access Token appears to be misconfigured."
682
+ msgstr "Su credencial Access Token de Mercado de Pago parece estar desconfigurada."
683
+
684
+ msgid "Your Card"
685
+ msgstr "Sus Tarjetas"
686
+
687
+ msgid "Other Cards"
688
+ msgstr "Otras Tarjetas"
689
+
690
+ msgid "Other Card"
691
+ msgstr "Otra Tarjeta"
692
+
693
+ msgid "ended in"
694
+ msgstr "terminado en"
695
+
696
+ msgid "Your site appears to not have SSL certification. SSL is a pre-requisite because the payment process is made in your server."
697
+ msgstr "Su sitio parece no tener certificación SSL. SSL es un requisito para transaccionar desde su servidor."
698
+
699
+ msgid "ATTENTION: The currency"
700
+ msgstr "ATENCIÓN: La moneda"
701
+
702
+ msgid "defined in WooCommerce is different from the one used in your credentials country.<br>The currency for transactions in this payment method will be"
703
+ msgstr "que se define en WooCommerce es diferente de la utilizada en el país de sus credenciales.<br>La moneda para las transacciones realizadas por este medio de pago será"
704
+
705
+ msgid "Currency conversions should be made outside this module."
706
+ msgstr "Conversiones de monedas deben hacerse fuera de este módulo."
707
+
708
+ msgid "Coupons"
709
+ msgstr "Cupones"
710
+
711
+ msgid "Enable coupons of discounts"
712
+ msgstr "Activar los cupones de descuento"
713
+
714
+ msgid "If there is a Mercado Pago campaign, allow your store to give discounts to customers."
715
+ msgstr "Si hay una campaña de Mercado Pago, permitir a su tienda hacer descuentos para los clientes."
716
+
717
+ msgid "You will save"
718
+ msgstr "Usted ahorrará"
719
+
720
+ msgid "Apply"
721
+ msgstr "Aplicar"
722
+
723
+ msgid "Remove"
724
+ msgstr "Eliminar"
725
+
726
+ msgid "Please, inform your coupon code"
727
+ msgstr "Por favor, introduzca el código de su cupón"
728
+
729
+ msgid "Please, inform your email in billing address to use this feature"
730
+ msgstr "Por favor, introduzca su email en la dirección de facturación para utilizar este servicio"
731
+
732
+ msgid "Discount for %s coupon"
733
+ msgstr "Descuento para el cupón %s"
734
+
735
+ msgid "Discount provided by store"
736
+ msgstr "Descuento dado por la tienda"
737
+
738
+ msgid "Discount Coupon"
739
+ msgstr "Cupón de Descuento"
740
+
741
+ msgid "CURRENCY CONVERTED: The currency conversion ratio from"
742
+ msgstr "MONEDA CONVERTIDA: La tasa de conversión de moneda de"
743
+
744
+ msgid "ERROR: It was not possible to convert the unsupported currency"
745
+ msgstr "ERROR: No fue posible convertir la moneda no soportada"
746
+
747
+ msgid "to"
748
+ msgstr "para"
749
+
750
+ msgid "If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio."
751
+ msgstr "Si la moneda utilizada en WooCommerce es diferente o no soportada por Mercado Pago, convierte los importes de sus transacciones con la tasa de conversión de Mercado Pago."
752
+
753
+ msgid " is: "
754
+ msgstr " es: "
755
+
756
+ msgid "Currency Conversion"
757
+ msgstr "Conversión de Moneda"
758
+
759
+ msgid "with discount from"
760
+ msgstr "con descuento de"
761
+
762
+ msgid "Total of your purchase:"
763
+ msgstr "Total de su compra:"
764
+
765
+ msgid "Total of your purchase with discount:"
766
+ msgstr "Total de su compra con descuento:"
767
+
768
+ msgid "*Uppon payment approval"
769
+ msgstr "*Con la aprobación de pago"
770
+
771
+ msgid "Terms and Conditions of Use"
772
+ msgstr "Términos y Condiciones de Uso"
773
+
774
+ msgid "Payment converted from"
775
+ msgstr "Pago convertido de"
776
+
777
+ msgid "Rate Us"
778
+ msgstr "Calificar"
779
+
780
+ msgid "Report Issue"
781
+ msgstr "Informar Problema"
782
+
783
+ msgid "Two Cards Mode"
784
+ msgstr "Modo de Dos Tarjetas"
785
+
786
+ msgid "Payments with Two Cards"
787
+ msgstr "Pagos con Dos Tarjetas"
788
+
789
+ msgid "Your customer will be able to use two different cards to pay the order."
790
+ msgstr "Su cliente será capaz de utilizar dos tarjetas diferentes para pagar el pedido."
791
+
792
+ msgid "Your Mercado Pago credentials Access Token appears to be misconfigured."
793
+ msgstr "La credencial Mercado Pago Access Token parece estar mal configurada."
794
+
795
+ msgid "Cancel Order"
796
+ msgstr "Cancelar la Compra"
797
+
798
+ msgid "Refund Order"
799
+ msgstr "Reembolso de Compra"
800
+
801
+ msgid "Back URL Options"
802
+ msgstr "Opciones de URL de Callback"
803
+
804
+ msgid "Sucess URL"
805
+ msgstr "URL de Éxito"
806
+
807
+ msgid "Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page."
808
+ msgstr "Donde los clientes serán redirigidos después de una compra exitosa. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
809
+
810
+ msgid "Failure URL"
811
+ msgstr "URL de Pago Rechazado"
812
+
813
+ msgid "Where customers should be redirected after a failed purchase. Let blank to redirect to the default store order resume page."
814
+ msgstr "Donde los clientes serán redirigidos después de una compra rechazada. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
815
+
816
+ msgid "Pending URL"
817
+ msgstr "URL de Pago Pendiente"
818
+
819
+ msgid "Where customers should be redirected after a pending purchase. Let blank to redirect to the default store order resume page."
820
+ msgstr "Donde los clientes ​serán redirigidos después de una compra pendiente. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
821
+
822
+ msgid "Stock Reduce"
823
+ msgstr "Reducir Inventario"
824
+
825
+ msgid "Reduce Stock in Order Generation"
826
+ msgstr "Reducir Inventario en la Orden"
827
+
828
+ msgid "Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval."
829
+ msgstr "Activar esta opción para reducir el inventario mediante la creación de un pedido. Desactivar para reducir sólo <strong>después</strong> de la aprobación del pago."
830
+
831
+ msgid "Recurrent Product"
832
+ msgstr "Producto Recurrente"
833
+
834
+ msgid "Frequency"
835
+ msgstr "Frecuencia"
836
+
837
+ msgid "Amount of time (in days or months) for the execution of the next payment."
838
+ msgstr "Cantidad de tiempo (en días o meses) para la ejecución del próximo pago."
839
+
840
+ msgid "Start date"
841
+ msgstr "Fecha de inicio"
842
+
843
+ msgid "First payment date (effective debit). Defaults to now if blank."
844
+ msgstr "Primera fecha de pago (débito efectivo). De forma predeterminada ahora, si está en blanco."
845
+
846
+ msgid "End date"
847
+ msgstr "Fecha final"
848
+
849
+ msgid "Deadline to generate new charges. Defaults to never if blank."
850
+ msgstr "Fecha límite para generar nuevos cargos. De forma predeterminada como nunca, si está en blanco."
851
+
852
+ msgid "Days"
853
+ msgstr "Días"
854
+
855
+ msgid "Months"
856
+ msgstr "Meses"
857
+
858
+ msgid "Indicates the period of time."
859
+ msgstr "Indica el período de tiempo."
860
+
861
+ msgid "The amount to charge the payer each period. Should be informed including taxes and discounts."
862
+ msgstr "La cantidad para cobrar el pagador en cada período. Debe ser informada incluyendo impuestos y descuentos."
863
+
864
+ msgid "Amount charged"
865
+ msgstr "Cantidad de cobro"
866
+
867
+ msgid "Uruguay"
868
+ msgstr "Uruguay"
869
+
870
+ msgid "Frequency type"
871
+ msgstr "Tipo de frecuencia"
872
+
873
+ msgid "Transaction amount"
874
+ msgstr "Valor de la transacción"
875
+
876
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
877
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
878
+
879
+ msgid "Subscription"
880
+ msgstr "Suscripción"
881
+
882
+ msgid "Enable Subscription"
883
+ msgstr "Habilitar Suscripción"
884
+
885
+ msgid "Subscription is Inactive"
886
+ msgstr "La Suscripción está Inactiva"
887
+
888
+ msgid "Subscribe with Mercado Pago"
889
+ msgstr "Suscribirse con Mercado Pago"
890
+
891
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
892
+ msgstr "Para esta solución, usted debe configurar su URL de IPN. Puede acceder a ella en su cuenta para su específico país en:"
893
+
894
+ msgid "Discount by Gateway"
895
+ msgstr "Descuento por Gateway"
896
+
897
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
898
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
899
+
900
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
901
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
902
+
903
+ msgid "Discount Of"
904
+ msgstr "Descuento de"
905
+
906
+ msgid "Mercado Pago Subscription"
907
+ msgstr "Suscripción Mercado Pago"
908
+
909
+ msgid "Payment ID:"
910
+ msgstr "ID de Pago:"
911
+
912
+ msgid "Amount:"
913
+ msgstr "Cantidad:"
914
+
915
+ msgid "This operation could not be completed."
916
+ msgstr "Esta operación no se puede completar."
917
+
918
+ msgid "Operation successfully completed."
919
+ msgstr "La operación se realizó con éxito."
920
+
921
+ msgid "Refund Payment"
922
+ msgstr "Reembolso de Pago"
923
+
924
+ msgid "Cancel Payment"
925
+ msgstr "Cancelar Pago"
926
+
927
+ msgid "Mercado Pago - Subscription"
928
+ msgstr "Mercado Pago - Suscripcións"
929
+
930
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
931
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
932
+
933
+ msgid "Free Shipping"
934
+ msgstr "Envío Gratuito"
935
+
936
+ msgid "Day"
937
+ msgstr "Día"
938
+
939
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
940
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
941
+
942
+ msgid "Mercado Envios"
943
+ msgstr "Mercado Envios"
944
+
945
+ msgid "This controls the title which the user sees during checkout."
946
+ msgstr "Controla el título que se muestra al cliente durante el pago."
947
+
948
+ msgid "Enable free shipping for this shipping method"
949
+ msgstr "Habilitar el envío gratuito para este método de envío"
950
+
951
+ msgid "Delivery Time"
952
+ msgstr "Tiempo de Entrega"
953
+
954
+ msgid "Show estimated delivery time"
955
+ msgstr "Mostrar el tiempo estimado de entrega"
956
+
957
+ msgid "Display the estimated delivery time in working days."
958
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
959
+
960
+ msgid "Buyer initiates complaint and requested a refund."
961
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
962
+
963
+ msgid "In return to sender"
964
+ msgstr "Volviendo al remitente"
965
+
966
+ msgid "Missing recipient for delivery"
967
+ msgstr "Destinatario ausente para envío"
968
+
969
+ msgid "Delayed shipping"
970
+ msgstr "Envío retrasado"
971
+
972
+ msgid "Unsuccessful"
973
+ msgstr "Fracasado"
974
+
975
+ msgid "Tag printed"
976
+ msgstr "Etiqueta impresa"
977
+
978
+ msgid "Tag ready to print"
979
+ msgstr "Etiquetar lista para imprimir"
980
+
981
+ msgid "Tracking code:"
982
+ msgstr "Código de rastreamiento:"
983
+
984
+ msgid "Tag:"
985
+ msgstr "Etiqueta:"
986
+
987
+ msgid "Shipping is pending"
988
+ msgstr "Envío pendiente"
989
+
990
+ msgid "Tutorial"
991
+ msgstr "Tutorial"
992
+
993
+ msgid "Discount Of "
994
+ msgstr "Descuento De "
995
+
996
+ msgid "Make this product a subscription."
997
+ msgstr "Hacer deste producto una suscripción."
998
+
999
+ msgid "Order"
1000
+ msgstr "Pedido"
1001
+
1002
+ msgid "Mercado Envios Tracking ID"
1003
+ msgstr "Código de rastreamiento de Mercado Envíos"
1004
+
1005
+ msgid "Hello,"
1006
+ msgstr "Hola,"
1007
+
1008
+ msgid "Your order"
1009
+ msgstr "Su pedido"
1010
+
1011
+ msgid "made in"
1012
+ msgstr "hecho en"
1013
+
1014
+ msgid "used Mercado Envios as its shipment method."
1015
+ msgstr "utilizó el Mercado Envíos como su medio de envío."
1016
+
1017
+ msgid "You can track it with the following Tracking ID:"
1018
+ msgstr "Usted puedes rastrearlo con lo siguiente código de rastreamiento:"
1019
+
1020
+ msgid "Best regards."
1021
+ msgstr "Saludos."
1022
+
1023
+ msgid "SELECT..."
1024
+ msgstr "SELECCIONE..."
1025
+
1026
+ msgid "NAME"
1027
+ msgstr "NOMBRE"
1028
+
1029
+ msgid "SURNAME"
1030
+ msgstr "APELLIDO"
1031
+
1032
+ msgid "DOCUMENT"
1033
+ msgstr "DOCUMENTO"
1034
+
1035
+ msgid "ADDRESS"
1036
+ msgstr "DIRECCIÓN"
1037
+
1038
+ msgid "NUMBER"
1039
+ msgstr "NÚMERO"
1040
+
1041
+ msgid "CITY"
1042
+ msgstr "CIUDAD"
1043
+
1044
+ msgid "STATE"
1045
+ msgstr "ESTADO"
1046
+
1047
+ msgid "ZIP"
1048
+ msgstr "CÓDIGO POSTAL"
1049
+
1050
+ msgid "You must inform you NAME"
1051
+ msgstr "Obligatorio informar su NOMBRE"
1052
+
1053
+ msgid "You must inform your SURNAME"
1054
+ msgstr "Obligatorio informar su APELLIDO"
1055
+
1056
+ msgid "You must inform your DOCUMENT"
1057
+ msgstr "Obligatorio informar su DOCUMENTO"
1058
+
1059
+ msgid "You must inform your ADDRESS"
1060
+ msgstr "Obligatorio informar su DIRECCIÓN"
1061
+
1062
+ msgid "You must inform your ADDRESS NUMBER"
1063
+ msgstr "Obligatorio informar su NÚMERO"
1064
+
1065
+ msgid "You must inform your CITY"
1066
+ msgstr "Obligatorio informar su CIUDAD"
1067
+
1068
+ msgid "You must inform your STATE"
1069
+ msgstr "Obligatorio informar su ESTADO"
1070
+
1071
+ msgid "You must inform your ZIP"
1072
+ msgstr "Obligatorio informar su CÓDIGO POSTAL"
1073
+
1074
+ msgid "Your PHP version is OK."
1075
+ msgstr "Su versión de PHP está bien."
1076
+
1077
+ msgid "Your PHP version do not support this module. You have %s, minimal required is %s."
1078
+ msgstr "Su versión de PHP no soporta este módulo. Tienes %s, la mínima requerida es %s."
1079
+
1080
+ msgid "cURL is installed."
1081
+ msgstr "cURL está instalado."
1082
+
1083
+ msgid "cURL is not installed."
1084
+ msgstr "cURL no está instalado."
1085
+
1086
+ msgid "SSL is missing in your site."
1087
+ msgstr "Falta el SSL en su sitio."
1088
+
1089
+ msgid "Your site has SSL enabled."
1090
+ msgstr "Su sitio tiene SSL habilitado."
1091
+
1092
+ msgid "Fisical Person"
1093
+ msgstr "Persona Física"
1094
+
1095
+ msgid "Legal Person"
1096
+ msgstr "Persona Jurídica"
1097
+
1098
+ msgid "SOCIAL NAME"
1099
+ msgstr "RAZÓN SOCIAL"
1100
+
1101
+ msgid "CNPJ"
1102
+ msgstr "CNPJ"
languages/woocommerce-mercadopago-module-es_PE.mo ADDED
Binary file
languages/woocommerce-mercadopago-module-es_PE.po ADDED
@@ -0,0 +1,1102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WordPress Blank Pot
2
+ # Copyright (C) 2014 ...
3
+ # This file is distributed under the GNU General Public License v2 or later.
4
+ msgid ""
5
+ msgstr ""
6
+ "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
+ "POT-Creation-Date: 2016-05-23 14:52-0300\n"
8
+ "PO-Revision-Date: \n"
9
+ "Language-Team: Product Development <translations@example.com>\n"
10
+ "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;"
18
+ "_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
19
+ "X-Poedit-Basepath: ../Documents/woocommerce (MAMP)/wp-content/plugins/woo-mercado-pago-module\n"
20
+ "X-Generator: Poedit 1.8.7\n"
21
+ "Last-Translator: \n"
22
+ "Language: es_PE\n"
23
+ "X-Poedit-SearchPath-0: .\n"
24
+
25
+ #. Description of the plugin/theme
26
+ msgid "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."
27
+ msgstr "Este es el módulo <strong>oficial</strong> de Mercado Pago para el plugin WooCommerce. Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
28
+
29
+ #: mercadopago-module.php:69
30
+ #, php-format
31
+ msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
32
+ msgstr "Woo Mercado Pago Module depende de la última versión de %s para ejecutarse!"
33
+
34
+ #: mercadopago-module.php:109
35
+ msgid "Basic Checkout"
36
+ msgstr "Checkout Básico"
37
+
38
+ #: mercadopago-module.php:113
39
+ msgid "Custom Checkout"
40
+ msgstr "Checkout Personalizado"
41
+
42
+ #: mercadopago/mercadopago-custom-gateway.php:48
43
+ msgid "Mercado Pago - Custom Checkout"
44
+ msgstr "Mercado Pago - Checkout Personalizado"
45
+
46
+ #: mercadopago/mercadopago-custom-gateway.php:51 mercadopago/mercadopago-gateway.php:54
47
+ msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
48
+ msgstr "Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
49
+
50
+ #: mercadopago/mercadopago-custom-gateway.php:126 mercadopago/mercadopago-custom-gateway.php:791 mercadopago/mercadopago-gateway.php:125
51
+ #: mercadopago/mercadopago-gateway.php:716
52
+ msgid "Argentine"
53
+ msgstr "Argentina"
54
+
55
+ #: mercadopago/mercadopago-custom-gateway.php:127 mercadopago/mercadopago-custom-gateway.php:792 mercadopago/mercadopago-gateway.php:126
56
+ #: mercadopago/mercadopago-gateway.php:717
57
+ msgid "Brazil"
58
+ msgstr "Brasil"
59
+
60
+ #: mercadopago/mercadopago-custom-gateway.php:128 mercadopago/mercadopago-custom-gateway.php:794 mercadopago/mercadopago-gateway.php:127
61
+ #: mercadopago/mercadopago-gateway.php:719
62
+ msgid "Chile"
63
+ msgstr "Chile"
64
+
65
+ #: mercadopago/mercadopago-custom-gateway.php:129 mercadopago/mercadopago-custom-gateway.php:793 mercadopago/mercadopago-gateway.php:128
66
+ #: mercadopago/mercadopago-gateway.php:718
67
+ msgid "Colombia"
68
+ msgstr "Colombia"
69
+
70
+ #: mercadopago/mercadopago-custom-gateway.php:130 mercadopago/mercadopago-custom-gateway.php:795 mercadopago/mercadopago-gateway.php:129
71
+ #: mercadopago/mercadopago-gateway.php:720
72
+ msgid "Mexico"
73
+ msgstr "México"
74
+
75
+ #: mercadopago/mercadopago-custom-gateway.php:132 mercadopago/mercadopago-gateway.php:130
76
+ msgid "or"
77
+ msgstr "o"
78
+
79
+ #: mercadopago/mercadopago-custom-gateway.php:133 mercadopago/mercadopago-custom-gateway.php:796 mercadopago/mercadopago-gateway.php:131
80
+ #: mercadopago/mercadopago-gateway.php:721
81
+ msgid "Venezuela"
82
+ msgstr "Venezuela"
83
+
84
+ #: mercadopago/mercadopago-custom-gateway.php:145 mercadopago/mercadopago-gateway.php:151
85
+ msgid "Your credentials are <strong>valid</strong> for"
86
+ msgstr "Sus credenciales <strong>son válidas</strong> para"
87
+
88
+ #: mercadopago/mercadopago-custom-gateway.php:151 mercadopago/mercadopago-custom-gateway.php:156 mercadopago/mercadopago-gateway.php:161
89
+ #: mercadopago/mercadopago-gateway.php:170
90
+ msgid "Your credentials are <strong>not valid</strong>!"
91
+ msgstr "Sus credenciales <strong>no son válidas</strong>!"
92
+
93
+ #: mercadopago/mercadopago-custom-gateway.php:169 mercadopago/mercadopago-gateway.php:211
94
+ msgid "Enable/Disable"
95
+ msgstr "Habilitar/Deshabilitar"
96
+
97
+ #: mercadopago/mercadopago-custom-gateway.php:171
98
+ msgid "Enable Custom Checkout"
99
+ msgstr "Habilitar Checkout Personalizado"
100
+
101
+ #: mercadopago/mercadopago-custom-gateway.php:175 mercadopago/mercadopago-gateway.php:217
102
+ msgid "Mercado Pago Credentials"
103
+ msgstr "Credenciales de Mercado Pago"
104
+
105
+ #: mercadopago/mercadopago-custom-gateway.php:177 mercadopago/mercadopago-gateway.php:219
106
+ msgid "You can obtain your credentials for"
107
+ msgstr "Puedes obtener tus credenciales para"
108
+
109
+ #: mercadopago/mercadopago-custom-gateway.php:182
110
+ msgid "Insert your Mercado Pago Public key."
111
+ msgstr "Inserte su Public Key de Mercado Pago."
112
+
113
+ #: mercadopago/mercadopago-custom-gateway.php:189
114
+ msgid "Insert your Mercado Pago Access token."
115
+ msgstr "Inserte su Access Token de Mercado Pago."
116
+
117
+ #: mercadopago/mercadopago-custom-gateway.php:194 mercadopago/mercadopago-gateway.php:236
118
+ msgid "Instant Payment Notification (IPN) URL"
119
+ msgstr "URL da Notificación Instantanea de Pago (IPN)"
120
+
121
+ #: mercadopago/mercadopago-custom-gateway.php:196 mercadopago/mercadopago-gateway.php:238
122
+ msgid "Your IPN URL to receive instant payment notifications is"
123
+ msgstr "Su URL de IPN para recibir notificaciones instantáneas de pago es"
124
+
125
+ #: mercadopago/mercadopago-custom-gateway.php:199 mercadopago/mercadopago-gateway.php:241
126
+ msgid "Checkout Options"
127
+ msgstr "Opciones de Checkout"
128
+
129
+ #: mercadopago/mercadopago-custom-gateway.php:204 mercadopago/mercadopago-gateway.php:246
130
+ msgid "Title"
131
+ msgstr "Título"
132
+
133
+ #: mercadopago/mercadopago-custom-gateway.php:206 mercadopago/mercadopago-gateway.php:248
134
+ msgid "Title shown to the client in the checkout."
135
+ msgstr "Título mostrado al cliente en el checkout."
136
+
137
+ #: mercadopago/mercadopago-custom-gateway.php:207 mercadopago/mercadopago-custom-gateway.php:219 mercadopago/mercadopago-gateway.php:249
138
+ msgid "Mercado Pago"
139
+ msgstr "Mercado Pago"
140
+
141
+ #: mercadopago/mercadopago-custom-gateway.php:210 mercadopago/mercadopago-gateway.php:252
142
+ msgid "Description"
143
+ msgstr "Descripción"
144
+
145
+ #: mercadopago/mercadopago-custom-gateway.php:212 mercadopago/mercadopago-gateway.php:254
146
+ msgid "Description shown to the client in the checkout."
147
+ msgstr "Descripción mostrada al cliente en el checkout."
148
+
149
+ #: mercadopago/mercadopago-custom-gateway.php:213 mercadopago/mercadopago-gateway.php:255 mercadopago/mercadopago-gateway.php:432
150
+ msgid "Pay with Mercado Pago"
151
+ msgstr "Pagar con Mercado Pago"
152
+
153
+ #: mercadopago/mercadopago-custom-gateway.php:216
154
+ msgid "Statement Descriptor"
155
+ msgstr "Descripción de la Factura"
156
+
157
+ #: mercadopago/mercadopago-custom-gateway.php:218
158
+ msgid "The description that will be shown in your customer's invoice."
159
+ msgstr "La descripción que se muestra en la factura de su cliente."
160
+
161
+ #: mercadopago/mercadopago-custom-gateway.php:222
162
+ msgid "Binary Mode"
163
+ msgstr "Modo binario"
164
+
165
+ #: mercadopago/mercadopago-custom-gateway.php:224
166
+ msgid "Enable binary mode for checkout status"
167
+ msgstr "Activar el modo binario para el estado del checkout"
168
+
169
+ #: mercadopago/mercadopago-custom-gateway.php:226
170
+ msgid "When charging a credit card, only [approved] or [reject] status will be taken."
171
+ msgstr "Al cargar una tarjeta de crédito, sólo los estados [aprobado] o [rechazar] seran tomados."
172
+
173
+ #: mercadopago/mercadopago-custom-gateway.php:229
174
+ msgid "Ticket"
175
+ msgstr "Ticket"
176
+
177
+ #: mercadopago/mercadopago-custom-gateway.php:231
178
+ msgid "Enable Ticket for Custom Checkout"
179
+ msgstr "Habilitar Ticket para Checkout Personalizado"
180
+
181
+ #: mercadopago/mercadopago-custom-gateway.php:233
182
+ msgid "Let your customer pay you with tickets"
183
+ msgstr "Deje que su cliente le paga con tickets"
184
+
185
+ #: mercadopago/mercadopago-custom-gateway.php:236 mercadopago/mercadopago-gateway.php:258
186
+ msgid "Store Category"
187
+ msgstr "Categoría de la tienda"
188
+
189
+ #: mercadopago/mercadopago-custom-gateway.php:238 mercadopago/mercadopago-gateway.php:260
190
+ msgid "Define which type of products your store sells."
191
+ msgstr "Defina el tipo de productos que su tienda vende."
192
+
193
+ #: mercadopago/mercadopago-custom-gateway.php:242 mercadopago/mercadopago-gateway.php:264
194
+ msgid "Store Identificator"
195
+ msgstr "Identificador de la tienda"
196
+
197
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
198
+ msgid "Please, inform a prefix to your store."
199
+ msgstr "Por favor, informe un prefijo para su tienda."
200
+
201
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
202
+ msgid ""
203
+ "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same "
204
+ "identificators."
205
+ msgstr ""
206
+ "Si esta utilizando su cuenta Mercado Pago para múltiples tiendas, asegúrese que este prefijo sea único para no generar pedidos con el mismo identificador."
207
+
208
+ #: mercadopago/mercadopago-custom-gateway.php:248 mercadopago/mercadopago-gateway.php:318
209
+ msgid "Test and Debug Options"
210
+ msgstr "Opciones de Prueba y Debug"
211
+
212
+ #: mercadopago/mercadopago-custom-gateway.php:253 mercadopago/mercadopago-gateway.php:323
213
+ msgid "Mercado Pago Sandbox"
214
+ msgstr "Sandbox Mercado Pago"
215
+
216
+ #: mercadopago/mercadopago-custom-gateway.php:255 mercadopago/mercadopago-gateway.php:325
217
+ msgid "Enable Mercado Pago Sandbox"
218
+ msgstr "Habilitar el sandbox de Mercado Pago"
219
+
220
+ #: mercadopago/mercadopago-custom-gateway.php:257 mercadopago/mercadopago-gateway.php:327
221
+ msgid "This option allows you to test payments inside a sandbox environment."
222
+ msgstr "Esta opción permite simular un flujo de pagos completo en nuestro entorno Sandbox."
223
+
224
+ #: mercadopago/mercadopago-custom-gateway.php:260 mercadopago/mercadopago-gateway.php:330
225
+ msgid "Debug and Log"
226
+ msgstr "Debug y Log"
227
+
228
+ #: mercadopago/mercadopago-custom-gateway.php:262 mercadopago/mercadopago-gateway.php:332
229
+ msgid "Enable log"
230
+ msgstr "Habilitar Log"
231
+
232
+ #: mercadopago/mercadopago-custom-gateway.php:264 mercadopago/mercadopago-gateway.php:334
233
+ msgid "Register event logs of Mercado Pago, such as API requests, in the file"
234
+ msgstr "Registrar logs de eventos de Mercado Pago, como llamadas a la API, dentro del archivo"
235
+
236
+ #: mercadopago/mercadopago-custom-gateway.php:265 mercadopago/mercadopago-gateway.php:335
237
+ msgid "File location: "
238
+ msgstr "Local del archivo: "
239
+
240
+ #: mercadopago/mercadopago-custom-gateway.php:281 mercadopago/mercadopago-gateway.php:351
241
+ #, php-format
242
+ msgid "Please, rate us %s on WordPress.org and give your feedback to help improve this module!"
243
+ msgstr "Por favor, califíquenos con %s en WordPress.org y de su feedback para ayudar a mejorar este módulo!"
244
+
245
+ #: mercadopago/mercadopago-custom-gateway.php:332
246
+ msgid "Payment Method"
247
+ msgstr "Medios de Pago"
248
+
249
+ #: mercadopago/mercadopago-custom-gateway.php:333
250
+ msgid "Credit card number"
251
+ msgstr "Número de tarjeta de crédito"
252
+
253
+ #: mercadopago/mercadopago-custom-gateway.php:334
254
+ msgid "Expiration month"
255
+ msgstr "Mes de expiración"
256
+
257
+ #: mercadopago/mercadopago-custom-gateway.php:335
258
+ msgid "Expiration year"
259
+ msgstr "Año de expiración"
260
+
261
+ #: mercadopago/mercadopago-custom-gateway.php:336
262
+ msgid "Year"
263
+ msgstr "Año"
264
+
265
+ #: mercadopago/mercadopago-custom-gateway.php:337
266
+ msgid "Month"
267
+ msgstr "Mes"
268
+
269
+ #: mercadopago/mercadopago-custom-gateway.php:338
270
+ msgid "Card holder name"
271
+ msgstr "Nombre del titular de la tarjeta"
272
+
273
+ #: mercadopago/mercadopago-custom-gateway.php:339
274
+ msgid "Security code"
275
+ msgstr "Código de seguridad"
276
+
277
+ #: mercadopago/mercadopago-custom-gateway.php:340
278
+ msgid "Document Type"
279
+ msgstr "Tipo de Documento"
280
+
281
+ #: mercadopago/mercadopago-custom-gateway.php:341
282
+ msgid "Document number"
283
+ msgstr "Número de Documento"
284
+
285
+ #: mercadopago/mercadopago-custom-gateway.php:342
286
+ msgid "Issuer"
287
+ msgstr "Emisor"
288
+
289
+ #: mercadopago/mercadopago-custom-gateway.php:343
290
+ msgid "Installments"
291
+ msgstr "Cuotas"
292
+
293
+ #: mercadopago/mercadopago-custom-gateway.php:347
294
+ msgid "Parameter cardNumber can not be null/empty"
295
+ msgstr "Parámetro [Número de tarjeta] no puede ser nulo/vacío"
296
+
297
+ #: mercadopago/mercadopago-custom-gateway.php:348
298
+ msgid "Invalid Card Number"
299
+ msgstr "Número de tarjeta inválido"
300
+
301
+ #: mercadopago/mercadopago-custom-gateway.php:350 mercadopago/mercadopago-custom-gateway.php:351 mercadopago/mercadopago-custom-gateway.php:352
302
+ #: mercadopago/mercadopago-custom-gateway.php:353
303
+ msgid "Invalid Expiration Date"
304
+ msgstr "Fecha de expiración inválida"
305
+
306
+ #: mercadopago/mercadopago-custom-gateway.php:355
307
+ msgid "Parameter cardholderName can not be null/empty"
308
+ msgstr "Parámetro [Nombre del titular] no puede ser nulo/vacío"
309
+
310
+ #: mercadopago/mercadopago-custom-gateway.php:356
311
+ msgid "Invalid Card Holder Name"
312
+ msgstr "Nombre del titular de la tarjeta inválido"
313
+
314
+ #: mercadopago/mercadopago-custom-gateway.php:358
315
+ msgid "Parameter securityCode can not be null/empty"
316
+ msgstr "Parámetro [Código de seguridad] no puede ser nulo/vacío"
317
+
318
+ #: mercadopago/mercadopago-custom-gateway.php:359
319
+ msgid "Invalid Security Code"
320
+ msgstr "Código de seguridad inválido"
321
+
322
+ #: mercadopago/mercadopago-custom-gateway.php:361
323
+ msgid "Parameter docType can not be null/empty"
324
+ msgstr "Parámetro [Tipo de Documento] no puede ser nulo/vacío"
325
+
326
+ #: mercadopago/mercadopago-custom-gateway.php:362
327
+ msgid "Invalid Document Type"
328
+ msgstr "Tipo de Documento inválido"
329
+
330
+ #: mercadopago/mercadopago-custom-gateway.php:364
331
+ msgid "Parameter docNumber can not be null/empty"
332
+ msgstr "Parámetro [Número del Documento] no puede ser nulo/vacío"
333
+
334
+ #: mercadopago/mercadopago-custom-gateway.php:365
335
+ msgid "Invalid Document Number"
336
+ msgstr "Número del Documento inválido"
337
+
338
+ #: mercadopago/mercadopago-custom-gateway.php:367
339
+ msgid "The parameter cardholder.document.subtype can not be null or empty"
340
+ msgstr "Parámetro [Subtipo del documento] no puede ser nulo/vacío"
341
+
342
+ #: mercadopago/mercadopago-custom-gateway.php:368
343
+ msgid "Invalid Document Sub Type"
344
+ msgstr "Subtipo del documento inválido"
345
+
346
+ #: mercadopago/mercadopago-custom-gateway.php:370
347
+ msgid "Parameter cardIssuerId can not be null/empty"
348
+ msgstr "Parámetro [Emisor] no puede ser nulo/vacío"
349
+
350
+ #: mercadopago/mercadopago-custom-gateway.php:402 mercadopago/mercadopago-custom-gateway.php:943 mercadopago/mercadopago-gateway.php:869
351
+ msgid "Payment approved."
352
+ msgstr "Pago aprobado."
353
+
354
+ #: mercadopago/mercadopago-custom-gateway.php:416 mercadopago/mercadopago-custom-gateway.php:805
355
+ msgid "Your payment is under review. In less than 1h, you should be notified by email."
356
+ msgstr "Su pago está en revisión. En menos de 1 hora, usted será notificado por correo electrónico."
357
+
358
+ #: mercadopago/mercadopago-custom-gateway.php:418
359
+ msgid "Check your order resume"
360
+ msgstr "Ver su hoja de pedido"
361
+
362
+ #: mercadopago/mercadopago-custom-gateway.php:431
363
+ msgid "Your payment was refused. You can try again."
364
+ msgstr "Su pago fue rechazado. Puede intentarlo de nuevo."
365
+
366
+ #: mercadopago/mercadopago-custom-gateway.php:435 mercadopago/mercadopago-custom-gateway.php:819 mercadopago/mercadopago-gateway.php:460
367
+ msgid "Click to try again"
368
+ msgstr "Haga clic para intentarlo de nuevo"
369
+
370
+ #: mercadopago/mercadopago-custom-gateway.php:455
371
+ msgid "A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?"
372
+ msgstr "Un problema se produjo al procesar su pago. ¿Esta seguro que ha rellenado correctamente toda la información en el formulario de checkout?"
373
+
374
+ #: mercadopago/mercadopago-custom-gateway.php:544
375
+ msgid "Shipping"
376
+ msgstr "Envío"
377
+
378
+ #: mercadopago/mercadopago-custom-gateway.php:545
379
+ msgid "Shipping service used by store"
380
+ msgstr "Servicio de envío utilizado por la tienda"
381
+
382
+ #: mercadopago/mercadopago-custom-gateway.php:721 mercadopago/mercadopago-gateway.php:649
383
+ msgid "WooCommerce &gt; System Status &gt; Logs"
384
+ msgstr "WooCommerce &gt; Estado del Sistema &gt; Logs"
385
+
386
+ #: mercadopago/mercadopago-custom-gateway.php:766 mercadopago/mercadopago-custom-gateway.php:779 mercadopago/mercadopago-gateway.php:694
387
+ #: mercadopago/mercadopago-gateway.php:705
388
+ msgid "Mercado Pago is Inactive"
389
+ msgstr "Mercado Pago Inactivo"
390
+
391
+ #: mercadopago/mercadopago-custom-gateway.php:769
392
+ msgid "Your Mercado Pago credentials Public Key/Access Token appears to be misconfigured."
393
+ msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
394
+
395
+ #: mercadopago/mercadopago-custom-gateway.php:771 mercadopago/mercadopago-gateway.php:698
396
+ msgid "Click here and configure!"
397
+ msgstr "Haga click aquí y configure!"
398
+
399
+ #: mercadopago/mercadopago-custom-gateway.php:782 mercadopago/mercadopago-gateway.php:708
400
+ msgid "The currency"
401
+ msgstr "La moneda"
402
+
403
+ #: mercadopago/mercadopago-custom-gateway.php:783 mercadopago/mercadopago-gateway.php:708
404
+ msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, PEN, VEF."
405
+ msgstr "no es soportada. Las monedas soportadas son: ARS, BRL, CLP, COP, MXN, PEN, VEF."
406
+
407
+ #: mercadopago/mercadopago-custom-gateway.php:797
408
+ msgid "Peru"
409
+ msgstr "Perú"
410
+
411
+ #: mercadopago/mercadopago-custom-gateway.php:809
412
+ msgid "Click to check your order"
413
+ msgstr "Haga clic para comprobar su pedido"
414
+
415
+ #: mercadopago/mercadopago-custom-gateway.php:814 mercadopago/mercadopago-gateway.php:457
416
+ msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
417
+ msgstr "Se ha producido un error en el procesamiento de su pago. Por favor, inténtelo de nuevo o póngase en contacto con nosotros para Asistencia."
418
+
419
+ #: mercadopago/mercadopago-custom-gateway.php:816
420
+ msgid "Reason is: "
421
+ msgstr "La razón es:"
422
+
423
+ #: mercadopago/mercadopago-custom-gateway.php:849 mercadopago/mercadopago-gateway.php:748
424
+ msgid "Mercado Pago Request Failure"
425
+ msgstr "La solicitud de Mercado Pago ha fallado."
426
+
427
+ #: mercadopago/mercadopago-custom-gateway.php:918 mercadopago/mercadopago-gateway.php:822
428
+ msgid "Payer email"
429
+ msgstr "Email del comprador"
430
+
431
+ #: mercadopago/mercadopago-custom-gateway.php:926 mercadopago/mercadopago-gateway.php:829
432
+ msgid "Payment type"
433
+ msgstr "Medio de pago"
434
+
435
+ #: mercadopago/mercadopago-custom-gateway.php:934 mercadopago/mercadopago-gateway.php:841
436
+ msgid "Mercado Pago Payment ID"
437
+ msgstr "ID de pago de Mercado Pago"
438
+
439
+ #: mercadopago/mercadopago-custom-gateway.php:950 mercadopago/mercadopago-gateway.php:875
440
+ msgid "Customer haven't paid yet."
441
+ msgstr "El cliente todavía no efectuó el pago."
442
+
443
+ #: mercadopago/mercadopago-custom-gateway.php:957 mercadopago/mercadopago-gateway.php:881
444
+ msgid "Payment under review."
445
+ msgstr "El pago está pendiente de revisión."
446
+
447
+ #: mercadopago/mercadopago-custom-gateway.php:964 mercadopago/mercadopago-gateway.php:887
448
+ msgid "The payment was refused. The customer can try again."
449
+ msgstr "El pago fue rechazado. El cliente puede intentar nuevamente."
450
+
451
+ #: mercadopago/mercadopago-custom-gateway.php:971 mercadopago/mercadopago-gateway.php:893
452
+ msgid "The payment was refunded to the customer."
453
+ msgstr "El pago fue devuelto al cliente."
454
+
455
+ #: mercadopago/mercadopago-custom-gateway.php:978 mercadopago/mercadopago-gateway.php:899
456
+ msgid "The payment was cancelled."
457
+ msgstr "El pago fue cancelado."
458
+
459
+ #: mercadopago/mercadopago-custom-gateway.php:984 mercadopago/mercadopago-custom-gateway.php:990 mercadopago/mercadopago-gateway.php:904
460
+ #: mercadopago/mercadopago-gateway.php:909
461
+ msgid "The payment is under mediation or it was charged-back."
462
+ msgstr "El pago esta en mediación o la compra fue desconocida por el cliente."
463
+
464
+ #: mercadopago/mercadopago-gateway.php:51
465
+ msgid "Mercado Pago - Basic Checkout"
466
+ msgstr "Mercado Pago - Checkout Básico"
467
+
468
+ #: mercadopago/mercadopago-gateway.php:148
469
+ msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
470
+ msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
471
+
472
+ #: mercadopago/mercadopago-gateway.php:158 mercadopago/mercadopago-gateway.php:167
473
+ msgid "Configure your Client_id and Client_secret to have access to more options."
474
+ msgstr "Configure su Client_id y Client_secret para tener acceso a más opciones."
475
+
476
+ #: mercadopago/mercadopago-gateway.php:184 mercadopago/mercadopago-gateway.php:192 mercadopago/mercadopago-gateway.php:202
477
+ msgid "This field should be an integer."
478
+ msgstr "Este campo debe ser un número."
479
+
480
+ #: mercadopago/mercadopago-gateway.php:187
481
+ msgid "If your integration method is iFrame, please inform the payment iFrame width."
482
+ msgstr "Si su modo de apertura es iFrame, indique el ancho del iFrame."
483
+
484
+ #: mercadopago/mercadopago-gateway.php:195
485
+ msgid "If your integration method is iFrame, please inform the payment iFrame height."
486
+ msgstr "Si su modo de apertura es iFrame, indique el alto del iFrame."
487
+
488
+ #: mercadopago/mercadopago-gateway.php:205
489
+ msgid "Select the max number of installments for your customers."
490
+ msgstr "Seleccione el número máximo de cuotas disponibles para sus clientes."
491
+
492
+ #: mercadopago/mercadopago-gateway.php:213
493
+ msgid "Enable Basic Checkout"
494
+ msgstr "Habilitar el Checkout Básico"
495
+
496
+ #: mercadopago/mercadopago-gateway.php:224
497
+ msgid "Insert your Mercado Pago Client_id."
498
+ msgstr "Inserte su Client_id de Mercado Pago."
499
+
500
+ #: mercadopago/mercadopago-gateway.php:231
501
+ msgid "Insert your Mercado Pago Client_secret."
502
+ msgstr "Inserte su Client_secret de Mercado Pago."
503
+
504
+ #: mercadopago/mercadopago-gateway.php:270
505
+ msgid "Integration Method"
506
+ msgstr "Método de integración"
507
+
508
+ #: mercadopago/mercadopago-gateway.php:272
509
+ msgid ""
510
+ "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an "
511
+ "internal window is embedded to the page layout)."
512
+ msgstr ""
513
+ "Seleccione la forma en que sus clientes deben interactuar con Mercado Pago. Ventana Modal (Dentro de su tienda), Redireccionamiento (El cliente es "
514
+ "redireccionado a Mercado Pago), o iFrame (Ventana de pago incorporada a su página)."
515
+
516
+ #: mercadopago/mercadopago-gateway.php:275
517
+ msgid "iFrame"
518
+ msgstr "iFrame"
519
+
520
+ #: mercadopago/mercadopago-gateway.php:276
521
+ msgid "Modal Window"
522
+ msgstr "Ventana modal"
523
+
524
+ #: mercadopago/mercadopago-gateway.php:277
525
+ msgid "Redirect"
526
+ msgstr "Redireccionamiento"
527
+
528
+ #: mercadopago/mercadopago-gateway.php:281
529
+ msgid "iFrame Width"
530
+ msgstr "Ancho del iFrame"
531
+
532
+ #: mercadopago/mercadopago-gateway.php:287
533
+ msgid "iFrame Height"
534
+ msgstr "Alto del iFrame"
535
+
536
+ #: mercadopago/mercadopago-gateway.php:293
537
+ msgid "Auto Return"
538
+ msgstr "Redirección automática"
539
+
540
+ #: mercadopago/mercadopago-gateway.php:295
541
+ msgid "Automatic Return After Payment"
542
+ msgstr "Redirección Automática luego del pago"
543
+
544
+ #: mercadopago/mercadopago-gateway.php:297
545
+ msgid "After the payment, client is automatically redirected."
546
+ msgstr "Después del pago, el cliente será redireccionado automáticamente."
547
+
548
+ #: mercadopago/mercadopago-gateway.php:300
549
+ msgid "Payment Options"
550
+ msgstr "Opciones de Pago"
551
+
552
+ #: mercadopago/mercadopago-gateway.php:305
553
+ msgid "Max installments"
554
+ msgstr "Número máximo de cuotas"
555
+
556
+ #: mercadopago/mercadopago-gateway.php:311
557
+ msgid "Exclude Payment Methods"
558
+ msgstr "Excluir medios de pago"
559
+
560
+ #: mercadopago/mercadopago-gateway.php:428
561
+ msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
562
+ msgstr "Gracias por su compra. Por favor, prosiga a la página de pago haciendo click en el botón de abajo."
563
+
564
+ #: mercadopago/mercadopago-gateway.php:436
565
+ msgid "Cancel order &amp; Clear cart"
566
+ msgstr "Cancelar &amp; Limpiar carrito"
567
+
568
+ #: mercadopago/mercadopago-gateway.php:446
569
+ msgid "Thank you for your order. Proceed with your payment completing the following information."
570
+ msgstr "Gracias por su compra. Prosiga con su pago completando la información abajo."
571
+
572
+ #: mercadopago/mercadopago-gateway.php:697
573
+ msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
574
+ msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
575
+
576
+ msgid " as it appears in your card ..."
577
+ msgstr " tal como aparece en su tarjeta ..."
578
+
579
+ msgid "Done, your payment was accredited!"
580
+ msgstr "Listo, su pago ha sido aceptado!"
581
+
582
+ msgid "We are processing the payment. In less than an hour we will e-mail you the results."
583
+ msgstr "Estamos procesando su pago. En menos de una hora le enviaremos el resultado por correo electrónico."
584
+
585
+ msgid "We are processing the payment. In less than 2 business days we will tell you by e-mail whether it has accredited or we need more information."
586
+ msgstr "Estamos procesando su pago. En menos de 2 días le enviaremos por correo electrónico si se ha aprobado el pago o si se necesita información adicional."
587
+
588
+ msgid "Check the card number."
589
+ msgstr "Compruebe el número de tarjeta."
590
+
591
+ msgid "Check the expiration date."
592
+ msgstr "Compruebe la fecha de expiración."
593
+
594
+ msgid "Check the information."
595
+ msgstr "Compruebe la información informada."
596
+
597
+ msgid "Check the security code."
598
+ msgstr "Compruebe el código de seguridad informado."
599
+
600
+ msgid "We could not process your payment."
601
+ msgstr "No se puede procesar su pago."
602
+
603
+ msgid "You must authorize the payment of your orders."
604
+ msgstr "Usted debe autorizar los pagos de sus órdenes."
605
+
606
+ msgid "Call your card issuer to activate your card. The phone is on the back of your card."
607
+ msgstr "Póngase en contacto con el emisor de su tarjeta para activarla. El teléfono se encuentra en la parte posterior de su tarjeta."
608
+
609
+ msgid "You already made a payment for that amount. If you need to repay, use another card or other payment method."
610
+ msgstr "Usted ya realizó un pago de este importe. Si tiene que pagar de nuevo, utilizar otra tarjeta u otro medio de pago."
611
+
612
+ msgid "Your payment was rejected. Choose another payment method. We recommend cash."
613
+ msgstr "Su pago fue rechazado. Por favor seleccione otro medio de pago. Se recomienda en efectivo."
614
+
615
+ msgid "Your payment do not have sufficient funds."
616
+ msgstr "Su pago no tiene fondos suficientes."
617
+
618
+ msgid "Your payment does not process payments with selected installments."
619
+ msgstr "El pago no puede procesar la cuota seleccionada."
620
+
621
+ msgid "You have reached the limit of allowed attempts. Choose another card or another payment method."
622
+ msgstr "Has alcanzado el límite de intentos permitidos. Elija otra tarjeta u otro medio de pago."
623
+
624
+ msgid "This payment method did not process the payment."
625
+ msgstr "Esta medio de pago no puede procesar su pago."
626
+
627
+ msgid "Mercado Pago - Ticket"
628
+ msgstr "Mercado Pago - Ticket"
629
+
630
+ msgid "Mercado Pago - Credit Card"
631
+ msgstr "Mercado Pago - Tarjeta de Crédito"
632
+
633
+ msgid "Ticket Options"
634
+ msgstr "Opciones de Ticket"
635
+
636
+ msgid "Enable Ticket Payment Method"
637
+ msgstr "Habilitar Pago con Ticket"
638
+
639
+ msgid "Other Bank"
640
+ msgstr "Otro Banco"
641
+
642
+ msgid "Choose"
643
+ msgstr "Escoger"
644
+
645
+ msgid "A problem was occurred when processing your payment. Please, try again."
646
+ msgstr "Un problema se produjo al procesar su pago. Por favor, inténtelo de nuevo."
647
+
648
+ msgid "Thank you for your order. Please, pay the ticket to get your order approved."
649
+ msgstr "Gracias por su orden. Por favor, realice el pago del ticket para tener su orden aprobada."
650
+
651
+ msgid "Waiting for the ticket payment."
652
+ msgstr "Esperando el pago del ticket."
653
+
654
+ msgid "Print the Ticket"
655
+ msgstr "Imprimir el ticket"
656
+
657
+ msgid "To reprint the ticket click "
658
+ msgstr "Para imprimir nuevamente el ticket hace clic "
659
+
660
+ msgid "here"
661
+ msgstr "aquí"
662
+
663
+ msgid "Custom Checkout is Inactive"
664
+ msgstr "Checkout Personalizado Inactivo"
665
+
666
+ msgid "Basic Checkout is Inactive"
667
+ msgstr "Checkout Básico Inactivo"
668
+
669
+ msgid "Ticket is Inactive"
670
+ msgstr "Ticket Inactivo"
671
+
672
+ msgid "Please, select the ticket issuer of your preference."
673
+ msgstr "Por favor, seleccione el emisor de su elección."
674
+
675
+ msgid "Click "Place order" button. The ticket will be generated and you will be redirected to print it."
676
+ msgstr "Haga clic en el botón "Realizar el pedido". El ticket será generado y usted será redirigido a imprimirlo."
677
+
678
+ msgid "Important: The order will be confirmed only after the payment approval."
679
+ msgstr "Importante: La solicitud sólo será confirmada después de la aprobación del pago."
680
+
681
+ msgid "Your Mercado Pago credential Access Token appears to be misconfigured."
682
+ msgstr "Su credencial Access Token de Mercado de Pago parece estar desconfigurada."
683
+
684
+ msgid "Your Card"
685
+ msgstr "Sus Tarjetas"
686
+
687
+ msgid "Other Cards"
688
+ msgstr "Otras Tarjetas"
689
+
690
+ msgid "Other Card"
691
+ msgstr "Otra Tarjeta"
692
+
693
+ msgid "ended in"
694
+ msgstr "terminado en"
695
+
696
+ msgid "Your site appears to not have SSL certification. SSL is a pre-requisite because the payment process is made in your server."
697
+ msgstr "Su sitio parece no tener certificación SSL. SSL es un requisito para transaccionar desde su servidor."
698
+
699
+ msgid "ATTENTION: The currency"
700
+ msgstr "ATENCIÓN: La moneda"
701
+
702
+ msgid "defined in WooCommerce is different from the one used in your credentials country.<br>The currency for transactions in this payment method will be"
703
+ msgstr "que se define en WooCommerce es diferente de la utilizada en el país de sus credenciales.<br>La moneda para las transacciones realizadas por este medio de pago será"
704
+
705
+ msgid "Currency conversions should be made outside this module."
706
+ msgstr "Conversiones de monedas deben hacerse fuera de este módulo."
707
+
708
+ msgid "Coupons"
709
+ msgstr "Cupones"
710
+
711
+ msgid "Enable coupons of discounts"
712
+ msgstr "Activar los cupones de descuento"
713
+
714
+ msgid "If there is a Mercado Pago campaign, allow your store to give discounts to customers."
715
+ msgstr "Si hay una campaña de Mercado Pago, permitir a su tienda hacer descuentos para los clientes."
716
+
717
+ msgid "You will save"
718
+ msgstr "Usted ahorrará"
719
+
720
+ msgid "Apply"
721
+ msgstr "Aplicar"
722
+
723
+ msgid "Remove"
724
+ msgstr "Eliminar"
725
+
726
+ msgid "Please, inform your coupon code"
727
+ msgstr "Por favor, introduzca el código de su cupón"
728
+
729
+ msgid "Please, inform your email in billing address to use this feature"
730
+ msgstr "Por favor, introduzca su email en la dirección de facturación para utilizar este servicio"
731
+
732
+ msgid "Discount for %s coupon"
733
+ msgstr "Descuento para el cupón %s"
734
+
735
+ msgid "Discount provided by store"
736
+ msgstr "Descuento dado por la tienda"
737
+
738
+ msgid "Discount Coupon"
739
+ msgstr "Cupón de Descuento"
740
+
741
+ msgid "CURRENCY CONVERTED: The currency conversion ratio from"
742
+ msgstr "MONEDA CONVERTIDA: La tasa de conversión de moneda de"
743
+
744
+ msgid "ERROR: It was not possible to convert the unsupported currency"
745
+ msgstr "ERROR: No fue posible convertir la moneda no soportada"
746
+
747
+ msgid "to"
748
+ msgstr "para"
749
+
750
+ msgid "If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio."
751
+ msgstr "Si la moneda utilizada en WooCommerce es diferente o no soportada por Mercado Pago, convierte los importes de sus transacciones con la tasa de conversión de Mercado Pago."
752
+
753
+ msgid " is: "
754
+ msgstr " es: "
755
+
756
+ msgid "Currency Conversion"
757
+ msgstr "Conversión de Moneda"
758
+
759
+ msgid "with discount from"
760
+ msgstr "con descuento de"
761
+
762
+ msgid "Total of your purchase:"
763
+ msgstr "Total de su compra:"
764
+
765
+ msgid "Total of your purchase with discount:"
766
+ msgstr "Total de su compra con descuento:"
767
+
768
+ msgid "*Uppon payment approval"
769
+ msgstr "*Con la aprobación de pago"
770
+
771
+ msgid "Terms and Conditions of Use"
772
+ msgstr "Términos y Condiciones de Uso"
773
+
774
+ msgid "Payment converted from"
775
+ msgstr "Pago convertido de"
776
+
777
+ msgid "Rate Us"
778
+ msgstr "Calificar"
779
+
780
+ msgid "Report Issue"
781
+ msgstr "Informar Problema"
782
+
783
+ msgid "Two Cards Mode"
784
+ msgstr "Modo de Dos Tarjetas"
785
+
786
+ msgid "Payments with Two Cards"
787
+ msgstr "Pagos con Dos Tarjetas"
788
+
789
+ msgid "Your customer will be able to use two different cards to pay the order."
790
+ msgstr "Su cliente será capaz de utilizar dos tarjetas diferentes para pagar el pedido."
791
+
792
+ msgid "Your Mercado Pago credentials Access Token appears to be misconfigured."
793
+ msgstr "La credencial Mercado Pago Access Token parece estar mal configurada."
794
+
795
+ msgid "Cancel Order"
796
+ msgstr "Cancelar la Compra"
797
+
798
+ msgid "Refund Order"
799
+ msgstr "Reembolso de Compra"
800
+
801
+ msgid "Back URL Options"
802
+ msgstr "Opciones de URL de Callback"
803
+
804
+ msgid "Sucess URL"
805
+ msgstr "URL de Éxito"
806
+
807
+ msgid "Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page."
808
+ msgstr "Donde los clientes serán redirigidos después de una compra exitosa. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
809
+
810
+ msgid "Failure URL"
811
+ msgstr "URL de Pago Rechazado"
812
+
813
+ msgid "Where customers should be redirected after a failed purchase. Let blank to redirect to the default store order resume page."
814
+ msgstr "Donde los clientes serán redirigidos después de una compra rechazada. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
815
+
816
+ msgid "Pending URL"
817
+ msgstr "URL de Pago Pendiente"
818
+
819
+ msgid "Where customers should be redirected after a pending purchase. Let blank to redirect to the default store order resume page."
820
+ msgstr "Donde los clientes ​serán redirigidos después de una compra pendiente. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
821
+
822
+ msgid "Stock Reduce"
823
+ msgstr "Reducir Inventario"
824
+
825
+ msgid "Reduce Stock in Order Generation"
826
+ msgstr "Reducir Inventario en la Orden"
827
+
828
+ msgid "Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval."
829
+ msgstr "Activar esta opción para reducir el inventario mediante la creación de un pedido. Desactivar para reducir sólo <strong>después</strong> de la aprobación del pago."
830
+
831
+ msgid "Recurrent Product"
832
+ msgstr "Producto Recurrente"
833
+
834
+ msgid "Frequency"
835
+ msgstr "Frecuencia"
836
+
837
+ msgid "Amount of time (in days or months) for the execution of the next payment."
838
+ msgstr "Cantidad de tiempo (en días o meses) para la ejecución del próximo pago."
839
+
840
+ msgid "Start date"
841
+ msgstr "Fecha de inicio"
842
+
843
+ msgid "First payment date (effective debit). Defaults to now if blank."
844
+ msgstr "Primera fecha de pago (débito efectivo). De forma predeterminada ahora, si está en blanco."
845
+
846
+ msgid "End date"
847
+ msgstr "Fecha final"
848
+
849
+ msgid "Deadline to generate new charges. Defaults to never if blank."
850
+ msgstr "Fecha límite para generar nuevos cargos. De forma predeterminada como nunca, si está en blanco."
851
+
852
+ msgid "Days"
853
+ msgstr "Días"
854
+
855
+ msgid "Months"
856
+ msgstr "Meses"
857
+
858
+ msgid "Indicates the period of time."
859
+ msgstr "Indica el período de tiempo."
860
+
861
+ msgid "The amount to charge the payer each period. Should be informed including taxes and discounts."
862
+ msgstr "La cantidad para cobrar el pagador en cada período. Debe ser informada incluyendo impuestos y descuentos."
863
+
864
+ msgid "Amount charged"
865
+ msgstr "Cantidad de cobro"
866
+
867
+ msgid "Uruguay"
868
+ msgstr "Uruguay"
869
+
870
+ msgid "Frequency type"
871
+ msgstr "Tipo de frecuencia"
872
+
873
+ msgid "Transaction amount"
874
+ msgstr "Valor de la transacción"
875
+
876
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
877
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
878
+
879
+ msgid "Subscription"
880
+ msgstr "Suscripción"
881
+
882
+ msgid "Enable Subscription"
883
+ msgstr "Habilitar Suscripción"
884
+
885
+ msgid "Subscription is Inactive"
886
+ msgstr "La Suscripción está Inactiva"
887
+
888
+ msgid "Subscribe with Mercado Pago"
889
+ msgstr "Suscribirse con Mercado Pago"
890
+
891
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
892
+ msgstr "Para esta solución, usted debe configurar su URL de IPN. Puede acceder a ella en su cuenta para su específico país en:"
893
+
894
+ msgid "Discount by Gateway"
895
+ msgstr "Descuento por Gateway"
896
+
897
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
898
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
899
+
900
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
901
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
902
+
903
+ msgid "Discount Of"
904
+ msgstr "Descuento de"
905
+
906
+ msgid "Mercado Pago Subscription"
907
+ msgstr "Suscripción Mercado Pago"
908
+
909
+ msgid "Payment ID:"
910
+ msgstr "ID de Pago:"
911
+
912
+ msgid "Amount:"
913
+ msgstr "Cantidad:"
914
+
915
+ msgid "This operation could not be completed."
916
+ msgstr "Esta operación no se puede completar."
917
+
918
+ msgid "Operation successfully completed."
919
+ msgstr "La operación se realizó con éxito."
920
+
921
+ msgid "Refund Payment"
922
+ msgstr "Reembolso de Pago"
923
+
924
+ msgid "Cancel Payment"
925
+ msgstr "Cancelar Pago"
926
+
927
+ msgid "Mercado Pago - Subscription"
928
+ msgstr "Mercado Pago - Suscripcións"
929
+
930
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
931
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
932
+
933
+ msgid "Free Shipping"
934
+ msgstr "Envío Gratuito"
935
+
936
+ msgid "Day"
937
+ msgstr "Día"
938
+
939
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
940
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
941
+
942
+ msgid "Mercado Envios"
943
+ msgstr "Mercado Envios"
944
+
945
+ msgid "This controls the title which the user sees during checkout."
946
+ msgstr "Controla el título que se muestra al cliente durante el pago."
947
+
948
+ msgid "Enable free shipping for this shipping method"
949
+ msgstr "Habilitar el envío gratuito para este método de envío"
950
+
951
+ msgid "Delivery Time"
952
+ msgstr "Tiempo de Entrega"
953
+
954
+ msgid "Show estimated delivery time"
955
+ msgstr "Mostrar el tiempo estimado de entrega"
956
+
957
+ msgid "Display the estimated delivery time in working days."
958
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
959
+
960
+ msgid "Buyer initiates complaint and requested a refund."
961
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
962
+
963
+ msgid "In return to sender"
964
+ msgstr "Volviendo al remitente"
965
+
966
+ msgid "Missing recipient for delivery"
967
+ msgstr "Destinatario ausente para envío"
968
+
969
+ msgid "Delayed shipping"
970
+ msgstr "Envío retrasado"
971
+
972
+ msgid "Unsuccessful"
973
+ msgstr "Fracasado"
974
+
975
+ msgid "Tag printed"
976
+ msgstr "Etiqueta impresa"
977
+
978
+ msgid "Tag ready to print"
979
+ msgstr "Etiquetar lista para imprimir"
980
+
981
+ msgid "Tracking code:"
982
+ msgstr "Código de rastreamiento:"
983
+
984
+ msgid "Tag:"
985
+ msgstr "Etiqueta:"
986
+
987
+ msgid "Shipping is pending"
988
+ msgstr "Envío pendiente"
989
+
990
+ msgid "Tutorial"
991
+ msgstr "Tutorial"
992
+
993
+ msgid "Discount Of "
994
+ msgstr "Descuento De "
995
+
996
+ msgid "Make this product a subscription."
997
+ msgstr "Hacer deste producto una suscripción."
998
+
999
+ msgid "Order"
1000
+ msgstr "Pedido"
1001
+
1002
+ msgid "Mercado Envios Tracking ID"
1003
+ msgstr "Código de rastreamiento de Mercado Envíos"
1004
+
1005
+ msgid "Hello,"
1006
+ msgstr "Hola,"
1007
+
1008
+ msgid "Your order"
1009
+ msgstr "Su pedido"
1010
+
1011
+ msgid "made in"
1012
+ msgstr "hecho en"
1013
+
1014
+ msgid "used Mercado Envios as its shipment method."
1015
+ msgstr "utilizó el Mercado Envíos como su medio de envío."
1016
+
1017
+ msgid "You can track it with the following Tracking ID:"
1018
+ msgstr "Usted puedes rastrearlo con lo siguiente código de rastreamiento:"
1019
+
1020
+ msgid "Best regards."
1021
+ msgstr "Saludos."
1022
+
1023
+ msgid "SELECT..."
1024
+ msgstr "SELECCIONE..."
1025
+
1026
+ msgid "NAME"
1027
+ msgstr "NOMBRE"
1028
+
1029
+ msgid "SURNAME"
1030
+ msgstr "APELLIDO"
1031
+
1032
+ msgid "DOCUMENT"
1033
+ msgstr "DOCUMENTO"
1034
+
1035
+ msgid "ADDRESS"
1036
+ msgstr "DIRECCIÓN"
1037
+
1038
+ msgid "NUMBER"
1039
+ msgstr "NÚMERO"
1040
+
1041
+ msgid "CITY"
1042
+ msgstr "CIUDAD"
1043
+
1044
+ msgid "STATE"
1045
+ msgstr "ESTADO"
1046
+
1047
+ msgid "ZIP"
1048
+ msgstr "CÓDIGO POSTAL"
1049
+
1050
+ msgid "You must inform you NAME"
1051
+ msgstr "Obligatorio informar su NOMBRE"
1052
+
1053
+ msgid "You must inform your SURNAME"
1054
+ msgstr "Obligatorio informar su APELLIDO"
1055
+
1056
+ msgid "You must inform your DOCUMENT"
1057
+ msgstr "Obligatorio informar su DOCUMENTO"
1058
+
1059
+ msgid "You must inform your ADDRESS"
1060
+ msgstr "Obligatorio informar su DIRECCIÓN"
1061
+
1062
+ msgid "You must inform your ADDRESS NUMBER"
1063
+ msgstr "Obligatorio informar su NÚMERO"
1064
+
1065
+ msgid "You must inform your CITY"
1066
+ msgstr "Obligatorio informar su CIUDAD"
1067
+
1068
+ msgid "You must inform your STATE"
1069
+ msgstr "Obligatorio informar su ESTADO"
1070
+
1071
+ msgid "You must inform your ZIP"
1072
+ msgstr "Obligatorio informar su CÓDIGO POSTAL"
1073
+
1074
+ msgid "Your PHP version is OK."
1075
+ msgstr "Su versión de PHP está bien."
1076
+
1077
+ msgid "Your PHP version do not support this module. You have %s, minimal required is %s."
1078
+ msgstr "Su versión de PHP no soporta este módulo. Tienes %s, la mínima requerida es %s."
1079
+
1080
+ msgid "cURL is installed."
1081
+ msgstr "cURL está instalado."
1082
+
1083
+ msgid "cURL is not installed."
1084
+ msgstr "cURL no está instalado."
1085
+
1086
+ msgid "SSL is missing in your site."
1087
+ msgstr "Falta el SSL en su sitio."
1088
+
1089
+ msgid "Your site has SSL enabled."
1090
+ msgstr "Su sitio tiene SSL habilitado."
1091
+
1092
+ msgid "Fisical Person"
1093
+ msgstr "Persona Física"
1094
+
1095
+ msgid "Legal Person"
1096
+ msgstr "Persona Jurídica"
1097
+
1098
+ msgid "SOCIAL NAME"
1099
+ msgstr "RAZÓN SOCIAL"
1100
+
1101
+ msgid "CNPJ"
1102
+ msgstr "CNPJ"
languages/woocommerce-mercadopago-module-es_UY.mo ADDED
Binary file
languages/woocommerce-mercadopago-module-es_UY.po ADDED
@@ -0,0 +1,1102 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # WordPress Blank Pot
2
+ # Copyright (C) 2014 ...
3
+ # This file is distributed under the GNU General Public License v2 or later.
4
+ msgid ""
5
+ msgstr ""
6
+ "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
+ "POT-Creation-Date: 2016-05-23 14:52-0300\n"
8
+ "PO-Revision-Date: \n"
9
+ "Language-Team: Product Development <translations@example.com>\n"
10
+ "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
+ "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
+ "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;"
18
+ "_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
19
+ "X-Poedit-Basepath: ../Documents/woocommerce (MAMP)/wp-content/plugins/woo-mercado-pago-module\n"
20
+ "X-Generator: Poedit 1.8.7\n"
21
+ "Last-Translator: \n"
22
+ "Language: es_UY\n"
23
+ "X-Poedit-SearchPath-0: .\n"
24
+
25
+ #. Description of the plugin/theme
26
+ msgid "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."
27
+ msgstr "Este es el módulo <strong>oficial</strong> de Mercado Pago para el plugin WooCommerce. Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
28
+
29
+ #: mercadopago-module.php:69
30
+ #, php-format
31
+ msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
32
+ msgstr "Woo Mercado Pago Module depende de la última versión de %s para ejecutarse!"
33
+
34
+ #: mercadopago-module.php:109
35
+ msgid "Basic Checkout"
36
+ msgstr "Checkout Básico"
37
+
38
+ #: mercadopago-module.php:113
39
+ msgid "Custom Checkout"
40
+ msgstr "Checkout Personalizado"
41
+
42
+ #: mercadopago/mercadopago-custom-gateway.php:48
43
+ msgid "Mercado Pago - Custom Checkout"
44
+ msgstr "Mercado Pago - Checkout Personalizado"
45
+
46
+ #: mercadopago/mercadopago-custom-gateway.php:51 mercadopago/mercadopago-gateway.php:54
47
+ msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
48
+ msgstr "Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
49
+
50
+ #: mercadopago/mercadopago-custom-gateway.php:126 mercadopago/mercadopago-custom-gateway.php:791 mercadopago/mercadopago-gateway.php:125
51
+ #: mercadopago/mercadopago-gateway.php:716
52
+ msgid "Argentine"
53
+ msgstr "Argentina"
54
+
55
+ #: mercadopago/mercadopago-custom-gateway.php:127 mercadopago/mercadopago-custom-gateway.php:792 mercadopago/mercadopago-gateway.php:126
56
+ #: mercadopago/mercadopago-gateway.php:717
57
+ msgid "Brazil"
58
+ msgstr "Brasil"
59
+
60
+ #: mercadopago/mercadopago-custom-gateway.php:128 mercadopago/mercadopago-custom-gateway.php:794 mercadopago/mercadopago-gateway.php:127
61
+ #: mercadopago/mercadopago-gateway.php:719
62
+ msgid "Chile"
63
+ msgstr "Chile"
64
+
65
+ #: mercadopago/mercadopago-custom-gateway.php:129 mercadopago/mercadopago-custom-gateway.php:793 mercadopago/mercadopago-gateway.php:128
66
+ #: mercadopago/mercadopago-gateway.php:718
67
+ msgid "Colombia"
68
+ msgstr "Colombia"
69
+
70
+ #: mercadopago/mercadopago-custom-gateway.php:130 mercadopago/mercadopago-custom-gateway.php:795 mercadopago/mercadopago-gateway.php:129
71
+ #: mercadopago/mercadopago-gateway.php:720
72
+ msgid "Mexico"
73
+ msgstr "México"
74
+
75
+ #: mercadopago/mercadopago-custom-gateway.php:132 mercadopago/mercadopago-gateway.php:130
76
+ msgid "or"
77
+ msgstr "o"
78
+
79
+ #: mercadopago/mercadopago-custom-gateway.php:133 mercadopago/mercadopago-custom-gateway.php:796 mercadopago/mercadopago-gateway.php:131
80
+ #: mercadopago/mercadopago-gateway.php:721
81
+ msgid "Venezuela"
82
+ msgstr "Venezuela"
83
+
84
+ #: mercadopago/mercadopago-custom-gateway.php:145 mercadopago/mercadopago-gateway.php:151
85
+ msgid "Your credentials are <strong>valid</strong> for"
86
+ msgstr "Sus credenciales <strong>son válidas</strong> para"
87
+
88
+ #: mercadopago/mercadopago-custom-gateway.php:151 mercadopago/mercadopago-custom-gateway.php:156 mercadopago/mercadopago-gateway.php:161
89
+ #: mercadopago/mercadopago-gateway.php:170
90
+ msgid "Your credentials are <strong>not valid</strong>!"
91
+ msgstr "Sus credenciales <strong>no son válidas</strong>!"
92
+
93
+ #: mercadopago/mercadopago-custom-gateway.php:169 mercadopago/mercadopago-gateway.php:211
94
+ msgid "Enable/Disable"
95
+ msgstr "Habilitar/Deshabilitar"
96
+
97
+ #: mercadopago/mercadopago-custom-gateway.php:171
98
+ msgid "Enable Custom Checkout"
99
+ msgstr "Habilitar Checkout Personalizado"
100
+
101
+ #: mercadopago/mercadopago-custom-gateway.php:175 mercadopago/mercadopago-gateway.php:217
102
+ msgid "Mercado Pago Credentials"
103
+ msgstr "Credenciales de Mercado Pago"
104
+
105
+ #: mercadopago/mercadopago-custom-gateway.php:177 mercadopago/mercadopago-gateway.php:219
106
+ msgid "You can obtain your credentials for"
107
+ msgstr "Puedes obtener tus credenciales para"
108
+
109
+ #: mercadopago/mercadopago-custom-gateway.php:182
110
+ msgid "Insert your Mercado Pago Public key."
111
+ msgstr "Inserte su Public Key de Mercado Pago."
112
+
113
+ #: mercadopago/mercadopago-custom-gateway.php:189
114
+ msgid "Insert your Mercado Pago Access token."
115
+ msgstr "Inserte su Access Token de Mercado Pago."
116
+
117
+ #: mercadopago/mercadopago-custom-gateway.php:194 mercadopago/mercadopago-gateway.php:236
118
+ msgid "Instant Payment Notification (IPN) URL"
119
+ msgstr "URL da Notificación Instantanea de Pago (IPN)"
120
+
121
+ #: mercadopago/mercadopago-custom-gateway.php:196 mercadopago/mercadopago-gateway.php:238
122
+ msgid "Your IPN URL to receive instant payment notifications is"
123
+ msgstr "Su URL de IPN para recibir notificaciones instantáneas de pago es"
124
+
125
+ #: mercadopago/mercadopago-custom-gateway.php:199 mercadopago/mercadopago-gateway.php:241
126
+ msgid "Checkout Options"
127
+ msgstr "Opciones de Checkout"
128
+
129
+ #: mercadopago/mercadopago-custom-gateway.php:204 mercadopago/mercadopago-gateway.php:246
130
+ msgid "Title"
131
+ msgstr "Título"
132
+
133
+ #: mercadopago/mercadopago-custom-gateway.php:206 mercadopago/mercadopago-gateway.php:248
134
+ msgid "Title shown to the client in the checkout."
135
+ msgstr "Título mostrado al cliente en el checkout."
136
+
137
+ #: mercadopago/mercadopago-custom-gateway.php:207 mercadopago/mercadopago-custom-gateway.php:219 mercadopago/mercadopago-gateway.php:249
138
+ msgid "Mercado Pago"
139
+ msgstr "Mercado Pago"
140
+
141
+ #: mercadopago/mercadopago-custom-gateway.php:210 mercadopago/mercadopago-gateway.php:252
142
+ msgid "Description"
143
+ msgstr "Descripción"
144
+
145
+ #: mercadopago/mercadopago-custom-gateway.php:212 mercadopago/mercadopago-gateway.php:254
146
+ msgid "Description shown to the client in the checkout."
147
+ msgstr "Descripción mostrada al cliente en el checkout."
148
+
149
+ #: mercadopago/mercadopago-custom-gateway.php:213 mercadopago/mercadopago-gateway.php:255 mercadopago/mercadopago-gateway.php:432
150
+ msgid "Pay with Mercado Pago"
151
+ msgstr "Pagar con Mercado Pago"
152
+
153
+ #: mercadopago/mercadopago-custom-gateway.php:216
154
+ msgid "Statement Descriptor"
155
+ msgstr "Descripción de la Factura"
156
+
157
+ #: mercadopago/mercadopago-custom-gateway.php:218
158
+ msgid "The description that will be shown in your customer's invoice."
159
+ msgstr "La descripción que se muestra en la factura de su cliente."
160
+
161
+ #: mercadopago/mercadopago-custom-gateway.php:222
162
+ msgid "Binary Mode"
163
+ msgstr "Modo binario"
164
+
165
+ #: mercadopago/mercadopago-custom-gateway.php:224
166
+ msgid "Enable binary mode for checkout status"
167
+ msgstr "Activar el modo binario para el estado del checkout"
168
+
169
+ #: mercadopago/mercadopago-custom-gateway.php:226
170
+ msgid "When charging a credit card, only [approved] or [reject] status will be taken."
171
+ msgstr "Al cargar una tarjeta de crédito, sólo los estados [aprobado] o [rechazar] seran tomados."
172
+
173
+ #: mercadopago/mercadopago-custom-gateway.php:229
174
+ msgid "Ticket"
175
+ msgstr "Ticket"
176
+
177
+ #: mercadopago/mercadopago-custom-gateway.php:231
178
+ msgid "Enable Ticket for Custom Checkout"
179
+ msgstr "Habilitar Ticket para Checkout Personalizado"
180
+
181
+ #: mercadopago/mercadopago-custom-gateway.php:233
182
+ msgid "Let your customer pay you with tickets"
183
+ msgstr "Deje que su cliente le paga con tickets"
184
+
185
+ #: mercadopago/mercadopago-custom-gateway.php:236 mercadopago/mercadopago-gateway.php:258
186
+ msgid "Store Category"
187
+ msgstr "Categoría de la tienda"
188
+
189
+ #: mercadopago/mercadopago-custom-gateway.php:238 mercadopago/mercadopago-gateway.php:260
190
+ msgid "Define which type of products your store sells."
191
+ msgstr "Defina el tipo de productos que su tienda vende."
192
+
193
+ #: mercadopago/mercadopago-custom-gateway.php:242 mercadopago/mercadopago-gateway.php:264
194
+ msgid "Store Identificator"
195
+ msgstr "Identificador de la tienda"
196
+
197
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
198
+ msgid "Please, inform a prefix to your store."
199
+ msgstr "Por favor, informe un prefijo para su tienda."
200
+
201
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
202
+ msgid ""
203
+ "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same "
204
+ "identificators."
205
+ msgstr ""
206
+ "Si esta utilizando su cuenta Mercado Pago para múltiples tiendas, asegúrese que este prefijo sea único para no generar pedidos con el mismo identificador."
207
+
208
+ #: mercadopago/mercadopago-custom-gateway.php:248 mercadopago/mercadopago-gateway.php:318
209
+ msgid "Test and Debug Options"
210
+ msgstr "Opciones de Prueba y Debug"
211
+
212
+ #: mercadopago/mercadopago-custom-gateway.php:253 mercadopago/mercadopago-gateway.php:323
213
+ msgid "Mercado Pago Sandbox"
214
+ msgstr "Sandbox Mercado Pago"
215
+
216
+ #: mercadopago/mercadopago-custom-gateway.php:255 mercadopago/mercadopago-gateway.php:325
217
+ msgid "Enable Mercado Pago Sandbox"
218
+ msgstr "Habilitar el sandbox de Mercado Pago"
219
+
220
+ #: mercadopago/mercadopago-custom-gateway.php:257 mercadopago/mercadopago-gateway.php:327
221
+ msgid "This option allows you to test payments inside a sandbox environment."
222
+ msgstr "Esta opción permite simular un flujo de pagos completo en nuestro entorno Sandbox."
223
+
224
+ #: mercadopago/mercadopago-custom-gateway.php:260 mercadopago/mercadopago-gateway.php:330
225
+ msgid "Debug and Log"
226
+ msgstr "Debug y Log"
227
+
228
+ #: mercadopago/mercadopago-custom-gateway.php:262 mercadopago/mercadopago-gateway.php:332
229
+ msgid "Enable log"
230
+ msgstr "Habilitar Log"
231
+
232
+ #: mercadopago/mercadopago-custom-gateway.php:264 mercadopago/mercadopago-gateway.php:334
233
+ msgid "Register event logs of Mercado Pago, such as API requests, in the file"
234
+ msgstr "Registrar logs de eventos de Mercado Pago, como llamadas a la API, dentro del archivo"
235
+
236
+ #: mercadopago/mercadopago-custom-gateway.php:265 mercadopago/mercadopago-gateway.php:335
237
+ msgid "File location: "
238
+ msgstr "Local del archivo: "
239
+
240
+ #: mercadopago/mercadopago-custom-gateway.php:281 mercadopago/mercadopago-gateway.php:351
241
+ #, php-format
242
+ msgid "Please, rate us %s on WordPress.org and give your feedback to help improve this module!"
243
+ msgstr "Por favor, califíquenos con %s en WordPress.org y de su feedback para ayudar a mejorar este módulo!"
244
+
245
+ #: mercadopago/mercadopago-custom-gateway.php:332
246
+ msgid "Payment Method"
247
+ msgstr "Medios de Pago"
248
+
249
+ #: mercadopago/mercadopago-custom-gateway.php:333
250
+ msgid "Credit card number"
251
+ msgstr "Número de tarjeta de crédito"
252
+
253
+ #: mercadopago/mercadopago-custom-gateway.php:334
254
+ msgid "Expiration month"
255
+ msgstr "Mes de expiración"
256
+
257
+ #: mercadopago/mercadopago-custom-gateway.php:335
258
+ msgid "Expiration year"
259
+ msgstr "Año de expiración"
260
+
261
+ #: mercadopago/mercadopago-custom-gateway.php:336
262
+ msgid "Year"
263
+ msgstr "Año"
264
+
265
+ #: mercadopago/mercadopago-custom-gateway.php:337
266
+ msgid "Month"
267
+ msgstr "Mes"
268
+
269
+ #: mercadopago/mercadopago-custom-gateway.php:338
270
+ msgid "Card holder name"
271
+ msgstr "Nombre del titular de la tarjeta"
272
+
273
+ #: mercadopago/mercadopago-custom-gateway.php:339
274
+ msgid "Security code"
275
+ msgstr "Código de seguridad"
276
+
277
+ #: mercadopago/mercadopago-custom-gateway.php:340
278
+ msgid "Document Type"
279
+ msgstr "Tipo de Documento"
280
+
281
+ #: mercadopago/mercadopago-custom-gateway.php:341
282
+ msgid "Document number"
283
+ msgstr "Número de Documento"
284
+
285
+ #: mercadopago/mercadopago-custom-gateway.php:342
286
+ msgid "Issuer"
287
+ msgstr "Emisor"
288
+
289
+ #: mercadopago/mercadopago-custom-gateway.php:343
290
+ msgid "Installments"
291
+ msgstr "Cuotas"
292
+
293
+ #: mercadopago/mercadopago-custom-gateway.php:347
294
+ msgid "Parameter cardNumber can not be null/empty"
295
+ msgstr "Parámetro [Número de tarjeta] no puede ser nulo/vacío"
296
+
297
+ #: mercadopago/mercadopago-custom-gateway.php:348
298
+ msgid "Invalid Card Number"
299
+ msgstr "Número de tarjeta inválido"
300
+
301
+ #: mercadopago/mercadopago-custom-gateway.php:350 mercadopago/mercadopago-custom-gateway.php:351 mercadopago/mercadopago-custom-gateway.php:352
302
+ #: mercadopago/mercadopago-custom-gateway.php:353
303
+ msgid "Invalid Expiration Date"
304
+ msgstr "Fecha de expiración inválida"
305
+
306
+ #: mercadopago/mercadopago-custom-gateway.php:355
307
+ msgid "Parameter cardholderName can not be null/empty"
308
+ msgstr "Parámetro [Nombre del titular] no puede ser nulo/vacío"
309
+
310
+ #: mercadopago/mercadopago-custom-gateway.php:356
311
+ msgid "Invalid Card Holder Name"
312
+ msgstr "Nombre del titular de la tarjeta inválido"
313
+
314
+ #: mercadopago/mercadopago-custom-gateway.php:358
315
+ msgid "Parameter securityCode can not be null/empty"
316
+ msgstr "Parámetro [Código de seguridad] no puede ser nulo/vacío"
317
+
318
+ #: mercadopago/mercadopago-custom-gateway.php:359
319
+ msgid "Invalid Security Code"
320
+ msgstr "Código de seguridad inválido"
321
+
322
+ #: mercadopago/mercadopago-custom-gateway.php:361
323
+ msgid "Parameter docType can not be null/empty"
324
+ msgstr "Parámetro [Tipo de Documento] no puede ser nulo/vacío"
325
+
326
+ #: mercadopago/mercadopago-custom-gateway.php:362
327
+ msgid "Invalid Document Type"
328
+ msgstr "Tipo de Documento inválido"
329
+
330
+ #: mercadopago/mercadopago-custom-gateway.php:364
331
+ msgid "Parameter docNumber can not be null/empty"
332
+ msgstr "Parámetro [Número del Documento] no puede ser nulo/vacío"
333
+
334
+ #: mercadopago/mercadopago-custom-gateway.php:365
335
+ msgid "Invalid Document Number"
336
+ msgstr "Número del Documento inválido"
337
+
338
+ #: mercadopago/mercadopago-custom-gateway.php:367
339
+ msgid "The parameter cardholder.document.subtype can not be null or empty"
340
+ msgstr "Parámetro [Subtipo del documento] no puede ser nulo/vacío"
341
+
342
+ #: mercadopago/mercadopago-custom-gateway.php:368
343
+ msgid "Invalid Document Sub Type"
344
+ msgstr "Subtipo del documento inválido"
345
+
346
+ #: mercadopago/mercadopago-custom-gateway.php:370
347
+ msgid "Parameter cardIssuerId can not be null/empty"
348
+ msgstr "Parámetro [Emisor] no puede ser nulo/vacío"
349
+
350
+ #: mercadopago/mercadopago-custom-gateway.php:402 mercadopago/mercadopago-custom-gateway.php:943 mercadopago/mercadopago-gateway.php:869
351
+ msgid "Payment approved."
352
+ msgstr "Pago aprobado."
353
+
354
+ #: mercadopago/mercadopago-custom-gateway.php:416 mercadopago/mercadopago-custom-gateway.php:805
355
+ msgid "Your payment is under review. In less than 1h, you should be notified by email."
356
+ msgstr "Su pago está en revisión. En menos de 1 hora, usted será notificado por correo electrónico."
357
+
358
+ #: mercadopago/mercadopago-custom-gateway.php:418
359
+ msgid "Check your order resume"
360
+ msgstr "Ver su hoja de pedido"
361
+
362
+ #: mercadopago/mercadopago-custom-gateway.php:431
363
+ msgid "Your payment was refused. You can try again."
364
+ msgstr "Su pago fue rechazado. Puede intentarlo de nuevo."
365
+
366
+ #: mercadopago/mercadopago-custom-gateway.php:435 mercadopago/mercadopago-custom-gateway.php:819 mercadopago/mercadopago-gateway.php:460
367
+ msgid "Click to try again"
368
+ msgstr "Haga clic para intentarlo de nuevo"
369
+
370
+ #: mercadopago/mercadopago-custom-gateway.php:455
371
+ msgid "A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?"
372
+ msgstr "Un problema se produjo al procesar su pago. ¿Esta seguro que ha rellenado correctamente toda la información en el formulario de checkout?"
373
+
374
+ #: mercadopago/mercadopago-custom-gateway.php:544
375
+ msgid "Shipping"
376
+ msgstr "Envío"
377
+
378
+ #: mercadopago/mercadopago-custom-gateway.php:545
379
+ msgid "Shipping service used by store"
380
+ msgstr "Servicio de envío utilizado por la tienda"
381
+
382
+ #: mercadopago/mercadopago-custom-gateway.php:721 mercadopago/mercadopago-gateway.php:649
383
+ msgid "WooCommerce &gt; System Status &gt; Logs"
384
+ msgstr "WooCommerce &gt; Estado del Sistema &gt; Logs"
385
+
386
+ #: mercadopago/mercadopago-custom-gateway.php:766 mercadopago/mercadopago-custom-gateway.php:779 mercadopago/mercadopago-gateway.php:694
387
+ #: mercadopago/mercadopago-gateway.php:705
388
+ msgid "Mercado Pago is Inactive"
389
+ msgstr "Mercado Pago Inactivo"
390
+
391
+ #: mercadopago/mercadopago-custom-gateway.php:769
392
+ msgid "Your Mercado Pago credentials Public Key/Access Token appears to be misconfigured."
393
+ msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
394
+
395
+ #: mercadopago/mercadopago-custom-gateway.php:771 mercadopago/mercadopago-gateway.php:698
396
+ msgid "Click here and configure!"
397
+ msgstr "Haga click aquí y configure!"
398
+
399
+ #: mercadopago/mercadopago-custom-gateway.php:782 mercadopago/mercadopago-gateway.php:708
400
+ msgid "The currency"
401
+ msgstr "La moneda"
402
+
403
+ #: mercadopago/mercadopago-custom-gateway.php:783 mercadopago/mercadopago-gateway.php:708
404
+ msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, PEN, VEF."
405
+ msgstr "no es soportada. Las monedas soportadas son: ARS, BRL, CLP, COP, MXN, PEN, VEF."
406
+
407
+ #: mercadopago/mercadopago-custom-gateway.php:797
408
+ msgid "Peru"
409
+ msgstr "Perú"
410
+
411
+ #: mercadopago/mercadopago-custom-gateway.php:809
412
+ msgid "Click to check your order"
413
+ msgstr "Haga clic para comprobar su pedido"
414
+
415
+ #: mercadopago/mercadopago-custom-gateway.php:814 mercadopago/mercadopago-gateway.php:457
416
+ msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
417
+ msgstr "Se ha producido un error en el procesamiento de su pago. Por favor, inténtelo de nuevo o póngase en contacto con nosotros para Asistencia."
418
+
419
+ #: mercadopago/mercadopago-custom-gateway.php:816
420
+ msgid "Reason is: "
421
+ msgstr "La razón es:"
422
+
423
+ #: mercadopago/mercadopago-custom-gateway.php:849 mercadopago/mercadopago-gateway.php:748
424
+ msgid "Mercado Pago Request Failure"
425
+ msgstr "La solicitud de Mercado Pago ha fallado."
426
+
427
+ #: mercadopago/mercadopago-custom-gateway.php:918 mercadopago/mercadopago-gateway.php:822
428
+ msgid "Payer email"
429
+ msgstr "Email del comprador"
430
+
431
+ #: mercadopago/mercadopago-custom-gateway.php:926 mercadopago/mercadopago-gateway.php:829
432
+ msgid "Payment type"
433
+ msgstr "Medio de pago"
434
+
435
+ #: mercadopago/mercadopago-custom-gateway.php:934 mercadopago/mercadopago-gateway.php:841
436
+ msgid "Mercado Pago Payment ID"
437
+ msgstr "ID de pago de Mercado Pago"
438
+
439
+ #: mercadopago/mercadopago-custom-gateway.php:950 mercadopago/mercadopago-gateway.php:875
440
+ msgid "Customer haven't paid yet."
441
+ msgstr "El cliente todavía no efectuó el pago."
442
+
443
+ #: mercadopago/mercadopago-custom-gateway.php:957 mercadopago/mercadopago-gateway.php:881
444
+ msgid "Payment under review."
445
+ msgstr "El pago está pendiente de revisión."
446
+
447
+ #: mercadopago/mercadopago-custom-gateway.php:964 mercadopago/mercadopago-gateway.php:887
448
+ msgid "The payment was refused. The customer can try again."
449
+ msgstr "El pago fue rechazado. El cliente puede intentar nuevamente."
450
+
451
+ #: mercadopago/mercadopago-custom-gateway.php:971 mercadopago/mercadopago-gateway.php:893
452
+ msgid "The payment was refunded to the customer."
453
+ msgstr "El pago fue devuelto al cliente."
454
+
455
+ #: mercadopago/mercadopago-custom-gateway.php:978 mercadopago/mercadopago-gateway.php:899
456
+ msgid "The payment was cancelled."
457
+ msgstr "El pago fue cancelado."
458
+
459
+ #: mercadopago/mercadopago-custom-gateway.php:984 mercadopago/mercadopago-custom-gateway.php:990 mercadopago/mercadopago-gateway.php:904
460
+ #: mercadopago/mercadopago-gateway.php:909
461
+ msgid "The payment is under mediation or it was charged-back."
462
+ msgstr "El pago esta en mediación o la compra fue desconocida por el cliente."
463
+
464
+ #: mercadopago/mercadopago-gateway.php:51
465
+ msgid "Mercado Pago - Basic Checkout"
466
+ msgstr "Mercado Pago - Checkout Básico"
467
+
468
+ #: mercadopago/mercadopago-gateway.php:148
469
+ msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
470
+ msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
471
+
472
+ #: mercadopago/mercadopago-gateway.php:158 mercadopago/mercadopago-gateway.php:167
473
+ msgid "Configure your Client_id and Client_secret to have access to more options."
474
+ msgstr "Configure su Client_id y Client_secret para tener acceso a más opciones."
475
+
476
+ #: mercadopago/mercadopago-gateway.php:184 mercadopago/mercadopago-gateway.php:192 mercadopago/mercadopago-gateway.php:202
477
+ msgid "This field should be an integer."
478
+ msgstr "Este campo debe ser un número."
479
+
480
+ #: mercadopago/mercadopago-gateway.php:187
481
+ msgid "If your integration method is iFrame, please inform the payment iFrame width."
482
+ msgstr "Si su modo de apertura es iFrame, indique el ancho del iFrame."
483
+
484
+ #: mercadopago/mercadopago-gateway.php:195
485
+ msgid "If your integration method is iFrame, please inform the payment iFrame height."
486
+ msgstr "Si su modo de apertura es iFrame, indique el alto del iFrame."
487
+
488
+ #: mercadopago/mercadopago-gateway.php:205
489
+ msgid "Select the max number of installments for your customers."
490
+ msgstr "Seleccione el número máximo de cuotas disponibles para sus clientes."
491
+
492
+ #: mercadopago/mercadopago-gateway.php:213
493
+ msgid "Enable Basic Checkout"
494
+ msgstr "Habilitar el Checkout Básico"
495
+
496
+ #: mercadopago/mercadopago-gateway.php:224
497
+ msgid "Insert your Mercado Pago Client_id."
498
+ msgstr "Inserte su Client_id de Mercado Pago."
499
+
500
+ #: mercadopago/mercadopago-gateway.php:231
501
+ msgid "Insert your Mercado Pago Client_secret."
502
+ msgstr "Inserte su Client_secret de Mercado Pago."
503
+
504
+ #: mercadopago/mercadopago-gateway.php:270
505
+ msgid "Integration Method"
506
+ msgstr "Método de integración"
507
+
508
+ #: mercadopago/mercadopago-gateway.php:272
509
+ msgid ""
510
+ "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an "
511
+ "internal window is embedded to the page layout)."
512
+ msgstr ""
513
+ "Seleccione la forma en que sus clientes deben interactuar con Mercado Pago. Ventana Modal (Dentro de su tienda), Redireccionamiento (El cliente es "
514
+ "redireccionado a Mercado Pago), o iFrame (Ventana de pago incorporada a su página)."
515
+
516
+ #: mercadopago/mercadopago-gateway.php:275
517
+ msgid "iFrame"
518
+ msgstr "iFrame"
519
+
520
+ #: mercadopago/mercadopago-gateway.php:276
521
+ msgid "Modal Window"
522
+ msgstr "Ventana modal"
523
+
524
+ #: mercadopago/mercadopago-gateway.php:277
525
+ msgid "Redirect"
526
+ msgstr "Redireccionamiento"
527
+
528
+ #: mercadopago/mercadopago-gateway.php:281
529
+ msgid "iFrame Width"
530
+ msgstr "Ancho del iFrame"
531
+
532
+ #: mercadopago/mercadopago-gateway.php:287
533
+ msgid "iFrame Height"
534
+ msgstr "Alto del iFrame"
535
+
536
+ #: mercadopago/mercadopago-gateway.php:293
537
+ msgid "Auto Return"
538
+ msgstr "Redirección automática"
539
+
540
+ #: mercadopago/mercadopago-gateway.php:295
541
+ msgid "Automatic Return After Payment"
542
+ msgstr "Redirección Automática luego del pago"
543
+
544
+ #: mercadopago/mercadopago-gateway.php:297
545
+ msgid "After the payment, client is automatically redirected."
546
+ msgstr "Después del pago, el cliente será redireccionado automáticamente."
547
+
548
+ #: mercadopago/mercadopago-gateway.php:300
549
+ msgid "Payment Options"
550
+ msgstr "Opciones de Pago"
551
+
552
+ #: mercadopago/mercadopago-gateway.php:305
553
+ msgid "Max installments"
554
+ msgstr "Número máximo de cuotas"
555
+
556
+ #: mercadopago/mercadopago-gateway.php:311
557
+ msgid "Exclude Payment Methods"
558
+ msgstr "Excluir medios de pago"
559
+
560
+ #: mercadopago/mercadopago-gateway.php:428
561
+ msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
562
+ msgstr "Gracias por su compra. Por favor, prosiga a la página de pago haciendo click en el botón de abajo."
563
+
564
+ #: mercadopago/mercadopago-gateway.php:436
565
+ msgid "Cancel order &amp; Clear cart"
566
+ msgstr "Cancelar &amp; Limpiar carrito"
567
+
568
+ #: mercadopago/mercadopago-gateway.php:446
569
+ msgid "Thank you for your order. Proceed with your payment completing the following information."
570
+ msgstr "Gracias por su compra. Prosiga con su pago completando la información abajo."
571
+
572
+ #: mercadopago/mercadopago-gateway.php:697
573
+ msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
574
+ msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
575
+
576
+ msgid " as it appears in your card ..."
577
+ msgstr " tal como aparece en su tarjeta ..."
578
+
579
+ msgid "Done, your payment was accredited!"
580
+ msgstr "Listo, su pago ha sido aceptado!"
581
+
582
+ msgid "We are processing the payment. In less than an hour we will e-mail you the results."
583
+ msgstr "Estamos procesando su pago. En menos de una hora le enviaremos el resultado por correo electrónico."
584
+
585
+ msgid "We are processing the payment. In less than 2 business days we will tell you by e-mail whether it has accredited or we need more information."
586
+ msgstr "Estamos procesando su pago. En menos de 2 días le enviaremos por correo electrónico si se ha aprobado el pago o si se necesita información adicional."
587
+
588
+ msgid "Check the card number."
589
+ msgstr "Compruebe el número de tarjeta."
590
+
591
+ msgid "Check the expiration date."
592
+ msgstr "Compruebe la fecha de expiración."
593
+
594
+ msgid "Check the information."
595
+ msgstr "Compruebe la información informada."
596
+
597
+ msgid "Check the security code."
598
+ msgstr "Compruebe el código de seguridad informado."
599
+
600
+ msgid "We could not process your payment."
601
+ msgstr "No se puede procesar su pago."
602
+
603
+ msgid "You must authorize the payment of your orders."
604
+ msgstr "Usted debe autorizar los pagos de sus órdenes."
605
+
606
+ msgid "Call your card issuer to activate your card. The phone is on the back of your card."
607
+ msgstr "Póngase en contacto con el emisor de su tarjeta para activarla. El teléfono se encuentra en la parte posterior de su tarjeta."
608
+
609
+ msgid "You already made a payment for that amount. If you need to repay, use another card or other payment method."
610
+ msgstr "Usted ya realizó un pago de este importe. Si tiene que pagar de nuevo, utilizar otra tarjeta u otro medio de pago."
611
+
612
+ msgid "Your payment was rejected. Choose another payment method. We recommend cash."
613
+ msgstr "Su pago fue rechazado. Por favor seleccione otro medio de pago. Se recomienda en efectivo."
614
+
615
+ msgid "Your payment do not have sufficient funds."
616
+ msgstr "Su pago no tiene fondos suficientes."
617
+
618
+ msgid "Your payment does not process payments with selected installments."
619
+ msgstr "El pago no puede procesar la cuota seleccionada."
620
+
621
+ msgid "You have reached the limit of allowed attempts. Choose another card or another payment method."
622
+ msgstr "Has alcanzado el límite de intentos permitidos. Elija otra tarjeta u otro medio de pago."
623
+
624
+ msgid "This payment method did not process the payment."
625
+ msgstr "Esta medio de pago no puede procesar su pago."
626
+
627
+ msgid "Mercado Pago - Ticket"
628
+ msgstr "Mercado Pago - Ticket"
629
+
630
+ msgid "Mercado Pago - Credit Card"
631
+ msgstr "Mercado Pago - Tarjeta de Crédito"
632
+
633
+ msgid "Ticket Options"
634
+ msgstr "Opciones de Ticket"
635
+
636
+ msgid "Enable Ticket Payment Method"
637
+ msgstr "Habilitar Pago con Ticket"
638
+
639
+ msgid "Other Bank"
640
+ msgstr "Otro Banco"
641
+
642
+ msgid "Choose"
643
+ msgstr "Escoger"
644
+
645
+ msgid "A problem was occurred when processing your payment. Please, try again."
646
+ msgstr "Un problema se produjo al procesar su pago. Por favor, inténtelo de nuevo."
647
+
648
+ msgid "Thank you for your order. Please, pay the ticket to get your order approved."
649
+ msgstr "Gracias por su orden. Por favor, realice el pago del ticket para tener su orden aprobada."
650
+
651
+ msgid "Waiting for the ticket payment."
652
+ msgstr "Esperando el pago del ticket."
653
+
654
+ msgid "Print the Ticket"
655
+ msgstr "Imprimir el ticket"
656
+
657
+ msgid "To reprint the ticket click "
658
+ msgstr "Para imprimir nuevamente el ticket hace clic "
659
+
660
+ msgid "here"
661
+ msgstr "aquí"
662
+
663
+ msgid "Custom Checkout is Inactive"
664
+ msgstr "Checkout Personalizado Inactivo"
665
+
666
+ msgid "Basic Checkout is Inactive"
667
+ msgstr "Checkout Básico Inactivo"
668
+
669
+ msgid "Ticket is Inactive"
670
+ msgstr "Ticket Inactivo"
671
+
672
+ msgid "Please, select the ticket issuer of your preference."
673
+ msgstr "Por favor, seleccione el emisor de su elección."
674
+
675
+ msgid "Click "Place order" button. The ticket will be generated and you will be redirected to print it."
676
+ msgstr "Haga clic en el botón "Realizar el pedido". El ticket será generado y usted será redirigido a imprimirlo."
677
+
678
+ msgid "Important: The order will be confirmed only after the payment approval."
679
+ msgstr "Importante: La solicitud sólo será confirmada después de la aprobación del pago."
680
+
681
+ msgid "Your Mercado Pago credential Access Token appears to be misconfigured."
682
+ msgstr "Su credencial Access Token de Mercado de Pago parece estar desconfigurada."
683
+
684
+ msgid "Your Card"
685
+ msgstr "Sus Tarjetas"
686
+
687
+ msgid "Other Cards"
688
+ msgstr "Otras Tarjetas"
689
+
690
+ msgid "Other Card"
691
+ msgstr "Otra Tarjeta"
692
+
693
+ msgid "ended in"
694
+ msgstr "terminado en"
695
+
696
+ msgid "Your site appears to not have SSL certification. SSL is a pre-requisite because the payment process is made in your server."
697
+ msgstr "Su sitio parece no tener certificación SSL. SSL es un requisito para transaccionar desde su servidor."
698
+
699
+ msgid "ATTENTION: The currency"
700
+ msgstr "ATENCIÓN: La moneda"
701
+
702
+ msgid "defined in WooCommerce is different from the one used in your credentials country.<br>The currency for transactions in this payment method will be"
703
+ msgstr "que se define en WooCommerce es diferente de la utilizada en el país de sus credenciales.<br>La moneda para las transacciones realizadas por este medio de pago será"
704
+
705
+ msgid "Currency conversions should be made outside this module."
706
+ msgstr "Conversiones de monedas deben hacerse fuera de este módulo."
707
+
708
+ msgid "Coupons"
709
+ msgstr "Cupones"
710
+
711
+ msgid "Enable coupons of discounts"
712
+ msgstr "Activar los cupones de descuento"
713
+
714
+ msgid "If there is a Mercado Pago campaign, allow your store to give discounts to customers."
715
+ msgstr "Si hay una campaña de Mercado Pago, permitir a su tienda hacer descuentos para los clientes."
716
+
717
+ msgid "You will save"
718
+ msgstr "Usted ahorrará"
719
+
720
+ msgid "Apply"
721
+ msgstr "Aplicar"
722
+
723
+ msgid "Remove"
724
+ msgstr "Eliminar"
725
+
726
+ msgid "Please, inform your coupon code"
727
+ msgstr "Por favor, introduzca el código de su cupón"
728
+
729
+ msgid "Please, inform your email in billing address to use this feature"
730
+ msgstr "Por favor, introduzca su email en la dirección de facturación para utilizar este servicio"
731
+
732
+ msgid "Discount for %s coupon"
733
+ msgstr "Descuento para el cupón %s"
734
+
735
+ msgid "Discount provided by store"
736
+ msgstr "Descuento dado por la tienda"
737
+
738
+ msgid "Discount Coupon"
739
+ msgstr "Cupón de Descuento"
740
+
741
+ msgid "CURRENCY CONVERTED: The currency conversion ratio from"
742
+ msgstr "MONEDA CONVERTIDA: La tasa de conversión de moneda de"
743
+
744
+ msgid "ERROR: It was not possible to convert the unsupported currency"
745
+ msgstr "ERROR: No fue posible convertir la moneda no soportada"
746
+
747
+ msgid "to"
748
+ msgstr "para"
749
+
750
+ msgid "If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio."
751
+ msgstr "Si la moneda utilizada en WooCommerce es diferente o no soportada por Mercado Pago, convierte los importes de sus transacciones con la tasa de conversión de Mercado Pago."
752
+
753
+ msgid " is: "
754
+ msgstr " es: "
755
+
756
+ msgid "Currency Conversion"
757
+ msgstr "Conversión de Moneda"
758
+
759
+ msgid "with discount from"
760
+ msgstr "con descuento de"
761
+
762
+ msgid "Total of your purchase:"
763
+ msgstr "Total de su compra:"
764
+
765
+ msgid "Total of your purchase with discount:"
766
+ msgstr "Total de su compra con descuento:"
767
+
768
+ msgid "*Uppon payment approval"
769
+ msgstr "*Con la aprobación de pago"
770
+
771
+ msgid "Terms and Conditions of Use"
772
+ msgstr "Términos y Condiciones de Uso"
773
+
774
+ msgid "Payment converted from"
775
+ msgstr "Pago convertido de"
776
+
777
+ msgid "Rate Us"
778
+ msgstr "Calificar"
779
+
780
+ msgid "Report Issue"
781
+ msgstr "Informar Problema"
782
+
783
+ msgid "Two Cards Mode"
784
+ msgstr "Modo de Dos Tarjetas"
785
+
786
+ msgid "Payments with Two Cards"
787
+ msgstr "Pagos con Dos Tarjetas"
788
+
789
+ msgid "Your customer will be able to use two different cards to pay the order."
790
+ msgstr "Su cliente será capaz de utilizar dos tarjetas diferentes para pagar el pedido."
791
+
792
+ msgid "Your Mercado Pago credentials Access Token appears to be misconfigured."
793
+ msgstr "La credencial Mercado Pago Access Token parece estar mal configurada."
794
+
795
+ msgid "Cancel Order"
796
+ msgstr "Cancelar la Compra"
797
+
798
+ msgid "Refund Order"
799
+ msgstr "Reembolso de Compra"
800
+
801
+ msgid "Back URL Options"
802
+ msgstr "Opciones de URL de Callback"
803
+
804
+ msgid "Sucess URL"
805
+ msgstr "URL de Éxito"
806
+
807
+ msgid "Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page."
808
+ msgstr "Donde los clientes serán redirigidos después de una compra exitosa. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
809
+
810
+ msgid "Failure URL"
811
+ msgstr "URL de Pago Rechazado"
812
+
813
+ msgid "Where customers should be redirected after a failed purchase. Let blank to redirect to the default store order resume page."
814
+ msgstr "Donde los clientes serán redirigidos después de una compra rechazada. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
815
+
816
+ msgid "Pending URL"
817
+ msgstr "URL de Pago Pendiente"
818
+
819
+ msgid "Where customers should be redirected after a pending purchase. Let blank to redirect to the default store order resume page."
820
+ msgstr "Donde los clientes ​serán redirigidos después de una compra pendiente. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
821
+
822
+ msgid "Stock Reduce"
823
+ msgstr "Reducir Inventario"
824
+
825
+ msgid "Reduce Stock in Order Generation"
826
+ msgstr "Reducir Inventario en la Orden"
827
+
828
+ msgid "Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval."
829
+ msgstr "Activar esta opción para reducir el inventario mediante la creación de un pedido. Desactivar para reducir sólo <strong>después</strong> de la aprobación del pago."
830
+
831
+ msgid "Recurrent Product"
832
+ msgstr "Producto Recurrente"
833
+
834
+ msgid "Frequency"
835
+ msgstr "Frecuencia"
836
+
837
+ msgid "Amount of time (in days or months) for the execution of the next payment."
838
+ msgstr "Cantidad de tiempo (en días o meses) para la ejecución del próximo pago."
839
+
840
+ msgid "Start date"
841
+ msgstr "Fecha de inicio"
842
+
843
+ msgid "First payment date (effective debit). Defaults to now if blank."
844
+ msgstr "Primera fecha de pago (débito efectivo). De forma predeterminada ahora, si está en blanco."
845
+
846
+ msgid "End date"
847
+ msgstr "Fecha final"
848
+
849
+ msgid "Deadline to generate new charges. Defaults to never if blank."
850
+ msgstr "Fecha límite para generar nuevos cargos. De forma predeterminada como nunca, si está en blanco."
851
+
852
+ msgid "Days"
853
+ msgstr "Días"
854
+
855
+ msgid "Months"
856
+ msgstr "Meses"
857
+
858
+ msgid "Indicates the period of time."
859
+ msgstr "Indica el período de tiempo."
860
+
861
+ msgid "The amount to charge the payer each period. Should be informed including taxes and discounts."
862
+ msgstr "La cantidad para cobrar el pagador en cada período. Debe ser informada incluyendo impuestos y descuentos."
863
+
864
+ msgid "Amount charged"
865
+ msgstr "Cantidad de cobro"
866
+
867
+ msgid "Uruguay"
868
+ msgstr "Uruguay"
869
+
870
+ msgid "Frequency type"
871
+ msgstr "Tipo de frecuencia"
872
+
873
+ msgid "Transaction amount"
874
+ msgstr "Valor de la transacción"
875
+
876
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
877
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
878
+
879
+ msgid "Subscription"
880
+ msgstr "Suscripción"
881
+
882
+ msgid "Enable Subscription"
883
+ msgstr "Habilitar Suscripción"
884
+
885
+ msgid "Subscription is Inactive"
886
+ msgstr "La Suscripción está Inactiva"
887
+
888
+ msgid "Subscribe with Mercado Pago"
889
+ msgstr "Suscribirse con Mercado Pago"
890
+
891
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
892
+ msgstr "Para esta solución, usted debe configurar su URL de IPN. Puede acceder a ella en su cuenta para su específico país en:"
893
+
894
+ msgid "Discount by Gateway"
895
+ msgstr "Descuento por Gateway"
896
+
897
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
898
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
899
+
900
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
901
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
902
+
903
+ msgid "Discount Of"
904
+ msgstr "Descuento de"
905
+
906
+ msgid "Mercado Pago Subscription"
907
+ msgstr "Suscripción Mercado Pago"
908
+
909
+ msgid "Payment ID:"
910
+ msgstr "ID de Pago:"
911
+
912
+ msgid "Amount:"
913
+ msgstr "Cantidad:"
914
+
915
+ msgid "This operation could not be completed."
916
+ msgstr "Esta operación no se puede completar."
917
+
918
+ msgid "Operation successfully completed."
919
+ msgstr "La operación se realizó con éxito."
920
+
921
+ msgid "Refund Payment"
922
+ msgstr "Reembolso de Pago"
923
+
924
+ msgid "Cancel Payment"
925
+ msgstr "Cancelar Pago"
926
+
927
+ msgid "Mercado Pago - Subscription"
928
+ msgstr "Mercado Pago - Suscripcións"
929
+
930
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
931
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
932
+
933
+ msgid "Free Shipping"
934
+ msgstr "Envío Gratuito"
935
+
936
+ msgid "Day"
937
+ msgstr "Día"
938
+
939
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
940
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
941
+
942
+ msgid "Mercado Envios"
943
+ msgstr "Mercado Envios"
944
+
945
+ msgid "This controls the title which the user sees during checkout."
946
+ msgstr "Controla el título que se muestra al cliente durante el pago."
947
+
948
+ msgid "Enable free shipping for this shipping method"
949
+ msgstr "Habilitar el envío gratuito para este método de envío"
950
+
951
+ msgid "Delivery Time"
952
+ msgstr "Tiempo de Entrega"
953
+
954
+ msgid "Show estimated delivery time"
955
+ msgstr "Mostrar el tiempo estimado de entrega"
956
+
957
+ msgid "Display the estimated delivery time in working days."
958
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
959
+
960
+ msgid "Buyer initiates complaint and requested a refund."
961
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
962
+
963
+ msgid "In return to sender"
964
+ msgstr "Volviendo al remitente"
965
+
966
+ msgid "Missing recipient for delivery"
967
+ msgstr "Destinatario ausente para envío"
968
+
969
+ msgid "Delayed shipping"
970
+ msgstr "Envío retrasado"
971
+
972
+ msgid "Unsuccessful"
973
+ msgstr "Fracasado"
974
+
975
+ msgid "Tag printed"
976
+ msgstr "Etiqueta impresa"
977
+
978
+ msgid "Tag ready to print"
979
+ msgstr "Etiquetar lista para imprimir"
980
+
981
+ msgid "Tracking code:"
982
+ msgstr "Código de rastreamiento:"
983
+
984
+ msgid "Tag:"
985
+ msgstr "Etiqueta:"
986
+
987
+ msgid "Shipping is pending"
988
+ msgstr "Envío pendiente"
989
+
990
+ msgid "Tutorial"
991
+ msgstr "Tutorial"
992
+
993
+ msgid "Discount Of "
994
+ msgstr "Descuento De "
995
+
996
+ msgid "Make this product a subscription."
997
+ msgstr "Hacer deste producto una suscripción."
998
+
999
+ msgid "Order"
1000
+ msgstr "Pedido"
1001
+
1002
+ msgid "Mercado Envios Tracking ID"
1003
+ msgstr "Código de rastreamiento de Mercado Envíos"
1004
+
1005
+ msgid "Hello,"
1006
+ msgstr "Hola,"
1007
+
1008
+ msgid "Your order"
1009
+ msgstr "Su pedido"
1010
+
1011
+ msgid "made in"
1012
+ msgstr "hecho en"
1013
+
1014
+ msgid "used Mercado Envios as its shipment method."
1015
+ msgstr "utilizó el Mercado Envíos como su medio de envío."
1016
+
1017
+ msgid "You can track it with the following Tracking ID:"
1018
+ msgstr "Usted puedes rastrearlo con lo siguiente código de rastreamiento:"
1019
+
1020
+ msgid "Best regards."
1021
+ msgstr "Saludos."
1022
+
1023
+ msgid "SELECT..."
1024
+ msgstr "SELECCIONE..."
1025
+
1026
+ msgid "NAME"
1027
+ msgstr "NOMBRE"
1028
+
1029
+ msgid "SURNAME"
1030
+ msgstr "APELLIDO"
1031
+
1032
+ msgid "DOCUMENT"
1033
+ msgstr "DOCUMENTO"
1034
+
1035
+ msgid "ADDRESS"
1036
+ msgstr "DIRECCIÓN"
1037
+
1038
+ msgid "NUMBER"
1039
+ msgstr "NÚMERO"
1040
+
1041
+ msgid "CITY"
1042
+ msgstr "CIUDAD"
1043
+
1044
+ msgid "STATE"
1045
+ msgstr "ESTADO"
1046
+
1047
+ msgid "ZIP"
1048
+ msgstr "CÓDIGO POSTAL"
1049
+
1050
+ msgid "You must inform you NAME"
1051
+ msgstr "Obligatorio informar su NOMBRE"
1052
+
1053
+ msgid "You must inform your SURNAME"
1054
+ msgstr "Obligatorio informar su APELLIDO"
1055
+
1056
+ msgid "You must inform your DOCUMENT"
1057
+ msgstr "Obligatorio informar su DOCUMENTO"
1058
+
1059
+ msgid "You must inform your ADDRESS"
1060
+ msgstr "Obligatorio informar su DIRECCIÓN"
1061
+
1062
+ msgid "You must inform your ADDRESS NUMBER"
1063
+ msgstr "Obligatorio informar su NÚMERO"
1064
+
1065
+ msgid "You must inform your CITY"
1066
+ msgstr "Obligatorio informar su CIUDAD"
1067
+
1068
+ msgid "You must inform your STATE"
1069
+ msgstr "Obligatorio informar su ESTADO"
1070
+
1071
+ msgid "You must inform your ZIP"
1072
+ msgstr "Obligatorio informar su CÓDIGO POSTAL"
1073
+
1074
+ msgid "Your PHP version is OK."
1075
+ msgstr "Su versión de PHP está bien."
1076
+
1077
+ msgid "Your PHP version do not support this module. You have %s, minimal required is %s."
1078
+ msgstr "Su versión de PHP no soporta este módulo. Tienes %s, la mínima requerida es %s."
1079
+
1080
+ msgid "cURL is installed."
1081
+ msgstr "cURL está instalado."
1082
+
1083
+ msgid "cURL is not installed."
1084
+ msgstr "cURL no está instalado."
1085
+
1086
+ msgid "SSL is missing in your site."
1087
+ msgstr "Falta el SSL en su sitio."
1088
+
1089
+ msgid "Your site has SSL enabled."
1090
+ msgstr "Su sitio tiene SSL habilitado."
1091
+
1092
+ msgid "Fisical Person"
1093
+ msgstr "Persona Física"
1094
+
1095
+ msgid "Legal Person"
1096
+ msgstr "Persona Jurídica"
1097
+
1098
+ msgid "SOCIAL NAME"
1099
+ msgstr "RAZÓN SOCIAL"
1100
+
1101
+ msgid "CNPJ"
1102
+ msgstr "CNPJ"
languages/woocommerce-mercadopago-module-es_VE.mo CHANGED
Binary file
languages/woocommerce-mercadopago-module-es_VE.po CHANGED
@@ -4,9 +4,9 @@
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
- "POT-Creation-Date: 2016-03-04 20:48-0300\n"
8
  "PO-Revision-Date: \n"
9
- "Language-Team: Your Team <translations@example.com>\n"
10
  "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -14,335 +14,1089 @@ msgstr ""
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
18
- "X-Poedit-Basepath: ..\n"
 
19
  "X-Generator: Poedit 1.8.7\n"
20
  "Last-Translator: \n"
21
- "Language: es_AR\n"
22
  "X-Poedit-SearchPath-0: .\n"
23
 
24
  #. Description of the plugin/theme
25
  msgid "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."
26
- msgstr "Este es el módulo <strong>oficial</strong> de Mercado Pago para el plugin WooCommerce. Este módulo habilita el uso de Mercado Pago en WooCommerce como método de pago para compras realizadas en su tienda virtual."
27
 
28
- #: mercadopago-module.php:66
29
  #, php-format
30
  msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
31
  msgstr "Woo Mercado Pago Module depende de la última versión de %s para ejecutarse!"
32
 
33
- #: mercadopago/mercadopago-gateway.php:63
 
 
 
 
 
 
 
 
 
 
 
 
34
  msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
35
- msgstr "Este módulo habilita el uso de Mercado Pago en WooCommerce como método de pago para compras realizadas en su tienda virtual."
36
 
37
- #: mercadopago/mercadopago-gateway.php:133
 
38
  msgid "Argentine"
39
  msgstr "Argentina"
40
 
41
- #: mercadopago/mercadopago-gateway.php:134
 
42
  msgid "Brazil"
43
  msgstr "Brasil"
44
 
45
- #: mercadopago/mercadopago-gateway.php:135
 
46
  msgid "Chile"
47
  msgstr "Chile"
48
 
49
- #: mercadopago/mercadopago-gateway.php:136
 
50
  msgid "Colombia"
51
  msgstr "Colombia"
52
 
53
- #: mercadopago/mercadopago-gateway.php:137
 
54
  msgid "Mexico"
55
  msgstr "México"
56
 
57
- #: mercadopago/mercadopago-gateway.php:138
58
  msgid "or"
59
  msgstr "o"
60
 
61
- #: mercadopago/mercadopago-gateway.php:139
 
62
  msgid "Venezuela"
63
  msgstr "Venezuela"
64
 
65
- #: mercadopago/mercadopago-gateway.php:154
66
- msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
67
- msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
68
-
69
- #: mercadopago/mercadopago-gateway.php:157
70
  msgid "Your credentials are <strong>valid</strong> for"
71
  msgstr "Sus credenciales <strong>son válidas</strong> para"
72
 
73
- #: mercadopago/mercadopago-gateway.php:164 mercadopago/mercadopago-gateway.php:173
74
- msgid "Configure your Client_id and Client_secret to have access to more options."
75
- msgstr "Configure su Client_id y Client_secret para tener acceso a más opciones."
76
-
77
- #: mercadopago/mercadopago-gateway.php:167 mercadopago/mercadopago-gateway.php:176
78
  msgid "Your credentials are <strong>not valid</strong>!"
79
  msgstr "Sus credenciales <strong>no son válidas</strong>!"
80
 
81
- #: mercadopago/mercadopago-gateway.php:190 mercadopago/mercadopago-gateway.php:198 mercadopago/mercadopago-gateway.php:208
82
- msgid "This field should be an integer."
83
- msgstr "Este campo debe ser un número."
84
-
85
- #: mercadopago/mercadopago-gateway.php:193
86
- msgid "If your integration method is iFrame, please inform the payment iFrame width."
87
- msgstr "Si su modo de apertura es iFrame, indique el ancho del iFrame."
88
-
89
- #: mercadopago/mercadopago-gateway.php:201
90
- msgid "If your integration method is iFrame, please inform the payment iFrame height."
91
- msgstr "Si su modo de apertura es iFrame, indique el alto del iFrame."
92
-
93
- #: mercadopago/mercadopago-gateway.php:211
94
- msgid "Select the max number of installments for your customers."
95
- msgstr "Seleccione el número máximo de cuotas posibles para sus clientes."
96
-
97
- #: mercadopago/mercadopago-gateway.php:217
98
  msgid "Enable/Disable"
99
  msgstr "Habilitar/Deshabilitar"
100
 
101
- #: mercadopago/mercadopago-gateway.php:219
102
- msgid "Enable Mercado Pago Module"
103
- msgstr "Habilitar Mercado Pago"
104
 
105
- #: mercadopago/mercadopago-gateway.php:223
106
  msgid "Mercado Pago Credentials"
107
  msgstr "Credenciales de Mercado Pago"
108
 
109
- #: mercadopago/mercadopago-gateway.php:225
110
  msgid "You can obtain your credentials for"
111
  msgstr "Puedes obtener tus credenciales para"
112
 
113
- #: mercadopago/mercadopago-gateway.php:228
114
- msgid "Mercado Pago Client_id"
115
- msgstr "Client_id de Mercado Pago"
116
-
117
- #: mercadopago/mercadopago-gateway.php:230
118
- msgid "Insert your Mercado Pago Client_id."
119
- msgstr "Inserte su Client_id de Mercado Pago."
120
-
121
- #: mercadopago/mercadopago-gateway.php:235
122
- msgid "Mercado Pago Client_secret"
123
- msgstr "Client_secret de Mercado Pago"
124
 
125
- #: mercadopago/mercadopago-gateway.php:237
126
- msgid "Insert your Mercado Pago Client_secret."
127
- msgstr "Inserte su Client_secret de Mercado Pago."
128
 
129
- #: mercadopago/mercadopago-gateway.php:242
130
  msgid "Instant Payment Notification (IPN) URL"
131
  msgstr "URL da Notificación Instantanea de Pago (IPN)"
132
 
133
- #: mercadopago/mercadopago-gateway.php:244
134
  msgid "Your IPN URL to receive instant payment notifications is"
135
  msgstr "Su URL de IPN para recibir notificaciones instantáneas de pago es"
136
 
137
- #: mercadopago/mercadopago-gateway.php:247
138
  msgid "Checkout Options"
139
  msgstr "Opciones de Checkout"
140
 
141
- #: mercadopago/mercadopago-gateway.php:252
142
  msgid "Title"
143
  msgstr "Título"
144
 
145
- #: mercadopago/mercadopago-gateway.php:254
146
  msgid "Title shown to the client in the checkout."
147
  msgstr "Título mostrado al cliente en el checkout."
148
 
149
- #: mercadopago/mercadopago-gateway.php:258
 
 
 
 
150
  msgid "Description"
151
  msgstr "Descripción"
152
 
153
- #: mercadopago/mercadopago-gateway.php:260
154
  msgid "Description shown to the client in the checkout."
155
  msgstr "Descripción mostrada al cliente en el checkout."
156
 
157
- #: mercadopago/mercadopago-gateway.php:261 mercadopago/mercadopago-gateway.php:406
158
  msgid "Pay with Mercado Pago"
159
  msgstr "Pagar con Mercado Pago"
160
 
161
- #: mercadopago/mercadopago-gateway.php:264
162
- msgid "Store Category"
163
- msgstr "Categoría de la tienda"
164
 
165
- #: mercadopago/mercadopago-gateway.php:266
166
- msgid "Define which type of products your store sells."
167
- msgstr "Defina el tipo de productos que su tienda vende."
168
 
169
- #: mercadopago/mercadopago-gateway.php:270
170
- msgid "Store Identificator"
171
- msgstr "Identificador de la tienda"
172
 
173
- #: mercadopago/mercadopago-gateway.php:272
174
- msgid "Please, inform a prefix to your store."
175
- msgstr "Por favor, informe un prefijo para su tienda."
176
 
177
- #: mercadopago/mercadopago-gateway.php:272
178
- msgid "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same identificators."
179
- msgstr "Si esta utilizando su cuenta Mercado Pago para múltiples tiendas, asegúrese que este prefijo sea único para no generar pedidos con el mismo identificador."
180
 
181
- #: mercadopago/mercadopago-gateway.php:276
182
- msgid "Integration Method"
183
- msgstr "Método de integración"
184
-
185
- #: mercadopago/mercadopago-gateway.php:278
186
- msgid "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an internal window is embedded to the page layout)."
187
- msgstr "Ventana Modal (Dentro de su tienda), Redireccionamiento (El cliente es redireccionado a Mercado Pago), o iFrame (Ventana de pago incorporada a su página)."
188
-
189
- #: mercadopago/mercadopago-gateway.php:281
190
- msgid "iFrame"
191
- msgstr "iFrame"
192
 
193
- #: mercadopago/mercadopago-gateway.php:282
194
- msgid "Modal Window"
195
- msgstr "Ventana modal"
196
 
197
- #: mercadopago/mercadopago-gateway.php:283
198
- msgid "Redirect"
199
- msgstr "Redireccionamiento"
200
 
201
- #: mercadopago/mercadopago-gateway.php:287
202
- msgid "iFrame Width"
203
- msgstr "Ancho del iFrame"
204
-
205
- #: mercadopago/mercadopago-gateway.php:293
206
- msgid "iFrame Height"
207
- msgstr "Alto del iFrame"
208
-
209
- #: mercadopago/mercadopago-gateway.php:299
210
- msgid "Auto Return"
211
- msgstr "Redirección automática"
212
-
213
- #: mercadopago/mercadopago-gateway.php:301
214
- msgid "Automatic Return After Payment"
215
- msgstr "Redirección Automática Luego del Pago"
216
 
217
- #: mercadopago/mercadopago-gateway.php:303
218
- msgid "After the payment, client is automatically redirected."
219
- msgstr "Después del pago, el cliente será redireccionado automáticamente."
220
 
221
- #: mercadopago/mercadopago-gateway.php:306
222
- msgid "Payment Options"
223
- msgstr "Opciones de Pago"
224
 
225
- #: mercadopago/mercadopago-gateway.php:311
226
- msgid "Max installments"
227
- msgstr "Número máximo de cuotas"
228
 
229
- #: mercadopago/mercadopago-gateway.php:317
230
- msgid "Exclude Payment Methods"
231
- msgstr "Excluir métodos de pago"
 
 
 
232
 
233
- #: mercadopago/mercadopago-gateway.php:324
234
  msgid "Test and Debug Options"
235
  msgstr "Opciones de Prueba y Debug"
236
 
237
- #: mercadopago/mercadopago-gateway.php:329
238
  msgid "Mercado Pago Sandbox"
239
  msgstr "Sandbox Mercado Pago"
240
 
241
- #: mercadopago/mercadopago-gateway.php:331
242
  msgid "Enable Mercado Pago Sandbox"
243
  msgstr "Habilitar el sandbox de Mercado Pago"
244
 
245
- #: mercadopago/mercadopago-gateway.php:333
246
- msgid "This options allows you to test payments inside a sandbox environment."
247
  msgstr "Esta opción permite simular un flujo de pagos completo en nuestro entorno Sandbox."
248
 
249
- #: mercadopago/mercadopago-gateway.php:336
250
  msgid "Debug and Log"
251
  msgstr "Debug y Log"
252
 
253
- #: mercadopago/mercadopago-gateway.php:338
254
  msgid "Enable log"
255
  msgstr "Habilitar Log"
256
 
257
- #: mercadopago/mercadopago-gateway.php:340
258
- #, php-format
259
  msgid "Register event logs of Mercado Pago, such as API requests, in the file"
260
  msgstr "Registrar logs de eventos de Mercado Pago, como llamadas a la API, dentro del archivo"
261
 
262
- #: mercadopago/mercadopago-gateway.php:402
263
- msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
264
- msgstr "Gracias por su compra. Por favor, prosiga a la página de pago haciendo click en el botón de abajo."
265
 
266
- #: mercadopago/mercadopago-gateway.php:410
267
- msgid "Cancel order &amp; Clear cart"
268
- msgstr "Cancelar &amp; Limpiar carrito"
 
269
 
270
- #: mercadopago/mercadopago-gateway.php:420
271
- msgid "Thank you for your order. Proceed with your payment completing the following information."
272
- msgstr "Gracias por su compra. Prosiga con su pago completando la información abajo."
273
 
274
- #: mercadopago/mercadopago-gateway.php:431
275
- msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
276
- msgstr "Un error ocurrió durante el procesamiento de su pago. Por favor intente nuevamente o contactenos para ayudarlo."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
277
 
278
- #: mercadopago/mercadopago-gateway.php:434
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
279
  msgid "Click to try again"
280
- msgstr "Haga click para intentar de nuevo"
 
 
 
 
 
 
 
 
281
 
282
- #: mercadopago/mercadopago-gateway.php:675 mercadopago/mercadopago-gateway.php:686
 
 
 
 
 
 
 
 
 
283
  msgid "Mercado Pago is Inactive"
284
  msgstr "Mercado Pago Inactivo"
285
 
286
- #: mercadopago/mercadopago-gateway.php:678
287
- msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
288
  msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
289
 
290
- #: mercadopago/mercadopago-gateway.php:679
291
  msgid "Click here and configure!"
292
  msgstr "Haga click aquí y configure!"
293
 
294
- #: mercadopago/mercadopago-gateway.php:689
295
  msgid "The currency"
296
  msgstr "La moneda"
297
 
298
- #: mercadopago/mercadopago-gateway.php:689
299
- msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, USD, VEF."
300
- msgstr "no es soportada. Las monedas soportadas son: ARS, BRL, CLP, COP, MXN, USD, VEF."
301
 
302
- #: mercadopago/mercadopago-gateway.php:714
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
303
  msgid "Mercado Pago Request Failure"
304
  msgstr "La solicitud de Mercado Pago ha fallado."
305
 
306
- #: mercadopago/mercadopago-gateway.php:791
307
- msgid "Mercado Pago Transaction ID"
308
- msgstr "ID de operación de Mercado Pago"
309
-
310
- #: mercadopago/mercadopago-gateway.php:798
311
  msgid "Payer email"
312
  msgstr "Email del comprador"
313
 
314
- #: mercadopago/mercadopago-gateway.php:805
315
  msgid "Payment type"
316
- msgstr "Método de pago"
317
 
318
- #: mercadopago/mercadopago-gateway.php:810
319
- msgid "Payment approved."
320
- msgstr "Pago aprobado."
321
 
322
- #: mercadopago/mercadopago-gateway.php:816
323
  msgid "Customer haven't paid yet."
324
  msgstr "El cliente todavía no efectuó el pago."
325
 
326
- #: mercadopago/mercadopago-gateway.php:821
327
  msgid "Payment under review."
328
  msgstr "El pago está pendiente de revisión."
329
 
330
- #: mercadopago/mercadopago-gateway.php:826
331
  msgid "The payment was refused. The customer can try again."
332
  msgstr "El pago fue rechazado. El cliente puede intentar nuevamente."
333
 
334
- #: mercadopago/mercadopago-gateway.php:832
335
  msgid "The payment was refunded to the customer."
336
  msgstr "El pago fue devuelto al cliente."
337
 
338
- #: mercadopago/mercadopago-gateway.php:838
339
  msgid "The payment was cancelled."
340
  msgstr "El pago fue cancelado."
341
 
342
- #: mercadopago/mercadopago-gateway.php:843
343
- msgid "Mercado Pago Payment ID"
344
- msgstr "ID de pago de Mercado Pago"
345
-
346
- #: mercadopago/mercadopago-gateway.php:843 mercadopago/mercadopago-gateway.php:848
347
  msgid "The payment is under mediation or it was charged-back."
348
  msgstr "El pago esta en mediación o la compra fue desconocida por el cliente."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
+ "POT-Creation-Date: 2016-05-23 14:52-0300\n"
8
  "PO-Revision-Date: \n"
9
+ "Language-Team: Product Development <translations@example.com>\n"
10
  "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Plural-Forms: nplurals=2; plural=(n != 1);\n"
15
  "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;"
18
+ "_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
19
+ "X-Poedit-Basepath: ../Documents/woocommerce (MAMP)/wp-content/plugins/woo-mercado-pago-module\n"
20
  "X-Generator: Poedit 1.8.7\n"
21
  "Last-Translator: \n"
22
+ "Language: es_VE\n"
23
  "X-Poedit-SearchPath-0: .\n"
24
 
25
  #. Description of the plugin/theme
26
  msgid "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."
27
+ msgstr "Este es el módulo <strong>oficial</strong> de Mercado Pago para el plugin WooCommerce. Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
28
 
29
+ #: mercadopago-module.php:69
30
  #, php-format
31
  msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
32
  msgstr "Woo Mercado Pago Module depende de la última versión de %s para ejecutarse!"
33
 
34
+ #: mercadopago-module.php:109
35
+ msgid "Basic Checkout"
36
+ msgstr "Checkout Básico"
37
+
38
+ #: mercadopago-module.php:113
39
+ msgid "Custom Checkout"
40
+ msgstr "Checkout Personalizado"
41
+
42
+ #: mercadopago/mercadopago-custom-gateway.php:48
43
+ msgid "Mercado Pago - Custom Checkout"
44
+ msgstr "Mercado Pago - Checkout Personalizado"
45
+
46
+ #: mercadopago/mercadopago-custom-gateway.php:51 mercadopago/mercadopago-gateway.php:54
47
  msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
48
+ msgstr "Este módulo habilita el uso de Mercado Pago en WooCommerce como medio de pago para compras realizadas en su tienda virtual."
49
 
50
+ #: mercadopago/mercadopago-custom-gateway.php:126 mercadopago/mercadopago-custom-gateway.php:791 mercadopago/mercadopago-gateway.php:125
51
+ #: mercadopago/mercadopago-gateway.php:716
52
  msgid "Argentine"
53
  msgstr "Argentina"
54
 
55
+ #: mercadopago/mercadopago-custom-gateway.php:127 mercadopago/mercadopago-custom-gateway.php:792 mercadopago/mercadopago-gateway.php:126
56
+ #: mercadopago/mercadopago-gateway.php:717
57
  msgid "Brazil"
58
  msgstr "Brasil"
59
 
60
+ #: mercadopago/mercadopago-custom-gateway.php:128 mercadopago/mercadopago-custom-gateway.php:794 mercadopago/mercadopago-gateway.php:127
61
+ #: mercadopago/mercadopago-gateway.php:719
62
  msgid "Chile"
63
  msgstr "Chile"
64
 
65
+ #: mercadopago/mercadopago-custom-gateway.php:129 mercadopago/mercadopago-custom-gateway.php:793 mercadopago/mercadopago-gateway.php:128
66
+ #: mercadopago/mercadopago-gateway.php:718
67
  msgid "Colombia"
68
  msgstr "Colombia"
69
 
70
+ #: mercadopago/mercadopago-custom-gateway.php:130 mercadopago/mercadopago-custom-gateway.php:795 mercadopago/mercadopago-gateway.php:129
71
+ #: mercadopago/mercadopago-gateway.php:720
72
  msgid "Mexico"
73
  msgstr "México"
74
 
75
+ #: mercadopago/mercadopago-custom-gateway.php:132 mercadopago/mercadopago-gateway.php:130
76
  msgid "or"
77
  msgstr "o"
78
 
79
+ #: mercadopago/mercadopago-custom-gateway.php:133 mercadopago/mercadopago-custom-gateway.php:796 mercadopago/mercadopago-gateway.php:131
80
+ #: mercadopago/mercadopago-gateway.php:721
81
  msgid "Venezuela"
82
  msgstr "Venezuela"
83
 
84
+ #: mercadopago/mercadopago-custom-gateway.php:145 mercadopago/mercadopago-gateway.php:151
 
 
 
 
85
  msgid "Your credentials are <strong>valid</strong> for"
86
  msgstr "Sus credenciales <strong>son válidas</strong> para"
87
 
88
+ #: mercadopago/mercadopago-custom-gateway.php:151 mercadopago/mercadopago-custom-gateway.php:156 mercadopago/mercadopago-gateway.php:161
89
+ #: mercadopago/mercadopago-gateway.php:170
 
 
 
90
  msgid "Your credentials are <strong>not valid</strong>!"
91
  msgstr "Sus credenciales <strong>no son válidas</strong>!"
92
 
93
+ #: mercadopago/mercadopago-custom-gateway.php:169 mercadopago/mercadopago-gateway.php:211
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  msgid "Enable/Disable"
95
  msgstr "Habilitar/Deshabilitar"
96
 
97
+ #: mercadopago/mercadopago-custom-gateway.php:171
98
+ msgid "Enable Custom Checkout"
99
+ msgstr "Habilitar Checkout Personalizado"
100
 
101
+ #: mercadopago/mercadopago-custom-gateway.php:175 mercadopago/mercadopago-gateway.php:217
102
  msgid "Mercado Pago Credentials"
103
  msgstr "Credenciales de Mercado Pago"
104
 
105
+ #: mercadopago/mercadopago-custom-gateway.php:177 mercadopago/mercadopago-gateway.php:219
106
  msgid "You can obtain your credentials for"
107
  msgstr "Puedes obtener tus credenciales para"
108
 
109
+ #: mercadopago/mercadopago-custom-gateway.php:182
110
+ msgid "Insert your Mercado Pago Public key."
111
+ msgstr "Inserte su Public Key de Mercado Pago."
 
 
 
 
 
 
 
 
112
 
113
+ #: mercadopago/mercadopago-custom-gateway.php:189
114
+ msgid "Insert your Mercado Pago Access token."
115
+ msgstr "Inserte su Access Token de Mercado Pago."
116
 
117
+ #: mercadopago/mercadopago-custom-gateway.php:194 mercadopago/mercadopago-gateway.php:236
118
  msgid "Instant Payment Notification (IPN) URL"
119
  msgstr "URL da Notificación Instantanea de Pago (IPN)"
120
 
121
+ #: mercadopago/mercadopago-custom-gateway.php:196 mercadopago/mercadopago-gateway.php:238
122
  msgid "Your IPN URL to receive instant payment notifications is"
123
  msgstr "Su URL de IPN para recibir notificaciones instantáneas de pago es"
124
 
125
+ #: mercadopago/mercadopago-custom-gateway.php:199 mercadopago/mercadopago-gateway.php:241
126
  msgid "Checkout Options"
127
  msgstr "Opciones de Checkout"
128
 
129
+ #: mercadopago/mercadopago-custom-gateway.php:204 mercadopago/mercadopago-gateway.php:246
130
  msgid "Title"
131
  msgstr "Título"
132
 
133
+ #: mercadopago/mercadopago-custom-gateway.php:206 mercadopago/mercadopago-gateway.php:248
134
  msgid "Title shown to the client in the checkout."
135
  msgstr "Título mostrado al cliente en el checkout."
136
 
137
+ #: mercadopago/mercadopago-custom-gateway.php:207 mercadopago/mercadopago-custom-gateway.php:219 mercadopago/mercadopago-gateway.php:249
138
+ msgid "Mercado Pago"
139
+ msgstr "Mercado Pago"
140
+
141
+ #: mercadopago/mercadopago-custom-gateway.php:210 mercadopago/mercadopago-gateway.php:252
142
  msgid "Description"
143
  msgstr "Descripción"
144
 
145
+ #: mercadopago/mercadopago-custom-gateway.php:212 mercadopago/mercadopago-gateway.php:254
146
  msgid "Description shown to the client in the checkout."
147
  msgstr "Descripción mostrada al cliente en el checkout."
148
 
149
+ #: mercadopago/mercadopago-custom-gateway.php:213 mercadopago/mercadopago-gateway.php:255 mercadopago/mercadopago-gateway.php:432
150
  msgid "Pay with Mercado Pago"
151
  msgstr "Pagar con Mercado Pago"
152
 
153
+ #: mercadopago/mercadopago-custom-gateway.php:216
154
+ msgid "Statement Descriptor"
155
+ msgstr "Descripción de la Factura"
156
 
157
+ #: mercadopago/mercadopago-custom-gateway.php:218
158
+ msgid "The description that will be shown in your customer's invoice."
159
+ msgstr "La descripción que se muestra en la factura de su cliente."
160
 
161
+ #: mercadopago/mercadopago-custom-gateway.php:222
162
+ msgid "Binary Mode"
163
+ msgstr "Modo binario"
164
 
165
+ #: mercadopago/mercadopago-custom-gateway.php:224
166
+ msgid "Enable binary mode for checkout status"
167
+ msgstr "Activar el modo binario para el estado del checkout"
168
 
169
+ #: mercadopago/mercadopago-custom-gateway.php:226
170
+ msgid "When charging a credit card, only [approved] or [reject] status will be taken."
171
+ msgstr "Al cargar una tarjeta de crédito, sólo los estados [aprobado] o [rechazar] seran tomados."
172
 
173
+ #: mercadopago/mercadopago-custom-gateway.php:229
174
+ msgid "Ticket"
175
+ msgstr "Ticket"
 
 
 
 
 
 
 
 
176
 
177
+ #: mercadopago/mercadopago-custom-gateway.php:231
178
+ msgid "Enable Ticket for Custom Checkout"
179
+ msgstr "Habilitar Ticket para Checkout Personalizado"
180
 
181
+ #: mercadopago/mercadopago-custom-gateway.php:233
182
+ msgid "Let your customer pay you with tickets"
183
+ msgstr "Deje que su cliente le paga con tickets"
184
 
185
+ #: mercadopago/mercadopago-custom-gateway.php:236 mercadopago/mercadopago-gateway.php:258
186
+ msgid "Store Category"
187
+ msgstr "Categoría de la tienda"
 
 
 
 
 
 
 
 
 
 
 
 
188
 
189
+ #: mercadopago/mercadopago-custom-gateway.php:238 mercadopago/mercadopago-gateway.php:260
190
+ msgid "Define which type of products your store sells."
191
+ msgstr "Defina el tipo de productos que su tienda vende."
192
 
193
+ #: mercadopago/mercadopago-custom-gateway.php:242 mercadopago/mercadopago-gateway.php:264
194
+ msgid "Store Identificator"
195
+ msgstr "Identificador de la tienda"
196
 
197
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
198
+ msgid "Please, inform a prefix to your store."
199
+ msgstr "Por favor, informe un prefijo para su tienda."
200
 
201
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
202
+ msgid ""
203
+ "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same "
204
+ "identificators."
205
+ msgstr ""
206
+ "Si esta utilizando su cuenta Mercado Pago para múltiples tiendas, asegúrese que este prefijo sea único para no generar pedidos con el mismo identificador."
207
 
208
+ #: mercadopago/mercadopago-custom-gateway.php:248 mercadopago/mercadopago-gateway.php:318
209
  msgid "Test and Debug Options"
210
  msgstr "Opciones de Prueba y Debug"
211
 
212
+ #: mercadopago/mercadopago-custom-gateway.php:253 mercadopago/mercadopago-gateway.php:323
213
  msgid "Mercado Pago Sandbox"
214
  msgstr "Sandbox Mercado Pago"
215
 
216
+ #: mercadopago/mercadopago-custom-gateway.php:255 mercadopago/mercadopago-gateway.php:325
217
  msgid "Enable Mercado Pago Sandbox"
218
  msgstr "Habilitar el sandbox de Mercado Pago"
219
 
220
+ #: mercadopago/mercadopago-custom-gateway.php:257 mercadopago/mercadopago-gateway.php:327
221
+ msgid "This option allows you to test payments inside a sandbox environment."
222
  msgstr "Esta opción permite simular un flujo de pagos completo en nuestro entorno Sandbox."
223
 
224
+ #: mercadopago/mercadopago-custom-gateway.php:260 mercadopago/mercadopago-gateway.php:330
225
  msgid "Debug and Log"
226
  msgstr "Debug y Log"
227
 
228
+ #: mercadopago/mercadopago-custom-gateway.php:262 mercadopago/mercadopago-gateway.php:332
229
  msgid "Enable log"
230
  msgstr "Habilitar Log"
231
 
232
+ #: mercadopago/mercadopago-custom-gateway.php:264 mercadopago/mercadopago-gateway.php:334
 
233
  msgid "Register event logs of Mercado Pago, such as API requests, in the file"
234
  msgstr "Registrar logs de eventos de Mercado Pago, como llamadas a la API, dentro del archivo"
235
 
236
+ #: mercadopago/mercadopago-custom-gateway.php:265 mercadopago/mercadopago-gateway.php:335
237
+ msgid "File location: "
238
+ msgstr "Local del archivo: "
239
 
240
+ #: mercadopago/mercadopago-custom-gateway.php:281 mercadopago/mercadopago-gateway.php:351
241
+ #, php-format
242
+ msgid "Please, rate us %s on WordPress.org and give your feedback to help improve this module!"
243
+ msgstr "Por favor, califíquenos con %s en WordPress.org y de su feedback para ayudar a mejorar este módulo!"
244
 
245
+ #: mercadopago/mercadopago-custom-gateway.php:332
246
+ msgid "Payment Method"
247
+ msgstr "Medios de Pago"
248
 
249
+ #: mercadopago/mercadopago-custom-gateway.php:333
250
+ msgid "Credit card number"
251
+ msgstr "Número de tarjeta de crédito"
252
+
253
+ #: mercadopago/mercadopago-custom-gateway.php:334
254
+ msgid "Expiration month"
255
+ msgstr "Mes de expiración"
256
+
257
+ #: mercadopago/mercadopago-custom-gateway.php:335
258
+ msgid "Expiration year"
259
+ msgstr "Año de expiración"
260
+
261
+ #: mercadopago/mercadopago-custom-gateway.php:336
262
+ msgid "Year"
263
+ msgstr "Año"
264
+
265
+ #: mercadopago/mercadopago-custom-gateway.php:337
266
+ msgid "Month"
267
+ msgstr "Mes"
268
+
269
+ #: mercadopago/mercadopago-custom-gateway.php:338
270
+ msgid "Card holder name"
271
+ msgstr "Nombre del titular de la tarjeta"
272
+
273
+ #: mercadopago/mercadopago-custom-gateway.php:339
274
+ msgid "Security code"
275
+ msgstr "Código de seguridad"
276
+
277
+ #: mercadopago/mercadopago-custom-gateway.php:340
278
+ msgid "Document Type"
279
+ msgstr "Tipo de Documento"
280
+
281
+ #: mercadopago/mercadopago-custom-gateway.php:341
282
+ msgid "Document number"
283
+ msgstr "Número de Documento"
284
+
285
+ #: mercadopago/mercadopago-custom-gateway.php:342
286
+ msgid "Issuer"
287
+ msgstr "Emisor"
288
+
289
+ #: mercadopago/mercadopago-custom-gateway.php:343
290
+ msgid "Installments"
291
+ msgstr "Cuotas"
292
 
293
+ #: mercadopago/mercadopago-custom-gateway.php:347
294
+ msgid "Parameter cardNumber can not be null/empty"
295
+ msgstr "Parámetro [Número de tarjeta] no puede ser nulo/vacío"
296
+
297
+ #: mercadopago/mercadopago-custom-gateway.php:348
298
+ msgid "Invalid Card Number"
299
+ msgstr "Número de tarjeta inválido"
300
+
301
+ #: mercadopago/mercadopago-custom-gateway.php:350 mercadopago/mercadopago-custom-gateway.php:351 mercadopago/mercadopago-custom-gateway.php:352
302
+ #: mercadopago/mercadopago-custom-gateway.php:353
303
+ msgid "Invalid Expiration Date"
304
+ msgstr "Fecha de expiración inválida"
305
+
306
+ #: mercadopago/mercadopago-custom-gateway.php:355
307
+ msgid "Parameter cardholderName can not be null/empty"
308
+ msgstr "Parámetro [Nombre del titular] no puede ser nulo/vacío"
309
+
310
+ #: mercadopago/mercadopago-custom-gateway.php:356
311
+ msgid "Invalid Card Holder Name"
312
+ msgstr "Nombre del titular de la tarjeta inválido"
313
+
314
+ #: mercadopago/mercadopago-custom-gateway.php:358
315
+ msgid "Parameter securityCode can not be null/empty"
316
+ msgstr "Parámetro [Código de seguridad] no puede ser nulo/vacío"
317
+
318
+ #: mercadopago/mercadopago-custom-gateway.php:359
319
+ msgid "Invalid Security Code"
320
+ msgstr "Código de seguridad inválido"
321
+
322
+ #: mercadopago/mercadopago-custom-gateway.php:361
323
+ msgid "Parameter docType can not be null/empty"
324
+ msgstr "Parámetro [Tipo de Documento] no puede ser nulo/vacío"
325
+
326
+ #: mercadopago/mercadopago-custom-gateway.php:362
327
+ msgid "Invalid Document Type"
328
+ msgstr "Tipo de Documento inválido"
329
+
330
+ #: mercadopago/mercadopago-custom-gateway.php:364
331
+ msgid "Parameter docNumber can not be null/empty"
332
+ msgstr "Parámetro [Número del Documento] no puede ser nulo/vacío"
333
+
334
+ #: mercadopago/mercadopago-custom-gateway.php:365
335
+ msgid "Invalid Document Number"
336
+ msgstr "Número del Documento inválido"
337
+
338
+ #: mercadopago/mercadopago-custom-gateway.php:367
339
+ msgid "The parameter cardholder.document.subtype can not be null or empty"
340
+ msgstr "Parámetro [Subtipo del documento] no puede ser nulo/vacío"
341
+
342
+ #: mercadopago/mercadopago-custom-gateway.php:368
343
+ msgid "Invalid Document Sub Type"
344
+ msgstr "Subtipo del documento inválido"
345
+
346
+ #: mercadopago/mercadopago-custom-gateway.php:370
347
+ msgid "Parameter cardIssuerId can not be null/empty"
348
+ msgstr "Parámetro [Emisor] no puede ser nulo/vacío"
349
+
350
+ #: mercadopago/mercadopago-custom-gateway.php:402 mercadopago/mercadopago-custom-gateway.php:943 mercadopago/mercadopago-gateway.php:869
351
+ msgid "Payment approved."
352
+ msgstr "Pago aprobado."
353
+
354
+ #: mercadopago/mercadopago-custom-gateway.php:416 mercadopago/mercadopago-custom-gateway.php:805
355
+ msgid "Your payment is under review. In less than 1h, you should be notified by email."
356
+ msgstr "Su pago está en revisión. En menos de 1 hora, usted será notificado por correo electrónico."
357
+
358
+ #: mercadopago/mercadopago-custom-gateway.php:418
359
+ msgid "Check your order resume"
360
+ msgstr "Ver su hoja de pedido"
361
+
362
+ #: mercadopago/mercadopago-custom-gateway.php:431
363
+ msgid "Your payment was refused. You can try again."
364
+ msgstr "Su pago fue rechazado. Puede intentarlo de nuevo."
365
+
366
+ #: mercadopago/mercadopago-custom-gateway.php:435 mercadopago/mercadopago-custom-gateway.php:819 mercadopago/mercadopago-gateway.php:460
367
  msgid "Click to try again"
368
+ msgstr "Haga clic para intentarlo de nuevo"
369
+
370
+ #: mercadopago/mercadopago-custom-gateway.php:455
371
+ msgid "A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?"
372
+ msgstr "Un problema se produjo al procesar su pago. ¿Esta seguro que ha rellenado correctamente toda la información en el formulario de checkout?"
373
+
374
+ #: mercadopago/mercadopago-custom-gateway.php:544
375
+ msgid "Shipping"
376
+ msgstr "Envío"
377
 
378
+ #: mercadopago/mercadopago-custom-gateway.php:545
379
+ msgid "Shipping service used by store"
380
+ msgstr "Servicio de envío utilizado por la tienda"
381
+
382
+ #: mercadopago/mercadopago-custom-gateway.php:721 mercadopago/mercadopago-gateway.php:649
383
+ msgid "WooCommerce &gt; System Status &gt; Logs"
384
+ msgstr "WooCommerce &gt; Estado del Sistema &gt; Logs"
385
+
386
+ #: mercadopago/mercadopago-custom-gateway.php:766 mercadopago/mercadopago-custom-gateway.php:779 mercadopago/mercadopago-gateway.php:694
387
+ #: mercadopago/mercadopago-gateway.php:705
388
  msgid "Mercado Pago is Inactive"
389
  msgstr "Mercado Pago Inactivo"
390
 
391
+ #: mercadopago/mercadopago-custom-gateway.php:769
392
+ msgid "Your Mercado Pago credentials Public Key/Access Token appears to be misconfigured."
393
  msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
394
 
395
+ #: mercadopago/mercadopago-custom-gateway.php:771 mercadopago/mercadopago-gateway.php:698
396
  msgid "Click here and configure!"
397
  msgstr "Haga click aquí y configure!"
398
 
399
+ #: mercadopago/mercadopago-custom-gateway.php:782 mercadopago/mercadopago-gateway.php:708
400
  msgid "The currency"
401
  msgstr "La moneda"
402
 
403
+ #: mercadopago/mercadopago-custom-gateway.php:783 mercadopago/mercadopago-gateway.php:708
404
+ msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, PEN, VEF."
405
+ msgstr "no es soportada. Las monedas soportadas son: ARS, BRL, CLP, COP, MXN, PEN, VEF."
406
 
407
+ #: mercadopago/mercadopago-custom-gateway.php:797
408
+ msgid "Peru"
409
+ msgstr "Perú"
410
+
411
+ #: mercadopago/mercadopago-custom-gateway.php:809
412
+ msgid "Click to check your order"
413
+ msgstr "Haga clic para comprobar su pedido"
414
+
415
+ #: mercadopago/mercadopago-custom-gateway.php:814 mercadopago/mercadopago-gateway.php:457
416
+ msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
417
+ msgstr "Se ha producido un error en el procesamiento de su pago. Por favor, inténtelo de nuevo o póngase en contacto con nosotros para Asistencia."
418
+
419
+ #: mercadopago/mercadopago-custom-gateway.php:816
420
+ msgid "Reason is: "
421
+ msgstr "La razón es:"
422
+
423
+ #: mercadopago/mercadopago-custom-gateway.php:849 mercadopago/mercadopago-gateway.php:748
424
  msgid "Mercado Pago Request Failure"
425
  msgstr "La solicitud de Mercado Pago ha fallado."
426
 
427
+ #: mercadopago/mercadopago-custom-gateway.php:918 mercadopago/mercadopago-gateway.php:822
 
 
 
 
428
  msgid "Payer email"
429
  msgstr "Email del comprador"
430
 
431
+ #: mercadopago/mercadopago-custom-gateway.php:926 mercadopago/mercadopago-gateway.php:829
432
  msgid "Payment type"
433
+ msgstr "Medio de pago"
434
 
435
+ #: mercadopago/mercadopago-custom-gateway.php:934 mercadopago/mercadopago-gateway.php:841
436
+ msgid "Mercado Pago Payment ID"
437
+ msgstr "ID de pago de Mercado Pago"
438
 
439
+ #: mercadopago/mercadopago-custom-gateway.php:950 mercadopago/mercadopago-gateway.php:875
440
  msgid "Customer haven't paid yet."
441
  msgstr "El cliente todavía no efectuó el pago."
442
 
443
+ #: mercadopago/mercadopago-custom-gateway.php:957 mercadopago/mercadopago-gateway.php:881
444
  msgid "Payment under review."
445
  msgstr "El pago está pendiente de revisión."
446
 
447
+ #: mercadopago/mercadopago-custom-gateway.php:964 mercadopago/mercadopago-gateway.php:887
448
  msgid "The payment was refused. The customer can try again."
449
  msgstr "El pago fue rechazado. El cliente puede intentar nuevamente."
450
 
451
+ #: mercadopago/mercadopago-custom-gateway.php:971 mercadopago/mercadopago-gateway.php:893
452
  msgid "The payment was refunded to the customer."
453
  msgstr "El pago fue devuelto al cliente."
454
 
455
+ #: mercadopago/mercadopago-custom-gateway.php:978 mercadopago/mercadopago-gateway.php:899
456
  msgid "The payment was cancelled."
457
  msgstr "El pago fue cancelado."
458
 
459
+ #: mercadopago/mercadopago-custom-gateway.php:984 mercadopago/mercadopago-custom-gateway.php:990 mercadopago/mercadopago-gateway.php:904
460
+ #: mercadopago/mercadopago-gateway.php:909
 
 
 
461
  msgid "The payment is under mediation or it was charged-back."
462
  msgstr "El pago esta en mediación o la compra fue desconocida por el cliente."
463
+
464
+ #: mercadopago/mercadopago-gateway.php:51
465
+ msgid "Mercado Pago - Basic Checkout"
466
+ msgstr "Mercado Pago - Checkout Básico"
467
+
468
+ #: mercadopago/mercadopago-gateway.php:148
469
+ msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
470
+ msgstr "Selecione los medios de pago que <strong>no</strong> desea aceptar con Mercado Pago."
471
+
472
+ #: mercadopago/mercadopago-gateway.php:158 mercadopago/mercadopago-gateway.php:167
473
+ msgid "Configure your Client_id and Client_secret to have access to more options."
474
+ msgstr "Configure su Client_id y Client_secret para tener acceso a más opciones."
475
+
476
+ #: mercadopago/mercadopago-gateway.php:184 mercadopago/mercadopago-gateway.php:192 mercadopago/mercadopago-gateway.php:202
477
+ msgid "This field should be an integer."
478
+ msgstr "Este campo debe ser un número."
479
+
480
+ #: mercadopago/mercadopago-gateway.php:187
481
+ msgid "If your integration method is iFrame, please inform the payment iFrame width."
482
+ msgstr "Si su modo de apertura es iFrame, indique el ancho del iFrame."
483
+
484
+ #: mercadopago/mercadopago-gateway.php:195
485
+ msgid "If your integration method is iFrame, please inform the payment iFrame height."
486
+ msgstr "Si su modo de apertura es iFrame, indique el alto del iFrame."
487
+
488
+ #: mercadopago/mercadopago-gateway.php:205
489
+ msgid "Select the max number of installments for your customers."
490
+ msgstr "Seleccione el número máximo de cuotas disponibles para sus clientes."
491
+
492
+ #: mercadopago/mercadopago-gateway.php:213
493
+ msgid "Enable Basic Checkout"
494
+ msgstr "Habilitar el Checkout Básico"
495
+
496
+ #: mercadopago/mercadopago-gateway.php:224
497
+ msgid "Insert your Mercado Pago Client_id."
498
+ msgstr "Inserte su Client_id de Mercado Pago."
499
+
500
+ #: mercadopago/mercadopago-gateway.php:231
501
+ msgid "Insert your Mercado Pago Client_secret."
502
+ msgstr "Inserte su Client_secret de Mercado Pago."
503
+
504
+ #: mercadopago/mercadopago-gateway.php:270
505
+ msgid "Integration Method"
506
+ msgstr "Método de integración"
507
+
508
+ #: mercadopago/mercadopago-gateway.php:272
509
+ msgid ""
510
+ "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an "
511
+ "internal window is embedded to the page layout)."
512
+ msgstr ""
513
+ "Seleccione la forma en que sus clientes deben interactuar con Mercado Pago. Ventana Modal (Dentro de su tienda), Redireccionamiento (El cliente es "
514
+ "redireccionado a Mercado Pago), o iFrame (Ventana de pago incorporada a su página)."
515
+
516
+ #: mercadopago/mercadopago-gateway.php:275
517
+ msgid "iFrame"
518
+ msgstr "iFrame"
519
+
520
+ #: mercadopago/mercadopago-gateway.php:276
521
+ msgid "Modal Window"
522
+ msgstr "Ventana modal"
523
+
524
+ #: mercadopago/mercadopago-gateway.php:277
525
+ msgid "Redirect"
526
+ msgstr "Redireccionamiento"
527
+
528
+ #: mercadopago/mercadopago-gateway.php:281
529
+ msgid "iFrame Width"
530
+ msgstr "Ancho del iFrame"
531
+
532
+ #: mercadopago/mercadopago-gateway.php:287
533
+ msgid "iFrame Height"
534
+ msgstr "Alto del iFrame"
535
+
536
+ #: mercadopago/mercadopago-gateway.php:293
537
+ msgid "Auto Return"
538
+ msgstr "Redirección automática"
539
+
540
+ #: mercadopago/mercadopago-gateway.php:295
541
+ msgid "Automatic Return After Payment"
542
+ msgstr "Redirección Automática luego del pago"
543
+
544
+ #: mercadopago/mercadopago-gateway.php:297
545
+ msgid "After the payment, client is automatically redirected."
546
+ msgstr "Después del pago, el cliente será redireccionado automáticamente."
547
+
548
+ #: mercadopago/mercadopago-gateway.php:300
549
+ msgid "Payment Options"
550
+ msgstr "Opciones de Pago"
551
+
552
+ #: mercadopago/mercadopago-gateway.php:305
553
+ msgid "Max installments"
554
+ msgstr "Número máximo de cuotas"
555
+
556
+ #: mercadopago/mercadopago-gateway.php:311
557
+ msgid "Exclude Payment Methods"
558
+ msgstr "Excluir medios de pago"
559
+
560
+ #: mercadopago/mercadopago-gateway.php:428
561
+ msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
562
+ msgstr "Gracias por su compra. Por favor, prosiga a la página de pago haciendo click en el botón de abajo."
563
+
564
+ #: mercadopago/mercadopago-gateway.php:436
565
+ msgid "Cancel order &amp; Clear cart"
566
+ msgstr "Cancelar &amp; Limpiar carrito"
567
+
568
+ #: mercadopago/mercadopago-gateway.php:446
569
+ msgid "Thank you for your order. Proceed with your payment completing the following information."
570
+ msgstr "Gracias por su compra. Prosiga con su pago completando la información abajo."
571
+
572
+ #: mercadopago/mercadopago-gateway.php:697
573
+ msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
574
+ msgstr "Sus credenciales Client_id/Client_secret de Mercado Pago parecen no estar debidamente configuradas."
575
+
576
+ msgid " as it appears in your card ..."
577
+ msgstr " tal como aparece en su tarjeta ..."
578
+
579
+ msgid "Done, your payment was accredited!"
580
+ msgstr "Listo, su pago ha sido aceptado!"
581
+
582
+ msgid "We are processing the payment. In less than an hour we will e-mail you the results."
583
+ msgstr "Estamos procesando su pago. En menos de una hora le enviaremos el resultado por correo electrónico."
584
+
585
+ msgid "We are processing the payment. In less than 2 business days we will tell you by e-mail whether it has accredited or we need more information."
586
+ msgstr "Estamos procesando su pago. En menos de 2 días le enviaremos por correo electrónico si se ha aprobado el pago o si se necesita información adicional."
587
+
588
+ msgid "Check the card number."
589
+ msgstr "Compruebe el número de tarjeta."
590
+
591
+ msgid "Check the expiration date."
592
+ msgstr "Compruebe la fecha de expiración."
593
+
594
+ msgid "Check the information."
595
+ msgstr "Compruebe la información informada."
596
+
597
+ msgid "Check the security code."
598
+ msgstr "Compruebe el código de seguridad informado."
599
+
600
+ msgid "We could not process your payment."
601
+ msgstr "No se puede procesar su pago."
602
+
603
+ msgid "You must authorize the payment of your orders."
604
+ msgstr "Usted debe autorizar los pagos de sus órdenes."
605
+
606
+ msgid "Call your card issuer to activate your card. The phone is on the back of your card."
607
+ msgstr "Póngase en contacto con el emisor de su tarjeta para activarla. El teléfono se encuentra en la parte posterior de su tarjeta."
608
+
609
+ msgid "You already made a payment for that amount. If you need to repay, use another card or other payment method."
610
+ msgstr "Usted ya realizó un pago de este importe. Si tiene que pagar de nuevo, utilizar otra tarjeta u otro medio de pago."
611
+
612
+ msgid "Your payment was rejected. Choose another payment method. We recommend cash."
613
+ msgstr "Su pago fue rechazado. Por favor seleccione otro medio de pago. Se recomienda en efectivo."
614
+
615
+ msgid "Your payment do not have sufficient funds."
616
+ msgstr "Su pago no tiene fondos suficientes."
617
+
618
+ msgid "Your payment does not process payments with selected installments."
619
+ msgstr "El pago no puede procesar la cuota seleccionada."
620
+
621
+ msgid "You have reached the limit of allowed attempts. Choose another card or another payment method."
622
+ msgstr "Has alcanzado el límite de intentos permitidos. Elija otra tarjeta u otro medio de pago."
623
+
624
+ msgid "This payment method did not process the payment."
625
+ msgstr "Esta medio de pago no puede procesar su pago."
626
+
627
+ msgid "Mercado Pago - Ticket"
628
+ msgstr "Mercado Pago - Ticket"
629
+
630
+ msgid "Mercado Pago - Credit Card"
631
+ msgstr "Mercado Pago - Tarjeta de Crédito"
632
+
633
+ msgid "Ticket Options"
634
+ msgstr "Opciones de Ticket"
635
+
636
+ msgid "Enable Ticket Payment Method"
637
+ msgstr "Habilitar Pago con Ticket"
638
+
639
+ msgid "Other Bank"
640
+ msgstr "Otro Banco"
641
+
642
+ msgid "Choose"
643
+ msgstr "Escoger"
644
+
645
+ msgid "A problem was occurred when processing your payment. Please, try again."
646
+ msgstr "Un problema se produjo al procesar su pago. Por favor, inténtelo de nuevo."
647
+
648
+ msgid "Thank you for your order. Please, pay the ticket to get your order approved."
649
+ msgstr "Gracias por su orden. Por favor, realice el pago del ticket para tener su orden aprobada."
650
+
651
+ msgid "Waiting for the ticket payment."
652
+ msgstr "Esperando el pago del ticket."
653
+
654
+ msgid "Print the Ticket"
655
+ msgstr "Imprimir el ticket"
656
+
657
+ msgid "To reprint the ticket click "
658
+ msgstr "Para imprimir nuevamente el ticket hace clic "
659
+
660
+ msgid "here"
661
+ msgstr "aquí"
662
+
663
+ msgid "Custom Checkout is Inactive"
664
+ msgstr "Checkout Personalizado Inactivo"
665
+
666
+ msgid "Basic Checkout is Inactive"
667
+ msgstr "Checkout Básico Inactivo"
668
+
669
+ msgid "Ticket is Inactive"
670
+ msgstr "Ticket Inactivo"
671
+
672
+ msgid "Please, select the ticket issuer of your preference."
673
+ msgstr "Por favor, seleccione el emisor de su elección."
674
+
675
+ msgid "Click "Place order" button. The ticket will be generated and you will be redirected to print it."
676
+ msgstr "Haga clic en el botón "Realizar el pedido". El ticket será generado y usted será redirigido a imprimirlo."
677
+
678
+ msgid "Important: The order will be confirmed only after the payment approval."
679
+ msgstr "Importante: La solicitud sólo será confirmada después de la aprobación del pago."
680
+
681
+ msgid "Your Mercado Pago credential Access Token appears to be misconfigured."
682
+ msgstr "Su credencial Access Token de Mercado de Pago parece estar desconfigurada."
683
+
684
+ msgid "Your Card"
685
+ msgstr "Sus Tarjetas"
686
+
687
+ msgid "Other Cards"
688
+ msgstr "Otras Tarjetas"
689
+
690
+ msgid "Other Card"
691
+ msgstr "Otra Tarjeta"
692
+
693
+ msgid "ended in"
694
+ msgstr "terminado en"
695
+
696
+ msgid "Your site appears to not have SSL certification. SSL is a pre-requisite because the payment process is made in your server."
697
+ msgstr "Su sitio parece no tener certificación SSL. SSL es un requisito para transaccionar desde su servidor."
698
+
699
+ msgid "ATTENTION: The currency"
700
+ msgstr "ATENCIÓN: La moneda"
701
+
702
+ msgid "defined in WooCommerce is different from the one used in your credentials country.<br>The currency for transactions in this payment method will be"
703
+ msgstr "que se define en WooCommerce es diferente de la utilizada en el país de sus credenciales.<br>La moneda para las transacciones realizadas por este medio de pago será"
704
+
705
+ msgid "Currency conversions should be made outside this module."
706
+ msgstr "Conversiones de monedas deben hacerse fuera de este módulo."
707
+
708
+ msgid "Coupons"
709
+ msgstr "Cupones"
710
+
711
+ msgid "Enable coupons of discounts"
712
+ msgstr "Activar los cupones de descuento"
713
+
714
+ msgid "If there is a Mercado Pago campaign, allow your store to give discounts to customers."
715
+ msgstr "Si hay una campaña de Mercado Pago, permitir a su tienda hacer descuentos para los clientes."
716
+
717
+ msgid "You will save"
718
+ msgstr "Usted ahorrará"
719
+
720
+ msgid "Apply"
721
+ msgstr "Aplicar"
722
+
723
+ msgid "Remove"
724
+ msgstr "Eliminar"
725
+
726
+ msgid "Please, inform your coupon code"
727
+ msgstr "Por favor, introduzca el código de su cupón"
728
+
729
+ msgid "Please, inform your email in billing address to use this feature"
730
+ msgstr "Por favor, introduzca su email en la dirección de facturación para utilizar este servicio"
731
+
732
+ msgid "Discount for %s coupon"
733
+ msgstr "Descuento para el cupón %s"
734
+
735
+ msgid "Discount provided by store"
736
+ msgstr "Descuento dado por la tienda"
737
+
738
+ msgid "Discount Coupon"
739
+ msgstr "Cupón de Descuento"
740
+
741
+ msgid "CURRENCY CONVERTED: The currency conversion ratio from"
742
+ msgstr "MONEDA CONVERTIDA: La tasa de conversión de moneda de"
743
+
744
+ msgid "ERROR: It was not possible to convert the unsupported currency"
745
+ msgstr "ERROR: No fue posible convertir la moneda no soportada"
746
+
747
+ msgid "to"
748
+ msgstr "para"
749
+
750
+ msgid "If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio."
751
+ msgstr "Si la moneda utilizada en WooCommerce es diferente o no soportada por Mercado Pago, convierte los importes de sus transacciones con la tasa de conversión de Mercado Pago."
752
+
753
+ msgid " is: "
754
+ msgstr " es: "
755
+
756
+ msgid "Currency Conversion"
757
+ msgstr "Conversión de Moneda"
758
+
759
+ msgid "with discount from"
760
+ msgstr "con descuento de"
761
+
762
+ msgid "Total of your purchase:"
763
+ msgstr "Total de su compra:"
764
+
765
+ msgid "Total of your purchase with discount:"
766
+ msgstr "Total de su compra con descuento:"
767
+
768
+ msgid "*Uppon payment approval"
769
+ msgstr "*Con la aprobación de pago"
770
+
771
+ msgid "Terms and Conditions of Use"
772
+ msgstr "Términos y Condiciones de Uso"
773
+
774
+ msgid "Payment converted from"
775
+ msgstr "Pago convertido de"
776
+
777
+ msgid "Rate Us"
778
+ msgstr "Calificar"
779
+
780
+ msgid "Report Issue"
781
+ msgstr "Informar Problema"
782
+
783
+ msgid "Two Cards Mode"
784
+ msgstr "Modo de Dos Tarjetas"
785
+
786
+ msgid "Payments with Two Cards"
787
+ msgstr "Pagos con Dos Tarjetas"
788
+
789
+ msgid "Your customer will be able to use two different cards to pay the order."
790
+ msgstr "Su cliente será capaz de utilizar dos tarjetas diferentes para pagar el pedido."
791
+
792
+ msgid "Your Mercado Pago credentials Access Token appears to be misconfigured."
793
+ msgstr "La credencial Mercado Pago Access Token parece estar mal configurada."
794
+
795
+ msgid "Cancel Order"
796
+ msgstr "Cancelar la Compra"
797
+
798
+ msgid "Refund Order"
799
+ msgstr "Reembolso de Compra"
800
+
801
+ msgid "Back URL Options"
802
+ msgstr "Opciones de URL de Callback"
803
+
804
+ msgid "Sucess URL"
805
+ msgstr "URL de Éxito"
806
+
807
+ msgid "Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page."
808
+ msgstr "Donde los clientes serán redirigidos después de una compra exitosa. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
809
+
810
+ msgid "Failure URL"
811
+ msgstr "URL de Pago Rechazado"
812
+
813
+ msgid "Where customers should be redirected after a failed purchase. Let blank to redirect to the default store order resume page."
814
+ msgstr "Donde los clientes serán redirigidos después de una compra rechazada. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
815
+
816
+ msgid "Pending URL"
817
+ msgstr "URL de Pago Pendiente"
818
+
819
+ msgid "Where customers should be redirected after a pending purchase. Let blank to redirect to the default store order resume page."
820
+ msgstr "Donde los clientes ​serán redirigidos después de una compra pendiente. Dejar en blanco para redirigir a la página estándar de resumen de compra en la tienda."
821
+
822
+ msgid "Stock Reduce"
823
+ msgstr "Reducir Inventario"
824
+
825
+ msgid "Reduce Stock in Order Generation"
826
+ msgstr "Reducir Inventario en la Orden"
827
+
828
+ msgid "Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval."
829
+ msgstr "Activar esta opción para reducir el inventario mediante la creación de un pedido. Desactivar para reducir sólo <strong>después</strong> de la aprobación del pago."
830
+
831
+ msgid "Recurrent Product"
832
+ msgstr "Producto Recurrente"
833
+
834
+ msgid "Frequency"
835
+ msgstr "Frecuencia"
836
+
837
+ msgid "Amount of time (in days or months) for the execution of the next payment."
838
+ msgstr "Cantidad de tiempo (en días o meses) para la ejecución del próximo pago."
839
+
840
+ msgid "Start date"
841
+ msgstr "Fecha de inicio"
842
+
843
+ msgid "First payment date (effective debit). Defaults to now if blank."
844
+ msgstr "Primera fecha de pago (débito efectivo). De forma predeterminada ahora, si está en blanco."
845
+
846
+ msgid "End date"
847
+ msgstr "Fecha final"
848
+
849
+ msgid "Deadline to generate new charges. Defaults to never if blank."
850
+ msgstr "Fecha límite para generar nuevos cargos. De forma predeterminada como nunca, si está en blanco."
851
+
852
+ msgid "Days"
853
+ msgstr "Días"
854
+
855
+ msgid "Months"
856
+ msgstr "Meses"
857
+
858
+ msgid "Indicates the period of time."
859
+ msgstr "Indica el período de tiempo."
860
+
861
+ msgid "The amount to charge the payer each period. Should be informed including taxes and discounts."
862
+ msgstr "La cantidad para cobrar el pagador en cada período. Debe ser informada incluyendo impuestos y descuentos."
863
+
864
+ msgid "Amount charged"
865
+ msgstr "Cantidad de cobro"
866
+
867
+ msgid "Uruguay"
868
+ msgstr "Uruguay"
869
+
870
+ msgid "Frequency type"
871
+ msgstr "Tipo de frecuencia"
872
+
873
+ msgid "Transaction amount"
874
+ msgstr "Valor de la transacción"
875
+
876
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
877
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
878
+
879
+ msgid "Subscription"
880
+ msgstr "Suscripción"
881
+
882
+ msgid "Enable Subscription"
883
+ msgstr "Habilitar Suscripción"
884
+
885
+ msgid "Subscription is Inactive"
886
+ msgstr "La Suscripción está Inactiva"
887
+
888
+ msgid "Subscribe with Mercado Pago"
889
+ msgstr "Suscribirse con Mercado Pago"
890
+
891
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
892
+ msgstr "Para esta solución, usted debe configurar su URL de IPN. Puede acceder a ella en su cuenta para su específico país en:"
893
+
894
+ msgid "Discount by Gateway"
895
+ msgstr "Descuento por Gateway"
896
+
897
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
898
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
899
+
900
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
901
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
902
+
903
+ msgid "Discount Of"
904
+ msgstr "Descuento de"
905
+
906
+ msgid "Mercado Pago Subscription"
907
+ msgstr "Suscripción Mercado Pago"
908
+
909
+ msgid "Payment ID:"
910
+ msgstr "ID de Pago:"
911
+
912
+ msgid "Amount:"
913
+ msgstr "Cantidad:"
914
+
915
+ msgid "This operation could not be completed."
916
+ msgstr "Esta operación no se puede completar."
917
+
918
+ msgid "Operation successfully completed."
919
+ msgstr "La operación se realizó con éxito."
920
+
921
+ msgid "Refund Payment"
922
+ msgstr "Reembolso de Pago"
923
+
924
+ msgid "Cancel Payment"
925
+ msgstr "Cancelar Pago"
926
+
927
+ msgid "Mercado Pago - Subscription"
928
+ msgstr "Mercado Pago - Suscripcións"
929
+
930
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
931
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
932
+
933
+ msgid "Free Shipping"
934
+ msgstr "Envío Gratuito"
935
+
936
+ msgid "Day"
937
+ msgstr "Día"
938
+
939
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
940
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
941
+
942
+ msgid "Mercado Envios"
943
+ msgstr "Mercado Envios"
944
+
945
+ msgid "This controls the title which the user sees during checkout."
946
+ msgstr "Controla el título que se muestra al cliente durante el pago."
947
+
948
+ msgid "Enable free shipping for this shipping method"
949
+ msgstr "Habilitar el envío gratuito para este método de envío"
950
+
951
+ msgid "Delivery Time"
952
+ msgstr "Tiempo de Entrega"
953
+
954
+ msgid "Show estimated delivery time"
955
+ msgstr "Mostrar el tiempo estimado de entrega"
956
+
957
+ msgid "Display the estimated delivery time in working days."
958
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
959
+
960
+ msgid "Buyer initiates complaint and requested a refund."
961
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
962
+
963
+ msgid "In return to sender"
964
+ msgstr "Volviendo al remitente"
965
+
966
+ msgid "Missing recipient for delivery"
967
+ msgstr "Destinatario ausente para envío"
968
+
969
+ msgid "Delayed shipping"
970
+ msgstr "Envío retrasado"
971
+
972
+ msgid "Unsuccessful"
973
+ msgstr "Fracasado"
974
+
975
+ msgid "Tag printed"
976
+ msgstr "Etiqueta impresa"
977
+
978
+ msgid "Tag ready to print"
979
+ msgstr "Etiquetar lista para imprimir"
980
+
981
+ msgid "Tracking code:"
982
+ msgstr "Código de rastreamiento:"
983
+
984
+ msgid "Tag:"
985
+ msgstr "Etiqueta:"
986
+
987
+ msgid "Shipping is pending"
988
+ msgstr "Envío pendiente"
989
+
990
+ msgid "Tutorial"
991
+ msgstr "Tutorial"
992
+
993
+ msgid "Discount Of "
994
+ msgstr "Descuento De "
995
+
996
+ msgid "Make this product a subscription."
997
+ msgstr "Hacer deste producto una suscripción."
998
+
999
+ msgid "Order"
1000
+ msgstr "Pedido"
1001
+
1002
+ msgid "Mercado Envios Tracking ID"
1003
+ msgstr "Código de rastreamiento de Mercado Envíos"
1004
+
1005
+ msgid "Hello,"
1006
+ msgstr "Hola,"
1007
+
1008
+ msgid "Your order"
1009
+ msgstr "Su pedido"
1010
+
1011
+ msgid "made in"
1012
+ msgstr "hecho en"
1013
+
1014
+ msgid "used Mercado Envios as its shipment method."
1015
+ msgstr "utilizó el Mercado Envíos como su medio de envío."
1016
+
1017
+ msgid "You can track it with the following Tracking ID:"
1018
+ msgstr "Usted puedes rastrearlo con lo siguiente código de rastreamiento:"
1019
+
1020
+ msgid "Best regards."
1021
+ msgstr "Saludos."
1022
+
1023
+ msgid "SELECT..."
1024
+ msgstr "SELECCIONE..."
1025
+
1026
+ msgid "NAME"
1027
+ msgstr "NOMBRE"
1028
+
1029
+ msgid "SURNAME"
1030
+ msgstr "APELLIDO"
1031
+
1032
+ msgid "DOCUMENT"
1033
+ msgstr "DOCUMENTO"
1034
+
1035
+ msgid "ADDRESS"
1036
+ msgstr "DIRECCIÓN"
1037
+
1038
+ msgid "NUMBER"
1039
+ msgstr "NÚMERO"
1040
+
1041
+ msgid "CITY"
1042
+ msgstr "CIUDAD"
1043
+
1044
+ msgid "STATE"
1045
+ msgstr "ESTADO"
1046
+
1047
+ msgid "ZIP"
1048
+ msgstr "CÓDIGO POSTAL"
1049
+
1050
+ msgid "You must inform you NAME"
1051
+ msgstr "Obligatorio informar su NOMBRE"
1052
+
1053
+ msgid "You must inform your SURNAME"
1054
+ msgstr "Obligatorio informar su APELLIDO"
1055
+
1056
+ msgid "You must inform your DOCUMENT"
1057
+ msgstr "Obligatorio informar su DOCUMENTO"
1058
+
1059
+ msgid "You must inform your ADDRESS"
1060
+ msgstr "Obligatorio informar su DIRECCIÓN"
1061
+
1062
+ msgid "You must inform your ADDRESS NUMBER"
1063
+ msgstr "Obligatorio informar su NÚMERO"
1064
+
1065
+ msgid "You must inform your CITY"
1066
+ msgstr "Obligatorio informar su CIUDAD"
1067
+
1068
+ msgid "You must inform your STATE"
1069
+ msgstr "Obligatorio informar su ESTADO"
1070
+
1071
+ msgid "You must inform your ZIP"
1072
+ msgstr "Obligatorio informar su CÓDIGO POSTAL"
1073
+
1074
+ msgid "Your PHP version is OK."
1075
+ msgstr "Su versión de PHP está bien."
1076
+
1077
+ msgid "Your PHP version do not support this module. You have %s, minimal required is %s."
1078
+ msgstr "Su versión de PHP no soporta este módulo. Tienes %s, la mínima requerida es %s."
1079
+
1080
+ msgid "cURL is installed."
1081
+ msgstr "cURL está instalado."
1082
+
1083
+ msgid "cURL is not installed."
1084
+ msgstr "cURL no está instalado."
1085
+
1086
+ msgid "SSL is missing in your site."
1087
+ msgstr "Falta el SSL en su sitio."
1088
+
1089
+ msgid "Your site has SSL enabled."
1090
+ msgstr "Su sitio tiene SSL habilitado."
1091
+
1092
+ msgid "Fisical Person"
1093
+ msgstr "Persona Física"
1094
+
1095
+ msgid "Legal Person"
1096
+ msgstr "Persona Jurídica"
1097
+
1098
+ msgid "SOCIAL NAME"
1099
+ msgstr "RAZÓN SOCIAL"
1100
+
1101
+ msgid "CNPJ"
1102
+ msgstr "CNPJ"
languages/woocommerce-mercadopago-module-pt_BR.mo CHANGED
Binary file
languages/woocommerce-mercadopago-module-pt_BR.po CHANGED
@@ -4,9 +4,9 @@
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
- "POT-Creation-Date: 2016-03-04 17:44-0300\n"
8
  "PO-Revision-Date: \n"
9
- "Language-Team: Your Team <translations@example.com>\n"
10
  "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
@@ -14,10 +14,8 @@ msgstr ""
14
  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
15
  "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
- "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;"
18
- "esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;"
19
- "_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
20
- "X-Poedit-Basepath: ..\n"
21
  "X-Generator: Poedit 1.8.7\n"
22
  "Last-Translator: \n"
23
  "Language: pt_BR\n"
@@ -27,386 +25,1143 @@ msgstr ""
27
  msgid "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."
28
  msgstr "Este é o módulo <strong>oficial</strong> do Mercado Pago para o plugin WooCommerce. Este módulo habilita o WooCommerce a usar o Mercado Pago como meio de pagamento para compras realizadas em sua loja virtual."
29
 
30
- #: mercadopago-module.php:66
31
  #, php-format
32
- msgid ""
33
- "Woo Mercado Pago Module depends on the last version of %s to "
34
- "execute!"
35
- msgstr ""
36
- "O Woo Mercado Pago Module depende da última versão do %s para "
37
- "executar!"
38
-
39
- #: mercadopago/mercadopago-gateway.php:63
40
- msgid ""
41
- "This module enables WooCommerce to use Mercado Pago as payment method for "
42
- "purchases made in your virtual store."
43
- msgstr ""
44
- "Este módulo habilita o WooCommerce a usar o Mercado Pago como meio de "
45
- "pagamento para compras realizadas em sua loja virtual."
46
-
47
- #: mercadopago/mercadopago-gateway.php:133
 
 
 
 
 
 
 
 
48
  msgid "Argentine"
49
  msgstr "Argentina"
50
 
51
- #: mercadopago/mercadopago-gateway.php:134
 
 
 
52
  msgid "Brazil"
53
  msgstr "Brasil"
54
 
55
- #: mercadopago/mercadopago-gateway.php:135
 
 
 
56
  msgid "Chile"
57
  msgstr "Chile"
58
 
59
- #: mercadopago/mercadopago-gateway.php:136
 
 
 
60
  msgid "Colombia"
61
  msgstr "Colômbia"
62
 
63
- #: mercadopago/mercadopago-gateway.php:137
 
 
 
64
  msgid "Mexico"
65
  msgstr "México"
66
 
67
- #: mercadopago/mercadopago-gateway.php:138
 
68
  msgid "or"
69
  msgstr "ou"
70
 
71
- #: mercadopago/mercadopago-gateway.php:139
 
 
 
72
  msgid "Venezuela"
73
  msgstr "Venezuela"
74
 
75
- #: mercadopago/mercadopago-gateway.php:154
76
- msgid ""
77
- "Select the payment methods that you <strong>don't</strong> want to receive "
78
- "with Mercado Pago."
79
- msgstr ""
80
- "Selecione os meios de pagamento que <strong>não</strong> gostaria de receber "
81
- "com o Mercado Pago."
82
-
83
- #: mercadopago/mercadopago-gateway.php:157
84
  msgid "Your credentials are <strong>valid</strong> for"
85
  msgstr "Suas credenciais <strong>são válidas</strong> para"
86
 
87
- #: mercadopago/mercadopago-gateway.php:164
88
- #: mercadopago/mercadopago-gateway.php:173
89
- msgid ""
90
- "Configure your Client_id and Client_secret to have access to more options."
91
- msgstr "Configure seu Client_id e Client_secret para ter acesso a mais opções."
92
-
93
- #: mercadopago/mercadopago-gateway.php:167
94
- #: mercadopago/mercadopago-gateway.php:176
95
  msgid "Your credentials are <strong>not valid</strong>!"
96
  msgstr "Suas credenciais <strong>não são válidas</strong>!"
97
 
98
- #: mercadopago/mercadopago-gateway.php:190
99
- #: mercadopago/mercadopago-gateway.php:198
100
- #: mercadopago/mercadopago-gateway.php:208
101
- msgid "This field should be an integer."
102
- msgstr "Este campo deve ser um número inteiro."
103
-
104
- #: mercadopago/mercadopago-gateway.php:193
105
- msgid ""
106
- "If your integration method is iFrame, please inform the payment iFrame width."
107
- msgstr ""
108
- "Se o seu método de integração é por iFrame, por favor informe a largura do "
109
- "layout."
110
-
111
- #: mercadopago/mercadopago-gateway.php:201
112
- msgid ""
113
- "If your integration method is iFrame, please inform the payment iFrame "
114
- "height."
115
- msgstr ""
116
- "Se o seu método de integração é por iFrame, por favor informe a altura do "
117
- "layout."
118
-
119
  #: mercadopago/mercadopago-gateway.php:211
120
- msgid "Select the max number of installments for your customers."
121
- msgstr ""
122
- "Selecione o número máximo de parcelas que sua loja oferece a seus clientes."
123
-
124
- #: mercadopago/mercadopago-gateway.php:217
125
  msgid "Enable/Disable"
126
  msgstr "Habilitar/Desabilitar"
127
 
128
- #: mercadopago/mercadopago-gateway.php:219
129
- msgid "Enable Mercado Pago Module"
130
- msgstr "Habilitar o Módulo Mercado Pago"
131
 
132
- #: mercadopago/mercadopago-gateway.php:223
 
133
  msgid "Mercado Pago Credentials"
134
  msgstr "Credenciais do Mercado Pago"
135
 
136
- #: mercadopago/mercadopago-gateway.php:225
 
137
  msgid "You can obtain your credentials for"
138
  msgstr "Você pode obter suas credenciais para"
139
 
140
- #: mercadopago/mercadopago-gateway.php:228
141
- msgid "Mercado Pago Client_id"
142
- msgstr "Client_id do Mercado Pago"
143
-
144
- #: mercadopago/mercadopago-gateway.php:230
145
- msgid "Insert your Mercado Pago Client_id."
146
- msgstr "Insira seu Client_id do Mercado Pago."
147
-
148
- #: mercadopago/mercadopago-gateway.php:235
149
- msgid "Mercado Pago Client_secret"
150
- msgstr "Client_secret do Mercado Pago"
151
 
152
- #: mercadopago/mercadopago-gateway.php:237
153
- msgid "Insert your Mercado Pago Client_secret."
154
- msgstr "Insira seu Client_secret do Mercado Pago."
155
 
156
- #: mercadopago/mercadopago-gateway.php:242
 
157
  msgid "Instant Payment Notification (IPN) URL"
158
  msgstr "URL de Notificações Instantâneas de Pagamento (IPN)"
159
 
160
- #: mercadopago/mercadopago-gateway.php:244
 
161
  msgid "Your IPN URL to receive instant payment notifications is"
162
  msgstr "Sua URL de IPN para receber notificações instantâneas de pagamentos é"
163
 
164
- #: mercadopago/mercadopago-gateway.php:247
 
165
  msgid "Checkout Options"
166
  msgstr "Opções de Checkout"
167
 
168
- #: mercadopago/mercadopago-gateway.php:252
 
169
  msgid "Title"
170
  msgstr "Título"
171
 
172
- #: mercadopago/mercadopago-gateway.php:254
 
173
  msgid "Title shown to the client in the checkout."
174
  msgstr "Título mostrado ao cliente durante o checkout."
175
 
176
- #: mercadopago/mercadopago-gateway.php:258
 
 
 
 
 
 
 
177
  msgid "Description"
178
  msgstr "Descrição"
179
 
180
- #: mercadopago/mercadopago-gateway.php:260
 
181
  msgid "Description shown to the client in the checkout."
182
  msgstr "Descrição mostrada ao cliente durante o checkout."
183
 
184
- #: mercadopago/mercadopago-gateway.php:261
185
- #: mercadopago/mercadopago-gateway.php:406
 
186
  msgid "Pay with Mercado Pago"
187
  msgstr "Pagar com Mercado Pago"
188
 
189
- #: mercadopago/mercadopago-gateway.php:264
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
190
  msgid "Store Category"
191
  msgstr "Categoria da loja"
192
 
193
- #: mercadopago/mercadopago-gateway.php:266
 
194
  msgid "Define which type of products your store sells."
195
  msgstr "Defina qual o tipo dos produtos que sua loja vende."
196
 
197
- #: mercadopago/mercadopago-gateway.php:270
 
198
  msgid "Store Identificator"
199
  msgstr "Identificador da Loja"
200
 
201
- #: mercadopago/mercadopago-gateway.php:272
 
202
  msgid "Please, inform a prefix to your store."
203
  msgstr "Por favor, informe um prefixo para sua loja."
204
 
205
- #: mercadopago/mercadopago-gateway.php:272
206
- msgid ""
207
- "If you use your Mercado Pago account on multiple stores you should make sure "
208
- "that this prefix is unique as Mercado Pago will not allow orders with same "
209
- "identificators."
210
- msgstr ""
211
- "Se estiver usando sua conta Mercado Pago para múltiplas lojas então você "
212
- "deverá assegurar-se que este prefixo seja único pois o Mercado Pago não "
213
- "permitirá pedidos com um mesmo identificador."
214
 
215
- #: mercadopago/mercadopago-gateway.php:276
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
216
  msgid "Integration Method"
217
- msgstr "Método de integração"
218
 
219
- #: mercadopago/mercadopago-gateway.php:278
220
- msgid ""
221
- "Select how your clients should interact with Mercado Pago. Modal Window "
222
- "(inside your store), Redirect (Client is redirected to Mercado Pago), or "
223
- "iFrame (an internal window is embedded to the page layout)."
224
- msgstr ""
225
- "Selecione como seus clientes irão interagir com o Mercado Pago. Janela Modal "
226
- "(Dentro de sua loja), Redirecionamento (O cliente é redirecionado ao Mercado "
227
- "Pago), ou iFrame (Uma janela de pagamento é incorporada ao layout da página)."
228
 
229
- #: mercadopago/mercadopago-gateway.php:281
230
  msgid "iFrame"
231
  msgstr "iFrame"
232
 
233
- #: mercadopago/mercadopago-gateway.php:282
234
  msgid "Modal Window"
235
  msgstr "Janela Modal"
236
 
237
- #: mercadopago/mercadopago-gateway.php:283
238
  msgid "Redirect"
239
  msgstr "Redirecionamento"
240
 
241
- #: mercadopago/mercadopago-gateway.php:287
242
  msgid "iFrame Width"
243
  msgstr "Largura do iFrame"
244
 
245
- #: mercadopago/mercadopago-gateway.php:293
246
  msgid "iFrame Height"
247
  msgstr "Altura do iFrame"
248
 
249
- #: mercadopago/mercadopago-gateway.php:299
250
  msgid "Auto Return"
251
  msgstr "Auto Retorno"
252
 
253
- #: mercadopago/mercadopago-gateway.php:301
254
  msgid "Automatic Return After Payment"
255
  msgstr "Retorno com Redirecionamento Automático"
256
 
257
- #: mercadopago/mercadopago-gateway.php:303
258
  msgid "After the payment, client is automatically redirected."
259
  msgstr "Após a compra, o cliente é redirecionado automaticamente."
260
 
261
- #: mercadopago/mercadopago-gateway.php:306
262
  msgid "Payment Options"
263
  msgstr "Opções de Pagamento"
264
 
265
- #: mercadopago/mercadopago-gateway.php:311
266
  msgid "Max installments"
267
  msgstr "Número Máximo de Parcelamentos"
268
 
269
- #: mercadopago/mercadopago-gateway.php:317
270
  msgid "Exclude Payment Methods"
271
  msgstr "Excluir Métodos de Pagamento"
272
 
273
- #: mercadopago/mercadopago-gateway.php:324
274
- msgid "Test and Debug Options"
275
- msgstr "Opções de Teste e Debug"
276
 
277
- #: mercadopago/mercadopago-gateway.php:329
278
- msgid "Mercado Pago Sandbox"
279
- msgstr "Sandbox Mercado Pago"
280
 
281
- #: mercadopago/mercadopago-gateway.php:331
282
- msgid "Enable Mercado Pago Sandbox"
283
- msgstr "Habilitar o sandbox do Mercado Pago"
284
 
285
- #: mercadopago/mercadopago-gateway.php:333
286
- msgid "This options allows you to test payments inside a sandbox environment."
287
- msgstr "Esta opção permite a você testar pagamentos em um ambiente sandbox."
288
 
289
- #: mercadopago/mercadopago-gateway.php:336
290
- msgid "Debug and Log"
291
- msgstr "Debug e Log"
292
 
293
- #: mercadopago/mercadopago-gateway.php:338
294
- msgid "Enable log"
295
- msgstr "Habilitar Log"
296
 
297
- #: mercadopago/mercadopago-gateway.php:340
298
- #, php-format
299
- msgid "Register event logs of Mercado Pago, such as API requests, in the file"
300
- msgstr ""
301
- "Registrar logs de events do Mercado Pago, como requisições à API, dentro do "
302
- "arquivo"
303
 
304
- #: mercadopago/mercadopago-gateway.php:402
305
- msgid ""
306
- "Thank you for your order. Please, proceed with your payment clicking in the "
307
- "bellow button."
308
- msgstr ""
309
- "Obrigado pela sua compra. Por favor, prossiga para a página de pagamento "
310
- "clicando no botão abaixo."
311
 
312
- #: mercadopago/mercadopago-gateway.php:410
313
- msgid "Cancel order &amp; Clear cart"
314
- msgstr "Cancelar &amp; Limpar carrinho"
315
 
316
- #: mercadopago/mercadopago-gateway.php:420
317
- msgid ""
318
- "Thank you for your order. Proceed with your payment completing the following "
319
- "information."
320
- msgstr ""
321
- "Obrigado pela sua compra. Prossiga com seu pagamento completando as "
322
- "informações abaixo."
323
 
324
- #: mercadopago/mercadopago-gateway.php:431
325
- msgid ""
326
- "An error occurred when proccessing your payment. Please try again or contact "
327
- "us for assistence."
328
- msgstr ""
329
- "Um erro ocorreu durante o processamento do seu pagamento. Por favor tente "
330
- "novamente ou contacte-nos para assistência."
331
 
332
- #: mercadopago/mercadopago-gateway.php:434
333
- msgid "Click to try again"
334
- msgstr "Clique para tentar de novo"
335
 
336
- #: mercadopago/mercadopago-gateway.php:675
337
- #: mercadopago/mercadopago-gateway.php:686
338
- msgid "Mercado Pago is Inactive"
339
- msgstr "O Mercado Pago está inativo"
340
 
341
- #: mercadopago/mercadopago-gateway.php:678
342
- msgid ""
343
- "Your Mercado Pago credentials Client_id/Client_secret appears to be "
344
- "misconfigured."
345
- msgstr ""
346
- "Suas credenciais Client_id/Client_secret do Mercado Pago parecem estar "
347
- "desconfiguradas."
348
 
349
- #: mercadopago/mercadopago-gateway.php:679
350
- msgid "Click here and configure!"
351
- msgstr "Clique aqui e configure!"
352
 
353
- #: mercadopago/mercadopago-gateway.php:689
354
- msgid "The currency"
355
- msgstr "As moedas"
356
 
357
- #: mercadopago/mercadopago-gateway.php:689
358
- msgid ""
359
- "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, USD, "
360
- "VEF."
361
- msgstr ""
362
- "não são suportadas. As moedas suportadas são: ARS, BRL, COP, MXN, USD, VEF."
363
 
364
- #: mercadopago/mercadopago-gateway.php:714
365
- msgid "Mercado Pago Request Failure"
366
- msgstr "Falha na Requisição do Mercado Pago"
367
 
368
- #: mercadopago/mercadopago-gateway.php:791
369
- msgid "Mercado Pago Transaction ID"
370
- msgstr "ID de Transação do Mercado Pago"
371
 
372
- #: mercadopago/mercadopago-gateway.php:798
373
- msgid "Payer email"
374
- msgstr "Email do pagador"
375
 
376
- #: mercadopago/mercadopago-gateway.php:805
377
- msgid "Payment type"
378
- msgstr "Tipo de pagamento"
379
 
380
- #: mercadopago/mercadopago-gateway.php:810
381
- msgid "Payment approved."
382
- msgstr "pagamento aprovado."
383
 
384
- #: mercadopago/mercadopago-gateway.php:816
385
- msgid "Customer haven't paid yet."
386
- msgstr "O cliente ainda não realizou o pagamento."
387
 
388
- #: mercadopago/mercadopago-gateway.php:821
389
- msgid "Payment under review."
390
- msgstr "O pagamento está em revisão."
391
 
392
- #: mercadopago/mercadopago-gateway.php:826
393
- msgid "The payment was refused. The customer can try again."
394
- msgstr "O pagamento foi recusado. O cliente pode tentar novamente."
395
 
396
- #: mercadopago/mercadopago-gateway.php:832
397
- msgid "The payment was refunded to the customer."
398
- msgstr "O pagamento foi estornado ao cliente."
399
 
400
- #: mercadopago/mercadopago-gateway.php:838
401
- msgid "The payment was cancelled."
402
- msgstr "O pagamento foi cancelado."
403
 
404
- #: mercadopago/mercadopago-gateway.php:843
405
- msgid "Mercado Pago Payment ID"
406
- msgstr "ID de Pagamento do Mercado Pago"
407
 
408
- #: mercadopago/mercadopago-gateway.php:843
409
- #: mercadopago/mercadopago-gateway.php:848
410
- msgid "The payment is under mediation or it was charged-back."
411
- msgstr ""
412
- "O pagamento está em mediação ou a compra não foi reconhecida pelo cliente."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
4
  msgid ""
5
  msgstr ""
6
  "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
+ "POT-Creation-Date: 2016-05-23 14:12-0300\n"
8
  "PO-Revision-Date: \n"
9
+ "Language-Team: Product Development <translations@example.com>\n"
10
  "Report-Msgid-Bugs-To: Translator Name <translations@example.com>\n"
11
  "MIME-Version: 1.0\n"
12
  "Content-Type: text/plain; charset=UTF-8\n"
14
  "Plural-Forms: nplurals=2; plural=(n > 1);\n"
15
  "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
  "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
18
+ "X-Poedit-Basepath: ../Documents/woocommerce (MAMP)/wp-content/plugins/woo-mercado-pago-module\n"
 
 
19
  "X-Generator: Poedit 1.8.7\n"
20
  "Last-Translator: \n"
21
  "Language: pt_BR\n"
25
  msgid "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."
26
  msgstr "Este é o módulo <strong>oficial</strong> do Mercado Pago para o plugin WooCommerce. Este módulo habilita o WooCommerce a usar o Mercado Pago como meio de pagamento para compras realizadas em sua loja virtual."
27
 
28
+ #: mercadopago-module.php:69
29
  #, php-format
30
+ msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
31
+ msgstr "Woo Mercado Pago Module depende da última versão do %s para executar!"
32
+
33
+ #: mercadopago-module.php:109
34
+ msgid "Basic Checkout"
35
+ msgstr "Checkout Básico"
36
+
37
+ #: mercadopago-module.php:113
38
+ msgid "Custom Checkout"
39
+ msgstr "Checkout Transparente"
40
+
41
+ #: mercadopago/mercadopago-custom-gateway.php:48
42
+ msgid "Mercado Pago - Custom Checkout"
43
+ msgstr "Mercado Pago - Checkout Transparente"
44
+
45
+ #: mercadopago/mercadopago-custom-gateway.php:51
46
+ #: mercadopago/mercadopago-gateway.php:54
47
+ msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
48
+ msgstr "Este módulo habilita o WooCommerce a usar o Mercado Pago como meio de pagamento para compras realizadas em sua loja virtual."
49
+
50
+ #: mercadopago/mercadopago-custom-gateway.php:126
51
+ #: mercadopago/mercadopago-custom-gateway.php:791
52
+ #: mercadopago/mercadopago-gateway.php:125
53
+ #: mercadopago/mercadopago-gateway.php:716
54
  msgid "Argentine"
55
  msgstr "Argentina"
56
 
57
+ #: mercadopago/mercadopago-custom-gateway.php:127
58
+ #: mercadopago/mercadopago-custom-gateway.php:792
59
+ #: mercadopago/mercadopago-gateway.php:126
60
+ #: mercadopago/mercadopago-gateway.php:717
61
  msgid "Brazil"
62
  msgstr "Brasil"
63
 
64
+ #: mercadopago/mercadopago-custom-gateway.php:128
65
+ #: mercadopago/mercadopago-custom-gateway.php:794
66
+ #: mercadopago/mercadopago-gateway.php:127
67
+ #: mercadopago/mercadopago-gateway.php:719
68
  msgid "Chile"
69
  msgstr "Chile"
70
 
71
+ #: mercadopago/mercadopago-custom-gateway.php:129
72
+ #: mercadopago/mercadopago-custom-gateway.php:793
73
+ #: mercadopago/mercadopago-gateway.php:128
74
+ #: mercadopago/mercadopago-gateway.php:718
75
  msgid "Colombia"
76
  msgstr "Colômbia"
77
 
78
+ #: mercadopago/mercadopago-custom-gateway.php:130
79
+ #: mercadopago/mercadopago-custom-gateway.php:795
80
+ #: mercadopago/mercadopago-gateway.php:129
81
+ #: mercadopago/mercadopago-gateway.php:720
82
  msgid "Mexico"
83
  msgstr "México"
84
 
85
+ #: mercadopago/mercadopago-custom-gateway.php:132
86
+ #: mercadopago/mercadopago-gateway.php:130
87
  msgid "or"
88
  msgstr "ou"
89
 
90
+ #: mercadopago/mercadopago-custom-gateway.php:133
91
+ #: mercadopago/mercadopago-custom-gateway.php:796
92
+ #: mercadopago/mercadopago-gateway.php:131
93
+ #: mercadopago/mercadopago-gateway.php:721
94
  msgid "Venezuela"
95
  msgstr "Venezuela"
96
 
97
+ #: mercadopago/mercadopago-custom-gateway.php:145
98
+ #: mercadopago/mercadopago-gateway.php:151
 
 
 
 
 
 
 
99
  msgid "Your credentials are <strong>valid</strong> for"
100
  msgstr "Suas credenciais <strong>são válidas</strong> para"
101
 
102
+ #: mercadopago/mercadopago-custom-gateway.php:151
103
+ #: mercadopago/mercadopago-custom-gateway.php:156
104
+ #: mercadopago/mercadopago-gateway.php:161
105
+ #: mercadopago/mercadopago-gateway.php:170
 
 
 
 
106
  msgid "Your credentials are <strong>not valid</strong>!"
107
  msgstr "Suas credenciais <strong>não são válidas</strong>!"
108
 
109
+ #: mercadopago/mercadopago-custom-gateway.php:169
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
110
  #: mercadopago/mercadopago-gateway.php:211
 
 
 
 
 
111
  msgid "Enable/Disable"
112
  msgstr "Habilitar/Desabilitar"
113
 
114
+ #: mercadopago/mercadopago-custom-gateway.php:171
115
+ msgid "Enable Custom Checkout"
116
+ msgstr "Habilitar o Checkout Transparente"
117
 
118
+ #: mercadopago/mercadopago-custom-gateway.php:175
119
+ #: mercadopago/mercadopago-gateway.php:217
120
  msgid "Mercado Pago Credentials"
121
  msgstr "Credenciais do Mercado Pago"
122
 
123
+ #: mercadopago/mercadopago-custom-gateway.php:177
124
+ #: mercadopago/mercadopago-gateway.php:219
125
  msgid "You can obtain your credentials for"
126
  msgstr "Você pode obter suas credenciais para"
127
 
128
+ #: mercadopago/mercadopago-custom-gateway.php:182
129
+ msgid "Insert your Mercado Pago Public key."
130
+ msgstr "Insira sua Public Key do Mercado Pago."
 
 
 
 
 
 
 
 
131
 
132
+ #: mercadopago/mercadopago-custom-gateway.php:189
133
+ msgid "Insert your Mercado Pago Access token."
134
+ msgstr "Insira seu Access Token do Mercado Pago."
135
 
136
+ #: mercadopago/mercadopago-custom-gateway.php:194
137
+ #: mercadopago/mercadopago-gateway.php:236
138
  msgid "Instant Payment Notification (IPN) URL"
139
  msgstr "URL de Notificações Instantâneas de Pagamento (IPN)"
140
 
141
+ #: mercadopago/mercadopago-custom-gateway.php:196
142
+ #: mercadopago/mercadopago-gateway.php:238
143
  msgid "Your IPN URL to receive instant payment notifications is"
144
  msgstr "Sua URL de IPN para receber notificações instantâneas de pagamentos é"
145
 
146
+ #: mercadopago/mercadopago-custom-gateway.php:199
147
+ #: mercadopago/mercadopago-gateway.php:241
148
  msgid "Checkout Options"
149
  msgstr "Opções de Checkout"
150
 
151
+ #: mercadopago/mercadopago-custom-gateway.php:204
152
+ #: mercadopago/mercadopago-gateway.php:246
153
  msgid "Title"
154
  msgstr "Título"
155
 
156
+ #: mercadopago/mercadopago-custom-gateway.php:206
157
+ #: mercadopago/mercadopago-gateway.php:248
158
  msgid "Title shown to the client in the checkout."
159
  msgstr "Título mostrado ao cliente durante o checkout."
160
 
161
+ #: mercadopago/mercadopago-custom-gateway.php:207
162
+ #: mercadopago/mercadopago-custom-gateway.php:219
163
+ #: mercadopago/mercadopago-gateway.php:249
164
+ msgid "Mercado Pago"
165
+ msgstr "Mercado Pago"
166
+
167
+ #: mercadopago/mercadopago-custom-gateway.php:210
168
+ #: mercadopago/mercadopago-gateway.php:252
169
  msgid "Description"
170
  msgstr "Descrição"
171
 
172
+ #: mercadopago/mercadopago-custom-gateway.php:212
173
+ #: mercadopago/mercadopago-gateway.php:254
174
  msgid "Description shown to the client in the checkout."
175
  msgstr "Descrição mostrada ao cliente durante o checkout."
176
 
177
+ #: mercadopago/mercadopago-custom-gateway.php:213
178
+ #: mercadopago/mercadopago-gateway.php:255
179
+ #: mercadopago/mercadopago-gateway.php:432
180
  msgid "Pay with Mercado Pago"
181
  msgstr "Pagar com Mercado Pago"
182
 
183
+ #: mercadopago/mercadopago-custom-gateway.php:216
184
+ msgid "Statement Descriptor"
185
+ msgstr "Descritor da Nota Fiscal"
186
+
187
+ #: mercadopago/mercadopago-custom-gateway.php:218
188
+ msgid "The description that will be shown in your customer's invoice."
189
+ msgstr "A descrição que será mostrada na nota fiscal de seu cliente."
190
+
191
+ #: mercadopago/mercadopago-custom-gateway.php:222
192
+ msgid "Binary Mode"
193
+ msgstr "Modo Binário"
194
+
195
+ #: mercadopago/mercadopago-custom-gateway.php:224
196
+ msgid "Enable binary mode for checkout status"
197
+ msgstr "Habilita o modo binário para o status do checkout"
198
+
199
+ #: mercadopago/mercadopago-custom-gateway.php:226
200
+ msgid "When charging a credit card, only [approved] or [reject] status will be taken."
201
+ msgstr "Ao realizar a cobrança no cartão, apenas os status [aprovado] ou [rejeitado] serão considerados."
202
+
203
+ #: mercadopago/mercadopago-custom-gateway.php:229
204
+ msgid "Ticket"
205
+ msgstr "Boleto"
206
+
207
+ #: mercadopago/mercadopago-custom-gateway.php:231
208
+ msgid "Enable Ticket for Custom Checkout"
209
+ msgstr "Habilitar Boleto para o Checkout Transparente"
210
+
211
+ #: mercadopago/mercadopago-custom-gateway.php:233
212
+ msgid "Let your customer pay you with tickets"
213
+ msgstr "Permitir que seus clientes façam pagamentos por boletos"
214
+
215
+ #: mercadopago/mercadopago-custom-gateway.php:236
216
+ #: mercadopago/mercadopago-gateway.php:258
217
  msgid "Store Category"
218
  msgstr "Categoria da loja"
219
 
220
+ #: mercadopago/mercadopago-custom-gateway.php:238
221
+ #: mercadopago/mercadopago-gateway.php:260
222
  msgid "Define which type of products your store sells."
223
  msgstr "Defina qual o tipo dos produtos que sua loja vende."
224
 
225
+ #: mercadopago/mercadopago-custom-gateway.php:242
226
+ #: mercadopago/mercadopago-gateway.php:264
227
  msgid "Store Identificator"
228
  msgstr "Identificador da Loja"
229
 
230
+ #: mercadopago/mercadopago-custom-gateway.php:244
231
+ #: mercadopago/mercadopago-gateway.php:266
232
  msgid "Please, inform a prefix to your store."
233
  msgstr "Por favor, informe um prefixo para sua loja."
234
 
235
+ #: mercadopago/mercadopago-custom-gateway.php:244
236
+ #: mercadopago/mercadopago-gateway.php:266
237
+ msgid "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same identificators."
238
+ msgstr "Se estiver usando sua conta Mercado Pago para múltiplas lojas então você deverá assegurar-se que este prefixo seja único pois o Mercado Pago não permitirá pedidos com um mesmo identificador."
 
 
 
 
 
239
 
240
+ #: mercadopago/mercadopago-custom-gateway.php:248
241
+ #: mercadopago/mercadopago-gateway.php:318
242
+ msgid "Test and Debug Options"
243
+ msgstr "Opções de Teste e Debug"
244
+
245
+ #: mercadopago/mercadopago-custom-gateway.php:253
246
+ #: mercadopago/mercadopago-gateway.php:323
247
+ msgid "Mercado Pago Sandbox"
248
+ msgstr "Sandbox Mercado Pago"
249
+
250
+ #: mercadopago/mercadopago-custom-gateway.php:255
251
+ #: mercadopago/mercadopago-gateway.php:325
252
+ msgid "Enable Mercado Pago Sandbox"
253
+ msgstr "Habilitar o sandbox do Mercado Pago"
254
+
255
+ #: mercadopago/mercadopago-custom-gateway.php:257
256
+ #: mercadopago/mercadopago-gateway.php:327
257
+ msgid "This option allows you to test payments inside a sandbox environment."
258
+ msgstr "Esta opção permite a você testar pagamentos em um ambiente sandbox."
259
+
260
+ #: mercadopago/mercadopago-custom-gateway.php:260
261
+ #: mercadopago/mercadopago-gateway.php:330
262
+ msgid "Debug and Log"
263
+ msgstr "Debug e Log"
264
+
265
+ #: mercadopago/mercadopago-custom-gateway.php:262
266
+ #: mercadopago/mercadopago-gateway.php:332
267
+ msgid "Enable log"
268
+ msgstr "Habilitar Log"
269
+
270
+ #: mercadopago/mercadopago-custom-gateway.php:264
271
+ #: mercadopago/mercadopago-gateway.php:334
272
+ msgid "Register event logs of Mercado Pago, such as API requests, in the file"
273
+ msgstr "Registrar logs de eventos do Mercado Pago, como requisições à API, dentro do arquivo"
274
+
275
+ #: mercadopago/mercadopago-custom-gateway.php:265
276
+ #: mercadopago/mercadopago-gateway.php:335
277
+ msgid "File location: "
278
+ msgstr "Local do arquivo: "
279
+
280
+ #: mercadopago/mercadopago-custom-gateway.php:281
281
+ #: mercadopago/mercadopago-gateway.php:351
282
+ #, php-format
283
+ msgid "Please, rate us %s on WordPress.org and give your feedback to help improve this module!"
284
+ msgstr "Por favor, avalie-nos com %s na WordPress.org e dê seu feedback para ajudar a melhorar este módulo!"
285
+
286
+ #: mercadopago/mercadopago-custom-gateway.php:332
287
+ msgid "Payment Method"
288
+ msgstr "Método de Pagamento"
289
+
290
+ #: mercadopago/mercadopago-custom-gateway.php:333
291
+ msgid "Credit card number"
292
+ msgstr "Número do cartão de crédito"
293
+
294
+ #: mercadopago/mercadopago-custom-gateway.php:334
295
+ msgid "Expiration month"
296
+ msgstr "Mês de expiração"
297
+
298
+ #: mercadopago/mercadopago-custom-gateway.php:335
299
+ msgid "Expiration year"
300
+ msgstr "Ano de expiração"
301
+
302
+ #: mercadopago/mercadopago-custom-gateway.php:336
303
+ msgid "Year"
304
+ msgstr "Ano"
305
+
306
+ #: mercadopago/mercadopago-custom-gateway.php:337
307
+ msgid "Month"
308
+ msgstr "Mês"
309
+
310
+ #: mercadopago/mercadopago-custom-gateway.php:338
311
+ msgid "Card holder name"
312
+ msgstr "Nome do dono do cartão"
313
+
314
+ #: mercadopago/mercadopago-custom-gateway.php:339
315
+ msgid "Security code"
316
+ msgstr "Código de segurança"
317
+
318
+ #: mercadopago/mercadopago-custom-gateway.php:340
319
+ msgid "Document Type"
320
+ msgstr "Tipo de documento"
321
+
322
+ #: mercadopago/mercadopago-custom-gateway.php:341
323
+ msgid "Document number"
324
+ msgstr "Número do CPF"
325
+
326
+ #: mercadopago/mercadopago-custom-gateway.php:342
327
+ msgid "Issuer"
328
+ msgstr "Emitente"
329
+
330
+ #: mercadopago/mercadopago-custom-gateway.php:343
331
+ msgid "Installments"
332
+ msgstr "Parcelas"
333
+
334
+ #: mercadopago/mercadopago-custom-gateway.php:347
335
+ msgid "Parameter cardNumber can not be null/empty"
336
+ msgstr "O campo [Número do cartão] não pode ser nulo/vazio"
337
+
338
+ #: mercadopago/mercadopago-custom-gateway.php:348
339
+ msgid "Invalid Card Number"
340
+ msgstr "Número do cartão inválido"
341
+
342
+ #: mercadopago/mercadopago-custom-gateway.php:350
343
+ #: mercadopago/mercadopago-custom-gateway.php:351
344
+ #: mercadopago/mercadopago-custom-gateway.php:352
345
+ #: mercadopago/mercadopago-custom-gateway.php:353
346
+ msgid "Invalid Expiration Date"
347
+ msgstr "Data de expiração inválida"
348
+
349
+ #: mercadopago/mercadopago-custom-gateway.php:355
350
+ msgid "Parameter cardholderName can not be null/empty"
351
+ msgstr "O campo [Nome do dono do cartão] não pode ser nulo/vazio"
352
+
353
+ #: mercadopago/mercadopago-custom-gateway.php:356
354
+ msgid "Invalid Card Holder Name"
355
+ msgstr "Nome do dono do cartão inválido"
356
+
357
+ #: mercadopago/mercadopago-custom-gateway.php:358
358
+ msgid "Parameter securityCode can not be null/empty"
359
+ msgstr "O campo [Código de segurança] não pode ser nulo/vazio"
360
+
361
+ #: mercadopago/mercadopago-custom-gateway.php:359
362
+ msgid "Invalid Security Code"
363
+ msgstr "Código de segurança inválido"
364
+
365
+ #: mercadopago/mercadopago-custom-gateway.php:361
366
+ msgid "Parameter docType can not be null/empty"
367
+ msgstr "O campo [Tipo do documento] não pode ser nulo/vazio"
368
+
369
+ #: mercadopago/mercadopago-custom-gateway.php:362
370
+ msgid "Invalid Document Type"
371
+ msgstr "Tipo do documento inválido"
372
+
373
+ #: mercadopago/mercadopago-custom-gateway.php:364
374
+ msgid "Parameter docNumber can not be null/empty"
375
+ msgstr "O campo [Número do documento] não pode ser nulo/vazio"
376
+
377
+ #: mercadopago/mercadopago-custom-gateway.php:365
378
+ msgid "Invalid Document Number"
379
+ msgstr "Número do documento inválido"
380
+
381
+ #: mercadopago/mercadopago-custom-gateway.php:367
382
+ msgid "The parameter cardholder.document.subtype can not be null or empty"
383
+ msgstr "O campo [Subtipo do documento] não pode ser nulo/vazio"
384
+
385
+ #: mercadopago/mercadopago-custom-gateway.php:368
386
+ msgid "Invalid Document Sub Type"
387
+ msgstr "Subtipo do documento inválido"
388
+
389
+ #: mercadopago/mercadopago-custom-gateway.php:370
390
+ msgid "Parameter cardIssuerId can not be null/empty"
391
+ msgstr "O campo [Emitente do cartão] não pode ser nulo/vazio"
392
+
393
+ #: mercadopago/mercadopago-custom-gateway.php:402
394
+ #: mercadopago/mercadopago-custom-gateway.php:943
395
+ #: mercadopago/mercadopago-gateway.php:869
396
+ msgid "Payment approved."
397
+ msgstr "Pagamento aprovado."
398
+
399
+ #: mercadopago/mercadopago-custom-gateway.php:416
400
+ #: mercadopago/mercadopago-custom-gateway.php:805
401
+ msgid "Your payment is under review. In less than 1h, you should be notified by email."
402
+ msgstr "Seu pagamento está sob análise. Em menos de 1h, você deverá ser notificado por email."
403
+
404
+ #: mercadopago/mercadopago-custom-gateway.php:418
405
+ msgid "Check your order resume"
406
+ msgstr "Ver o resumo do pedido"
407
+
408
+ #: mercadopago/mercadopago-custom-gateway.php:431
409
+ msgid "Your payment was refused. You can try again."
410
+ msgstr "Seu pagamento foi rejeitado. Você pode tentar novamente."
411
+
412
+ #: mercadopago/mercadopago-custom-gateway.php:435
413
+ #: mercadopago/mercadopago-custom-gateway.php:819
414
+ #: mercadopago/mercadopago-gateway.php:460
415
+ msgid "Click to try again"
416
+ msgstr "Clique para tentar novamente"
417
+
418
+ #: mercadopago/mercadopago-custom-gateway.php:455
419
+ msgid "A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?"
420
+ msgstr "Um problema ocorreu ao processar seu pagamento. Você tem certeza que preencheu corretamente todos os campos do formulário do checkout?"
421
+
422
+ #: mercadopago/mercadopago-custom-gateway.php:544
423
+ msgid "Shipping"
424
+ msgstr "Método de envio"
425
+
426
+ #: mercadopago/mercadopago-custom-gateway.php:545
427
+ msgid "Shipping service used by store"
428
+ msgstr "Serviço de envio usado pela loja"
429
+
430
+ #: mercadopago/mercadopago-custom-gateway.php:721
431
+ #: mercadopago/mercadopago-gateway.php:649
432
+ msgid "WooCommerce &gt; System Status &gt; Logs"
433
+ msgstr "WooCommerce &gt; Status de Sistema &gt; Logs"
434
+
435
+ #: mercadopago/mercadopago-custom-gateway.php:766
436
+ #: mercadopago/mercadopago-custom-gateway.php:779
437
+ #: mercadopago/mercadopago-gateway.php:694
438
+ #: mercadopago/mercadopago-gateway.php:705
439
+ msgid "Mercado Pago is Inactive"
440
+ msgstr "O Mercado Pago está inativo"
441
+
442
+ #: mercadopago/mercadopago-custom-gateway.php:769
443
+ msgid "Your Mercado Pago credentials Public Key/Access Token appears to be misconfigured."
444
+ msgstr "Suas credenciais Public Key/Access Token do Mercado Pago parecem estar desconfiguradas."
445
+
446
+ #: mercadopago/mercadopago-custom-gateway.php:771
447
+ #: mercadopago/mercadopago-gateway.php:698
448
+ msgid "Click here and configure!"
449
+ msgstr "Clique aqui e configure!"
450
+
451
+ #: mercadopago/mercadopago-custom-gateway.php:782
452
+ #: mercadopago/mercadopago-gateway.php:708
453
+ msgid "The currency"
454
+ msgstr "As moedas"
455
+
456
+ #: mercadopago/mercadopago-custom-gateway.php:783
457
+ #: mercadopago/mercadopago-gateway.php:708
458
+ msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, VEF."
459
+ msgstr "não são suportadas. As moedas suportadas são: ARS, BRL, CLP, COP, MXN, VEF."
460
+
461
+ #: mercadopago/mercadopago-custom-gateway.php:797
462
+ msgid "Peru"
463
+ msgstr "Peru"
464
+
465
+ #: mercadopago/mercadopago-custom-gateway.php:809
466
+ msgid "Click to check your order"
467
+ msgstr "Clique para ver o resumo do seu pedido"
468
+
469
+ #: mercadopago/mercadopago-custom-gateway.php:814
470
+ #: mercadopago/mercadopago-gateway.php:457
471
+ msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
472
+ msgstr "Um erro ocorreu ao processar seu pagamento. Por favor tente novamente ou nos contacte para assistência."
473
+
474
+ #: mercadopago/mercadopago-custom-gateway.php:816
475
+ msgid "Reason is: "
476
+ msgstr "Causa: "
477
+
478
+ #: mercadopago/mercadopago-custom-gateway.php:849
479
+ #: mercadopago/mercadopago-gateway.php:748
480
+ msgid "Mercado Pago Request Failure"
481
+ msgstr "Falha na Requisição do Mercado Pago"
482
+
483
+ #: mercadopago/mercadopago-custom-gateway.php:918
484
+ #: mercadopago/mercadopago-gateway.php:822
485
+ msgid "Payer email"
486
+ msgstr "Email do pagador"
487
+
488
+ #: mercadopago/mercadopago-custom-gateway.php:926
489
+ #: mercadopago/mercadopago-gateway.php:829
490
+ msgid "Payment type"
491
+ msgstr "Tipo de pagamento"
492
+
493
+ #: mercadopago/mercadopago-custom-gateway.php:934
494
+ #: mercadopago/mercadopago-gateway.php:841
495
+ msgid "Mercado Pago Payment ID"
496
+ msgstr "ID de Pagamento do Mercado Pago"
497
+
498
+ #: mercadopago/mercadopago-custom-gateway.php:950
499
+ #: mercadopago/mercadopago-gateway.php:875
500
+ msgid "Customer haven't paid yet."
501
+ msgstr "O cliente ainda não realizou o pagamento."
502
+
503
+ #: mercadopago/mercadopago-custom-gateway.php:957
504
+ #: mercadopago/mercadopago-gateway.php:881
505
+ msgid "Payment under review."
506
+ msgstr "O pagamento está em revisão."
507
+
508
+ #: mercadopago/mercadopago-custom-gateway.php:964
509
+ #: mercadopago/mercadopago-gateway.php:887
510
+ msgid "The payment was refused. The customer can try again."
511
+ msgstr "O pagamento foi recusado. O cliente pode tentar novamente."
512
+
513
+ #: mercadopago/mercadopago-custom-gateway.php:971
514
+ #: mercadopago/mercadopago-gateway.php:893
515
+ msgid "The payment was refunded to the customer."
516
+ msgstr "O pagamento foi estornado ao cliente."
517
+
518
+ #: mercadopago/mercadopago-custom-gateway.php:978
519
+ #: mercadopago/mercadopago-gateway.php:899
520
+ msgid "The payment was cancelled."
521
+ msgstr "O pagamento foi cancelado."
522
+
523
+ #: mercadopago/mercadopago-custom-gateway.php:984
524
+ #: mercadopago/mercadopago-custom-gateway.php:990
525
+ #: mercadopago/mercadopago-gateway.php:904
526
+ #: mercadopago/mercadopago-gateway.php:909
527
+ msgid "The payment is under mediation or it was charged-back."
528
+ msgstr "O pagamento está em mediação ou a compra não foi reconhecida pelo cliente."
529
+
530
+ #: mercadopago/mercadopago-gateway.php:51
531
+ msgid "Mercado Pago - Basic Checkout"
532
+ msgstr "Mercado Pago - Checkout Básico"
533
+
534
+ #: mercadopago/mercadopago-gateway.php:148
535
+ msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
536
+ msgstr "Selecione os meios de pagamento que <strong>não</strong> gostaria de receber com o Mercado Pago."
537
+
538
+ #: mercadopago/mercadopago-gateway.php:158
539
+ #: mercadopago/mercadopago-gateway.php:167
540
+ msgid "Configure your Client_id and Client_secret to have access to more options."
541
+ msgstr "Configure seu Client_id e Client_secret para ter acesso a mais opções."
542
+
543
+ #: mercadopago/mercadopago-gateway.php:184
544
+ #: mercadopago/mercadopago-gateway.php:192
545
+ #: mercadopago/mercadopago-gateway.php:202
546
+ msgid "This field should be an integer."
547
+ msgstr "Este campo deve ser um número inteiro."
548
+
549
+ #: mercadopago/mercadopago-gateway.php:187
550
+ msgid "If your integration method is iFrame, please inform the payment iFrame width."
551
+ msgstr "Se o seu método de integração é por iFrame, por favor informe a largura do layout."
552
+
553
+ #: mercadopago/mercadopago-gateway.php:195
554
+ msgid "If your integration method is iFrame, please inform the payment iFrame height."
555
+ msgstr "Se o seu método de integração é por iFrame, por favor informe a altura do layout."
556
+
557
+ #: mercadopago/mercadopago-gateway.php:205
558
+ msgid "Select the max number of installments for your customers."
559
+ msgstr "Selecione o número máximo de parcelas que sua loja oferece a seus clientes."
560
+
561
+ #: mercadopago/mercadopago-gateway.php:213
562
+ msgid "Enable Basic Checkout"
563
+ msgstr "Habilitar o Checkout Básico"
564
+
565
+ #: mercadopago/mercadopago-gateway.php:224
566
+ msgid "Insert your Mercado Pago Client_id."
567
+ msgstr "Insira seu Client_id do Mercado Pago."
568
+
569
+ #: mercadopago/mercadopago-gateway.php:231
570
+ msgid "Insert your Mercado Pago Client_secret."
571
+ msgstr "Insira seu Client_secret do Mercado Pago."
572
+
573
+ #: mercadopago/mercadopago-gateway.php:270
574
  msgid "Integration Method"
575
+ msgstr "Método de Integração"
576
 
577
+ #: mercadopago/mercadopago-gateway.php:272
578
+ msgid "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an internal window is embedded to the page layout)."
579
+ msgstr "Selecione como seus clientes irão interagir com o Mercado Pago. Janela Modal (Dentro de sua loja), Redirecionamento (O cliente é redirecionado ao Mercado Pago), ou iFrame (Uma janela de pagamento é incorporada ao layout da página)."
 
 
 
 
 
 
580
 
581
+ #: mercadopago/mercadopago-gateway.php:275
582
  msgid "iFrame"
583
  msgstr "iFrame"
584
 
585
+ #: mercadopago/mercadopago-gateway.php:276
586
  msgid "Modal Window"
587
  msgstr "Janela Modal"
588
 
589
+ #: mercadopago/mercadopago-gateway.php:277
590
  msgid "Redirect"
591
  msgstr "Redirecionamento"
592
 
593
+ #: mercadopago/mercadopago-gateway.php:281
594
  msgid "iFrame Width"
595
  msgstr "Largura do iFrame"
596
 
597
+ #: mercadopago/mercadopago-gateway.php:287
598
  msgid "iFrame Height"
599
  msgstr "Altura do iFrame"
600
 
601
+ #: mercadopago/mercadopago-gateway.php:293
602
  msgid "Auto Return"
603
  msgstr "Auto Retorno"
604
 
605
+ #: mercadopago/mercadopago-gateway.php:295
606
  msgid "Automatic Return After Payment"
607
  msgstr "Retorno com Redirecionamento Automático"
608
 
609
+ #: mercadopago/mercadopago-gateway.php:297
610
  msgid "After the payment, client is automatically redirected."
611
  msgstr "Após a compra, o cliente é redirecionado automaticamente."
612
 
613
+ #: mercadopago/mercadopago-gateway.php:300
614
  msgid "Payment Options"
615
  msgstr "Opções de Pagamento"
616
 
617
+ #: mercadopago/mercadopago-gateway.php:305
618
  msgid "Max installments"
619
  msgstr "Número Máximo de Parcelamentos"
620
 
621
+ #: mercadopago/mercadopago-gateway.php:311
622
  msgid "Exclude Payment Methods"
623
  msgstr "Excluir Métodos de Pagamento"
624
 
625
+ #: mercadopago/mercadopago-gateway.php:428
626
+ msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
627
+ msgstr "Obrigado pela sua compra. Por favor, prossiga para a página de pagamento clicando no botão abaixo."
628
 
629
+ #: mercadopago/mercadopago-gateway.php:436
630
+ msgid "Cancel order &amp; Clear cart"
631
+ msgstr "Cancelar &amp; Limpar carrinho"
632
 
633
+ #: mercadopago/mercadopago-gateway.php:446
634
+ msgid "Thank you for your order. Proceed with your payment completing the following information."
635
+ msgstr "Obrigado pela sua compra. Prossiga com seu pagamento completando as informações abaixo."
636
 
637
+ #: mercadopago/mercadopago-gateway.php:697
638
+ msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
639
+ msgstr "Suas credenciais Client_id/Client_secret do Mercado Pago parecem estar desconfiguradas."
640
 
641
+ msgid " as it appears in your card ..."
642
+ msgstr " como aparece no seu cartão ..."
 
643
 
644
+ msgid "Done, your payment was accredited!"
645
+ msgstr "Pronto, seu pagamento foi aprovado!"
 
646
 
647
+ msgid "We are processing the payment. In less than an hour we will e-mail you the results."
648
+ msgstr "Estamos processando seu pagamento. Em menos de uma hora você será notificado por email."
 
 
 
 
649
 
650
+ msgid "We are processing the payment. In less than 2 business days we will tell you by e-mail whether it has accredited or we need more information."
651
+ msgstr "Estamos processando seu pagamento. Em menos de 2 dias úteis você será notificado por email se o pagamento foi aprovado ou se são necessárias informações adicionais."
 
 
 
 
 
652
 
653
+ msgid "Check the card number."
654
+ msgstr "Verifique o número do cartão."
 
655
 
656
+ msgid "Check the expiration date."
657
+ msgstr "Verifique a data de expiração."
 
 
 
 
 
658
 
659
+ msgid "Check the information."
660
+ msgstr "Verifique as informações preenchidas."
 
 
 
 
 
661
 
662
+ msgid "Check the security code."
663
+ msgstr "Verifique o código de segurança informado."
 
664
 
665
+ msgid "We could not process your payment."
666
+ msgstr "Não foi possível processar seu pagamento."
 
 
667
 
668
+ msgid "You must authorize the payment of your orders."
669
+ msgstr "Você precisa autorizar o pagamento de seus pedidos."
 
 
 
 
 
670
 
671
+ msgid "Call your card issuer to activate your card. The phone is on the back of your card."
672
+ msgstr "Contacte o emissor de seu cartão para ativá-lo. O telefone está no verso do seu cartão."
 
673
 
674
+ msgid "You already made a payment for that amount. If you need to repay, use another card or other payment method."
675
+ msgstr "Você já realizou o pagamento para esse valor. Se precisa pagar novamente, use outro cartão ou outro método de pagamento."
 
676
 
677
+ msgid "Your payment was rejected. Choose another payment method. We recommend cash."
678
+ msgstr "Seu pagamento foi rejeitado. Escolha outro método de pagamento. Recomenda-se dinheiro."
 
 
 
 
679
 
680
+ msgid "Your payment do not have sufficient funds."
681
+ msgstr "Seu pagamento não possui fundos suficientes."
 
682
 
683
+ msgid "Your payment does not process payments with selected installments."
684
+ msgstr "Seu pagamento não pode processar o parcelamento selecionado."
 
685
 
686
+ msgid "You have reached the limit of allowed attempts. Choose another card or another payment method."
687
+ msgstr "Você atingiu o limite de tentativas permitidas. Escolha outro cartão ou outro método de pagamento."
 
688
 
689
+ msgid "This payment method did not process the payment."
690
+ msgstr "Este método de pagamento não pôde processar o seu pagamento."
 
691
 
692
+ msgid "Mercado Pago - Ticket"
693
+ msgstr "Mercado Pago - Boleto"
 
694
 
695
+ msgid "Mercado Pago - Credit Card"
696
+ msgstr "Mercado Pago - Cartão de Crédito"
 
697
 
698
+ msgid "Ticket Options"
699
+ msgstr "Opções do Boleto"
 
700
 
701
+ msgid "Enable Ticket Payment Method"
702
+ msgstr "Habilitar o Método de Pagamento por Boleto"
 
703
 
704
+ msgid "Other Bank"
705
+ msgstr "Outro Banco"
 
706
 
707
+ msgid "Choose"
708
+ msgstr "Escolha"
 
709
 
710
+ msgid "A problem was occurred when processing your payment. Please, try again."
711
+ msgstr "Um problema ocorreu ao processar seu pagamento. Por favor, tente novamente."
 
712
 
713
+ msgid "Thank you for your order. Please, pay the ticket to get your order approved."
714
+ msgstr "Obrigado pelo seu pedido. Por favor, pague o boleto para ter seu pedido aprovado."
715
+
716
+ msgid "Waiting for the ticket payment."
717
+ msgstr "Aguardando o pagamento do boleto."
718
+
719
+ msgid "Print the Ticket"
720
+ msgstr "Imprimir o boleto"
721
+
722
+ msgid "To reprint the ticket click "
723
+ msgstr "Para reimprimir o boleto clique "
724
+
725
+ msgid "here"
726
+ msgstr "aqui"
727
+
728
+ msgid "Custom Checkout is Inactive"
729
+ msgstr "O Checkout Transparente está Inativo"
730
+
731
+ msgid "Basic Checkout is Inactive"
732
+ msgstr "O Checkout Básico está Inativo"
733
+
734
+ msgid "Ticket is Inactive"
735
+ msgstr "O Boleto está Inativo"
736
+
737
+ msgid "Please, select the ticket issuer of your preference."
738
+ msgstr "Por favor, selecione o emissor de sua preferência."
739
+
740
+ msgid "Click \"Place order\" button. The ticket will be generated and you will be redirected to print it."
741
+ msgstr "Clique no botão \"Finalizar compra\". O boleto será gerado e você será redirecionado para imprimí-lo."
742
+
743
+ msgid "Important: The order will be confirmed only after the payment approval."
744
+ msgstr "Importante: O pedido só será confirmado após a aprovação do pagamento."
745
+
746
+ msgid "Your Mercado Pago credential Access Token appears to be misconfigured."
747
+ msgstr "Sua credencial Access Token do Mercado Pago parece estar desconfigurada."
748
+
749
+ msgid "Your Card"
750
+ msgstr "Seus Cartões"
751
+
752
+ msgid "Other Cards"
753
+ msgstr "Outros Cartões"
754
+
755
+ msgid "Other Card"
756
+ msgstr "Outro Cartão"
757
+
758
+ msgid "ended in"
759
+ msgstr "terminado em"
760
+
761
+ msgid "Your site appears to not have SSL certification. SSL is a pre-requisite because the payment process is made in your server."
762
+ msgstr "Seu site parece não possuir certificação SSL. SSL é um pré-requisito pois o processamento dos pagamentos é feito em seu servidor."
763
+
764
+ msgid "ATTENTION: The currency"
765
+ msgstr "ATENÇÃO: A moeda"
766
+
767
+ msgid "defined in WooCommerce is different from the one used in your credentials country.<br>The currency for transactions in this payment method will be"
768
+ msgstr "definida no WooCommerce é diferente da usada no país de suas credenciais.<br>A moeda para transações feitas por este meio de pagamento será"
769
+
770
+ msgid "Currency conversions should be made outside this module."
771
+ msgstr "Conversões devem ser feitas fora deste módulo."
772
+
773
+ msgid "Coupons"
774
+ msgstr "Cupons"
775
+
776
+ msgid "Enable coupons of discounts"
777
+ msgstr "Habilitar cupons de desconto"
778
+
779
+ msgid "If there is a Mercado Pago campaign, allow your store to give discounts to customers."
780
+ msgstr "Caso haja uma campanha do Mercado Pago, permite que sua loja disponibilize descontos aos clientes."
781
+
782
+ msgid "You will save"
783
+ msgstr "Você economizará"
784
+
785
+ msgid "Apply"
786
+ msgstr "Aplicar"
787
+
788
+ msgid "Remove"
789
+ msgstr "Remover"
790
+
791
+ msgid "Please, inform your coupon code"
792
+ msgstr "Por favor, informe o código do seu cupom"
793
+
794
+ msgid "Please, inform your email in billing address to use this feature"
795
+ msgstr "Por favor, informe seu email no endereço de cobrança para fazer uso desta funcionalidade"
796
+
797
+ msgid "Discount for %s coupon"
798
+ msgstr "Desconto para o cupom %s"
799
+
800
+ msgid "Discount provided by store"
801
+ msgstr "Desconto dado pela loja"
802
+
803
+ msgid "Discount Coupon"
804
+ msgstr "Cupom de Desconto"
805
+
806
+ msgid "CURRENCY CONVERTED: The currency conversion ratio from"
807
+ msgstr "MOEDA CONVERTIDA: A taxa de conversão de moeda de"
808
+
809
+ msgid "ERROR: It was not possible to convert the unsupported currency"
810
+ msgstr "ERRO: Não foi possível converter a moeda não suportada"
811
+
812
+ msgid "to"
813
+ msgstr "para"
814
+
815
+ msgid "If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio."
816
+ msgstr "Se a moeda utilizada pelo WooCommerce for diferente ou não suportada pelo Mercado Pago, converte os valores de suas transações usando a taxa de conversão do Mercado Pago."
817
+
818
+ msgid " is: "
819
+ msgstr " é: "
820
+
821
+ msgid "Currency Conversion"
822
+ msgstr "Conversão de Moeda"
823
+
824
+ msgid "with discount from"
825
+ msgstr "com o desconto de"
826
+
827
+ msgid "Total of your purchase:"
828
+ msgstr "Total da sua compra:"
829
+
830
+ msgid "Total of your purchase with discount:"
831
+ msgstr "Total da sua compra com desconto:"
832
+
833
+ msgid "*Uppon payment approval"
834
+ msgstr "*Mediante aprovação de pagamento"
835
+
836
+ msgid "Terms and Conditions of Use"
837
+ msgstr "Termos e condições"
838
+
839
+ msgid "Payment converted from"
840
+ msgstr "Pagamento convertido de"
841
+
842
+ msgid "Rate Us"
843
+ msgstr "Avalie"
844
+
845
+ msgid "Report Issue"
846
+ msgstr "Informar Problema"
847
+
848
+ msgid "Two Cards Mode"
849
+ msgstr "Modo Dois Cartões"
850
+
851
+ msgid "Payments with Two Cards"
852
+ msgstr "Pagamento com Dois Cartões"
853
+
854
+ msgid "Your customer will be able to use two different cards to pay the order."
855
+ msgstr "Seus clientes poderão utilizar dois diferentes cartões para pagar pedidos."
856
+
857
+ msgid "Your Mercado Pago credentials Access Token appears to be misconfigured."
858
+ msgstr "Sua credencial Access Token do Mercado Pago parece estar desconfigurada."
859
+
860
+ msgid "Cancel Order"
861
+ msgstr "Cancelar Pedido"
862
+
863
+ msgid "Refund Order"
864
+ msgstr "Extornar Pedido"
865
+
866
+ msgid "Back URL Options"
867
+ msgstr "Opções de URL de Retorno"
868
+
869
+ msgid "Sucess URL"
870
+ msgstr "URL de Sucesso"
871
+
872
+ msgid "Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page."
873
+ msgstr "Onde os clientes deverão ser redirecionados após uma compra bem-sucedida. Deixe em branco para redirecionar para a página padrão de resumo de pedido da loja."
874
+
875
+ msgid "Failure URL"
876
+ msgstr "URL de Falha"
877
+
878
+ msgid "Where customers should be redirected after a failed purchase. Let blank to redirect to the default store order resume page."
879
+ msgstr "Onde os clientes deverão ser redirecionados após uma compra ter falhado. Deixe em branco para redirecionar para a página padrão de resumo de pedido da loja."
880
+
881
+ msgid "Pending URL"
882
+ msgstr "URL de Pendência"
883
+
884
+ msgid "Where customers should be redirected after a pending purchase. Let blank to redirect to the default store order resume page."
885
+ msgstr "Onde os clientes deverão ser redirecionados após uma compra entrar em análise. Deixe em branco para redirecionar para a página padrão de resumo de pedido da loja."
886
+
887
+ msgid "Stock Reduce"
888
+ msgstr "Redução de Estoque"
889
+
890
+ msgid "Reduce Stock in Order Generation"
891
+ msgstr "Reduzir Estoque ao Gerar Pedido"
892
+
893
+ msgid "Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval."
894
+ msgstr "Habilite esta opção para reduzir o estoque ao se criar um pedido. Desabilite para reduzir somente <strong>depois</strong> da aprovação do pagamento."
895
+
896
+ msgid "Recurrent Product"
897
+ msgstr "Produto Recorrente"
898
+
899
+ msgid "Frequency"
900
+ msgstr "Frequência"
901
+
902
+ msgid "Amount of time (in days or months) for the execution of the next payment."
903
+ msgstr "Quantia de tempo (em dias ou meses) para a cobrança do próximo pagamento."
904
+
905
+ msgid "Start date"
906
+ msgstr "Data de início"
907
+
908
+ msgid "First payment date (effective debit). Defaults to now if blank."
909
+ msgstr "Data do primeiro pagamento (débito efetivo). Por padrão agora, se deixado em branco."
910
+
911
+ msgid "End date"
912
+ msgstr "Data final"
913
+
914
+ msgid "Deadline to generate new charges. Defaults to never if blank."
915
+ msgstr "Data limite para gerar nova cobrança. Por padrão nunca, se deixado em branco."
916
+
917
+ msgid "Days"
918
+ msgstr "Dias"
919
+
920
+ msgid "Months"
921
+ msgstr "Meses"
922
+
923
+ msgid "Indicates the period of time."
924
+ msgstr "Indica o período de tempo."
925
+
926
+ msgid "The amount to charge the payer each period. Should be informed including taxes and discounts."
927
+ msgstr "A quantia a cobrar o pagador em cada período. Deve ser informada incluindo impostos e descontos."
928
+
929
+ msgid "Amount charged"
930
+ msgstr "Quantia cobrada"
931
+
932
+ msgid "Uruguay"
933
+ msgstr "Uruguai"
934
+
935
+ msgid "Frequency type"
936
+ msgstr "Tipo de frequência"
937
+
938
+ msgid "Transaction amount"
939
+ msgstr "Quantia transacionada"
940
+
941
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
942
+ msgstr "Um produto recorrente é uma assinatura que deve ser comprada isoladamente em seu carrinho. Por favor, crie pedidos separadamente."
943
+
944
+ msgid "Subscription"
945
+ msgstr "Assinaturas"
946
+
947
+ msgid "Enable Subscription"
948
+ msgstr "Habilitar Assinaturas"
949
+
950
+ msgid "Subscription is Inactive"
951
+ msgstr "Assinaturas está Desabilitada"
952
+
953
+ msgid "Subscribe with Mercado Pago"
954
+ msgstr "Assine com Mercado Pago"
955
+
956
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
957
+ msgstr "Para esta solução, você precisa configurar sua URL de IPN. Você pode acessa-la em sua conta específica para seu país em:"
958
+
959
+ msgid "Discount by Gateway"
960
+ msgstr "Desconto por Gateway"
961
+
962
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
963
+ msgstr "Dê um desconto porcentual para seus clientes caso eles usem este método de pagamento."
964
+
965
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
966
+ msgstr "Este campo deve ser um inteiro maior ou igual a 0 e menor que 100."
967
+
968
+ msgid "Discount Of"
969
+ msgstr "Desconto de"
970
+
971
+ msgid "Mercado Pago Subscription"
972
+ msgstr "Assinaturas Mercado Pago"
973
+
974
+ msgid "Payment ID:"
975
+ msgstr "ID de pagamento:"
976
+
977
+ msgid "Amount:"
978
+ msgstr "Quantidade:"
979
+
980
+ msgid "This operation could not be completed."
981
+ msgstr "Esta operação não pode ser completada."
982
+
983
+ msgid "Operation successfully completed."
984
+ msgstr "A operação foi realizada com sucesso."
985
+
986
+ msgid "Refund Payment"
987
+ msgstr "Extornar Pgto"
988
+
989
+ msgid "Cancel Payment"
990
+ msgstr "Cancelar Pgto"
991
+
992
+ msgid "Mercado Pago - Subscription"
993
+ msgstr "Mercado Pago - Assinaturas"
994
+
995
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
996
+ msgstr "Mercado Envios é um método de envio disponível apenas para pagamentos com Mercado Pago."
997
+
998
+ msgid "Free Shipping"
999
+ msgstr "Envio Grátis"
1000
+
1001
+ msgid "Day"
1002
+ msgstr "Dia"
1003
+
1004
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
1005
+ msgstr "Habilitar os dois métodos de envio do Mercado Envios (Expresso e Normal) para o devido funcionamento do módulo."
1006
+
1007
+ msgid "Mercado Envios"
1008
+ msgstr "Mercado Envios"
1009
+
1010
+ msgid "This controls the title which the user sees during checkout."
1011
+ msgstr "Controla o título que é mostrado ao cliente vê durante o checkout."
1012
+
1013
+ msgid "Enable free shipping for this shipping method"
1014
+ msgstr "Habilitar envio gratuito para este método de envio"
1015
+
1016
+ msgid "Delivery Time"
1017
+ msgstr "Tempo de Envio"
1018
+
1019
+ msgid "Show estimated delivery time"
1020
+ msgstr "Mostrar tempo estimado de entrega"
1021
+
1022
+ msgid "Display the estimated delivery time in working days."
1023
+ msgstr "Mostrar o tempo estimado de entrega em dias úteis."
1024
+
1025
+ msgid "Buyer initiates complaint and requested a refund."
1026
+ msgstr "O comprador iniciou uma discussão e requisita um extorno."
1027
+
1028
+ msgid "In return to sender"
1029
+ msgstr "Retornando ao remetente"
1030
+
1031
+ msgid "Missing recipient for delivery"
1032
+ msgstr "Destinatário ausente" para envio
1033
+
1034
+ msgid "Delayed shipping"
1035
+ msgstr "Envio atrasado"
1036
+
1037
+ msgid "Unsuccessful"
1038
+ msgstr "Mal sucedido"
1039
+
1040
+ msgid "Tag printed"
1041
+ msgstr "Etiqueta imprimida"
1042
+
1043
+ msgid "Tag ready to print"
1044
+ msgstr "Etiqueta pronta para impressão"
1045
+
1046
+ msgid "Tracking code:"
1047
+ msgstr "Código de rastreamento:"
1048
+
1049
+ msgid "Tag:"
1050
+ msgstr "Etiqueta:"
1051
+
1052
+ msgid "Shipping is pending"
1053
+ msgstr "Envio pendente"
1054
+
1055
+ msgid "Tutorial"
1056
+ msgstr "Tutorial"
1057
+
1058
+ msgid "Discount Of "
1059
+ msgstr "Desconto De "
1060
+
1061
+ msgid "Make this product a subscription."
1062
+ msgstr "Fazer deste produto uma assinatura."
1063
+
1064
+ msgid "Order"
1065
+ msgstr "Pedido"
1066
+
1067
+ msgid "Mercado Envios Tracking ID"
1068
+ msgstr "ID de rastreamento do Mercado Envios"
1069
+
1070
+ msgid "Hello,"
1071
+ msgstr "Olá,"
1072
+
1073
+ msgid "Your order"
1074
+ msgstr "Seu pedido"
1075
+
1076
+ msgid "made in"
1077
+ msgstr "feito em"
1078
+
1079
+ msgid "used Mercado Envios as its shipment method."
1080
+ msgstr "usou o Mercado Envios como método de envio."
1081
+
1082
+ msgid "You can track it with the following Tracking ID:"
1083
+ msgstr "Você pode rastrea-lo com o seguinte ID de rastreamento:"
1084
+
1085
+ msgid "Best regards."
1086
+ msgstr "Atenciosamente."
1087
+
1088
+ msgid "SELECT..."
1089
+ msgstr "SELECIONE..."
1090
+
1091
+ msgid "NAME"
1092
+ msgstr "NOME"
1093
+
1094
+ msgid "SURNAME"
1095
+ msgstr "SOBRENOME"
1096
+
1097
+ msgid "DOCUMENT"
1098
+ msgstr "CPF"
1099
+
1100
+ msgid "ADDRESS"
1101
+ msgstr "ENDEREÇO"
1102
+
1103
+ msgid "NUMBER"
1104
+ msgstr "NÚMERO"
1105
+
1106
+ msgid "CITY"
1107
+ msgstr "CIDADE"
1108
+
1109
+ msgid "STATE"
1110
+ msgstr "ESTADO"
1111
+
1112
+ msgid "ZIP"
1113
+ msgstr "CEP"
1114
+
1115
+ msgid "You must inform you NAME"
1116
+ msgstr "Obrigatório o preenchimento do Nome"
1117
+
1118
+ msgid "You must inform your SURNAME"
1119
+ msgstr "Obrigatório o preenchimento do Sobrenome"
1120
+
1121
+ msgid "You must inform your DOCUMENT"
1122
+ msgstr "Obrigatório o preenchimento do documento"
1123
+
1124
+ msgid "You must inform your ADDRESS"
1125
+ msgstr "Obrigatório o preenchimento do Endereço"
1126
+
1127
+ msgid "You must inform your ADDRESS NUMBER"
1128
+ msgstr "Obrigatório o preenchimento do número residencial"
1129
+
1130
+ msgid "You must inform your CITY"
1131
+ msgstr "Obrigatório informar a cidade"
1132
+
1133
+ msgid "You must inform your STATE"
1134
+ msgstr "Obrigatório informar o estado"
1135
+
1136
+ msgid "You must inform your ZIP"
1137
+ msgstr "Obrigatório informar o CEP"
1138
+
1139
+ msgid "Your PHP version is OK."
1140
+ msgstr "Sua versão do PHP está OK."
1141
+
1142
+ msgid "Your PHP version do not support this module. You have %s, minimal required is %s."
1143
+ msgstr "Sua versão do PHP não suporta este módulo. Sua versão é %s, a mínima requerida é %s."
1144
+
1145
+ msgid "cURL is installed."
1146
+ msgstr "cURL está instalado."
1147
+
1148
+ msgid "cURL is not installed."
1149
+ msgstr "cURL não está instalado."
1150
+
1151
+ msgid "SSL is missing in your site."
1152
+ msgstr "Está faltando SSL em seu site."
1153
+
1154
+ msgid "Your site has SSL enabled."
1155
+ msgstr "Seu site possui SSL habilitado."
1156
+
1157
+ msgid "Fisical Person"
1158
+ msgstr "Pessoa Física"
1159
+
1160
+ msgid "Legal Person"
1161
+ msgstr "Pessoa Jurídica"
1162
+
1163
+ msgid "SOCIAL NAME"
1164
+ msgstr "RAZÃO SOCIAL"
1165
+
1166
+ msgid "CNPJ"
1167
+ msgstr "CNPJ"
languages/woocommerce-mercadopago-module.pot CHANGED
@@ -1,527 +1,1092 @@
1
  # WordPress Blank Pot
2
  # Copyright (C) 2014 ...
3
  # This file is distributed under the GNU General Public License v2 or later.
4
- #, fuzzy
5
  msgid ""
6
  msgstr ""
7
- "Project-Id-Version: "
8
- "WordPress Blank Pot "
9
- "v1.0.0\n"
10
- "POT-Creation-Date: "
11
- "2016-03-04 17:44-0300\n"
12
  "PO-Revision-Date: \n"
13
- "Last-Translator: Your "
14
- "Name <you@example.com>\n"
15
- "Language-Team: Your Team "
16
- "<translations@example."
17
- "com>\n"
18
- "Report-Msgid-Bugs-To: "
19
- "Translator Name "
20
- "<translations@example."
21
- "com>\n"
22
  "MIME-Version: 1.0\n"
23
- "Content-Type: text/"
24
- "plain; charset=UTF-8\n"
25
- "Content-Transfer-"
26
- "Encoding: 8bit\n"
27
- "Plural-Forms: "
28
- "nplurals=2; plural=n != "
29
- "1;\n"
30
- "X-Textdomain-Support: "
31
- "yesX-Generator: Poedit "
32
- "1.6.4\n"
33
- "X-Poedit-SourceCharset: "
34
- "UTF-8\n"
35
- "X-Poedit-KeywordsList: "
36
- "__;_e;esc_html_e;"
37
- "esc_html_x:1,2c;"
38
- "esc_html__;esc_attr_e;"
39
- "esc_attr_x:1,2c;"
40
- "esc_attr__;_ex:1,2c;"
41
- "_nx:4c,1,2;"
42
- "_nx_noop:4c,1,2;_x:1,2c;"
43
- "_n:1,2;_n_noop:1,2;"
44
- "__ngettext:1,2;"
45
- "__ngettext_noop:1,2;_c,"
46
- "_nc:4c,1,2\n"
47
- "X-Poedit-Basepath: ..\n"
48
  "Language: en_US\n"
49
- "X-Generator: Poedit "
50
- "1.8.7\n"
51
- "X-Poedit-"
52
- "SearchPath-0: .\n"
53
 
54
  #. Description of the plugin/theme
55
  msgid "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."
56
  msgstr ""
57
 
58
- #: mercadopago-module.php:66
59
- #, php-format
60
- msgid ""
61
- "Woo Mercado Pago Module "
62
- "depends on the "
63
- "last version of %s to "
64
- "execute!"
65
  msgstr ""
66
 
67
- #: mercadopago/mercadopago-gateway.php:63
68
- msgid ""
69
- "This module enables "
70
- "WooCommerce to use "
71
- "Mercado Pago as payment "
72
- "method for purchases "
73
- "made in your virtual "
74
- "store."
 
 
 
 
 
 
75
  msgstr ""
76
 
77
- #: mercadopago/mercadopago-gateway.php:133
 
78
  msgid "Argentine"
79
  msgstr ""
80
 
81
- #: mercadopago/mercadopago-gateway.php:134
 
82
  msgid "Brazil"
83
  msgstr ""
84
 
85
- #: mercadopago/mercadopago-gateway.php:135
 
86
  msgid "Chile"
87
  msgstr ""
88
 
89
- #: mercadopago/mercadopago-gateway.php:136
 
90
  msgid "Colombia"
91
  msgstr ""
92
 
93
- #: mercadopago/mercadopago-gateway.php:137
 
94
  msgid "Mexico"
95
  msgstr ""
96
 
97
- #: mercadopago/mercadopago-gateway.php:138
98
  msgid "or"
99
  msgstr ""
100
 
101
- #: mercadopago/mercadopago-gateway.php:139
 
102
  msgid "Venezuela"
103
  msgstr ""
104
 
105
- #: mercadopago/mercadopago-gateway.php:154
106
- msgid ""
107
- "Select the payment "
108
- "methods that you "
109
- "<strong>don't</strong> "
110
- "want to receive with "
111
- "Mercado Pago."
112
  msgstr ""
113
 
114
- #: mercadopago/mercadopago-gateway.php:157
115
- msgid ""
116
- "Your credentials are "
117
- "<strong>valid</strong> "
118
- "for"
119
  msgstr ""
120
 
121
- #: mercadopago/mercadopago-gateway.php:164
122
- #: mercadopago/mercadopago-gateway.php:173
123
- msgid ""
124
- "Configure your Client_id "
125
- "and Client_secret to "
126
- "have access to more "
127
- "options."
128
  msgstr ""
129
 
130
- #: mercadopago/mercadopago-gateway.php:167
131
- #: mercadopago/mercadopago-gateway.php:176
132
- msgid ""
133
- "Your credentials are "
134
- "<strong>not valid</"
135
- "strong>!"
136
  msgstr ""
137
 
138
- #: mercadopago/mercadopago-gateway.php:190
139
- #: mercadopago/mercadopago-gateway.php:198
140
- #: mercadopago/mercadopago-gateway.php:208
141
- msgid ""
142
- "This field should be an "
143
- "integer."
144
  msgstr ""
145
 
146
- #: mercadopago/mercadopago-gateway.php:193
147
- msgid ""
148
- "If your integration "
149
- "method is iFrame, please "
150
- "inform the payment "
151
- "iFrame width."
152
  msgstr ""
153
 
154
- #: mercadopago/mercadopago-gateway.php:201
155
- msgid ""
156
- "If your integration "
157
- "method is iFrame, please "
158
- "inform the payment "
159
- "iFrame height."
160
  msgstr ""
161
 
162
- #: mercadopago/mercadopago-gateway.php:211
163
- msgid ""
164
- "Select the max number of "
165
- "installments for your "
166
- "customers."
167
  msgstr ""
168
 
169
- #: mercadopago/mercadopago-gateway.php:217
170
- msgid "Enable/Disable"
171
  msgstr ""
172
 
173
- #: mercadopago/mercadopago-gateway.php:219
174
- msgid ""
175
- "Enable Mercado Pago "
176
- "Module"
177
  msgstr ""
178
 
179
- #: mercadopago/mercadopago-gateway.php:223
180
- msgid ""
181
- "Mercado Pago Credentials"
182
  msgstr ""
183
 
184
- #: mercadopago/mercadopago-gateway.php:225
185
- msgid ""
186
- "You can obtain your "
187
- "credentials for"
188
  msgstr ""
189
 
190
- #: mercadopago/mercadopago-gateway.php:228
191
- msgid ""
192
- "Mercado Pago Client_id"
193
  msgstr ""
194
 
195
- #: mercadopago/mercadopago-gateway.php:230
196
- msgid ""
197
- "Insert your Mercado Pago "
198
- "Client_id."
199
  msgstr ""
200
 
201
- #: mercadopago/mercadopago-gateway.php:235
202
- msgid ""
203
- "Mercado Pago "
204
- "Client_secret"
205
  msgstr ""
206
 
207
- #: mercadopago/mercadopago-gateway.php:237
208
- msgid ""
209
- "Insert your Mercado Pago "
210
- "Client_secret."
211
  msgstr ""
212
 
213
- #: mercadopago/mercadopago-gateway.php:242
214
- msgid ""
215
- "Instant Payment "
216
- "Notification (IPN) URL"
217
  msgstr ""
218
 
219
- #: mercadopago/mercadopago-gateway.php:244
220
- msgid ""
221
- "Your IPN URL to receive "
222
- "instant payment "
223
- "notifications is"
224
  msgstr ""
225
 
226
- #: mercadopago/mercadopago-gateway.php:247
227
- msgid "Checkout Options"
228
  msgstr ""
229
 
230
- #: mercadopago/mercadopago-gateway.php:252
231
- msgid "Title"
232
  msgstr ""
233
 
234
- #: mercadopago/mercadopago-gateway.php:254
235
- msgid ""
236
- "Title shown to the "
237
- "client in the checkout."
238
  msgstr ""
239
 
240
- #: mercadopago/mercadopago-gateway.php:258
241
- msgid "Description"
242
  msgstr ""
243
 
244
- #: mercadopago/mercadopago-gateway.php:260
245
- msgid ""
246
- "Description shown to the "
247
- "client in the checkout."
248
  msgstr ""
249
 
250
- #: mercadopago/mercadopago-gateway.php:261
251
- #: mercadopago/mercadopago-gateway.php:406
252
- msgid ""
253
- "Pay with Mercado Pago"
254
  msgstr ""
255
 
256
- #: mercadopago/mercadopago-gateway.php:264
 
 
 
 
257
  msgid "Store Category"
258
  msgstr ""
259
 
260
- #: mercadopago/mercadopago-gateway.php:266
261
- msgid ""
262
- "Define which type of "
263
- "products your store "
264
- "sells."
265
  msgstr ""
266
 
267
- #: mercadopago/mercadopago-gateway.php:270
268
  msgid "Store Identificator"
269
  msgstr ""
270
 
271
- #: mercadopago/mercadopago-gateway.php:272
272
- msgid ""
273
- "Please, inform a prefix "
274
- "to your store."
275
  msgstr ""
276
 
277
- #: mercadopago/mercadopago-gateway.php:272
278
- msgid ""
279
- "If you use your Mercado "
280
- "Pago account on multiple "
281
- "stores you should make "
282
- "sure that this prefix is "
283
- "unique as Mercado Pago "
284
- "will not allow orders "
285
- "with same identificators."
286
  msgstr ""
287
 
288
- #: mercadopago/mercadopago-gateway.php:276
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
289
  msgid "Integration Method"
290
  msgstr ""
291
 
292
- #: mercadopago/mercadopago-gateway.php:278
293
- msgid ""
294
- "Select how your clients "
295
- "should interact with "
296
- "Mercado Pago. Modal "
297
- "Window (inside your "
298
- "store), Redirect (Client "
299
- "is redirected to Mercado "
300
- "Pago), or iFrame (an "
301
- "internal window is "
302
- "embedded to the page "
303
- "layout)."
304
  msgstr ""
305
 
306
- #: mercadopago/mercadopago-gateway.php:281
307
  msgid "iFrame"
308
  msgstr ""
309
 
310
- #: mercadopago/mercadopago-gateway.php:282
311
  msgid "Modal Window"
312
  msgstr ""
313
 
314
- #: mercadopago/mercadopago-gateway.php:283
315
  msgid "Redirect"
316
  msgstr ""
317
 
318
- #: mercadopago/mercadopago-gateway.php:287
319
  msgid "iFrame Width"
320
  msgstr ""
321
 
322
- #: mercadopago/mercadopago-gateway.php:293
323
  msgid "iFrame Height"
324
  msgstr ""
325
 
326
- #: mercadopago/mercadopago-gateway.php:299
327
  msgid "Auto Return"
328
  msgstr ""
329
 
330
- #: mercadopago/mercadopago-gateway.php:301
331
- msgid ""
332
- "Automatic Return After "
333
- "Payment"
334
  msgstr ""
335
 
336
- #: mercadopago/mercadopago-gateway.php:303
337
- msgid ""
338
- "After the payment, "
339
- "client is automatically "
340
- "redirected."
341
  msgstr ""
342
 
343
- #: mercadopago/mercadopago-gateway.php:306
344
  msgid "Payment Options"
345
  msgstr ""
346
 
347
- #: mercadopago/mercadopago-gateway.php:311
348
  msgid "Max installments"
349
  msgstr ""
350
 
351
- #: mercadopago/mercadopago-gateway.php:317
352
- msgid ""
353
- "Exclude Payment Methods"
354
  msgstr ""
355
 
356
- #: mercadopago/mercadopago-gateway.php:324
357
- msgid ""
358
- "Test and Debug Options"
359
  msgstr ""
360
 
361
- #: mercadopago/mercadopago-gateway.php:329
362
- msgid ""
363
- "Mercado Pago Sandbox"
364
  msgstr ""
365
 
366
- #: mercadopago/mercadopago-gateway.php:331
367
- msgid ""
368
- "Enable Mercado Pago "
369
- "Sandbox"
370
  msgstr ""
371
 
372
- #: mercadopago/mercadopago-gateway.php:333
373
- msgid ""
374
- "This options allows you "
375
- "to test payments inside "
376
- "a sandbox environment."
377
  msgstr ""
378
 
379
- #: mercadopago/mercadopago-gateway.php:336
380
- msgid "Debug and Log"
381
  msgstr ""
382
 
383
- #: mercadopago/mercadopago-gateway.php:338
384
- msgid "Enable log"
385
  msgstr ""
386
 
387
- #: mercadopago/mercadopago-gateway.php:340
388
- #, php-format
389
- msgid ""
390
- "Register event logs of "
391
- "Mercado Pago, such as "
392
- "API requests, in the "
393
- "file"
394
  msgstr ""
395
 
396
- #: mercadopago/mercadopago-gateway.php:402
397
- msgid ""
398
- "Thank you for your "
399
- "order. Please, proceed "
400
- "with your payment "
401
- "clicking in the bellow "
402
- "button."
403
  msgstr ""
404
 
405
- #: mercadopago/mercadopago-gateway.php:410
406
- msgid ""
407
- "Cancel order &amp; Clear "
408
- "cart"
409
  msgstr ""
410
 
411
- #: mercadopago/mercadopago-gateway.php:420
412
- msgid ""
413
- "Thank you for your "
414
- "order. Proceed with your "
415
- "payment completing the "
416
- "following information."
417
  msgstr ""
418
 
419
- #: mercadopago/mercadopago-gateway.php:431
420
- msgid ""
421
- "An error occurred when "
422
- "proccessing your "
423
- "payment. Please try "
424
- "again or contact us for "
425
- "assistence."
426
  msgstr ""
427
 
428
- #: mercadopago/mercadopago-gateway.php:434
429
- msgid "Click to try again"
430
  msgstr ""
431
 
432
- #: mercadopago/mercadopago-gateway.php:675
433
- #: mercadopago/mercadopago-gateway.php:686
434
- msgid ""
435
- "Mercado Pago is Inactive"
436
  msgstr ""
437
 
438
- #: mercadopago/mercadopago-gateway.php:678
439
- msgid ""
440
- "Your Mercado Pago "
441
- "credentials Client_id/"
442
- "Client_secret appears to "
443
- "be misconfigured."
444
  msgstr ""
445
 
446
- #: mercadopago/mercadopago-gateway.php:679
447
- msgid ""
448
- "Click here and configure!"
449
  msgstr ""
450
 
451
- #: mercadopago/mercadopago-gateway.php:689
452
- msgid "The currency"
453
  msgstr ""
454
 
455
- #: mercadopago/mercadopago-gateway.php:689
456
- msgid ""
457
- "is not supported. "
458
- "Supported currencies "
459
- "are: ARS, BRL, CLP, COP, "
460
- "MXN, USD, VEF."
461
  msgstr ""
462
 
463
- #: mercadopago/mercadopago-gateway.php:714
464
- msgid ""
465
- "Mercado Pago Request "
466
- "Failure"
467
  msgstr ""
468
 
469
- #: mercadopago/mercadopago-gateway.php:791
470
- msgid ""
471
- "Mercado Pago Transaction "
472
- "ID"
473
  msgstr ""
474
 
475
- #: mercadopago/mercadopago-gateway.php:798
476
- msgid "Payer email"
477
  msgstr ""
478
 
479
- #: mercadopago/mercadopago-gateway.php:805
480
- msgid "Payment type"
481
  msgstr ""
482
 
483
- #: mercadopago/mercadopago-gateway.php:810
484
- msgid "Payment approved."
485
  msgstr ""
486
 
487
- #: mercadopago/mercadopago-gateway.php:816
488
- msgid ""
489
- "Customer haven't paid "
490
- "yet."
491
  msgstr ""
492
 
493
- #: mercadopago/mercadopago-gateway.php:821
494
- msgid ""
495
- "Payment under review."
496
  msgstr ""
497
 
498
- #: mercadopago/mercadopago-gateway.php:826
499
- msgid ""
500
- "The payment was refused. "
501
- "The customer can try "
502
- "again."
503
  msgstr ""
504
 
505
- #: mercadopago/mercadopago-gateway.php:832
506
- msgid ""
507
- "The payment was refunded "
508
- "to the customer."
509
  msgstr ""
510
 
511
- #: mercadopago/mercadopago-gateway.php:838
512
- msgid ""
513
- "The payment was "
514
- "cancelled."
515
  msgstr ""
516
 
517
- #: mercadopago/mercadopago-gateway.php:843
518
- msgid "Mercado Pago Payment ID"
519
  msgstr ""
520
 
521
- #: mercadopago/mercadopago-gateway.php:843
522
- #: mercadopago/mercadopago-gateway.php:848
523
- msgid ""
524
- "The payment is under "
525
- "mediation or it was "
526
- "charged-back."
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
527
  msgstr ""
1
  # WordPress Blank Pot
2
  # Copyright (C) 2014 ...
3
  # This file is distributed under the GNU General Public License v2 or later.
 
4
  msgid ""
5
  msgstr ""
6
+ "Project-Id-Version: WordPress Blank Pot v1.0.0\n"
7
+ "POT-Creation-Date: 2016-05-23 14:12-0300\n"
 
 
 
8
  "PO-Revision-Date: \n"
9
+ "Language-Team: Product Development <modulos@mercadopago.com>\n"
10
+ "Report-Msgid-Bugs-To: Marcelo Tomio Hama <marcelo.hama@mercadolivre.com>\n"
 
 
 
 
 
 
 
11
  "MIME-Version: 1.0\n"
12
+ "Content-Type: text/plain; charset=UTF-8\n"
13
+ "Content-Transfer-Encoding: 8bit\n"
14
+ "Plural-Forms: nplurals=2; plural=(n > 1);\n"
15
+ "X-Textdomain-Support: yesX-Generator: Poedit 1.6.4\n"
16
+ "X-Poedit-SourceCharset: UTF-8\n"
17
+ "X-Poedit-KeywordsList: __;_e;esc_html_e;esc_html_x:1,2c;esc_html__;esc_attr_e;esc_attr_x:1,2c;esc_attr__;_ex:1,2c;_nx:4c,1,2;_nx_noop:4c,1,2;_x:1,2c;_n:1,2;_n_noop:1,2;__ngettext:1,2;__ngettext_noop:1,2;_c,_nc:4c,1,2\n"
18
+ "X-Poedit-Basepath: \n"
19
+ "X-Generator: Poedit 1.8.7\n"
20
+ "Last-Translator: \n"
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  "Language: en_US\n"
22
+ "X-Poedit-SearchPath-0: .\n"
 
 
 
23
 
24
  #. Description of the plugin/theme
25
  msgid "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."
26
  msgstr ""
27
 
28
+ #: mercadopago-module.php:69
29
+ msgid "Woo Mercado Pago Module depends on the last version of %s to execute!"
 
 
 
 
 
30
  msgstr ""
31
 
32
+ #: mercadopago-module.php:109
33
+ msgid "Basic Checkout"
34
+ msgstr ""
35
+
36
+ #: mercadopago-module.php:113
37
+ msgid "Custom Checkout"
38
+ msgstr ""
39
+
40
+ #: mercadopago/mercadopago-custom-gateway.php:48
41
+ msgid "Mercado Pago - Custom Checkout"
42
+ msgstr ""
43
+
44
+ #: mercadopago/mercadopago-custom-gateway.php:51 mercadopago/mercadopago-gateway.php:54
45
+ msgid "This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store."
46
  msgstr ""
47
 
48
+ #: mercadopago/mercadopago-custom-gateway.php:126 mercadopago/mercadopago-custom-gateway.php:791 mercadopago/mercadopago-gateway.php:125
49
+ #: mercadopago/mercadopago-gateway.php:716
50
  msgid "Argentine"
51
  msgstr ""
52
 
53
+ #: mercadopago/mercadopago-custom-gateway.php:127 mercadopago/mercadopago-custom-gateway.php:792 mercadopago/mercadopago-gateway.php:126
54
+ #: mercadopago/mercadopago-gateway.php:717
55
  msgid "Brazil"
56
  msgstr ""
57
 
58
+ #: mercadopago/mercadopago-custom-gateway.php:128 mercadopago/mercadopago-custom-gateway.php:794 mercadopago/mercadopago-gateway.php:127
59
+ #: mercadopago/mercadopago-gateway.php:719
60
  msgid "Chile"
61
  msgstr ""
62
 
63
+ #: mercadopago/mercadopago-custom-gateway.php:129 mercadopago/mercadopago-custom-gateway.php:793 mercadopago/mercadopago-gateway.php:128
64
+ #: mercadopago/mercadopago-gateway.php:718
65
  msgid "Colombia"
66
  msgstr ""
67
 
68
+ #: mercadopago/mercadopago-custom-gateway.php:130 mercadopago/mercadopago-custom-gateway.php:795 mercadopago/mercadopago-gateway.php:129
69
+ #: mercadopago/mercadopago-gateway.php:720
70
  msgid "Mexico"
71
  msgstr ""
72
 
73
+ #: mercadopago/mercadopago-custom-gateway.php:132 mercadopago/mercadopago-gateway.php:130
74
  msgid "or"
75
  msgstr ""
76
 
77
+ #: mercadopago/mercadopago-custom-gateway.php:133 mercadopago/mercadopago-custom-gateway.php:796 mercadopago/mercadopago-gateway.php:131
78
+ #: mercadopago/mercadopago-gateway.php:721
79
  msgid "Venezuela"
80
  msgstr ""
81
 
82
+ #: mercadopago/mercadopago-custom-gateway.php:145 mercadopago/mercadopago-gateway.php:151
83
+ msgid "Your credentials are <strong>valid</strong> for"
 
 
 
 
 
84
  msgstr ""
85
 
86
+ #: mercadopago/mercadopago-custom-gateway.php:151 mercadopago/mercadopago-custom-gateway.php:156 mercadopago/mercadopago-gateway.php:161
87
+ #: mercadopago/mercadopago-gateway.php:170
88
+ msgid "Your credentials are <strong>not valid</strong>!"
 
 
89
  msgstr ""
90
 
91
+ #: mercadopago/mercadopago-custom-gateway.php:169 mercadopago/mercadopago-gateway.php:211
92
+ msgid "Enable/Disable"
 
 
 
 
 
93
  msgstr ""
94
 
95
+ #: mercadopago/mercadopago-custom-gateway.php:171
96
+ msgid "Enable Custom Checkout"
 
 
 
 
97
  msgstr ""
98
 
99
+ #: mercadopago/mercadopago-custom-gateway.php:175 mercadopago/mercadopago-gateway.php:217
100
+ msgid "Mercado Pago Credentials"
 
 
 
 
101
  msgstr ""
102
 
103
+ #: mercadopago/mercadopago-custom-gateway.php:177 mercadopago/mercadopago-gateway.php:219
104
+ msgid "You can obtain your credentials for"
 
 
 
 
105
  msgstr ""
106
 
107
+ #: mercadopago/mercadopago-custom-gateway.php:182
108
+ msgid "Insert your Mercado Pago Public key."
 
 
 
 
109
  msgstr ""
110
 
111
+ #: mercadopago/mercadopago-custom-gateway.php:189
112
+ msgid "Insert your Mercado Pago Access token."
 
 
 
113
  msgstr ""
114
 
115
+ #: mercadopago/mercadopago-custom-gateway.php:194 mercadopago/mercadopago-gateway.php:236
116
+ msgid "Instant Payment Notification (IPN) URL"
117
  msgstr ""
118
 
119
+ #: mercadopago/mercadopago-custom-gateway.php:196 mercadopago/mercadopago-gateway.php:238
120
+ msgid "Your IPN URL to receive instant payment notifications is"
 
 
121
  msgstr ""
122
 
123
+ #: mercadopago/mercadopago-custom-gateway.php:199 mercadopago/mercadopago-gateway.php:241
124
+ msgid "Checkout Options"
 
125
  msgstr ""
126
 
127
+ #: mercadopago/mercadopago-custom-gateway.php:204 mercadopago/mercadopago-gateway.php:246
128
+ msgid "Title"
 
 
129
  msgstr ""
130
 
131
+ #: mercadopago/mercadopago-custom-gateway.php:206 mercadopago/mercadopago-gateway.php:248
132
+ msgid "Title shown to the client in the checkout."
 
133
  msgstr ""
134
 
135
+ #: mercadopago/mercadopago-custom-gateway.php:207 mercadopago/mercadopago-custom-gateway.php:219 mercadopago/mercadopago-gateway.php:249
136
+ msgid "Mercado Pago"
 
 
137
  msgstr ""
138
 
139
+ #: mercadopago/mercadopago-custom-gateway.php:210 mercadopago/mercadopago-gateway.php:252
140
+ msgid "Description"
 
 
141
  msgstr ""
142
 
143
+ #: mercadopago/mercadopago-custom-gateway.php:212 mercadopago/mercadopago-gateway.php:254
144
+ msgid "Description shown to the client in the checkout."
 
 
145
  msgstr ""
146
 
147
+ #: mercadopago/mercadopago-custom-gateway.php:213 mercadopago/mercadopago-gateway.php:255 mercadopago/mercadopago-gateway.php:432
148
+ msgid "Pay with Mercado Pago"
 
 
149
  msgstr ""
150
 
151
+ #: mercadopago/mercadopago-custom-gateway.php:216
152
+ msgid "Statement Descriptor"
 
 
 
153
  msgstr ""
154
 
155
+ #: mercadopago/mercadopago-custom-gateway.php:218
156
+ msgid "The description that will be shown in your customer's invoice."
157
  msgstr ""
158
 
159
+ #: mercadopago/mercadopago-custom-gateway.php:222
160
+ msgid "Binary Mode"
161
  msgstr ""
162
 
163
+ #: mercadopago/mercadopago-custom-gateway.php:224
164
+ msgid "Enable binary mode for checkout status"
 
 
165
  msgstr ""
166
 
167
+ #: mercadopago/mercadopago-custom-gateway.php:226
168
+ msgid "When charging a credit card, only [approved] or [reject] status will be taken."
169
  msgstr ""
170
 
171
+ #: mercadopago/mercadopago-custom-gateway.php:229
172
+ msgid "Ticket"
 
 
173
  msgstr ""
174
 
175
+ #: mercadopago/mercadopago-custom-gateway.php:231
176
+ msgid "Enable Ticket for Custom Checkout"
 
 
177
  msgstr ""
178
 
179
+ #: mercadopago/mercadopago-custom-gateway.php:233
180
+ msgid "Let your customer pay you with tickets"
181
+ msgstr ""
182
+
183
+ #: mercadopago/mercadopago-custom-gateway.php:236 mercadopago/mercadopago-gateway.php:258
184
  msgid "Store Category"
185
  msgstr ""
186
 
187
+ #: mercadopago/mercadopago-custom-gateway.php:238 mercadopago/mercadopago-gateway.php:260
188
+ msgid "Define which type of products your store sells."
 
 
 
189
  msgstr ""
190
 
191
+ #: mercadopago/mercadopago-custom-gateway.php:242 mercadopago/mercadopago-gateway.php:264
192
  msgid "Store Identificator"
193
  msgstr ""
194
 
195
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
196
+ msgid "Please, inform a prefix to your store."
 
 
197
  msgstr ""
198
 
199
+ #: mercadopago/mercadopago-custom-gateway.php:244 mercadopago/mercadopago-gateway.php:266
200
+ msgid "If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same identificators."
 
 
 
 
 
 
 
201
  msgstr ""
202
 
203
+ #: mercadopago/mercadopago-custom-gateway.php:248 mercadopago/mercadopago-gateway.php:318
204
+ msgid "Test and Debug Options"
205
+ msgstr ""
206
+
207
+ #: mercadopago/mercadopago-custom-gateway.php:253 mercadopago/mercadopago-gateway.php:323
208
+ msgid "Mercado Pago Sandbox"
209
+ msgstr ""
210
+
211
+ #: mercadopago/mercadopago-custom-gateway.php:255 mercadopago/mercadopago-gateway.php:325
212
+ msgid "Enable Mercado Pago Sandbox"
213
+ msgstr ""
214
+
215
+ #: mercadopago/mercadopago-custom-gateway.php:257 mercadopago/mercadopago-gateway.php:327
216
+ msgid "This option allows you to test payments inside a sandbox environment."
217
+ msgstr ""
218
+
219
+ #: mercadopago/mercadopago-custom-gateway.php:260 mercadopago/mercadopago-gateway.php:330
220
+ msgid "Debug and Log"
221
+ msgstr ""
222
+
223
+ #: mercadopago/mercadopago-custom-gateway.php:262 mercadopago/mercadopago-gateway.php:332
224
+ msgid "Enable log"
225
+ msgstr ""
226
+
227
+ #: mercadopago/mercadopago-custom-gateway.php:264 mercadopago/mercadopago-gateway.php:334
228
+ msgid "Register event logs of Mercado Pago, such as API requests, in the file"
229
+ msgstr ""
230
+
231
+ #: mercadopago/mercadopago-custom-gateway.php:265 mercadopago/mercadopago-gateway.php:335
232
+ msgid "File location: "
233
+ msgstr ""
234
+
235
+ #: mercadopago/mercadopago-custom-gateway.php:281 mercadopago/mercadopago-gateway.php:351
236
+ msgid "Please, rate us %s on WordPress.org and give your feedback to help improve this module!"
237
+ msgstr ""
238
+
239
+ #: mercadopago/mercadopago-custom-gateway.php:332
240
+ msgid "Payment Method"
241
+ msgstr ""
242
+
243
+ #: mercadopago/mercadopago-custom-gateway.php:333
244
+ msgid "Credit card number"
245
+ msgstr ""
246
+
247
+ #: mercadopago/mercadopago-custom-gateway.php:334
248
+ msgid "Expiration month"
249
+ msgstr ""
250
+
251
+ #: mercadopago/mercadopago-custom-gateway.php:335
252
+ msgid "Expiration year"
253
+ msgstr ""
254
+
255
+ #: mercadopago/mercadopago-custom-gateway.php:336
256
+ msgid "Year"
257
+ msgstr ""
258
+
259
+ #: mercadopago/mercadopago-custom-gateway.php:337
260
+ msgid "Month"
261
+ msgstr ""
262
+
263
+ #: mercadopago/mercadopago-custom-gateway.php:338
264
+ msgid "Card holder name"
265
+ msgstr ""
266
+
267
+ #: mercadopago/mercadopago-custom-gateway.php:339
268
+ msgid "Security code"
269
+ msgstr ""
270
+
271
+ #: mercadopago/mercadopago-custom-gateway.php:340
272
+ msgid "Document Type"
273
+ msgstr ""
274
+
275
+ #: mercadopago/mercadopago-custom-gateway.php:341
276
+ msgid "Document number"
277
+ msgstr ""
278
+
279
+ #: mercadopago/mercadopago-custom-gateway.php:342
280
+ msgid "Issuer"
281
+ msgstr ""
282
+
283
+ #: mercadopago/mercadopago-custom-gateway.php:343
284
+ msgid "Installments"
285
+ msgstr ""
286
+
287
+ #: mercadopago/mercadopago-custom-gateway.php:347
288
+ msgid "Parameter cardNumber can not be null/empty"
289
+ msgstr ""
290
+
291
+ #: mercadopago/mercadopago-custom-gateway.php:348
292
+ msgid "Invalid Card Number"
293
+ msgstr ""
294
+
295
+ #: mercadopago/mercadopago-custom-gateway.php:350 mercadopago/mercadopago-custom-gateway.php:351 mercadopago/mercadopago-custom-gateway.php:352
296
+ #: mercadopago/mercadopago-custom-gateway.php:353
297
+ msgid "Invalid Expiration Date"
298
+ msgstr ""
299
+
300
+ #: mercadopago/mercadopago-custom-gateway.php:355
301
+ msgid "Parameter cardholderName can not be null/empty"
302
+ msgstr ""
303
+
304
+ #: mercadopago/mercadopago-custom-gateway.php:356
305
+ msgid "Invalid Card Holder Name"
306
+ msgstr ""
307
+
308
+ #: mercadopago/mercadopago-custom-gateway.php:358
309
+ msgid "Parameter securityCode can not be null/empty"
310
+ msgstr ""
311
+
312
+ #: mercadopago/mercadopago-custom-gateway.php:359
313
+ msgid "Invalid Security Code"
314
+ msgstr ""
315
+
316
+ #: mercadopago/mercadopago-custom-gateway.php:361
317
+ msgid "Parameter docType can not be null/empty"
318
+ msgstr ""
319
+
320
+ #: mercadopago/mercadopago-custom-gateway.php:362
321
+ msgid "Invalid Document Type"
322
+ msgstr ""
323
+
324
+ #: mercadopago/mercadopago-custom-gateway.php:364
325
+ msgid "Parameter docNumber can not be null/empty"
326
+ msgstr ""
327
+
328
+ #: mercadopago/mercadopago-custom-gateway.php:365
329
+ msgid "Invalid Document Number"
330
+ msgstr ""
331
+
332
+ #: mercadopago/mercadopago-custom-gateway.php:367
333
+ msgid "The parameter cardholder.document.subtype can not be null or empty"
334
+ msgstr ""
335
+
336
+ #: mercadopago/mercadopago-custom-gateway.php:368
337
+ msgid "Invalid Document Sub Type"
338
+ msgstr ""
339
+
340
+ #: mercadopago/mercadopago-custom-gateway.php:370
341
+ msgid "Parameter cardIssuerId can not be null/empty"
342
+ msgstr ""
343
+
344
+ #: mercadopago/mercadopago-custom-gateway.php:402 mercadopago/mercadopago-custom-gateway.php:943 mercadopago/mercadopago-gateway.php:869
345
+ msgid "Payment approved."
346
+ msgstr ""
347
+
348
+ #: mercadopago/mercadopago-custom-gateway.php:416 mercadopago/mercadopago-custom-gateway.php:805
349
+ msgid "Your payment is under review. In less than 1h, you should be notified by email."
350
+ msgstr ""
351
+
352
+ #: mercadopago/mercadopago-custom-gateway.php:418
353
+ msgid "Check your order resume"
354
+ msgstr ""
355
+
356
+ #: mercadopago/mercadopago-custom-gateway.php:431
357
+ msgid "Your payment was refused. You can try again."
358
+ msgstr ""
359
+
360
+ #: mercadopago/mercadopago-custom-gateway.php:435 mercadopago/mercadopago-custom-gateway.php:819 mercadopago/mercadopago-gateway.php:460
361
+ msgid "Click to try again"
362
+ msgstr ""
363
+
364
+ #: mercadopago/mercadopago-custom-gateway.php:455
365
+ msgid "A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?"
366
+ msgstr ""
367
+
368
+ #: mercadopago/mercadopago-custom-gateway.php:544
369
+ msgid "Shipping"
370
+ msgstr ""
371
+
372
+ #: mercadopago/mercadopago-custom-gateway.php:545
373
+ msgid "Shipping service used by store"
374
+ msgstr ""
375
+
376
+ #: mercadopago/mercadopago-custom-gateway.php:721 mercadopago/mercadopago-gateway.php:649
377
+ msgid "WooCommerce &gt; System Status &gt; Logs"
378
+ msgstr ""
379
+
380
+ #: mercadopago/mercadopago-custom-gateway.php:766 mercadopago/mercadopago-custom-gateway.php:779 mercadopago/mercadopago-gateway.php:694
381
+ #: mercadopago/mercadopago-gateway.php:705
382
+ msgid "Mercado Pago is Inactive"
383
+ msgstr ""
384
+
385
+ #: mercadopago/mercadopago-custom-gateway.php:769
386
+ msgid "Your Mercado Pago credentials Public Key/Access Token appears to be misconfigured."
387
+ msgstr ""
388
+
389
+ #: mercadopago/mercadopago-custom-gateway.php:771 mercadopago/mercadopago-gateway.php:698
390
+ msgid "Click here and configure!"
391
+ msgstr ""
392
+
393
+ #: mercadopago/mercadopago-custom-gateway.php:782 mercadopago/mercadopago-gateway.php:708
394
+ msgid "The currency"
395
+ msgstr ""
396
+
397
+ #: mercadopago/mercadopago-custom-gateway.php:783 mercadopago/mercadopago-gateway.php:708
398
+ msgid "is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, VEF."
399
+ msgstr ""
400
+
401
+ #: mercadopago/mercadopago-custom-gateway.php:797
402
+ msgid "Peru"
403
+ msgstr ""
404
+
405
+ #: mercadopago/mercadopago-custom-gateway.php:809
406
+ msgid "Click to check your order"
407
+ msgstr ""
408
+
409
+ #: mercadopago/mercadopago-custom-gateway.php:814 mercadopago/mercadopago-gateway.php:457
410
+ msgid "An error occurred when proccessing your payment. Please try again or contact us for assistence."
411
+ msgstr ""
412
+
413
+ #: mercadopago/mercadopago-custom-gateway.php:816
414
+ msgid "Reason is: "
415
+ msgstr ""
416
+
417
+ #: mercadopago/mercadopago-custom-gateway.php:849 mercadopago/mercadopago-gateway.php:748
418
+ msgid "Mercado Pago Request Failure"
419
+ msgstr ""
420
+
421
+ #: mercadopago/mercadopago-custom-gateway.php:918 mercadopago/mercadopago-gateway.php:822
422
+ msgid "Payer email"
423
+ msgstr ""
424
+
425
+ #: mercadopago/mercadopago-custom-gateway.php:926 mercadopago/mercadopago-gateway.php:829
426
+ msgid "Payment type"
427
+ msgstr ""
428
+
429
+ #: mercadopago/mercadopago-custom-gateway.php:934 mercadopago/mercadopago-gateway.php:841
430
+ msgid "Mercado Pago Payment ID"
431
+ msgstr ""
432
+
433
+ #: mercadopago/mercadopago-custom-gateway.php:950 mercadopago/mercadopago-gateway.php:875
434
+ msgid "Customer haven't paid yet."
435
+ msgstr ""
436
+
437
+ #: mercadopago/mercadopago-custom-gateway.php:957 mercadopago/mercadopago-gateway.php:881
438
+ msgid "Payment under review."
439
+ msgstr ""
440
+
441
+ #: mercadopago/mercadopago-custom-gateway.php:964 mercadopago/mercadopago-gateway.php:887
442
+ msgid "The payment was refused. The customer can try again."
443
+ msgstr ""
444
+
445
+ #: mercadopago/mercadopago-custom-gateway.php:971 mercadopago/mercadopago-gateway.php:893
446
+ msgid "The payment was refunded to the customer."
447
+ msgstr ""
448
+
449
+ #: mercadopago/mercadopago-custom-gateway.php:978 mercadopago/mercadopago-gateway.php:899
450
+ msgid "The payment was cancelled."
451
+ msgstr ""
452
+
453
+ #: mercadopago/mercadopago-custom-gateway.php:984 mercadopago/mercadopago-custom-gateway.php:990 mercadopago/mercadopago-gateway.php:904
454
+ #: mercadopago/mercadopago-gateway.php:909
455
+ msgid "The payment is under mediation or it was charged-back."
456
+ msgstr ""
457
+
458
+ #: mercadopago/mercadopago-gateway.php:51
459
+ msgid "Mercado Pago - Basic Checkout"
460
+ msgstr ""
461
+
462
+ #: mercadopago/mercadopago-gateway.php:148
463
+ msgid "Select the payment methods that you <strong>don't</strong> want to receive with Mercado Pago."
464
+ msgstr ""
465
+
466
+ #: mercadopago/mercadopago-gateway.php:158 mercadopago/mercadopago-gateway.php:167
467
+ msgid "Configure your Client_id and Client_secret to have access to more options."
468
+ msgstr ""
469
+
470
+ #: mercadopago/mercadopago-gateway.php:184 mercadopago/mercadopago-gateway.php:192 mercadopago/mercadopago-gateway.php:202
471
+ msgid "This field should be an integer."
472
+ msgstr ""
473
+
474
+ #: mercadopago/mercadopago-gateway.php:187
475
+ msgid "If your integration method is iFrame, please inform the payment iFrame width."
476
+ msgstr ""
477
+
478
+ #: mercadopago/mercadopago-gateway.php:195
479
+ msgid "If your integration method is iFrame, please inform the payment iFrame height."
480
+ msgstr ""
481
+
482
+ #: mercadopago/mercadopago-gateway.php:205
483
+ msgid "Select the max number of installments for your customers."
484
+ msgstr ""
485
+
486
+ #: mercadopago/mercadopago-gateway.php:213
487
+ msgid "Enable Basic Checkout"
488
+ msgstr ""
489
+
490
+ #: mercadopago/mercadopago-gateway.php:224
491
+ msgid "Insert your Mercado Pago Client_id."
492
+ msgstr ""
493
+
494
+ #: mercadopago/mercadopago-gateway.php:231
495
+ msgid "Insert your Mercado Pago Client_secret."
496
+ msgstr ""
497
+
498
+ #: mercadopago/mercadopago-gateway.php:270
499
  msgid "Integration Method"
500
  msgstr ""
501
 
502
+ #: mercadopago/mercadopago-gateway.php:272
503
+ msgid "Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an internal window is embedded to the page layout)."
 
 
 
 
 
 
 
 
 
 
504
  msgstr ""
505
 
506
+ #: mercadopago/mercadopago-gateway.php:275
507
  msgid "iFrame"
508
  msgstr ""
509
 
510
+ #: mercadopago/mercadopago-gateway.php:276
511
  msgid "Modal Window"
512
  msgstr ""
513
 
514
+ #: mercadopago/mercadopago-gateway.php:277
515
  msgid "Redirect"
516
  msgstr ""
517
 
518
+ #: mercadopago/mercadopago-gateway.php:281
519
  msgid "iFrame Width"
520
  msgstr ""
521
 
522
+ #: mercadopago/mercadopago-gateway.php:287
523
  msgid "iFrame Height"
524
  msgstr ""
525
 
526
+ #: mercadopago/mercadopago-gateway.php:293
527
  msgid "Auto Return"
528
  msgstr ""
529
 
530
+ #: mercadopago/mercadopago-gateway.php:295
531
+ msgid "Automatic Return After Payment"
 
 
532
  msgstr ""
533
 
534
+ #: mercadopago/mercadopago-gateway.php:297
535
+ msgid "After the payment, client is automatically redirected."
 
 
 
536
  msgstr ""
537
 
538
+ #: mercadopago/mercadopago-gateway.php:300
539
  msgid "Payment Options"
540
  msgstr ""
541
 
542
+ #: mercadopago/mercadopago-gateway.php:305
543
  msgid "Max installments"
544
  msgstr ""
545
 
546
+ #: mercadopago/mercadopago-gateway.php:311
547
+ msgid "Exclude Payment Methods"
 
548
  msgstr ""
549
 
550
+ #: mercadopago/mercadopago-gateway.php:428
551
+ msgid "Thank you for your order. Please, proceed with your payment clicking in the bellow button."
 
552
  msgstr ""
553
 
554
+ #: mercadopago/mercadopago-gateway.php:436
555
+ msgid "Cancel order &amp; Clear cart"
 
556
  msgstr ""
557
 
558
+ #: mercadopago/mercadopago-gateway.php:446
559
+ msgid "Thank you for your order. Proceed with your payment completing the following information."
 
 
560
  msgstr ""
561
 
562
+ #: mercadopago/mercadopago-gateway.php:697
563
+ msgid "Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured."
 
 
 
564
  msgstr ""
565
 
566
+ msgid " as it appears in your card ..."
 
567
  msgstr ""
568
 
569
+ msgid "Done, your payment was accredited!"
 
570
  msgstr ""
571
 
572
+ msgid "We are processing the payment. In less than an hour we will e-mail you the results."
 
 
 
 
 
 
573
  msgstr ""
574
 
575
+ msgid "We are processing the payment. In less than 2 business days we will tell you by e-mail whether it has accredited or we need more information."
 
 
 
 
 
 
576
  msgstr ""
577
 
578
+ msgid "Check the card number."
 
 
 
579
  msgstr ""
580
 
581
+ msgid "Check the expiration date."
 
 
 
 
 
582
  msgstr ""
583
 
584
+ msgid "Check the information."
 
 
 
 
 
 
585
  msgstr ""
586
 
587
+ msgid "Check the security code."
 
588
  msgstr ""
589
 
590
+ msgid "We could not process your payment."
 
 
 
591
  msgstr ""
592
 
593
+ msgid "You must authorize the payment of your orders."
 
 
 
 
 
594
  msgstr ""
595
 
596
+ msgid "Call your card issuer to activate your card. The phone is on the back of your card."
 
 
597
  msgstr ""
598
 
599
+ msgid "You already made a payment for that amount. If you need to repay, use another card or other payment method."
 
600
  msgstr ""
601
 
602
+ msgid "Your payment was rejected. Choose another payment method. We recommend cash."
 
 
 
 
 
603
  msgstr ""
604
 
605
+ msgid "Your payment do not have sufficient funds."
 
 
 
606
  msgstr ""
607
 
608
+ msgid "Your payment does not process payments with selected installments."
 
 
 
609
  msgstr ""
610
 
611
+ msgid "You have reached the limit of allowed attempts. Choose another card or another payment method."
 
612
  msgstr ""
613
 
614
+ msgid "This payment method did not process the payment."
 
615
  msgstr ""
616
 
617
+ msgid "Mercado Pago - Ticket"
 
618
  msgstr ""
619
 
620
+ msgid "Mercado Pago - Credit Card"
 
 
 
621
  msgstr ""
622
 
623
+ msgid "Ticket Options"
 
 
624
  msgstr ""
625
 
626
+ msgid "Enable Ticket Payment Method"
 
 
 
 
627
  msgstr ""
628
 
629
+ msgid "Other Bank"
 
 
 
630
  msgstr ""
631
 
632
+ msgid "Choose"
 
 
 
633
  msgstr ""
634
 
635
+ msgid "A problem was occurred when processing your payment. Please, try again."
 
636
  msgstr ""
637
 
638
+ msgid "Thank you for your order. Please, pay the ticket to get your order approved."
639
+ msgstr ""
640
+
641
+ msgid "Waiting for the ticket payment."
642
+ msgstr ""
643
+
644
+ msgid "Print the Ticket"
645
+ msgstr ""
646
+
647
+ msgid "To reprint the ticket click "
648
+ msgstr ""
649
+
650
+ msgid "here"
651
+ msgstr ""
652
+
653
+ msgid "Custom Checkout is Inactive"
654
+ msgstr ""
655
+
656
+ msgid "Basic Checkout is Inactive"
657
+ msgstr ""
658
+
659
+ msgid "Ticket is Inactive"
660
+ msgstr ""
661
+
662
+ msgid "Please, select the ticket issuer of your preference."
663
+ msgstr ""
664
+
665
+ msgid "Click "Place order" button. The ticket will be generated and you will be redirected to print it."
666
+ msgstr ""
667
+
668
+ msgid "Important: The order will be confirmed only after the payment approval."
669
+ msgstr ""
670
+
671
+ msgid "Your Mercado Pago credential Access Token appears to be misconfigured."
672
+ msgstr ""
673
+
674
+ msgid "Your Card"
675
+ msgstr ""
676
+
677
+ msgid "Other Cards"
678
+ msgstr ""
679
+
680
+ msgid "Other Card"
681
+ msgstr ""
682
+
683
+ msgid "ended in"
684
+ msgstr ""
685
+
686
+ msgid "Your site appears to not have SSL certification. SSL is a pre-requisite because the payment process is made in your server."
687
+ msgstr ""
688
+
689
+ msgid "ATTENTION: The currency"
690
+ msgstr ""
691
+
692
+ msgid "defined in WooCommerce is different from the one used in your credentials country.<br>The currency for transactions in this payment method will be"
693
+ msgstr ""
694
+
695
+ msgid "Currency conversions should be made outside this module."
696
+ msgstr ""
697
+
698
+ msgid "Coupons"
699
+ msgstr ""
700
+
701
+ msgid "Enable coupons of discounts"
702
+ msgstr ""
703
+
704
+ msgid "If there is a Mercado Pago campaign, allow your store to give discounts to customers."
705
+ msgstr ""
706
+
707
+ msgid "You will save"
708
+ msgstr ""
709
+
710
+ msgid "Apply"
711
+ msgstr ""
712
+
713
+ msgid "Remove"
714
+ msgstr ""
715
+
716
+ msgid "Please, inform your coupon code"
717
+ msgstr ""
718
+
719
+ msgid "Please, inform your email in billing address to use this feature"
720
+ msgstr ""
721
+
722
+ msgid "Discount for %s coupon"
723
+ msgstr ""
724
+
725
+ msgid "Discount provided by store"
726
+ msgstr ""
727
+
728
+ msgid "Discount Coupon"
729
+ msgstr ""
730
+
731
+ msgid "CURRENCY CONVERTED: The currency conversion ratio from"
732
+ msgstr ""
733
+
734
+ msgid "ERROR: It was not possible to convert the unsupported currency"
735
+ msgstr ""
736
+
737
+ msgid "to"
738
+ msgstr ""
739
+
740
+ msgid "If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio."
741
+ msgstr ""
742
+
743
+ msgid " is: "
744
+ msgstr ""
745
+
746
+ msgid "Currency Conversion"
747
+ msgstr ""
748
+
749
+ msgid "with discount from"
750
+ msgstr ""
751
+
752
+ msgid "Total of your purchase:"
753
+ msgstr ""
754
+
755
+ msgid "Total of your purchase with discount:"
756
+ msgstr ""
757
+
758
+ msgid "*Uppon payment approval"
759
+ msgstr ""
760
+
761
+ msgid "Terms and Conditions of Use"
762
+ msgstr ""
763
+
764
+ msgid "Payment converted from"
765
+ msgstr ""
766
+
767
+ msgid "Rate Us"
768
+ msgstr ""
769
+
770
+ msgid "Report Issue"
771
+ msgstr ""
772
+
773
+ msgid "Two Cards Mode"
774
+ msgstr ""
775
+
776
+ msgid "Payments with Two Cards"
777
+ msgstr ""
778
+
779
+ msgid "Your customer will be able to use two different cards to pay the order."
780
+ msgstr ""
781
+
782
+ msgid "Your Mercado Pago credentials Access Token appears to be misconfigured."
783
+ msgstr ""
784
+
785
+ msgid "Cancel Order"
786
+ msgstr ""
787
+
788
+ msgid "Refund Order"
789
+ msgstr ""
790
+
791
+ msgid "Back URL Options"
792
+ msgstr ""
793
+
794
+ msgid "Sucess URL"
795
+ msgstr ""
796
+
797
+ msgid "Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page."
798
+ msgstr ""
799
+
800
+ msgid "Failure URL"
801
+ msgstr ""
802
+
803
+ msgid "Where customers should be redirected after a failed purchase. Let blank to redirect to the default store order resume page."
804
+ msgstr ""
805
+
806
+ msgid "Pending URL"
807
+ msgstr ""
808
+
809
+ msgid "Where customers should be redirected after a pending purchase. Let blank to redirect to the default store order resume page."
810
+ msgstr ""
811
+
812
+ msgid "Stock Reduce"
813
+ msgstr ""
814
+
815
+ msgid "Reduce Stock in Order Generation"
816
+ msgstr ""
817
+
818
+ msgid "Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval."
819
+ msgstr ""
820
+
821
+ msgid "Recurrent Product"
822
+ msgstr ""
823
+
824
+ msgid "Frequency"
825
+ msgstr ""
826
+
827
+ msgid "Amount of time (in days or months) for the execution of the next payment."
828
+ msgstr ""
829
+
830
+ msgid "Start date"
831
+ msgstr ""
832
+
833
+ msgid "First payment date (effective debit). Defaults to now if blank."
834
+ msgstr ""
835
+
836
+ msgid "End date"
837
+ msgstr ""
838
+
839
+ msgid "Deadline to generate new charges. Defaults to never if blank."
840
+ msgstr ""
841
+
842
+ msgid "Days"
843
+ msgstr ""
844
+
845
+ msgid "Months"
846
+ msgstr ""
847
+
848
+ msgid "Indicates the period of time."
849
+ msgstr ""
850
+
851
+ msgid "The amount to charge the payer each period. Should be informed including taxes and discounts."
852
+ msgstr ""
853
+
854
+ msgid "Amount charged"
855
+ msgstr ""
856
+
857
+ msgid "Uruguay"
858
+ msgstr ""
859
+
860
+ msgid "Frequency type"
861
+ msgstr ""
862
+
863
+ msgid "Transaction amount"
864
+ msgstr ""
865
+
866
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
867
+ msgstr ""
868
+
869
+ msgid "Subscription"
870
+ msgstr ""
871
+
872
+ msgid "Enable Subscription"
873
+ msgstr ""
874
+
875
+ msgid "Subscription is Inactive"
876
+ msgstr ""
877
+
878
+ msgid "Subscribe with Mercado Pago"
879
+ msgstr ""
880
+
881
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
882
+ msgstr ""
883
+
884
+ msgid "Discount by Gateway"
885
+ msgstr ""
886
+
887
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
888
+ msgstr ""
889
+
890
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
891
+ msgstr ""
892
+
893
+ msgid "Discount Of"
894
+ msgstr ""
895
+
896
+ msgid "Mercado Pago Subscription"
897
+ msgstr ""
898
+
899
+ msgid "Payment ID:"
900
+ msgstr ""
901
+
902
+ msgid "Amount:"
903
+ msgstr ""
904
+
905
+ msgid "This operation could not be completed."
906
+ msgstr ""
907
+
908
+ msgid "Operation successfully completed."
909
+ msgstr ""
910
+
911
+ msgid "Refund Payment"
912
+ msgstr ""
913
+
914
+ msgid "Cancel Payment"
915
+ msgstr ""
916
+
917
+ msgid "Mercado Pago - Subscription"
918
+ msgstr ""
919
+
920
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
921
+ msgstr ""
922
+
923
+ msgid "Free Shipping"
924
+ msgstr ""
925
+
926
+ msgid "Day"
927
+ msgstr ""
928
+
929
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
930
+ msgstr ""
931
+
932
+ msgid "Mercado Envios"
933
+ msgstr ""
934
+
935
+ msgid "This controls the title which the user sees during checkout."
936
+ msgstr ""
937
+
938
+ msgid "Enable free shipping for this shipping method"
939
+ msgstr ""
940
+
941
+ msgid "Delivery Time"
942
+ msgstr ""
943
+
944
+ msgid "Show estimated delivery time"
945
+ msgstr ""
946
+
947
+ msgid "Display the estimated delivery time in working days."
948
+ msgstr ""
949
+
950
+ msgid "Buyer initiates complaint and requested a refund."
951
+ msgstr ""
952
+
953
+ msgid "In return to sender"
954
+ msgstr ""
955
+
956
+ msgid "Missing recipient for delivery"
957
+ msgstr ""
958
+
959
+ msgid "Sending the delayed path"
960
+ msgstr ""
961
+
962
+ msgid "Unsuccessful"
963
+ msgstr ""
964
+
965
+ msgid "Tag printed"
966
+ msgstr ""
967
+
968
+ msgid "Tag ready to print"
969
+ msgstr ""
970
+
971
+ msgid "Tracking code:"
972
+ msgstr ""
973
+
974
+ msgid "Ticket:"
975
+ msgstr ""
976
+
977
+ msgid "Shipping is pending"
978
+ msgstr ""
979
+
980
+ msgid "Tutorial"
981
+ msgstr ""
982
+
983
+ msgid "Discount Of "
984
+ msgstr ""
985
+
986
+ msgid "Make this product a subscription."
987
+ msgstr ""
988
+
989
+ msgid "Order"
990
+ msgstr ""
991
+
992
+ msgid "Mercado Envios Tracking ID"
993
+ msgstr ""
994
+
995
+ msgid "Hello,"
996
+ msgstr ""
997
+
998
+ msgid "Your order"
999
+ msgstr ""
1000
+
1001
+ msgid "made in"
1002
+ msgstr ""
1003
+
1004
+ msgid "used Mercado Envios as its shipment method."
1005
+ msgstr ""
1006
+
1007
+ msgid "You can track it with the following Tracking ID:"
1008
+ msgstr ""
1009
+
1010
+ msgid "Best regards."
1011
+ msgstr ""
1012
+
1013
+ msgid "SELECT..."
1014
+ msgstr ""
1015
+
1016
+ msgid "NAME"
1017
+ msgstr ""
1018
+
1019
+ msgid "SURNAME"
1020
+ msgstr ""
1021
+
1022
+ msgid "DOCUMENT"
1023
+ msgstr ""
1024
+
1025
+ msgid "ADDRESS"
1026
+ msgstr ""
1027
+
1028
+ msgid "NUMBER"
1029
+ msgstr ""
1030
+
1031
+ msgid "CITY"
1032
+ msgstr ""
1033
+
1034
+ msgid "STATE"
1035
+ msgstr ""
1036
+
1037
+ msgid "ZIP"
1038
+ msgstr ""
1039
+
1040
+ msgid "You must inform you NAME"
1041
+ msgstr ""
1042
+
1043
+ msgid "You must inform your SURNAME"
1044
+ msgstr ""
1045
+
1046
+ msgid "You must inform your DOCUMENT"
1047
+ msgstr ""
1048
+
1049
+ msgid "You must inform your ADDRESS"
1050
+ msgstr ""
1051
+
1052
+ msgid "You must inform your ADDRESS NUMBER"
1053
+ msgstr ""
1054
+
1055
+ msgid "You must inform your CITY"
1056
+ msgstr ""
1057
+
1058
+ msgid "You must inform your STATE"
1059
+ msgstr ""
1060
+
1061
+ msgid "You must inform your ZIP"
1062
+ msgstr ""
1063
+
1064
+ msgid "Your PHP version is OK."
1065
+ msgstr ""
1066
+
1067
+ msgid "Your PHP version do not support this module. You have %s, minimal required is %s."
1068
+ msgstr ""
1069
+
1070
+ msgid "cURL is installed."
1071
+ msgstr ""
1072
+
1073
+ msgid "cURL is not installed."
1074
+ msgstr ""
1075
+
1076
+ msgid "SSL is missing in your site."
1077
+ msgstr ""
1078
+
1079
+ msgid "Your site has SSL enabled."
1080
+ msgstr ""
1081
+
1082
+ msgid "Fisical Person"
1083
+ msgstr ""
1084
+
1085
+ msgid "Legal Person"
1086
+ msgstr ""
1087
+
1088
+ msgid "SOCIAL NAME"
1089
+ msgstr ""
1090
+
1091
+ msgid "CNPJ"
1092
  msgstr ""
mercadopago-module.php CHANGED
@@ -1,4 +1,5 @@
1
  <?php
 
2
  /**
3
  * Plugin Name: Woo Mercado Pago Module
4
  * Plugin URI: https://github.com/mercadopago/cart-woocommerce
@@ -6,105 +7,541 @@
6
  * Author: Mercado Pago
7
  * Author URI: https://www.mercadopago.com.br/developers/
8
  * Developer: Marcelo Tomio Hama / marcelo.hama@mercadolivre.com
9
- * Copyright: Copyright(c) MercadoPago [http://www.mercadopago.com]
10
- * Version: 1.0.3
11
- * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
12
  * Text Domain: woocommerce-mercadopago-module
13
  * Domain Path: /languages/
14
  */
15
 
16
- /**
17
- * Implementation references:
18
- * 1. https://docs.woothemes.com/document/payment-gateway-api/
19
- * 2. https://www.mercadopago.com.br/developers/en/api-docs/
20
- */
21
-
22
- // Exit if accessed directly
23
- if (!defined('ABSPATH')) {
24
  exit;
25
  }
26
 
27
- // Check if class is already loaded
28
- if (!class_exists('WC_WooMercadoPago_Module')) :
29
 
30
- /*
31
- * WooCommerce MercadoPago Module main class
32
- */
33
- class WC_WooMercadoPago_Module {
 
 
 
 
 
 
 
 
34
 
35
- // Singleton design pattern
36
- protected static $instance = null;
37
- public static function initMercadoPagoGatewayClass() {
38
- if (null == self::$instance) {
39
- self::$instance = new self;
 
 
40
  }
41
- return self::$instance;
42
- }
43
 
44
- // Class constructor
45
- private function __construct() {
46
- // load plugin text domain
47
- add_action('init', array($this, 'load_plugin_textdomain'));
48
- // verify if WooCommerce is already installed
49
- if (class_exists('WC_Payment_Gateway')) {
50
- include_once 'mercadopago/mercadopago-gateway.php';
51
- add_filter('woocommerce_payment_gateways', array( $this, 'addGateway'));
52
- } else {
53
- add_action('admin_notices', array($this, 'notifyWooCommerceMiss'));
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
54
  }
55
- }
56
-
57
- // As well as defining your class, you need to also tell WooCommerce (WC) that
58
- // it exists. Do this by filtering woocommerce_payment_gateways.
59
- public function addGateway($methods) {
60
- $methods[] = 'WC_WooMercadoPago_Gateway';
61
- return $methods;
62
- }
63
-
64
- // Places a warning error to notify user that WooCommerce is missing
65
- public function notifyWooCommerceMiss() {
66
- echo
67
- '<div class="error"><p>' .
68
- sprintf(
69
- __('Woo Mercado Pago Module depends on the last version of %s to execute!', 'woocommerce-mercadopago-module'),
70
- '<a href="http://wordpress.org/extend/plugins/woocommerce/">' . 'WooCommerce' . '</a>'
71
- ) .
72
- '</p></div>';
73
- }
74
-
75
- // IPN compatibility with version prior to 2.1
76
- public static function woocommerceInstance() {
77
- if (function_exists('WC')) {
78
- return WC();
79
- } else {
80
- global $woocommerce;
81
- return $woocommerce;
82
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
83
  }
84
-
85
- // Multi-language plugin
86
- public function load_plugin_textdomain() {
87
- $locale = apply_filters('plugin_locale', get_locale(), 'woocommerce-mercadopago-module');
88
- load_textdomain('woocommerce-mercadopago-module', trailingslashit(WP_LANG_DIR ) . 'woocommerce-mercadopago-module/woocommerce-mercadopago-module-' . $locale . '.mo');
89
- load_plugin_textdomain('woocommerce-mercadopago-module', false, dirname(plugin_basename(__FILE__)) . '/languages/');
90
- }
91
-
92
- }
93
-
94
- // Payment gateways should be created as additional plugins that hook into WooCommerce.
95
- // Inside the plugin, you need to create a class after plugins are loaded
96
- add_action('plugins_loaded', array('WC_WooMercadoPago_Module', 'initMercadoPagoGatewayClass'), 0);
97
-
98
- // Support to previous IPN implementations
99
- function wcmercadopago_legacy_ipn() {
100
- if (isset($_GET['topic']) && !isset($_GET['wc-api'])) {
101
- $woocommerce = WC_WooMercadoPago_Module::woocommerceInstance();
102
- $woocommerce->payment_gateways();
103
- do_action('woocommerce_api_wc_woomercadopago_gateway');
104
  }
105
- }
106
- add_action('init', 'wcmercadopago_legacy_ipn');
107
 
108
- endif;
 
 
 
 
 
109
 
110
- ?>
1
  <?php
2
+
3
  /**
4
  * Plugin Name: Woo Mercado Pago Module
5
  * Plugin URI: https://github.com/mercadopago/cart-woocommerce
7
  * Author: Mercado Pago
8
  * Author URI: https://www.mercadopago.com.br/developers/
9
  * Developer: Marcelo Tomio Hama / marcelo.hama@mercadolivre.com
10
+ * Copyright: Copyright(c) MercadoPago [https://www.mercadopago.com]
11
+ * Version: 2.2.18
12
+ * License: https://www.gnu.org/licenses/gpl.html GPL version 2 or higher
13
  * Text Domain: woocommerce-mercadopago-module
14
  * Domain Path: /languages/
15
  */
16
 
17
+ // Exit if accessed directly.
18
+ if ( ! defined( 'ABSPATH' ) ) {
 
 
 
 
 
 
19
  exit;
20
  }
21
 
22
+ require_once dirname( __FILE__ ) . '/mercadopago/sdk/lib/mercadopago.php';
 
23
 
24
+ // Load module class if it wasn't loaded yet.
25
+ if ( ! class_exists( 'WC_WooMercadoPago_Module' ) ) :
26
+
27
+ /**
28
+ * Summary: WooCommerce MercadoPago Module main class.
29
+ * Description: Used as a kind of manager to enable/disable each Mercado Pago gateway.
30
+ * @since 1.0.0
31
+ */
32
+ class WC_WooMercadoPago_Module {
33
+
34
+ const VERSION = '2.2.18';
35
+ const MIN_PHP = 5.6;
36
 
37
+ // Singleton design pattern
38
+ protected static $instance = null;
39
+ public static function init_mercado_pago_gateway_class() {
40
+ if ( null == self::$instance ) {
41
+ self::$instance = new self;
42
+ }
43
+ return self::$instance;
44
  }
 
 
45
 
46
+ // Class constructor.
47
+ private function __construct() {
48
+
49
+ add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
50
+
51
+ // Verify if WooCommerce is already installed.
52
+ if ( class_exists( 'WC_Payment_Gateway' ) ) {
53
+
54
+ // Gateways
55
+ include_once dirname( __FILE__ ) . '/mercadopago/mercadopago-gateway.php';
56
+ include_once dirname( __FILE__ ) . '/mercadopago/mercadopago-custom-gateway.php';
57
+ include_once dirname( __FILE__ ) . '/mercadopago/mercadopago-ticket-gateway.php';
58
+ include_once dirname( __FILE__ ) . '/mercadopago/mercadopago-subscription-gateway.php';
59
+
60
+ include_once dirname( __FILE__ ) . '/mercadopago/class-wc-product-mp_recurrent.php';
61
+
62
+ // Shipping.
63
+ include_once dirname( __FILE__ ) . '/shipment/abstract-wc-mercadoenvios-shipping.php';
64
+ include_once dirname( __FILE__ ) . '/shipment/class-wc-mercadoenvios-shipping-normal.php';
65
+ include_once dirname( __FILE__ ) . '/shipment/class-wc-mercadoenvios-shipping-express.php';
66
+ include_once dirname( __FILE__ ) . '/shipment/class-wc-mercadoenvios-package.php';
67
+
68
+ add_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateway' ) );
69
+ add_filter(
70
+ 'plugin_action_links_' . plugin_basename( __FILE__ ),
71
+ array( $this, 'woomercadopago_settings_link' ) );
72
+
73
+ add_filter( 'woocommerce_shipping_methods', array( $this, 'add_shipping' ) );
74
+ add_filter(
75
+ 'woocommerce_available_payment_gateways',
76
+ array( $this, 'filter_payment_method_by_shipping' )
77
+ );
78
+
79
+ } else {
80
+ add_action( 'admin_notices', array( $this, 'notify_woocommerce_miss' ) );
81
+ }
82
+
83
+ if ( is_admin() ) {
84
+ $this->admin_includes();
85
+ }
86
+
87
  }
88
+
89
+ /**
90
+ * Admin includes.
91
+ */
92
+ private function admin_includes() {
93
+ include_once dirname( __FILE__ ) . '/admin/class-wc-mercadoenvios-admin-orders.php';
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
94
  }
95
+
96
+ // As well as defining your class, you need to also tell WooCommerce (WC) that
97
+ // it exists. Do this by filtering woocommerce_payment_gateways.
98
+ public function add_gateway( $methods ) {
99
+ $methods[] = 'WC_WooMercadoPago_Gateway';
100
+ $methods[] = 'WC_WooMercadoPagoCustom_Gateway';
101
+ $methods[] = 'WC_WooMercadoPagoTicket_Gateway';
102
+ $methods[] = 'WC_WooMercadoPagoSubscription_Gateway';
103
+ return $methods;
104
+ }
105
+
106
+ // woocommerce_shipping_methods
107
+ public function add_shipping( $methods ) {
108
+ $methods['mercadoenvios-normal'] = 'WC_MercadoEnvios_Shipping_Normal';
109
+ $methods['mercadoenvios-express'] = 'WC_MercadoEnvios_Shipping_Express';
110
+ return $methods;
111
+ }
112
+
113
+ // When selected Mercado Envios the payment can be made only with Mercado Pago Basic (Standard)
114
+ public function filter_payment_method_by_shipping( $methods ) {
115
+
116
+ $session = WC()->session;
117
+ if ( ! isset( $session ) ) {
118
+ return $methods;
119
+ }
120
+
121
+ $chosen_methods = $session->get( 'chosen_shipping_methods' );
122
+ $chosen_shipping = $chosen_methods[0];
123
+
124
+ // Check shipping methods is a Mercado Envios.
125
+ if ( strpos( $chosen_shipping, 'mercadoenvios-normal' ) !== false || strpos( $chosen_shipping, 'mercadoenvios-express' ) !== false ) {
126
+ $new_array = array();
127
+ foreach ( $methods as $payment_method => $payment_method_object ) {
128
+ if ( $payment_method == 'woocommerce-mercadopago-module' ) {
129
+ $new_array['woocommerce-mercadopago-module'] = $payment_method_object;
130
+ }
131
+ }
132
+ // Return new array shipping methods (only Mercado Pago Basic).
133
+ return $new_array;
134
+ }
135
+
136
+ // Return all shipping methods.
137
+ return $methods;
138
+ }
139
+
140
+ /**
141
+ * Summary: Places a warning error to notify user that WooCommerce is missing.
142
+ * Description: Places a warning error to notify user that WooCommerce is missing.
143
+ */
144
+ public function notify_woocommerce_miss() {
145
+ echo
146
+ '<div class="error"><p>' .
147
+ sprintf(
148
+ __( 'Woo Mercado Pago Module depends on the last version of %s to execute!', 'woocommerce-mercadopago-module' ),
149
+ '<a href="https://wordpress.org/extend/plugins/woocommerce/">WooCommerce</a>'
150
+ ) .
151
+ '</p></div>';
152
+ }
153
+
154
+ // Multi-language plugin.
155
+ public function load_plugin_textdomain() {
156
+ $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce-mercadopago-module' );
157
+ $module_root = 'woocommerce-mercadopago-module/woocommerce-mercadopago-module-';
158
+ load_textdomain(
159
+ 'woocommerce-mercadopago-module',
160
+ trailingslashit( WP_LANG_DIR ) . $module_root . $locale . '.mo'
161
+ );
162
+ load_plugin_textdomain(
163
+ 'woocommerce-mercadopago-module',
164
+ false,
165
+ dirname( plugin_basename( __FILE__ ) ) . '/languages/'
166
+ );
167
+ }
168
+
169
+ // Add settings link on plugin page
170
+ public function woomercadopago_settings_link( $links ) {
171
+ $plugin_links = array();
172
+ $plugin_links[] = '<a href="' . esc_url( admin_url(
173
+ 'admin.php?page=wc-settings&tab=checkout&section=WC_WooMercadoPago_Gateway' ) ) .
174
+ '">' . __( 'Basic Checkout', 'woocommerce-mercadopago-module' ) . '</a>';
175
+ $plugin_links[] = '<a href="' . esc_url( admin_url(
176
+ 'admin.php?page=wc-settings&tab=checkout&section=WC_WooMercadoPagoCustom_Gateway' ) ) .
177
+ '">' . __( 'Custom Checkout', 'woocommerce-mercadopago-module' ) . '</a>';
178
+ $plugin_links[] = '<a href="' . esc_url( admin_url(
179
+ 'admin.php?page=wc-settings&tab=checkout&section=WC_WooMercadoPagoTicket_Gateway' ) ) .
180
+ '">' . __( 'Ticket', 'woocommerce-mercadopago-module' ) . '</a>';
181
+ $plugin_links[] = '<a href="' . esc_url( admin_url(
182
+ 'admin.php?page=wc-settings&tab=checkout&section=WC_WooMercadoPagoSubscription_Gateway' ) ) .
183
+ '">' . __( 'Subscription', 'woocommerce-mercadopago-module' ) . '</a>';
184
+ $plugin_links[] = '<br><a target="_blank" href="' .
185
+ 'https://github.com/mercadopago/cart-woocommerce#installation' .
186
+ '">' . __( 'Tutorial', 'woocommerce-mercadopago-module' ) . '</a>';
187
+ $plugin_links[] = '<a target="_blank" href="' .
188
+ 'https://wordpress.org/support/view/plugin-reviews/woo-mercado-pago-module?filter=5#postform' .
189
+ '">' . sprintf(
190
+ __( 'Rate Us', 'woocommerce-mercadopago-module' ) . ' %s',
191
+ '&#9733;&#9733;&#9733;&#9733;&#9733;'
192
+ ) . '</a>';
193
+ $plugin_links[] = '<a target="_blank" href="' .
194
+ 'https://wordpress.org/support/plugin/woo-mercado-pago-module#postform' .
195
+ '">' . __( 'Report Issue', 'woocommerce-mercadopago-module' ) . '</a>';
196
+ return array_merge($plugin_links, $links);
197
+ }
198
+
199
+ /**
200
+ * Summary: Get store categories from Mercado Pago.
201
+ * Description: Trigger API to get available categories and proper description.
202
+ * @return an array with found categories and a description for its selector title.
203
+ */
204
+ public static function get_categories() {
205
+
206
+ $store_categories_id = array();
207
+ $store_categories_description = array();
208
+
209
+ // Get Mercado Pago store categories.
210
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
211
+ MPRestClient::set_email( $email );
212
+ $categories = MPRestClient::get(
213
+ array( 'uri' => '/item_categories' ),
214
+ WC_WooMercadoPago_Module::get_module_version()
215
+ );
216
+ foreach ( $categories['response'] as $category ) {
217
+ array_push(
218
+ $store_categories_id, str_replace( '_', ' ', $category['id'] )
219
+ );
220
+ array_push(
221
+ $store_categories_description, str_replace( '_', ' ', $category['description'] )
222
+ );
223
+ }
224
+
225
+ return array(
226
+ 'store_categories_id' => $store_categories_id,
227
+ 'store_categories_description' => $store_categories_description
228
+ );
229
+
230
+ }
231
+
232
+ /**
233
+ * Summary: Get the rate of conversion between two currencies.
234
+ * Description: The currencies are the one used in WooCommerce and the one used in $site_id.
235
+ * @return a float that is the rate of conversion.
236
+ */
237
+ public static function get_conversion_rate( $used_currency ) {
238
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
239
+ MPRestClient::set_email( $email );
240
+ $currency_obj = MPRestClient::get(
241
+ array( 'uri' => '/currency_conversions/search?' .
242
+ 'from=' . get_woocommerce_currency() .
243
+ '&to=' . $used_currency
244
+ ),
245
+ WC_WooMercadoPago_Module::get_module_version()
246
+ );
247
+ if ( isset( $currency_obj['response'] ) ) {
248
+ $currency_obj = $currency_obj['response'];
249
+ if ( isset( $currency_obj['ratio'] ) ) {
250
+ return ( (float) $currency_obj['ratio'] );
251
+ }
252
+ }
253
+ return -1;
254
+ }
255
+
256
+ // Get WooCommerce instance
257
+ public static function woocommerce_instance() {
258
+ if ( function_exists( 'WC' ) ) {
259
+ return WC();
260
+ } else {
261
+ global $woocommerce;
262
+ return $woocommerce;
263
+ }
264
+ }
265
+
266
+ /**
267
+ * Summary: Find template's folder.
268
+ * Description: Find template's folder.
269
+ * @return a string that identifies the path.
270
+ */
271
+ public static function get_templates_path() {
272
+ return plugin_dir_path( __FILE__ ) . 'templates/';
273
+ }
274
+
275
+ /**
276
+ * Summary: Get module's version.
277
+ * Description: Get module's version.
278
+ * @return a string with the given version.
279
+ */
280
+ public static function get_module_version() {
281
+ return WC_WooMercadoPago_Module::VERSION;
282
+ }
283
+
284
+ /**
285
+ * Summary: Get client id from access token.
286
+ * Description: Get client id from access token.
287
+ * @return the client id.
288
+ */
289
+ public static function get_client_id( $at ) {
290
+ $t = explode ( '-', $at );
291
+ if ( count( $t ) > 0 ) {
292
+ return $t[1];
293
+ }
294
+ return '';
295
+ }
296
+
297
+ /**
298
+ * Summary: Builds up the array for the mp_install table, with info related with checkout.
299
+ * Description: Builds up the array for the mp_install table, with info related with checkout.
300
+ * @return an array with the module informations.
301
+ */
302
+ public static function get_common_settings() {
303
+
304
+ $w = WC_WooMercadoPago_Module::woocommerce_instance();
305
+
306
+ $infra_data = array(
307
+ 'module_version' => WC_WooMercadoPago_Module::VERSION,
308
+ 'platform' => 'WooCommerce',
309
+ 'platform_version' => $w->version,
310
+ 'code_version' => phpversion(),
311
+ 'so_server' => PHP_OS
312
+ );
313
+
314
+ return $infra_data;
315
+
316
+ }
317
+
318
+ /**
319
+ * Summary: Get preference data for a specific country.
320
+ * Description: Get preference data for a specific country.
321
+ * @return an array with sponsor id, country name, banner image for checkout, and currency.
322
+ */
323
+ public static function get_country_config( $site_id ) {
324
+ switch ( $site_id ) {
325
+ case 'MLA':
326
+ return array(
327
+ 'sponsor_id' => 208682286,
328
+ 'country_name' => __( 'Argentine', 'woocommerce-mercadopago-module' ),
329
+ 'checkout_banner' => plugins_url(
330
+ 'images/MLA/standard_mla.jpg',
331
+ __FILE__
332
+ ),
333
+ 'checkout_banner_custom' => plugins_url(
334
+ 'images/MLA/credit_card.png',
335
+ __FILE__
336
+ ),
337
+ 'currency' => 'ARS'
338
+ );
339
+ case 'MLB':
340
+ return array(
341
+ 'sponsor_id' => 208686191,
342
+ 'country_name' => __( 'Brazil', 'woocommerce-mercadopago-module' ),
343
+ 'checkout_banner' => plugins_url(
344
+ 'images/MLB/standard_mlb.jpg',
345
+ __FILE__
346
+ ),
347
+ 'checkout_banner_custom' => plugins_url(
348
+ 'images/MLB/credit_card.png',
349
+ __FILE__
350
+ ),
351
+ 'currency' => 'BRL'
352
+ );
353
+ case 'MCO':
354
+ return array(
355
+ 'sponsor_id' => 208687643,
356
+ 'country_name' => __( 'Colombia', 'woocommerce-mercadopago-module' ),
357
+ 'checkout_banner' => plugins_url(
358
+ 'images/MCO/standard_mco.jpg',
359
+ __FILE__
360
+ ),
361
+ 'checkout_banner_custom' => plugins_url(
362
+ 'images/MCO/credit_card.png',
363
+ __FILE__
364
+ ),
365
+ 'currency' => 'COP'
366
+ );
367
+ case 'MLC':
368
+ return array(
369
+ 'sponsor_id' => 208690789,
370
+ 'country_name' => __( 'Chile', 'woocommerce-mercadopago-module' ),
371
+ 'checkout_banner' => plugins_url(
372
+ 'images/MLC/standard_mlc.gif',
373
+ __FILE__
374
+ ),
375
+ 'checkout_banner_custom' => plugins_url(
376
+ 'images/MLC/credit_card.png',
377
+ __FILE__
378
+ ),
379
+ 'currency' => 'CLP'
380
+ );
381
+ case 'MLM':
382
+ return array(
383
+ 'sponsor_id' => 208692380,
384
+ 'country_name' => __( 'Mexico', 'woocommerce-mercadopago-module' ),
385
+ 'checkout_banner' => plugins_url(
386
+ 'images/MLM/standard_mlm.jpg',
387
+ __FILE__
388
+ ),
389
+ 'checkout_banner_custom' => plugins_url(
390
+ 'images/MLM/credit_card.png',
391
+ __FILE__
392
+ ),
393
+ 'currency' => 'MXN'
394
+ );
395
+ case 'MLV':
396
+ return array(
397
+ 'sponsor_id' => 208692735,
398
+ 'country_name' => __( 'Venezuela', 'woocommerce-mercadopago-module' ),
399
+ 'checkout_banner' => plugins_url(
400
+ 'images/MLV/standard_mlv.jpg',
401
+ __FILE__
402
+ ),
403
+ 'checkout_banner_custom' => plugins_url(
404
+ 'images/MLV/credit_card.png',
405
+ __FILE__
406
+ ),
407
+ 'currency' => 'VEF'
408
+ );
409
+ case 'MPE':
410
+ return array(
411
+ 'sponsor_id' => 216998692,
412
+ 'country_name' => __( 'Peru', 'woocommerce-mercadopago-module' ),
413
+ 'checkout_banner' => plugins_url(
414
+ 'images/MPE/standard_mpe.png',
415
+ __FILE__
416
+ ),
417
+ 'checkout_banner_custom' => plugins_url(
418
+ 'images/MPE/credit_card.png',
419
+ __FILE__
420
+ ),
421
+ 'currency' => 'PEN'
422
+ );
423
+ case 'MLU':
424
+ return array(
425
+ 'sponsor_id' => 243692679,
426
+ 'country_name' => __( 'Uruguay', 'woocommerce-mercadopago-module' ),
427
+ 'checkout_banner' => plugins_url(
428
+ 'images/MLU/standard_mlu.png',
429
+ __FILE__
430
+ ),
431
+ 'checkout_banner_custom' => plugins_url(
432
+ 'images/MLU/credit_card.png',
433
+ __FILE__
434
+ ),
435
+ 'currency' => 'UYU'
436
+ );
437
+ default: // set Argentina as default country
438
+ return array(
439
+ 'sponsor_id' => 208682286,
440
+ 'country_name' => __( 'Argentine', 'woocommerce-mercadopago-module' ),
441
+ 'checkout_banner' => plugins_url(
442
+ 'images/MLA/standard_mla.jpg',
443
+ __FILE__
444
+ ),
445
+ 'checkout_banner_custom' => plugins_url(
446
+ 'images/MLA/credit_card.png',
447
+ __FILE__
448
+ ),
449
+ 'currency' => 'ARS'
450
+ );
451
+ }
452
+ }
453
+
454
+ public static function build_currency_conversion_err_msg( $currency ) {
455
+ return '<img width="12" height="12" src="' .
456
+ plugins_url( 'images/error.png', __FILE__ ) .
457
+ '"> ' .
458
+ __( 'ERROR: It was not possible to convert the unsupported currency', 'woocommerce-mercadopago-module' ) .
459
+ ' ' . get_woocommerce_currency() . ' ' .
460
+ __( 'to', 'woocommerce-mercadopago-module' ) . ' ' . $currency . '. ' .
461
+ __( 'Currency conversions should be made outside this module.', 'woocommerce-mercadopago-module' );
462
+ }
463
+
464
+ public static function build_currency_not_converted_msg( $currency, $country_name ) {
465
+ return '<img width="12" height="12" src="' .
466
+ plugins_url( 'images/warning.png', __FILE__ ) .
467
+ '"> ' .
468
+ __( 'ATTENTION: The currency', 'woocommerce-mercadopago-module' ) .
469
+ ' ' . get_woocommerce_currency() . ' ' .
470
+ __( 'defined in WooCommerce is different from the one used in your credentials country.<br>The currency for transactions in this payment method will be', 'woocommerce-mercadopago-module' ) .
471
+ ' ' . $currency . ' (' . $country_name . '). ' .
472
+ __( 'Currency conversions should be made outside this module.', 'woocommerce-mercadopago-module' );
473
+ }
474
+
475
+ public static function build_currency_converted_msg( $currency, $currency_ratio ) {
476
+ return '<img width="12" height="12" src="' .
477
+ plugins_url( 'images/check.png', __FILE__ ) .
478
+ '"> ' .
479
+ __( 'CURRENCY CONVERTED: The currency conversion ratio from', 'woocommerce-mercadopago-module' ) .
480
+ ' ' . get_woocommerce_currency() . ' ' .
481
+ __( 'to', 'woocommerce-mercadopago-module' ) . ' ' . $currency .
482
+ __( ' is: ', 'woocommerce-mercadopago-module' ) . $currency_ratio . ".";
483
+ }
484
+
485
+ public static function build_valid_credentials_msg( $country_name, $site_id ) {
486
+ return '<img width="12" height="12" src="' .
487
+ plugins_url( 'images/check.png', __FILE__ ) .
488
+ '"> ' .
489
+ __( 'Your credentials are <strong>valid</strong> for', 'woocommerce-mercadopago-module' ) .
490
+ ': ' . $country_name . ' <img width="18.6" height="12" src="' . plugins_url(
491
+ 'images/' . $site_id . '/' . $site_id . '.png', __FILE__
492
+ ) . '"> ';
493
+ }
494
+
495
+ // Check if an order is recurrent.
496
+ public static function is_subscription( $items ) {
497
+ $is_subscription = false;
498
+ if ( sizeof( $items ) == 1 ) {
499
+ foreach ( $items as $cart_item_key => $cart_item ) {
500
+ $is_recurrent = get_post_meta( $cart_item['product_id'], '_mp_recurring_is_recurrent', true );
501
+ if ( $is_recurrent == 'yes' ) {
502
+ $is_subscription = true;
503
+ }
504
+ }
505
+ }
506
+ return $is_subscription;
507
+ }
508
+
509
+ public static function build_invalid_credentials_msg() {
510
+ return '<img width="12" height="12" src="' .
511
+ plugins_url( 'images/error.png', __FILE__ ) .
512
+ '"> ' .
513
+ __( 'Your credentials are <strong>not valid</strong>!', 'woocommerce-mercadopago-module' );
514
+ }
515
+
516
+ // Fix to URL Problem : #038; replaces & and breaks the navigation.
517
+ public static function workaround_ampersand_bug( $link ) {
518
+ return str_replace( '\/', '/', str_replace( '&#038;', '&', $link) );
519
+ }
520
+
521
+ // Converts HTML entities to readable UTF8
522
+ public static function utf8_ansi( $str = '' ) {
523
+ $str = str_replace( '\u', 'u', $str );
524
+ $str = preg_replace( '/u([\da-fA-F]{4})/', '&#x\1;', $str );
525
+ return html_entity_decode( $str );
526
+ }
527
+
528
  }
529
+
530
+ // ==========================================================================================
531
+
532
+ // add our own item to the order actions meta box
533
+ add_action( 'woocommerce_order_actions', 'add_mp_order_meta_box_actions' );
534
+ // define the item in the meta box by adding an item to the $actions array
535
+ function add_mp_order_meta_box_actions( $actions ) {
536
+ $actions['cancel_order'] = __( 'Cancel Order', 'woocommerce-mercadopago-module' );
537
+ return $actions;
 
 
 
 
 
 
 
 
 
 
 
538
  }
 
 
539
 
540
+ // Payment gateways should be created as additional plugins that hook into WooCommerce.
541
+ // Inside the plugin, you need to create a class after plugins are loaded.
542
+ add_action(
543
+ 'plugins_loaded',
544
+ array( 'WC_WooMercadoPago_Module', 'init_mercado_pago_gateway_class' ), 0
545
+ );
546
 
547
+ endif;
mercadopago/class-wc-product-mp_recurrent.php ADDED
@@ -0,0 +1,362 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Part of Woo Mercado Pago Module
5
+ * Author - Mercado Pago
6
+ * Developer - Marcelo Tomio Hama / marcelo.hama@mercadolivre.com
7
+ * Copyright - Copyright(c) MercadoPago [https://www.mercadopago.com]
8
+ * License - https://www.gnu.org/licenses/gpl.html GPL version 2 or higher
9
+ */
10
+
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ exit; // Exit if accessed directly
13
+ }
14
+
15
+ add_action( 'add_meta_boxes', 'add_meta_boxes' );
16
+ function add_meta_boxes() {
17
+ add_meta_box(
18
+ 'woocommerce-mp-order-action-refund',
19
+ __( 'Mercado Pago Subscription', 'woocommerce-mercadopago-module' ),
20
+ 'mp_subscription_order_refund_cancel_box',
21
+ 'shop_order',
22
+ 'side',
23
+ 'default'
24
+ );
25
+ }
26
+
27
+ function mp_subscription_order_refund_cancel_box() {
28
+
29
+ global $post;
30
+ $order = wc_get_order( $post->ID );
31
+ $order_id = trim( str_replace( '#', '', $order->get_order_number() ) );
32
+
33
+ $payments = get_post_meta(
34
+ $order_id,
35
+ '_Mercado_Pago_Sub_Payment_IDs',
36
+ true
37
+ );
38
+
39
+ $options = '';
40
+ if ( ! empty( $payments ) ) {
41
+ $payment_structs = array();
42
+ $payment_ids = explode( ', ', $payments );
43
+ foreach ( $payment_ids as $p_id ) {
44
+ $options .= '<option value="' . $p_id . '">' . $p_id . '</option>';
45
+ }
46
+ }
47
+
48
+ if ( $options == '' ) {
49
+ return;
50
+ }
51
+
52
+ $domain = get_site_url() . '/index.php' . '/woocommerce-mercadopago-module/';
53
+ $domain .= '?wc-api=WC_WooMercadoPagoSubscription_Gateway';
54
+ $subscription_js = '<script type="text/javascript">
55
+ ( function() {
56
+ var MPSubscription = {}
57
+ MPSubscription.callSubscriptionCancel = function () {
58
+ var url = "' . $domain . '";
59
+ url += "&action_mp_payment_id=" + document.getElementById("payment_id").value;
60
+ url += "&action_mp_payment_amount=" + document.getElementById("payment_amount").value;
61
+ url += "&action_mp_payment_action=cancel";
62
+ document.getElementById("sub_pay_cancel_btn").disabled = true;
63
+ MPSubscription.AJAX({
64
+ url: url,
65
+ method : "GET",
66
+ timeout : 5000,
67
+ error: function() {
68
+ document.getElementById("sub_pay_cancel_btn").disabled = false;
69
+ alert("' . __( 'This operation could not be completed.', 'woocommerce-mercadopago-module' ) . '");
70
+ },
71
+ success : function ( status, data ) {
72
+ document.getElementById("sub_pay_cancel_btn").disabled = false;
73
+ var mp_status = data.status;
74
+ var mp_message = data.message;
75
+ if (data.status == 200) {
76
+ alert("' . __( 'Operation successfully completed.', 'woocommerce-mercadopago-module' ) . '");
77
+ } else {
78
+ alert(mp_message);
79
+ }
80
+ }
81
+ });
82
+ }
83
+ MPSubscription.callSubscriptionRefund = function () {
84
+ var url = "' . $domain . '";
85
+ url += "&action_mp_payment_id=" + document.getElementById("payment_id").value;
86
+ url += "&action_mp_payment_amount=" + document.getElementById("payment_amount").value;
87
+ url += "&action_mp_payment_action=refund";
88
+ document.getElementById("sub_pay_refund_btn").disabled = true;
89
+ MPSubscription.AJAX({
90
+ url: url,
91
+ method : "GET",
92
+ timeout : 5000,
93
+ error: function() {
94
+ document.getElementById("sub_pay_refund_btn").disabled = false;
95
+ alert("' . __( 'This operation could not be completed.', 'woocommerce-mercadopago-module' ) . '");
96
+ },
97
+ success : function ( status, data ) {
98
+ document.getElementById("sub_pay_refund_btn").disabled = false;
99
+ var mp_status = data.status;
100
+ var mp_message = data.message;
101
+ if (data.status == 200) {
102
+ alert("' . __( 'Operation successfully completed.', 'woocommerce-mercadopago-module' ) . '");
103
+ } else {
104
+ alert(mp_message);
105
+ }
106
+ }
107
+ });
108
+ }
109
+ MPSubscription.AJAX = function( options ) {
110
+ var useXDomain = !!window.XDomainRequest;
111
+ var req = useXDomain ? new XDomainRequest() : new XMLHttpRequest()
112
+ var data;
113
+ options.url += ( options.url.indexOf( "?" ) >= 0 ? "&" : "?" );
114
+ options.requestedMethod = options.method;
115
+ if ( useXDomain && options.method == "PUT" ) {
116
+ options.method = "POST";
117
+ options.url += "&_method=PUT";
118
+ }
119
+ req.open( options.method, options.url, true );
120
+ req.timeout = options.timeout || 1000;
121
+ if ( window.XDomainRequest ) {
122
+ req.onload = function() {
123
+ data = JSON.parse( req.responseText );
124
+ if ( typeof options.success === "function" ) {
125
+ options.success( options.requestedMethod === "POST" ? 201 : 200, data );
126
+ }
127
+ };
128
+ req.onerror = req.ontimeout = function() {
129
+ if ( typeof options.error === "function" ) {
130
+ options.error( 400, {
131
+ user_agent:window.navigator.userAgent, error : "bad_request", cause:[]
132
+ });
133
+ }
134
+ };
135
+ req.onprogress = function() {};
136
+ } else {
137
+ req.setRequestHeader( "Accept", "application/json" );
138
+ if ( options.contentType ) {
139
+ req.setRequestHeader( "Content-Type", options.contentType );
140
+ } else {
141
+ req.setRequestHeader( "Content-Type", "application/json" );
142
+ }
143
+ req.onreadystatechange = function() {
144
+ if ( this.readyState === 4 ) {
145
+ if ( this.status >= 200 && this.status < 400 ) {
146
+ // Success!
147
+ data = JSON.parse( this.responseText );
148
+ if ( typeof options.success === "function" ) {
149
+ options.success( this.status, data );
150
+ }
151
+ } else if ( this.status >= 400 ) {
152
+ data = JSON.parse( this.responseText );
153
+ if ( typeof options.error === "function" ) {
154
+ options.error( this.status, data );
155
+ }
156
+ } else if ( typeof options.error === "function" ) {
157
+ options.error( 503, {} );
158
+ }
159
+ }
160
+ };
161
+ }
162
+ if ( options.method === "GET" || options.data == null || options.data == undefined ) {
163
+ req.send();
164
+ } else {
165
+ req.send( JSON.stringify( options.data ) );
166
+ }
167
+ }
168
+
169
+ this.MPSubscription = MPSubscription;
170
+
171
+ } ).call();
172
+
173
+ </script>';
174
+
175
+ $subscription_meta_box = '<table>' .
176
+ '<tr class="total">' .
177
+ '<td><label for="payment_id" style="margin-right:1px;">' .
178
+ __( 'Payment ID:', 'woocommerce-mercadopago-module' ) .
179
+ '</label></td>' .
180
+ '<td><select id="payment_id" name="refund_payment_id" style="margin-left:1px;">' .
181
+ $options .
182
+ '</select></td>' .
183
+ '</tr>' .
184
+ '<tr class="total">' .
185
+ '<td><label for="payment_amount" style="margin-right:1px;">' .
186
+ __( 'Amount:', 'woocommerce-mercadopago-module' ) .
187
+ '</label></td>' .
188
+ '<td><input type="number" class="text amount_input" id="payment_amount" value="0" name="payment_amount"' .
189
+ ' placeholder="Decimal" min="0" step="0.01" value="0.00" style="width:117px; margin-left:1px;"' .
190
+ ' ng-pattern="/^[0-9]+(\.[0-9]{1,2})?$/"/>' .
191
+ '</td>' .
192
+ '</tr>' .
193
+ '<tr class="total">' .
194
+ '<td><input onclick="MPSubscription.callSubscriptionRefund();" type="button"' .
195
+ ' id="sub_pay_refund_btn" class="button button-primary" style="margin-left:1px; margin-top:2px;"' .
196
+ ' name="refund" value="' . __( 'Refund Payment', 'woocommerce-mercadopago-module' ) .
197
+ '" style="margin-right:1px;"></td>' .
198
+ '<td><input onclick="MPSubscription.callSubscriptionCancel();" type="button"' .
199
+ ' id="sub_pay_cancel_btn" class="button button-primary" style="margin-right:1px; margin-top:2px;"' .
200
+ ' name="cancel" value="' . __( 'Cancel Payment', 'woocommerce-mercadopago-module' ) .
201
+ '" style="margin-left:1px;"></td>' .
202
+ '</tr>' .
203
+ '</table>';
204
+
205
+ echo $subscription_js . $subscription_meta_box;
206
+
207
+ }
208
+
209
+ // Makes the recurrent product individually sold
210
+ add_filter( 'woocommerce_is_sold_individually', 'default_no_quantities', 10, 2 );
211
+ function default_no_quantities( $individually, $product ) {
212
+ if ( method_exists( $product, 'get_id' ) ) {
213
+ $product_id = $product->get_id();
214
+ } else {
215
+ $product_id = $product->id;
216
+ }
217
+ $is_recurrent = get_post_meta( $product_id, '_mp_recurring_is_recurrent', true );
218
+ if ( $is_recurrent == 'yes' ) {
219
+ $individually = true;
220
+ }
221
+ return $individually;
222
+ }
223
+
224
+ // Prevent selling recurrent products together with other products
225
+ add_action( 'woocommerce_check_cart_items', 'check_recurrent_product_singularity' );
226
+ function check_recurrent_product_singularity() {
227
+ global $woocommerce;
228
+ $w_cart = $woocommerce->cart;
229
+ if ( ! isset( $w_cart ) ) {
230
+ return;
231
+ }
232
+ $items = $w_cart->get_cart();
233
+ if ( sizeof( $items ) > 1 ) {
234
+ foreach ( $items as $cart_item_key => $cart_item ) {
235
+ $is_recurrent = get_post_meta( $cart_item['product_id'], '_mp_recurring_is_recurrent', true );
236
+ if ( $is_recurrent == 'yes' ) {
237
+ wc_add_notice(
238
+ __( 'A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders.', 'woocommerce-mercadopago-module' ),
239
+ 'error'
240
+ );
241
+ }
242
+ }
243
+ }
244
+ }
245
+
246
+ // Validate product date availability.
247
+ add_filter( 'woocommerce_is_purchasable', 'filter_woocommerce_is_purchasable', 10, 2 );
248
+ function filter_woocommerce_is_purchasable( $purchasable, $product ) {
249
+ if ( method_exists( $product, 'get_id' ) ) {
250
+ $product_id = $product->get_id();
251
+ } else {
252
+ $product_id = $product->id;
253
+ }
254
+ // skip this check if product is not a subscription
255
+ $is_recurrent = get_post_meta( $product_id, '_mp_recurring_is_recurrent', true );
256
+ if ( $is_recurrent !== 'yes' ) {
257
+ return $purchasable;
258
+ }
259
+ $today_date = date( 'Y-m-d' );
260
+ $end_date = get_post_meta( $product_id, '_mp_recurring_end_date', true );
261
+ // If there is no date, we should just return the original value.
262
+ if ( ! isset( $end_date ) || empty( $end_date ) ) {
263
+ return $purchasable;
264
+ }
265
+ // If end date had passed, this product is no longer available.
266
+ $days_diff = ( strtotime( $today_date ) - strtotime( $end_date ) ) / 86400;
267
+ if ( $days_diff >= 0 ) {
268
+ return false;
269
+ }
270
+ return $purchasable;
271
+ }
272
+
273
+ // Add the settings under 'general' sub-menu.
274
+ add_action( 'woocommerce_product_options_general_product_data', 'mp_add_recurrent_settings' );
275
+ function mp_add_recurrent_settings() {
276
+
277
+ //global $woocommerce, $post, $thepostid;
278
+ wp_nonce_field( 'woocommerce_save_data', 'woocommerce_meta_nonce' );
279
+ //$thepostid = $post->ID;
280
+
281
+ echo '<div class="options_group show_if_simple">';
282
+
283
+ woocommerce_wp_checkbox(
284
+ array(
285
+ 'id' => '_mp_recurring_is_recurrent',
286
+ 'label' => __( 'Recurrent Product', 'woocommerce-mercadopago-module' ),
287
+ 'description' => __( 'Make this product a subscription.', 'woocommerce-mercadopago-module' )
288
+ )
289
+ );
290
+
291
+ woocommerce_wp_text_input(
292
+ array(
293
+ 'id' => '_mp_recurring_frequency',
294
+ 'label' => __( 'Frequency', 'woocommerce-mercadopago-module' ),
295
+ 'placeholder' => '1',
296
+ 'desc_tip' => 'true',
297
+ 'description' => __( 'Amount of time (in days or months) for the execution of the next payment.', 'woocommerce-mercadopago-module' ),
298
+ 'type' => 'number'
299
+ )
300
+ );
301
+
302
+ woocommerce_wp_select(
303
+ array(
304
+ 'id' => '_mp_recurring_frequency_type',
305
+ 'label' => __( 'Frequency type', 'woocommerce-mercadopago-module' ),
306
+ 'desc_tip' => 'true',
307
+ 'description' => __( 'Indicates the period of time.', 'woocommerce-mercadopago-module' ),
308
+ 'options' => array(
309
+ 'days' => __( 'Days', 'woocommerce-mercadopago-module' ),
310
+ 'months' => __( 'Months', 'woocommerce-mercadopago-module' )
311
+ )
312
+ )
313
+ );
314
+
315
+ woocommerce_wp_text_input(
316
+ array(
317
+ 'id' => '_mp_recurring_end_date',
318
+ 'label' => __( 'End date', 'woocommerce-mercadopago-module' ),
319
+ 'placeholder' => _x( 'YYYY-MM-DD', 'placeholder', 'woocommerce-mercadopago-module' ),
320
+ 'desc_tip' => 'true',
321
+ 'description' => __( 'Deadline to generate new charges. Defaults to never if blank.', 'woocommerce-mercadopago-module' ),
322
+ 'class' => 'date-picker',
323
+ 'custom_attributes' => array( 'pattern' => "[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])" )
324
+ )
325
+ );
326
+
327
+ echo '</div>';
328
+ }
329
+
330
+ // Persists the options saved in product metadata.
331
+ add_action( 'woocommerce_process_product_meta', 'mp_save_recurrent_settings' );
332
+ function mp_save_recurrent_settings( $post_id ) {
333
+
334
+ $_mp_recurring_is_recurrent = $_POST['_mp_recurring_is_recurrent'];
335
+ if ( ! empty( $_mp_recurring_is_recurrent ) ) {
336
+ update_post_meta( $post_id, '_mp_recurring_is_recurrent', esc_attr( $_mp_recurring_is_recurrent ) );
337
+ } else {
338
+ update_post_meta( $post_id, '_mp_recurring_is_recurrent', esc_attr( null ) );
339
+ }
340
+
341
+ $_mp_recurring_frequency = $_POST['_mp_recurring_frequency'];
342
+ if ( ! empty( $_mp_recurring_frequency ) ) {
343
+ update_post_meta( $post_id, '_mp_recurring_frequency', esc_attr( $_mp_recurring_frequency ) );
344
+ } else {
345
+ update_post_meta( $post_id, '_mp_recurring_frequency', esc_attr( 1 ) );
346
+ }
347
+
348
+ $_mp_recurring_frequency_type = $_POST['_mp_recurring_frequency_type'];
349
+ if ( ! empty( $_mp_recurring_frequency_type ) ) {
350
+ update_post_meta( $post_id, '_mp_recurring_frequency_type', esc_attr( $_mp_recurring_frequency_type ) );
351
+ } else {
352
+ update_post_meta( $post_id, '_mp_recurring_frequency_type', esc_attr( 'days' ) );
353
+ }
354
+
355
+ $_mp_recurring_end_date = $_POST['_mp_recurring_end_date'];
356
+ if ( ! empty( $_mp_recurring_end_date ) ) {
357
+ update_post_meta( $post_id, '_mp_recurring_end_date', esc_attr( $_mp_recurring_end_date ) );
358
+ } else {
359
+ update_post_meta( $post_id, '_mp_recurring_end_date', esc_attr( null ) );
360
+ }
361
+
362
+ }
mercadopago/css/woo-mercadopago-module.css DELETED
@@ -1,14 +0,0 @@
1
- .mp-btn, .ch-btn {
2
- background-color: #009ee3;
3
- border: 1px solid #009ee3;
4
- border-radius: 4px;
5
- color: #fff;
6
- display: inline-block;
7
- font-family: Arial,sans-serif;
8
- font-size: 18px;
9
- font-weight: normal;
10
- margin: 0;
11
- padding: 10px;
12
- text-align: center;
13
- width: 100%;
14
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
mercadopago/mercadopago-custom-gateway.php ADDED
@@ -0,0 +1,1952 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Part of Woo Mercado Pago Module
5
+ * Author - Mercado Pago
6
+ * Developer - Marcelo Tomio Hama / marcelo.hama@mercadolivre.com
7
+ * Copyright - Copyright(c) MercadoPago [https://www.mercadopago.com]
8
+ * License - https://www.gnu.org/licenses/gpl.html GPL version 2 or higher
9
+ */
10
+
11
+ // This include Mercado Pago library SDK
12
+ require_once dirname( __FILE__ ) . '/sdk/lib/mercadopago.php';
13
+
14
+ /**
15
+ * Summary: Extending from WooCommerce Payment Gateway class.
16
+ * Description: This class implements Mercado Pago custom checkout.
17
+ * @since 2.0.0
18
+ */
19
+ class WC_WooMercadoPagoCustom_Gateway extends WC_Payment_Gateway {
20
+
21
+ public function __construct( $is_instance = false ) {
22
+
23
+ // Creating PHP version message.
24
+ $min_php_message = phpversion() >= WC_WooMercadoPago_Module::MIN_PHP ?
25
+ '<img width="14" height="14" src="' . plugins_url( 'images/check.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
26
+ __( 'Your PHP version is OK.', 'woocommerce-mercadopago-module' ) :
27
+ '<img width="14" height="14" src="' . plugins_url( 'images/error.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
28
+ sprintf(
29
+ __( 'Your PHP version do not support this module. You have %s, minimal required is %s.', 'woocommerce-mercadopago-module' ),
30
+ phpversion(), WC_WooMercadoPago_Module::MIN_PHP
31
+ );
32
+ // Check cURL.
33
+ $curl_message = in_array( 'curl', get_loaded_extensions() ) ?
34
+ '<img width="14" height="14" src="' . plugins_url( 'images/check.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
35
+ __( 'cURL is installed.', 'woocommerce-mercadopago-module' ) :
36
+ '<img width="14" height="14" src="' . plugins_url( 'images/error.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
37
+ __( 'cURL is not installed.', 'woocommerce-mercadopago-module' );
38
+ // Check SSL.
39
+ $is_ssl_message = empty( $_SERVER['HTTPS'] ) || $_SERVER['HTTPS'] == 'off' ?
40
+ '<img width="14" height="14" src="' . plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
41
+ __( 'SSL is missing in your site.', 'woocommerce-mercadopago-module' ) :
42
+ '<img width="14" height="14" src="' . plugins_url( 'images/check.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
43
+ __( 'Your site has SSL enabled.', 'woocommerce-mercadopago-module' );
44
+
45
+ // Mercado Pago fields.
46
+ $this->mp = null;
47
+ $this->site_id = null;
48
+ $this->collector_id = null;
49
+ $this->currency_ratio = -1;
50
+ $this->is_test_user = false;
51
+
52
+ // Auxiliary fields.
53
+ $this->currency_message = '';
54
+ $this->country_configs = array();
55
+ $this->store_categories_id = array();
56
+ $this->store_categories_description = array();
57
+
58
+ // WooCommerce fields.
59
+ $this->supports = array( 'products', 'refunds' );
60
+ $this->id = 'woocommerce-mercadopago-custom-module';
61
+ $this->domain = get_site_url() . '/index.php';
62
+ $this->method_title = __( 'Mercado Pago - Credit Card', 'woocommerce-mercadopago-module' );
63
+ $this->method_description = '<img width="200" height="52" src="' .
64
+ plugins_url(
65
+ 'images/mplogo.png',
66
+ plugin_dir_path( __FILE__ )
67
+ ) . '"><br><br>' . '<strong>' .
68
+ __( 'This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store.', 'woocommerce-mercadopago-module' ) .
69
+ '</strong>' . '<br><br>' .
70
+ $min_php_message . '<br>' .
71
+ $is_ssl_message . '<br>' .
72
+ $curl_message;
73
+
74
+ // Fields used in Mercado Pago Module configuration page.
75
+ $this->public_key = $this->get_option( 'public_key' );
76
+ $this->access_token = $this->get_option( 'access_token' );
77
+ $this->title = $this->get_option( 'title' );
78
+ $this->description = $this->get_option( 'description' );
79
+ $this->statement_descriptor = $this->get_option( 'statement_descriptor' );
80
+ $this->coupon_mode = $this->get_option( 'coupon_mode' );
81
+ $this->binary_mode = $this->get_option( 'binary_mode' );
82
+ $this->category_id = $this->get_option( 'category_id' );
83
+ $this->invoice_prefix = $this->get_option( 'invoice_prefix', 'WC-' );
84
+ $this->currency_conversion = $this->get_option( 'currency_conversion', false );
85
+ $this->gateway_discount = $this->get_option( 'gateway_discount', 0 );
86
+ $this->sandbox = $this->get_option( 'sandbox', false );
87
+ $this->debug = $this->get_option( 'debug', false );
88
+
89
+ // Logging and debug.
90
+ if ( 'yes' == $this->debug) {
91
+ if ( class_exists( 'WC_Logger' ) ) {
92
+ $this->log = new WC_Logger();
93
+ } else {
94
+ $this->log = WC_MercadoPago_Module::woocommerce_instance()->logger();
95
+ }
96
+ }
97
+
98
+ // Render our configuration page and init/load fields.
99
+ $this->init_form_fields();
100
+ $this->init_settings();
101
+
102
+ // Used by IPN to receive IPN incomings.
103
+ add_action(
104
+ 'woocommerce_api_wc_woomercadopagocustom_gateway',
105
+ array( $this, 'process_http_request' )
106
+ );
107
+ // Used by IPN to process valid incomings.
108
+ add_action(
109
+ 'valid_mercadopagocustom_ipn_request',
110
+ array( $this, 'successful_request' )
111
+ );
112
+ // process the cancel order meta box order action
113
+ add_action(
114
+ 'woocommerce_order_action_cancel_order',
115
+ array( $this, 'process_cancel_order_meta_box_actions' )
116
+ );
117
+ // Used in settings page to hook "save settings" action.
118
+ add_action(
119
+ 'woocommerce_update_options_payment_gateways_' . $this->id,
120
+ array( $this, 'process_admin_options' )
121
+ );
122
+ // Scripts for custom checkout.
123
+ add_action(
124
+ 'wp_enqueue_scripts',
125
+ array( $this, 'custom_checkout_scripts' )
126
+ );
127
+ // Apply the discounts.
128
+ add_action(
129
+ 'woocommerce_cart_calculate_fees',
130
+ array( $this, 'add_discount_custom' ), 10
131
+ );
132
+ // Display discount in payment method title.
133
+ add_filter(
134
+ 'woocommerce_gateway_title',
135
+ array( $this, 'get_payment_method_title_custom' ), 10, 2
136
+ );
137
+ // Used in settings page to hook "save settings" action.
138
+ add_action(
139
+ 'woocommerce_update_options_payment_gateways_' . $this->id,
140
+ array( $this, 'custom_process_admin_options' )
141
+ );
142
+
143
+ if ( ! empty( $this->settings['enabled'] ) && $this->settings['enabled'] == 'yes' ) {
144
+ if ( $is_instance ) {
145
+ if ( empty( $this->public_key) || empty( $this->access_token ) ) {
146
+ // Verify if public_key or access_token is empty.
147
+ add_action( 'admin_notices', array( $this, 'credentials_missing_message' ) );
148
+ } else {
149
+ if ( empty( $this->sandbox) && $this->sandbox == 'no' ) {
150
+ // Verify if SSL is supported.
151
+ add_action( 'admin_notices', array( $this, 'check_ssl_absence' ) );
152
+ }
153
+ }
154
+ } else {
155
+ // Scripts for order configuration.
156
+ add_action(
157
+ 'woocommerce_after_checkout_form',
158
+ array( $this, 'add_checkout_script' )
159
+ );
160
+ // Checkout updates.
161
+ add_action(
162
+ 'woocommerce_thankyou',
163
+ array( $this, 'update_checkout_status' )
164
+ );
165
+ }
166
+ }
167
+
168
+ }
169
+
170
+ /**
171
+ * Summary: Initialise Gateway Settings Form Fields.
172
+ * Description: Initialise Gateway settings form fields with a customized page.
173
+ */
174
+ public function init_form_fields() {
175
+
176
+ // If module is disabled, we do not need to load and process the settings page.
177
+ if ( empty( $this->settings['enabled'] ) || 'no' == $this->settings['enabled'] ) {
178
+ $this->form_fields = array(
179
+ 'enabled' => array(
180
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
181
+ 'type' => 'checkbox',
182
+ 'label' => __( 'Enable Custom Checkout', 'woocommerce-mercadopago-module' ),
183
+ 'default' => 'no'
184
+ )
185
+ );
186
+ return;
187
+ }
188
+
189
+ $api_secret_locale = sprintf(
190
+ '<a href="https://www.mercadopago.com/mla/account/credentials?type=custom" target="_blank">%s</a>, ' .
191
+ '<a href="https://www.mercadopago.com/mlb/account/credentials?type=custom" target="_blank">%s</a>, ' .
192
+ '<a href="https://www.mercadopago.com/mlc/account/credentials?type=custom" target="_blank">%s</a>, ' .
193
+ '<a href="https://www.mercadopago.com/mco/account/credentials?type=custom" target="_blank">%s</a>, ' .
194
+ '<a href="https://www.mercadopago.com/mlm/account/credentials?type=custom" target="_blank">%s</a>, ' .
195
+ '<a href="https://www.mercadopago.com/mpe/account/credentials?type=custom" target="_blank">%s</a> %s ' .
196
+ '<a href="https://www.mercadopago.com/mlv/account/credentials?type=custom" target="_blank">%s</a>',
197
+ __( 'Argentine', 'woocommerce-mercadopago-module' ),
198
+ __( 'Brazil', 'woocommerce-mercadopago-module' ),
199
+ __( 'Chile', 'woocommerce-mercadopago-module' ),
200
+ __( 'Colombia', 'woocommerce-mercadopago-module' ),
201
+ __( 'Mexico', 'woocommerce-mercadopago-module' ),
202
+ __( 'Peru', 'woocommerce-mercadopago-module' ),
203
+ __( 'or', 'woocommerce-mercadopago-module' ),
204
+ __( 'Venezuela', 'woocommerce-mercadopago-module' )
205
+ );
206
+
207
+ // Trigger API to get payment methods and site_id, also validates public_key/access_token.
208
+ if ( $this->validate_credentials() ) {
209
+ // checking the currency.
210
+ $this->currency_message = '';
211
+ if ( ! $this->is_supported_currency() && 'yes' == $this->settings['enabled'] ) {
212
+ if ( $this->currency_conversion == 'no' ) {
213
+ $this->currency_ratio = -1;
214
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_not_converted_msg(
215
+ $this->country_configs['currency'],
216
+ $this->country_configs['country_name']
217
+ );
218
+ } elseif ( $this->currency_conversion == 'yes' && $this->currency_ratio != -1 ) {
219
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_converted_msg(
220
+ $this->country_configs['currency'],
221
+ $this->currency_ratio
222
+ );
223
+ } else {
224
+ $this->currency_ratio = -1;
225
+ $this->currency_message .=
226
+ WC_WooMercadoPago_Module::build_currency_conversion_err_msg(
227
+ $this->country_configs['currency']
228
+ );
229
+ }
230
+ } else {
231
+ $this->currency_ratio = -1;
232
+ }
233
+ $this->credentials_message = WC_WooMercadoPago_Module::build_valid_credentials_msg(
234
+ $this->country_configs['country_name'],
235
+ $this->site_id
236
+ );
237
+ } else {
238
+ $this->credentials_message = WC_WooMercadoPago_Module::build_invalid_credentials_msg();
239
+ }
240
+
241
+ // fill categories (can be handled without credentials).
242
+ $categories = WC_WooMercadoPago_Module::get_categories();
243
+ $this->store_categories_id = $categories['store_categories_id'];
244
+ $this->store_categories_description = $categories['store_categories_description'];
245
+
246
+ // Validate discount field.
247
+ if ( ! is_numeric( $this->gateway_discount ) ) {
248
+ $this->gateway_discount_desc = '<img width="12" height="12" src="' .
249
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
250
+ __( 'This field should be an integer greater or equal 0 and smaller than 100.', 'woocommerce-mercadopago-module' );
251
+ } elseif ( $this->gateway_discount < 0 || $this->gateway_discount >= 100 ) {
252
+ $this->gateway_discount_desc = '<img width="12" height="12" src="' .
253
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
254
+ __( 'This field should be an integer greater or equal 0 and smaller than 100.', 'woocommerce-mercadopago-module' );
255
+ } else {
256
+ $this->gateway_discount_desc =
257
+ __( 'Give a percentual discount for your customers if they use this payment gateway.', 'woocommerce-mercadopago-module' );
258
+ }
259
+
260
+ // This array draws each UI (text, selector, checkbox, label, etc).
261
+ $this->form_fields = array(
262
+ 'enabled' => array(
263
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
264
+ 'type' => 'checkbox',
265
+ 'label' => __( 'Enable Custom Checkout', 'woocommerce-mercadopago-module' ),
266
+ 'default' => 'no'
267
+ ),
268
+ 'credentials_title' => array(
269
+ 'title' => __( 'Mercado Pago Credentials', 'woocommerce-mercadopago-module' ),
270
+ 'type' => 'title',
271
+ 'description' => sprintf( '%s', $this->credentials_message ) . '<br>' . sprintf(
272
+ __( 'You can obtain your credentials for', 'woocommerce-mercadopago-module' ) .
273
+ ' %s.', $api_secret_locale
274
+ )
275
+ ),
276
+ 'public_key' => array(
277
+ 'title' => 'Public key',
278
+ 'type' => 'text',
279
+ 'description' =>
280
+ __( 'Insert your Mercado Pago Public key.', 'woocommerce-mercadopago-module' ),
281
+ 'default' => '',
282
+ 'required' => true
283
+ ),
284
+ 'access_token' => array(
285
+ 'title' => 'Access token',
286
+ 'type' => 'text',
287
+ 'description' =>
288
+ __( 'Insert your Mercado Pago Access token.', 'woocommerce-mercadopago-module' ),
289
+ 'default' => '',
290
+ 'required' => true
291
+ ),
292
+ 'ipn_url' => array(
293
+ 'title' =>
294
+ __( 'Instant Payment Notification (IPN) URL', 'woocommerce-mercadopago-module' ),
295
+ 'type' => 'title',
296
+ 'description' => sprintf(
297
+ __( 'Your IPN URL to receive instant payment notifications is', 'woocommerce-mercadopago-module' ) .
298
+ '<br>%s', '<code>' . WC()->api_request_url( 'WC_WooMercadoPagoCustom_Gateway' ) . '</code>.'
299
+ )
300
+ ),
301
+ 'checkout_options_title' => array(
302
+ 'title' => __( 'Checkout Options', 'woocommerce-mercadopago-module' ),
303
+ 'type' => 'title',
304
+ 'description' => ''
305
+ ),
306
+ 'title' => array(
307
+ 'title' => __( 'Title', 'woocommerce-mercadopago-module' ),
308
+ 'type' => 'text',
309
+ 'description' =>
310
+ __( 'Title shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
311
+ 'default' => __( 'Mercado Pago - Credit Card', 'woocommerce-mercadopago-module' )
312
+ ),
313
+ 'description' => array(
314
+ 'title' => __( 'Description', 'woocommerce-mercadopago-module' ),
315
+ 'type' => 'textarea',
316
+ 'description' =>
317
+ __( 'Description shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
318
+ 'default' => __( 'Pay with Mercado Pago', 'woocommerce-mercadopago-module' )
319
+ ),
320
+ 'statement_descriptor' => array(
321
+ 'title' => __( 'Statement Descriptor', 'woocommerce-mercadopago-module' ),
322
+ 'type' => 'text',
323
+ 'description' => __( 'The description that will be shown in your customer\'s invoice.', 'woocommerce-mercadopago-module' ),
324
+ 'default' => __( 'Mercado Pago', 'woocommerce-mercadopago-module' )
325
+ ),
326
+ 'coupon_mode' => array(
327
+ 'title' => __( 'Coupons', 'woocommerce-mercadopago-module' ),
328
+ 'type' => 'checkbox',
329
+ 'label' => __( 'Enable coupons of discounts', 'woocommerce-mercadopago-module' ),
330
+ 'default' => 'no',
331
+ 'description' =>
332
+ __( 'If there is a Mercado Pago campaign, allow your store to give discounts to customers.', 'woocommerce-mercadopago-module' )
333
+ ),
334
+ 'binary_mode' => array(
335
+ 'title' => __( 'Binary Mode', 'woocommerce-mercadopago-module' ),
336
+ 'type' => 'checkbox',
337
+ 'label' => __( 'Enable binary mode for checkout status', 'woocommerce-mercadopago-module' ),
338
+ 'default' => 'no',
339
+ 'description' =>
340
+ __( 'When charging a credit card, only [approved] or [reject] status will be taken.', 'woocommerce-mercadopago-module' )
341
+ ),
342
+ 'category_id' => array(
343
+ 'title' => __( 'Store Category', 'woocommerce-mercadopago-module' ),
344
+ 'type' => 'select',
345
+ 'description' =>
346
+ __( 'Define which type of products your store sells.', 'woocommerce-mercadopago-module' ),
347
+ 'options' => $this->store_categories_id
348
+ ),
349
+ 'invoice_prefix' => array(
350
+ 'title' => __( 'Store Identificator', 'woocommerce-mercadopago-module' ),
351
+ 'type' => 'text',
352
+ 'description' =>
353
+ __( 'Please, inform a prefix to your store.', 'woocommerce-mercadopago-module' )
354
+ . ' ' .
355
+ __( 'If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same identificators.', 'woocommerce-mercadopago-module' ),
356
+ 'default' => 'WC-'
357
+ ),
358
+ 'currency_conversion' => array(
359
+ 'title' => __( 'Currency Conversion', 'woocommerce-mercadopago-module' ),
360
+ 'type' => 'checkbox',
361
+ 'label' =>
362
+ __( 'If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio.', 'woocommerce-mercadopago-module' ),
363
+ 'default' => 'no',
364
+ 'description' => sprintf( '%s', $this->currency_message )
365
+ ),
366
+ 'gateway_discount' => array(
367
+ 'title' => __( 'Discount by Gateway', 'woocommerce-mercadopago-module' ),
368
+ 'type' => 'number',
369
+ 'description' => $this->gateway_discount_desc,
370
+ 'default' => '0'
371
+ ),
372
+ 'testing' => array(
373
+ 'title' => __( 'Test and Debug Options', 'woocommerce-mercadopago-module' ),
374
+ 'type' => 'title',
375
+ 'description' => ''
376
+ ),
377
+ 'sandbox' => array(
378
+ 'title' => __( 'Mercado Pago Sandbox', 'woocommerce-mercadopago-module' ),
379
+ 'type' => 'checkbox',
380
+ 'label' => __( 'Enable Mercado Pago Sandbox', 'woocommerce-mercadopago-module' ),
381
+ 'default' => 'no',
382
+ 'description' =>
383
+ __( 'This option allows you to test payments inside a sandbox environment.', 'woocommerce-mercadopago-module' ),
384
+ ),
385
+ 'debug' => array(
386
+ 'title' => __( 'Debug and Log', 'woocommerce-mercadopago-module' ),
387
+ 'type' => 'checkbox',
388
+ 'label' => __( 'Enable log', 'woocommerce-mercadopago-module' ),
389
+ 'default' => 'no',
390
+ 'description' => sprintf(
391
+ __( 'Register event logs of Mercado Pago, such as API requests, in the file', 'woocommerce-mercadopago-module' ) .
392
+ ' %s.', $this->build_log_path_string() . '.<br>' .
393
+ __( 'File location: ', 'woocommerce-mercadopago-module' ) .
394
+ '<code>wordpress/wp-content/uploads/wc-logs/' . $this->id . '-' .
395
+ sanitize_file_name( wp_hash( $this->id ) ) . '.log</code>' )
396
+ )
397
+ );
398
+
399
+ }
400
+
401
+ /**
402
+ * Processes and saves options.
403
+ * If there is an error thrown, will continue to save and validate fields, but will leave the
404
+ * erroring field out.
405
+ * @return bool was anything saved?
406
+ */
407
+ public function custom_process_admin_options() {
408
+ $this->init_settings();
409
+
410
+ $post_data = $this->get_post_data();
411
+
412
+ foreach ( $this->get_form_fields() as $key => $field ) {
413
+ if ( 'title' !== $this->get_field_type( $field ) ) {
414
+ try {
415
+ $this->settings[$key] = $this->get_field_value( $key, $field, $post_data );
416
+ } catch ( Exception $e ) {
417
+ $this->add_error( $e->getMessage() );
418
+ }
419
+ }
420
+ }
421
+
422
+ if ( ! empty( $this->settings['public_key'] ) && ! empty( $this->settings['access_token'] ) ) {
423
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
424
+ $this->mp = new MP(
425
+ WC_WooMercadoPago_Module::get_module_version(),
426
+ $this->settings['access_token']
427
+ );
428
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
429
+ $this->mp->set_email( $email );
430
+ } else {
431
+ $this->mp = null;
432
+ }
433
+
434
+ // analytics
435
+ if ( $this->mp != null && ! $this->is_test_user ) {
436
+ $infra_data = WC_WooMercadoPago_Module::get_common_settings();
437
+ $infra_data['checkout_custom_credit_card'] = ( $this->settings['enabled'] == 'yes' ? 'true' : 'false' );
438
+ $infra_data['checkout_custom_credit_card_coupon'] = ( $this->settings['coupon_mode'] == 'yes' ? 'true' : 'false' );
439
+ $response = $this->mp->analytics_save_settings( $infra_data );
440
+ if ( 'yes' == $this->debug) {
441
+ $this->log->add(
442
+ $this->id,
443
+ '[custom_process_admin_options] - analytics info response: ' .
444
+ json_encode( $response, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
445
+ );
446
+ }
447
+ }
448
+
449
+ return update_option(
450
+ $this->get_option_key(),
451
+ apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->settings )
452
+ );
453
+ }
454
+
455
+ /**
456
+ * Handles the manual order refunding in server-side.
457
+ */
458
+ public function process_refund( $order_id, $amount = null, $reason = '' ) {
459
+
460
+ $payments = get_post_meta(
461
+ $order_id,
462
+ '_Mercado_Pago_Payment_IDs',
463
+ true
464
+ );
465
+
466
+ // Validate.
467
+ if ( $this->mp == null || empty( $payments ) ) {
468
+ if ( 'yes' == $this->debug ) {
469
+ $this->log->add(
470
+ $this->id,
471
+ '[process_refund] - no payments or credentials invalid'
472
+ );
473
+ }
474
+ return false;
475
+ }
476
+
477
+ $total_available = 0;
478
+ $payment_structs = array();
479
+ $payment_ids = explode( ', ', $payments );
480
+ foreach ( $payment_ids as $p_id ) {
481
+ $p = get_post_meta(
482
+ $order_id,
483
+ 'Mercado Pago - Payment ' . $p_id,
484
+ true
485
+ );
486
+ $p = explode( '/', $p );
487
+ $paid_arr = explode( ' ', substr( $p[2], 1, -1 ) );
488
+ $paid = ( (float) $paid_arr[1] );
489
+ $refund_arr = explode( ' ', substr( $p[3], 1, -1 ) );
490
+ $refund = ( (float) $refund_arr[1] );
491
+ $p_struct = array(
492
+ 'id' => $p_id,
493
+ 'available_to_refund' => $paid - $refund
494
+ );
495
+ $total_available += $paid - $refund;
496
+ $payment_structs[] = $p_struct;
497
+ }
498
+
499
+ if ( 'yes' == $this->debug ) {
500
+ $this->log->add(
501
+ $this->id,
502
+ '[process_refund] - refunding ' . $amount . ' because of ' . $reason . ' and payments ' .
503
+ json_encode( $payment_structs, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
504
+ );
505
+ }
506
+
507
+ // Do not allow refund more than available or invalid amounts.
508
+ if ( $amount > $total_available || $amount <= 0 ) {
509
+ return false;
510
+ }
511
+
512
+ $remaining_to_refund = $amount;
513
+ foreach ( $payment_structs as $to_refund ) {
514
+ if ( $remaining_to_refund <= $to_refund['available_to_refund'] ) {
515
+ // We want to refund an amount that is less than the available for this payment, so we
516
+ // can just refund and return.
517
+ $response = $this->mp->partial_refund_payment(
518
+ $to_refund['id'],
519
+ $remaining_to_refund,
520
+ $reason,
521
+ $this->invoice_prefix . $order_id
522
+ );
523
+ $message = $response['response']['message'];
524
+ $status = $response['status'];
525
+ if ( 'yes' == $this->debug ) {
526
+ $this->log->add(
527
+ $this->id,
528
+ '[process_refund] - refund payment of id ' . $p_id .
529
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
530
+ );
531
+ }
532
+ if ( $status >= 200 && $status < 300 ) {
533
+ return true;
534
+ } else {
535
+ return false;
536
+ }
537
+ } elseif ( $to_refund['available_to_refund'] > 0 ) {
538
+ // We want to refund an amount that exceeds the available for this payment, so we
539
+ // totally refund this payment, and try to complete refund in other/next payments.
540
+ $response = $this->mp->partial_refund_payment(
541
+ $to_refund['id'],
542
+ $to_refund['available_to_refund'],
543
+ $reason,
544
+ $this->invoice_prefix . $order_id
545
+ );
546
+ $message = $response['response']['message'];
547
+ $status = $response['status'];
548
+ if ( 'yes' == $this->debug ) {
549
+ $this->log->add(
550
+ $this->id,
551
+ '[process_refund] - refund payment of id ' . $p_id .
552
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
553
+ );
554
+ }
555
+ if ( $status < 200 || $status >= 300 ) {
556
+ return false;
557
+ }
558
+ $remaining_to_refund -= $to_refund['available_to_refund'];
559
+ }
560
+ if ( $remaining_to_refund == 0 )
561
+ return true;
562
+ }
563
+
564
+ // Reaching here means that there we run out of payments, and there is an amount
565
+ // remaining to be refund, which is impossible as it implies refunding more than
566
+ // available on paid amounts.
567
+ return false;
568
+
569
+ }
570
+
571
+ /**
572
+ * Handles the manual order cancellation in server-side.
573
+ */
574
+ public function process_cancel_order_meta_box_actions( $order ) {
575
+
576
+ // WooCommerce 3.0 or later.
577
+ if ( method_exists( $order, 'get_meta' ) ) {
578
+ $used_gateway = $order->get_meta( '_used_gateway' );
579
+ $payments = $order->get_meta( '_Mercado_Pago_Payment_IDs' );
580
+ } else {
581
+ $used_gateway = get_post_meta( $order->id, '_used_gateway', true );
582
+ $payments = get_post_meta( $order->id, '_Mercado_Pago_Payment_IDs', true );
583
+ }
584
+
585
+ if ( $used_gateway != 'WC_WooMercadoPagoCustom_Gateway' ) {
586
+ return;
587
+ }
588
+
589
+ if ( 'yes' == $this->debug ) {
590
+ $this->log->add(
591
+ $this->id,
592
+ '[process_cancel_order_meta_box_actions] - cancelling payments for ' . $payments
593
+ );
594
+ }
595
+
596
+ if ( $this->mp != null && ! empty( $payments ) ) {
597
+ $payment_ids = explode( ', ', $payments );
598
+ foreach ( $payment_ids as $p_id ) {
599
+ $response = $this->mp->cancel_payment( $p_id );
600
+ $message = $response['response']['message'];
601
+ $status = $response['status'];
602
+ if ( 'yes' == $this->debug ) {
603
+ $this->log->add(
604
+ $this->id,
605
+ '[process_cancel_order_meta_box_actions] - cancel payment of id ' . $p_id .
606
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
607
+ );
608
+ }
609
+ }
610
+ } else {
611
+ if ( 'yes' == $this->debug ) {
612
+ $this->log->add(
613
+ $this->id,
614
+ '[process_cancel_order_meta_box_actions] - no payments or credentials invalid'
615
+ );
616
+ }
617
+ }
618
+
619
+ }
620
+
621
+ /*
622
+ * ========================================================================
623
+ * CHECKOUT BUSINESS RULES (CLIENT SIDE)
624
+ * ========================================================================
625
+ */
626
+
627
+ public function add_checkout_script() {
628
+
629
+ $public_key = $this->get_option( 'public_key' );
630
+
631
+ if ( ! empty( $public_key ) && ! $this->is_test_user ) {
632
+
633
+ $w = WC_WooMercadoPago_Module::woocommerce_instance();
634
+ $logged_user_email = null;
635
+ $payments = array();
636
+ $gateways = WC()->payment_gateways->get_available_payment_gateways();
637
+ foreach ( $gateways as $g ) {
638
+ $payments[] = $g->id;
639
+ }
640
+ $payments = str_replace( '-', '_', implode( ', ', $payments ) );
641
+
642
+ if ( wp_get_current_user()->ID != 0 ) {
643
+ $logged_user_email = wp_get_current_user()->user_email;
644
+ }
645
+
646
+ ?>
647
+ <script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
648
+ <script type="text/javascript">
649
+ var MA = ModuleAnalytics;
650
+ MA.setPublicKey( '<?php echo $public_key; ?>' );
651
+ MA.setPlatform( 'WooCommerce' );
652
+ MA.setPlatformVersion( '<?php echo $w->version; ?>' );
653
+ MA.setModuleVersion( '<?php echo WC_WooMercadoPago_Module::VERSION; ?>' );
654
+ MA.setPayerEmail( '<?php echo ( $logged_user_email != null ? $logged_user_email : "" ); ?>' );
655
+ MA.setUserLogged( <?php echo ( empty( $logged_user_email ) ? 0 : 1 ); ?> );
656
+ MA.setInstalledModules( '<?php echo $payments; ?>' );
657
+ MA.post();
658
+ </script>
659
+ <?php
660
+
661
+ }
662
+
663
+ }
664
+
665
+ public function update_checkout_status( $order_id ) {
666
+
667
+ $public_key = $this->get_option( 'public_key' );
668
+
669
+ if ( ! empty( $public_key ) && ! $this->is_test_user ) {
670
+
671
+ if ( get_post_meta( $order_id, '_used_gateway', true ) != 'WC_WooMercadoPagoCustom_Gateway' ) {
672
+ return;
673
+ }
674
+
675
+ if ( 'yes' == $this->debug ) {
676
+ $this->log->add(
677
+ $this->id,
678
+ '[update_checkout_status] - updating order of ID ' . $order_id
679
+ );
680
+ }
681
+
682
+ echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
683
+ <script type="text/javascript">
684
+ var MA = ModuleAnalytics;
685
+ MA.setPublicKey( "' . $public_key . '" );
686
+ MA.setPaymentType("credit_card");
687
+ MA.setCheckoutType("custom");
688
+ MA.put();
689
+ </script>';
690
+
691
+ }
692
+
693
+ }
694
+
695
+ public function custom_checkout_scripts() {
696
+ if ( is_checkout() && $this->is_available() ) {
697
+ if ( ! get_query_var( 'order-received' ) ) {
698
+ wp_enqueue_style(
699
+ 'woocommerce-mercadopago-style', plugins_url(
700
+ 'assets/css/custom_checkout_mercadopago.css',
701
+ plugin_dir_path( __FILE__ ) ) );
702
+ wp_enqueue_script(
703
+ 'woocommerce-mercadopago-v1',
704
+ 'https://secure.mlstatic.com/sdk/javascript/v1/mercadopago.js' );
705
+ }
706
+ }
707
+ }
708
+
709
+ public function payment_fields() {
710
+ $amount = $this->get_order_total();
711
+
712
+ $parameters = array(
713
+ 'public_key' => $this->public_key,
714
+ 'site_id' => $this->site_id,
715
+ 'images_path' => plugins_url( 'images/', plugin_dir_path( __FILE__ ) ),
716
+ 'banner_path' => $this->country_configs['checkout_banner_custom'],
717
+ 'amount' => $amount *
718
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 ),
719
+ 'coupon_mode' => $this->coupon_mode,
720
+ 'is_currency_conversion' => $this->currency_ratio,
721
+ 'woocommerce_currency' => get_woocommerce_currency(),
722
+ 'account_currency' => $this->country_configs['currency'],
723
+ 'discount_action_url' => $this->domain .
724
+ '/woocommerce-mercadopago-module/?wc-api=WC_WooMercadoPagoCustom_Gateway',
725
+ 'form_labels' => array(
726
+ 'form' => array(
727
+ 'payment_converted' =>
728
+ __( 'Payment converted from', 'woocommerce-mercadopago-module' ),
729
+ 'to' => __( 'to', 'woocommerce-mercadopago-module' ),
730
+ 'coupon_empty' =>
731
+ __( 'Please, inform your coupon code', 'woocommerce-mercadopago-module' ),
732
+ 'apply' => __( 'Apply', 'woocommerce-mercadopago-module' ),
733
+ 'remove' => __( 'Remove', 'woocommerce-mercadopago-module' ),
734
+ 'discount_info1' => __( 'You will save', 'woocommerce-mercadopago-module' ),
735
+ 'discount_info2' => __( 'with discount from', 'woocommerce-mercadopago-module' ),
736
+ 'discount_info3' => __( 'Total of your purchase:', 'woocommerce-mercadopago-module' ),
737
+ 'discount_info4' =>
738
+ __( 'Total of your purchase with discount:', 'woocommerce-mercadopago-module' ),
739
+ 'discount_info5' => __( '*Uppon payment approval', 'woocommerce-mercadopago-module' ),
740
+ 'discount_info6' =>
741
+ __( 'Terms and Conditions of Use', 'woocommerce-mercadopago-module' ),
742
+ 'coupon_of_discounts' => __( 'Discount Coupon', 'woocommerce-mercadopago-module' ),
743
+ 'label_other_bank' => __( 'Other Bank', 'woocommerce-mercadopago-module' ),
744
+ 'label_choose' => __( 'Choose', 'woocommerce-mercadopago-module' ),
745
+ 'your_card' => __( 'Your Card', 'woocommerce-mercadopago-module' ),
746
+ 'other_cards' => __( 'Other Cards', 'woocommerce-mercadopago-module' ),
747
+ 'other_card' => __( 'Other Card', 'woocommerce-mercadopago-module' ),
748
+ 'ended_in' => __( 'ended in', 'woocommerce-mercadopago-module' ),
749
+ 'card_holder_placeholder' =>
750
+ __( ' as it appears in your card ...', 'woocommerce-mercadopago-module' ),
751
+ 'payment_method' => __( 'Payment Method', 'woocommerce-mercadopago-module' ),
752
+ 'credit_card_number' => __( 'Credit card number', 'woocommerce-mercadopago-module' ),
753
+ 'expiration_month' => __( 'Expiration month', 'woocommerce-mercadopago-module' ),
754
+ 'expiration_year' => __( 'Expiration year', 'woocommerce-mercadopago-module' ),
755
+ 'year' => __( 'Year', 'woocommerce-mercadopago-module' ),
756
+ 'month' => __( 'Month', 'woocommerce-mercadopago-module' ),
757
+ 'card_holder_name' => __( 'Card holder name', 'woocommerce-mercadopago-module' ),
758
+ 'security_code' => __( 'Security code', 'woocommerce-mercadopago-module' ),
759
+ 'document_type' => __( 'Document Type', 'woocommerce-mercadopago-module' ),
760
+ 'document_number' => __( 'Document number', 'woocommerce-mercadopago-module' ),
761
+ 'issuer' => __( 'Issuer', 'woocommerce-mercadopago-module' ),
762
+ 'installments' => __( 'Installments', 'woocommerce-mercadopago-module' )
763
+ ),
764
+ 'error' => array(
765
+ // Card number.
766
+ '205' => __( 'Parameter cardNumber can not be null/empty', 'woocommerce-mercadopago-module' ),
767
+ 'E301' => __( 'Invalid Card Number', 'woocommerce-mercadopago-module' ),
768
+ // Expiration date.
769
+ '208' => __( 'Invalid Expiration Date', 'woocommerce-mercadopago-module' ),
770
+ '209' => __( 'Invalid Expiration Date', 'woocommerce-mercadopago-module' ),
771
+ '325' => __( 'Invalid Expiration Date', 'woocommerce-mercadopago-module' ),
772
+ '326' => __( 'Invalid Expiration Date', 'woocommerce-mercadopago-module' ),
773
+ // Card holder name.
774
+ '221' => __( 'Parameter cardholderName can not be null/empty', 'woocommerce-mercadopago-module' ),
775
+ '316' => __( 'Invalid Card Holder Name', 'woocommerce-mercadopago-module' ),
776
+ // Security code.
777
+ '224' => __( 'Parameter securityCode can not be null/empty', 'woocommerce-mercadopago-module' ),
778
+ 'E302' => __( 'Invalid Security Code', 'woocommerce-mercadopago-module' ),
779
+ // Doc type.
780
+ '212' => __( 'Parameter docType can not be null/empty', 'woocommerce-mercadopago-module' ),
781
+ '322' => __( 'Invalid Document Type', 'woocommerce-mercadopago-module' ),
782
+ // Doc number.
783
+ '214' => __( 'Parameter docNumber can not be null/empty', 'woocommerce-mercadopago-module' ),
784
+ '324' => __( 'Invalid Document Number', 'woocommerce-mercadopago-module' ),
785
+ // Doc sub type.
786
+ '213' => __( 'The parameter cardholder.document.subtype can not be null or empty', 'woocommerce-mercadopago-module' ),
787
+ '323' => __( 'Invalid Document Sub Type', 'woocommerce-mercadopago-module' ),
788
+ // Issuer.
789
+ '220' => __( 'Parameter cardIssuerId can not be null/empty', 'woocommerce-mercadopago-module' )
790
+ )
791
+ )
792
+ );
793
+
794
+ // Find logged user.
795
+ $customer_cards = array();
796
+ try {
797
+ $logged_user_email = null;
798
+ $parameters['customerId'] = null;
799
+ $parameters['payer_email'] = null;
800
+ if ( wp_get_current_user()->ID != 0 ) {
801
+ $logged_user_email = wp_get_current_user()->user_email;
802
+ }
803
+ if ( isset( $logged_user_email ) ) {
804
+ $customer = $this->mp->get_or_create_customer( $logged_user_email);
805
+ if ( isset( $logged_user_email ) ) {
806
+ $parameters['payer_email'] = $logged_user_email;
807
+ }
808
+ if ( isset( $customer['id'] ) ) {
809
+ $parameters['customerId'] = $customer['id'];
810
+ }
811
+ if ( isset( $customer['cards'] ) ) {
812
+ $customer_cards = $customer['cards'];
813
+ }
814
+ } else {
815
+ $parameters['coupon_mode'] = 'no';
816
+ }
817
+ } catch ( Exception $e ) {
818
+ $parameters['coupon_mode'] = 'no';
819
+ if ( 'yes' == $this->debug ) {
820
+ $this->log->add(
821
+ $this->id,
822
+ '[process_fields] - there is a problem when retrieving information for cards: ' .
823
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
824
+ );
825
+ }
826
+ }
827
+ $parameters['customer_cards'] = $customer_cards;
828
+
829
+ wc_get_template(
830
+ 'credit-card/payment-form.php',
831
+ $parameters,
832
+ 'woocommerce/mercadopago/',
833
+ WC_WooMercadoPago_Module::get_templates_path()
834
+ );
835
+ }
836
+
837
+ /**
838
+ * Summary: Handle the payment and processing the order.
839
+ * Description: This function is called after we click on [place_order] button, and each field is
840
+ * passed to this function through $_POST variable.
841
+ * @return an array containing the result of the processment and the URL to redirect.
842
+ */
843
+ public function process_payment( $order_id ) {
844
+
845
+ if ( ! isset( $_POST['mercadopago_custom'] ) ) {
846
+ return;
847
+ }
848
+
849
+ $order = wc_get_order( $order_id );
850
+ $custom_checkout = $_POST['mercadopago_custom'];
851
+
852
+ // WooCommerce 3.0 or later.
853
+ if ( method_exists( $order, 'update_meta_data' ) ) {
854
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPagoCustom_Gateway' );
855
+ $order->save();
856
+ } else {
857
+ update_post_meta( $order_id, '_used_gateway', 'WC_WooMercadoPagoCustom_Gateway' );
858
+ }
859
+
860
+ // We have got parameters from checkout page, now its time to charge the card.
861
+ if ( 'yes' == $this->debug ) {
862
+ $this->log->add(
863
+ $this->id,
864
+ '[process_payment] - Received [$_POST] from customer front-end page: ' .
865
+ json_encode( $_POST, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
866
+ );
867
+ }
868
+
869
+ // Mexico country case.
870
+ if ( $custom_checkout['paymentMethodId'] == '' || empty( $custom_checkout['paymentMethodId'] ) ) {
871
+ $custom_checkout['paymentMethodId'] = $custom_checkout['paymentMethodSelector'];
872
+ }
873
+
874
+ if ( isset( $custom_checkout['amount'] ) && ! empty( $custom_checkout['amount'] ) &&
875
+ isset( $custom_checkout['token'] ) && ! empty( $custom_checkout['token'] ) &&
876
+ isset( $custom_checkout['paymentMethodId'] ) && ! empty( $custom_checkout['paymentMethodId'] ) &&
877
+ isset( $custom_checkout['installments'] ) && ! empty( $custom_checkout['installments'] ) &&
878
+ $custom_checkout['installments'] != -1 ) {
879
+
880
+ $response = $this->create_url( $order, $custom_checkout );
881
+
882
+ if ( array_key_exists( 'status', $response ) ) {
883
+ switch ( $response['status'] ) {
884
+ case 'approved':
885
+ WC()->cart->empty_cart();
886
+ wc_add_notice(
887
+ '<p>' .
888
+ __( $this->get_order_status( 'accredited' ), 'woocommerce-mercadopago-module' ) .
889
+ '</p>',
890
+ 'notice'
891
+ );
892
+ $order->add_order_note(
893
+ 'Mercado Pago: ' .
894
+ __( 'Payment approved.', 'woocommerce-mercadopago-module' )
895
+ );
896
+ return array(
897
+ 'result' => 'success',
898
+ 'redirect' => $order->get_checkout_order_received_url()
899
+ );
900
+ break;
901
+ case 'pending':
902
+ // Order approved/pending, we just redirect to the thankyou page.
903
+ return array(
904
+ 'result' => 'success',
905
+ 'redirect' => $order->get_checkout_order_received_url()
906
+ );
907
+ break;
908
+ case 'in_process':
909
+ // For pending, we don't know if the purchase will be made, so we must inform this status.
910
+ WC()->cart->empty_cart();
911
+ wc_add_notice(
912
+ '<p>' .
913
+ __( $this->get_order_status( $response['status_detail'] ), 'woocommerce-mercadopago-module' ) .
914
+ '</p>' .
915
+ '<p><a class="button" href="' .
916
+ esc_url( $order->get_checkout_order_received_url() ) .
917
+ '">' .
918
+ __( 'Check your order resume', 'woocommerce-mercadopago-module' ) .
919
+ '</a></p>',
920
+ 'notice'
921
+ );
922
+ return array(
923
+ 'result' => 'success',
924
+ 'redirect' => $order->get_checkout_payment_url( true )
925
+ );
926
+ break;
927
+ case 'rejected':
928
+ // If rejected is received, the order will not proceed until another payment try,
929
+ // so we must inform this status.
930
+ wc_add_notice(
931
+ '<p>' .
932
+ __( 'Your payment was refused. You can try again.', 'woocommerce-mercadopago-module' ) .
933
+ '<br>' .
934
+ __( $this->get_order_status( $response['status_detail'] ), 'woocommerce-mercadopago-module' ) .
935
+ '</p>' .
936
+ '<p><a class="button" href="' . esc_url( $order->get_checkout_payment_url() ) . '">' .
937
+ __( 'Click to try again', 'woocommerce-mercadopago-module' ) .
938
+ '</a></p>',
939
+ 'error'
940
+ );
941
+ return array(
942
+ 'result' => 'success',
943
+ 'redirect' => $order->get_checkout_payment_url( true )
944
+ );
945
+ break;
946
+ case 'cancelled':
947
+ case 'in_mediation':
948
+ case 'charged-back':
949
+ break;
950
+ default:
951
+ break;
952
+ }
953
+ } else {
954
+ // Process when fields are imcomplete.
955
+ wc_add_notice(
956
+ '<p>' .
957
+ __( 'A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?', 'woocommerce-mercadopago-module' ) . ' MERCADO PAGO: ' . $response .
958
+ '</p>',
959
+ 'error'
960
+ );
961
+ return array(
962
+ 'result' => 'fail',
963
+ 'redirect' => '',
964
+ );
965
+ }
966
+ } else {
967
+ // Process when fields are imcomplete.
968
+ wc_add_notice(
969
+ '<p>' .
970
+ __( 'A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?', 'woocommerce-mercadopago-module' ) .
971
+ '</p>',
972
+ 'error'
973
+ );
974
+ return array(
975
+ 'result' => 'fail',
976
+ 'redirect' => '',
977
+ );
978
+ }
979
+ }
980
+
981
+ /**
982
+ * Summary: Build Mercado Pago preference.
983
+ * Description: Create Mercado Pago preference and get init_point URL based in the order options
984
+ * from the cart.
985
+ * @return the preference object.
986
+ */
987
+ private function build_payment_preference( $order, $custom_checkout ) {
988
+
989
+ // A string to register items (workaround to deal with API problem that shows only first item).
990
+ $list_of_items = array();
991
+ $order_total = 0;
992
+ $discount_amount_of_items = 0;
993
+
994
+ // Here we build the array that contains ordered items, from customer cart.
995
+ $items = array();
996
+ if ( sizeof( $order->get_items() ) > 0 ) {
997
+ foreach ( $order->get_items() as $item ) {
998
+ if ( $item['qty'] ) {
999
+ $product = new WC_product( $item['product_id'] );
1000
+
1001
+ // WooCommerce 3.0 or later.
1002
+ if ( method_exists( $product, 'get_description' ) ) {
1003
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
1004
+ $product->get_name()
1005
+ );
1006
+ $product_content = WC_WooMercadoPago_Module::utf8_ansi(
1007
+ $product->get_description()
1008
+ );
1009
+ } else {
1010
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
1011
+ $product->post->post_title
1012
+ );
1013
+ $product_content = WC_WooMercadoPago_Module::utf8_ansi(
1014
+ $product->post->post_content
1015
+ );
1016
+ }
1017
+
1018
+ // Calculate discount for payment method.
1019
+ $unit_price = floor( ( (float) $item['line_total'] + (float) $item['line_tax'] ) *
1020
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 ) * 100 ) / 100;
1021
+ if ( is_numeric( $this->gateway_discount ) ) {
1022
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
1023
+ $price_percent = $this->gateway_discount / 100;
1024
+ $discount = $unit_price * $price_percent;
1025
+ if ( $discount > 0 ) {
1026
+ $discount_amount_of_items += $discount;
1027
+ }
1028
+ }
1029
+ }
1030
+
1031
+ // Remove decimals if MCO/MLC
1032
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
1033
+ $unit_price = floor( $unit_price );
1034
+ $discount_amount_of_items = floor( $discount_amount_of_items );
1035
+ }
1036
+
1037
+ $order_total += $unit_price;
1038
+
1039
+ array_push( $list_of_items, $product_title . ' x ' . $item['qty'] );
1040
+ array_push( $items, array(
1041
+ 'id' => $item['product_id'],
1042
+ 'title' => ( html_entity_decode( $product_title ) . ' x ' . $item['qty'] ),
1043
+ 'description' => sanitize_file_name( html_entity_decode(
1044
+ // This handles description width limit of Mercado Pago.
1045
+ ( strlen( $product_content ) > 230 ?
1046
+ substr( $product_content, 0, 230 ) . '...' :
1047
+ $product_content )
1048
+ ) ),
1049
+ 'picture_url' => wp_get_attachment_url( $product->get_image_id() ),
1050
+ 'category_id' => $this->store_categories_id[$this->category_id],
1051
+ 'quantity' => 1,
1052
+ 'unit_price' => $unit_price
1053
+ ) );
1054
+ }
1055
+ }
1056
+ }
1057
+
1058
+ // Creates the shipment cost structure.
1059
+ $ship_cost = ( (float) $order->get_total_shipping() + (float) $order->get_shipping_tax() ) *
1060
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 );
1061
+
1062
+ // Remove decimals if MCO/MLC
1063
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
1064
+ $ship_cost = floor( $ship_cost );
1065
+ }
1066
+
1067
+ if ( $ship_cost > 0 ) {
1068
+ $order_total += $ship_cost;
1069
+ $item = array(
1070
+ 'id' => 2147483647,
1071
+ 'title' => sanitize_file_name( $order->get_shipping_to_display() ),
1072
+ 'description' => __( 'Shipping service used by store', 'woocommerce-mercadopago-module' ),
1073
+ 'category_id' => $this->store_categories_id[$this->category_id],
1074
+ 'quantity' => 1,
1075
+ 'unit_price' => floor( $ship_cost * 100 ) / 100
1076
+ );
1077
+ $items[] = $item;
1078
+ }
1079
+
1080
+ // Discounts features.
1081
+ if ( isset( $custom_checkout['discount'] ) && $custom_checkout['discount'] != '' &&
1082
+ $custom_checkout['discount'] > 0 && isset( $custom_checkout['coupon_code'] ) &&
1083
+ $custom_checkout['coupon_code'] != '' &&
1084
+ WC()->session->chosen_payment_method == 'woocommerce-mercadopago-custom-module' ) {
1085
+
1086
+ // Remove decimals if MCO/MLC
1087
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
1088
+ $custom_checkout['discount'] = floor( $custom_checkout['discount'] );
1089
+ }
1090
+
1091
+ $item = array(
1092
+ 'id' => 2147483646,
1093
+ 'title' => __( 'Discount', 'woocommerce-mercadopago-module' ),
1094
+ 'description' => __( 'Discount provided by store', 'woocommerce-mercadopago-module' ),
1095
+ 'quantity' => 1,
1096
+ 'category_id' => $this->store_categories_id[$this->category_id],
1097
+ 'unit_price' => -( (float) $custom_checkout['discount'] )
1098
+ );
1099
+ $items[] = $item;
1100
+ }
1101
+
1102
+ // Build additional information from the customer data.
1103
+ if ( method_exists( $order, 'get_id' ) ) {
1104
+ // Build additional information from the customer data.
1105
+ $payer_additional_info = array(
1106
+ 'first_name' => html_entity_decode( $order->get_billing_first_name() ),
1107
+ 'last_name' => html_entity_decode( $order->get_billing_last_name() ),
1108
+ //'registration_date' =>
1109
+ 'phone' => array(
1110
+ //'area_code' =>
1111
+ 'number' => $order->get_billing_phone(),
1112
+ ),
1113
+ 'address' => array(
1114
+ 'zip_code' => $order->get_billing_postcode(),
1115
+ //'street_number' =>
1116
+ 'street_name' => html_entity_decode(
1117
+ $order->get_billing_address_1() . ' / ' .
1118
+ $order->get_billing_city() . ' ' .
1119
+ $order->get_billing_state() . ' ' .
1120
+ $order->get_billing_country()
1121
+ )
1122
+ )
1123
+ );
1124
+ // Create the shipment address information set.
1125
+ $shipments = array(
1126
+ 'receiver_address' => array(
1127
+ 'zip_code' => $order->get_shipping_postcode(),
1128
+ //'street_number' =>
1129
+ 'street_name' => html_entity_decode(
1130
+ $order->get_shipping_address_1() . ' ' .
1131
+ $order->get_shipping_address_2() . ' ' .
1132
+ $order->get_shipping_city() . ' ' .
1133
+ $order->get_shipping_state() . ' ' .
1134
+ $order->get_shipping_country()
1135
+ ),
1136
+ //'floor' =>
1137
+ 'apartment' => $order->get_shipping_address_2()
1138
+ )
1139
+ );
1140
+ // The payment preference.
1141
+ $preferences = array(
1142
+ 'transaction_amount' => floor( ( (float) ( $order_total - $discount_amount_of_items ) ) * 100 ) / 100,
1143
+ 'token' => $custom_checkout['token'],
1144
+ 'description' => implode( ', ', $list_of_items ),
1145
+ 'installments' => (int) $custom_checkout['installments'],
1146
+ 'payment_method_id' => $custom_checkout['paymentMethodId'],
1147
+ 'payer' => array(
1148
+ 'email' => $order->get_billing_email()
1149
+ ),
1150
+ 'external_reference' => $this->invoice_prefix . $order->get_id(),
1151
+ 'statement_descriptor' => $this->statement_descriptor,
1152
+ 'binary_mode' => ( $this->binary_mode == 'yes' ),
1153
+ 'additional_info' => array(
1154
+ 'items' => $items,
1155
+ 'payer' => $payer_additional_info,
1156
+ 'shipments' => $shipments
1157
+ )
1158
+ );
1159
+ } else {
1160
+ // Build additional information from the customer data.
1161
+ $payer_additional_info = array(
1162
+ 'first_name' => html_entity_decode( $order->billing_first_name ),
1163
+ 'last_name' => html_entity_decode( $order->billing_last_name ),
1164
+ //'registration_date' =>
1165
+ 'phone' => array(
1166
+ //'area_code' =>
1167
+ 'number' => $order->billing_phone
1168
+ ),
1169
+ 'address' => array(
1170
+ 'zip_code' => $order->billing_postcode,
1171
+ //'street_number' =>
1172
+ 'street_name' => html_entity_decode(
1173
+ $order->billing_address_1 . ' / ' .
1174
+ $order->billing_city . ' ' .
1175
+ $order->billing_state . ' ' .
1176
+ $order->billing_country
1177
+ )
1178
+ )
1179
+ );
1180
+ // Create the shipment address information set.
1181
+ $shipments = array(
1182
+ 'receiver_address' => array(
1183
+ 'zip_code' => $order->shipping_postcode,
1184
+ //'street_number' =>
1185
+ 'street_name' => html_entity_decode(
1186
+ $order->shipping_address_1 . ' ' .
1187
+ $order->shipping_address_2 . ' ' .
1188
+ $order->shipping_city . ' ' .
1189
+ $order->shipping_state . ' ' .
1190
+ $order->shipping_country
1191
+ ),
1192
+ //'floor' =>
1193
+ 'apartment' => $order->shipping_address_2
1194
+ )
1195
+ );
1196
+ // The payment preference.
1197
+ $preferences = array(
1198
+ 'transaction_amount' => floor( ( (float) ( $order_total - $discount_amount_of_items ) ) * 100 ) / 100,
1199
+ 'token' => $custom_checkout['token'],
1200
+ 'description' => implode( ', ', $list_of_items ),
1201
+ 'installments' => (int) $custom_checkout['installments'],
1202
+ 'payment_method_id' => $custom_checkout['paymentMethodId'],
1203
+ 'payer' => array(
1204
+ 'email' => $order->billing_email
1205
+ ),
1206
+ 'external_reference' => $this->invoice_prefix . $order->id,
1207
+ 'statement_descriptor' => $this->statement_descriptor,
1208
+ 'binary_mode' => ( $this->binary_mode == 'yes' ),
1209
+ 'additional_info' => array(
1210
+ 'items' => $items,
1211
+ 'payer' => $payer_additional_info,
1212
+ 'shipments' => $shipments
1213
+ )
1214
+ );
1215
+ }
1216
+
1217
+ // Customer's Card Feature, add only if it has issuer id.
1218
+ if ( array_key_exists( 'token', $custom_checkout ) ) {
1219
+ $preferences['metadata']['token'] = $custom_checkout['token'];
1220
+ if ( array_key_exists( 'issuer', $custom_checkout ) ) {
1221
+ if ( ! empty( $custom_checkout['issuer'] ) ) {
1222
+ $preferences['issuer_id'] = (integer) $custom_checkout['issuer'];
1223
+ }
1224
+ }
1225
+ if ( ! empty( $custom_checkout['CustomerId'] ) ) {
1226
+ $preferences['payer']['id'] = $custom_checkout['CustomerId'];
1227
+ }
1228
+ }
1229
+
1230
+ // Do not set IPN url if it is a localhost.
1231
+ if ( ! strrpos( $this->domain, 'localhost' ) ) {
1232
+ $preferences['notification_url'] = WC_WooMercadoPago_Module::workaround_ampersand_bug(
1233
+ WC()->api_request_url( 'WC_WooMercadoPagoCustom_Gateway' )
1234
+ );
1235
+ }
1236
+
1237
+ // Discounts features.
1238
+ if ( isset( $custom_checkout['discount'] ) && $custom_checkout['discount'] != '' &&
1239
+ $custom_checkout['discount'] > 0 && isset( $custom_checkout['coupon_code'] ) &&
1240
+ $custom_checkout['coupon_code'] != '' &&
1241
+ WC()->session->chosen_payment_method == 'woocommerce-mercadopago-custom-module' ) {
1242
+
1243
+ $preferences['campaign_id'] = (int) $custom_checkout['campaign_id'];
1244
+ $preferences['coupon_amount'] = ( (float) $custom_checkout['discount'] );
1245
+ $preferences['coupon_code'] = strtoupper( $custom_checkout['coupon_code'] );
1246
+ }
1247
+
1248
+ // Set sponsor ID.
1249
+ if ( ! $this->is_test_user ) {
1250
+ $preferences['sponsor_id'] = $this->country_configs['sponsor_id'];
1251
+ }
1252
+
1253
+ if ( 'yes' == $this->debug ) {
1254
+ $this->log->add(
1255
+ $this->id,
1256
+ '[build_payment_preference] - returning just created [$preferences] structure: ' .
1257
+ json_encode( $preferences, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1258
+ );
1259
+ }
1260
+
1261
+ $preferences = apply_filters(
1262
+ 'woocommerce_mercadopago_module_custom_preferences',
1263
+ $preferences, $order
1264
+ );
1265
+ return $preferences;
1266
+ }
1267
+
1268
+ // --------------------------------------------------
1269
+
1270
+ protected function create_url( $order, $custom_checkout ) {
1271
+
1272
+ // Creates the order parameters by checking the cart configuration.
1273
+ $preferences = $this->build_payment_preference( $order, $custom_checkout );
1274
+
1275
+ // Checks for sandbox mode.
1276
+ if ( 'yes' == $this->sandbox ) {
1277
+ $this->mp->sandbox_mode( true );
1278
+ if ( 'yes' == $this->debug) {
1279
+ $this->log->add(
1280
+ $this->id,
1281
+ '[create_url] - sandbox mode is enabled'
1282
+ );
1283
+ }
1284
+ } else {
1285
+ $this->mp->sandbox_mode( false );
1286
+ }
1287
+
1288
+ // Create order preferences with Mercado Pago API request.
1289
+ try {
1290
+ $checkout_info = $this->mp->post( '/v1/payments', json_encode( $preferences) );
1291
+ if ( $checkout_info['status'] < 200 || $checkout_info['status'] >= 300 ) {
1292
+ // Mercado Pago trowed an error.
1293
+ if ( 'yes' == $this->debug ) {
1294
+ $this->log->add(
1295
+ $this->id,
1296
+ '[create_url] - mercado pago gave error, payment creation failed with error: ' .
1297
+ $checkout_info['response']['message'] );
1298
+ }
1299
+ return $checkout_info['response']['message'];
1300
+ } elseif ( is_wp_error( $checkout_info ) ) {
1301
+ // WordPress throwed an error.
1302
+ if ( 'yes' == $this->debug ) {
1303
+ $this->log->add(
1304
+ $this->id,
1305
+ '[create_url] - wordpress gave error, payment creation failed with error: ' .
1306
+ $checkout_info['response']['message'] );
1307
+ }
1308
+ return $checkout_info['response']['message'];
1309
+ } else {
1310
+ // Obtain the URL.
1311
+ if ( 'yes' == $this->debug ) {
1312
+ $this->log->add(
1313
+ $this->id,
1314
+ '[create_url] - payment link generated with success from mercado pago, with structure as follow: ' .
1315
+ json_encode( $checkout_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE ) );
1316
+ }
1317
+ return $checkout_info['response'];
1318
+ }
1319
+ } catch ( MercadoPagoException $e ) {
1320
+ // Something went wrong with the payment creation.
1321
+ if ( 'yes' == $this->debug ) {
1322
+ $this->log->add(
1323
+ $this->id,
1324
+ '[create_url] - payment creation failed with exception: ' .
1325
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1326
+ );
1327
+ }
1328
+ return $e->getMessage();
1329
+ }
1330
+ }
1331
+
1332
+ /**
1333
+ * Summary: Check if we have existing customer card, if not we create and save it.
1334
+ * Description: Check if we have existing customer card, if not we create and save it.
1335
+ * @return boolean true/false depending on the validation result.
1336
+ */
1337
+ public function check_and_save_customer_card( $checkout_info ) {
1338
+
1339
+ if ( 'yes' == $this->debug ) {
1340
+ $this->log->add(
1341
+ $this->id,
1342
+ ': @[check_and_save_customer_card] - checking info to create card: ' .
1343
+ json_encode( $checkout_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1344
+ );
1345
+ }
1346
+
1347
+ $custId = null;
1348
+ $token = null;
1349
+ $issuer_id = null;
1350
+ $payment_method_id = null;
1351
+
1352
+ if ( isset( $checkout_info['payer']['id'] ) && ! empty( $checkout_info['payer']['id'] ) ) {
1353
+ $custId = $checkout_info['payer']['id'];
1354
+ } else {
1355
+ return;
1356
+ }
1357
+
1358
+ if ( isset( $checkout_info['metadata']['token'] ) && ! empty( $checkout_info['metadata']['token'] ) ) {
1359
+ $token = $checkout_info['metadata']['token'];
1360
+ } else {
1361
+ return;
1362
+ }
1363
+
1364
+ if ( isset( $checkout_info['issuer_id'] ) && ! empty( $checkout_info['issuer_id'] ) ) {
1365
+ $issuer_id = (integer) ( $checkout_info['issuer_id'] );
1366
+ }
1367
+ if ( isset( $checkout_info['payment_method_id'] ) && ! empty( $checkout_info['payment_method_id'] ) ) {
1368
+ $payment_method_id = $checkout_info['payment_method_id'];
1369
+ }
1370
+
1371
+ try {
1372
+ $this->mp->create_card_in_customer( $custId, $token, $payment_method_id, $issuer_id );
1373
+ } catch ( MercadoPagoException $e ) {
1374
+ if ( 'yes' == $this->debug ) {
1375
+ $this->log->add(
1376
+ $this->id,
1377
+ '[check_and_save_customer_card] - card creation failed: ' .
1378
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1379
+ );
1380
+ }
1381
+ }
1382
+
1383
+ }
1384
+
1385
+ /**
1386
+ * Summary: Receive post data and applies a discount based in the received values.
1387
+ * Description: Receive post data and applies a discount based in the received values.
1388
+ */
1389
+ public function add_discount_custom() {
1390
+
1391
+ if ( ! isset( $_POST['mercadopago_custom'] ) )
1392
+ return;
1393
+
1394
+ if ( is_admin() && ! defined( 'DOING_AJAX' ) || is_cart() ) {
1395
+ return;
1396
+ }
1397
+
1398
+ $mercadopago_custom = $_POST['mercadopago_custom'];
1399
+ if ( isset( $mercadopago_custom['discount'] ) && $mercadopago_custom['discount'] != '' &&
1400
+ $mercadopago_custom['discount'] > 0 && isset( $mercadopago_custom['coupon_code'] ) &&
1401
+ $mercadopago_custom['coupon_code'] != '' &&
1402
+ WC()->session->chosen_payment_method == 'woocommerce-mercadopago-custom-module' ) {
1403
+
1404
+ if ( 'yes' == $this->debug ) {
1405
+ $this->log->add(
1406
+ $this->id,
1407
+ '[add_discount_custom] - custom checkout trying to apply discount...'
1408
+ );
1409
+ }
1410
+
1411
+ $value = ( $mercadopago_custom['discount'] ) /
1412
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 );
1413
+ global $woocommerce;
1414
+ if ( apply_filters(
1415
+ 'wc_mercadopagocustom_module_apply_discount',
1416
+ 0 < $value, $woocommerce->cart )
1417
+ ) {
1418
+ $woocommerce->cart->add_fee( sprintf(
1419
+ __( 'Discount for %s coupon', 'woocommerce-mercadopago-module' ),
1420
+ esc_attr( $mercadopago_custom['campaign']
1421
+ ) ), ( $value * -1 ), false
1422
+ );
1423
+ }
1424
+ }
1425
+
1426
+ }
1427
+
1428
+ // Display the discount in payment method title.
1429
+ public function get_payment_method_title_custom( $title, $id ) {
1430
+
1431
+ if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
1432
+ return $title;
1433
+ }
1434
+
1435
+ if ( $title != $this->title || $this->gateway_discount == 0 ) {
1436
+ return $title;
1437
+ }
1438
+
1439
+ $total = (float) WC()->cart->subtotal;
1440
+ if ( is_numeric( $this->gateway_discount ) ) {
1441
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
1442
+ $price_percent = $this->gateway_discount / 100;
1443
+ if ( $price_percent > 0 ) {
1444
+ $title .= ' (' . __( 'Discount Of ', 'woocommerce-mercadopago-module' ) .
1445
+ strip_tags( wc_price( $total * $price_percent ) ) . ' )';
1446
+ }
1447
+ }
1448
+ }
1449
+
1450
+ return $title;
1451
+ }
1452
+
1453
+ /*
1454
+ * ========================================================================
1455
+ * AUXILIARY AND FEEDBACK METHODS (SERVER SIDE)
1456
+ * ========================================================================
1457
+ */
1458
+
1459
+ /**
1460
+ * Summary: Check if we have valid credentials.
1461
+ * Description: Check if we have valid credentials.
1462
+ * @return boolean true/false depending on the validation result.
1463
+ */
1464
+ public function validate_credentials() {
1465
+
1466
+ if ( empty( $this->public_key ) || empty( $this->access_token ) ) {
1467
+ return false;
1468
+ }
1469
+
1470
+ if ( strpos( $this->public_key, 'APP_USR' ) === false && strpos( $this->public_key, 'TEST' ) === false ) {
1471
+ return false;
1472
+ }
1473
+
1474
+ if ( strpos( $this->access_token, 'APP_USR' ) === false && strpos( $this->access_token, 'TEST' ) === false ) {
1475
+ return false;
1476
+ }
1477
+
1478
+ try {
1479
+
1480
+ $this->mp = new MP(
1481
+ WC_WooMercadoPago_Module::get_module_version(),
1482
+ $this->access_token
1483
+ );
1484
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
1485
+ $this->mp->set_email( $email );
1486
+ $get_request = $this->mp->get(
1487
+ '/users/me?access_token=' . $this->access_token
1488
+ );
1489
+
1490
+ if ( isset( $get_request['response']['site_id'] ) ) {
1491
+
1492
+ // TODO: revalidate MLU
1493
+ if ( $get_request['response']['site_id'] == 'MLU' ) {
1494
+ $this->mp = null;
1495
+ return false;
1496
+ }
1497
+
1498
+ $this->is_test_user = in_array( 'test_user', $get_request['response']['tags'] );
1499
+ $this->site_id = $get_request['response']['site_id'];
1500
+ $this->collector_id = $get_request['response']['id'];
1501
+ $this->country_configs = WC_WooMercadoPago_Module::get_country_config( $this->site_id );
1502
+
1503
+ // Check for auto converstion of currency (only if it is enabled).
1504
+ $this->currency_ratio = -1;
1505
+ if ( $this->currency_conversion == 'yes' ) {
1506
+ $this->currency_ratio = WC_WooMercadoPago_Module::get_conversion_rate(
1507
+ $this->country_configs['currency']
1508
+ );
1509
+ }
1510
+
1511
+ return true;
1512
+
1513
+ } else {
1514
+ $this->mp = null;
1515
+ return false;
1516
+ }
1517
+
1518
+ } catch ( MercadoPagoException $e ) {
1519
+ if ( 'yes' == $this->debug ) {
1520
+ $this->log->add(
1521
+ $this->id,
1522
+ '[validate_credentials] - while validating credentials, got exception: ' .
1523
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1524
+ );
1525
+ }
1526
+ $this->mp = null;
1527
+ return false;
1528
+ }
1529
+
1530
+ return false;
1531
+
1532
+ }
1533
+
1534
+ // Build the string representing the path to the log file.
1535
+ protected function build_log_path_string() {
1536
+ return '<a href="' . esc_url(admin_url( 'admin.php?page=wc-status&tab=logs&log_file=' .
1537
+ esc_attr( $this->id ) . '-' . sanitize_file_name( wp_hash( $this->id ) ) . '.log' ) ) . '">' .
1538
+ __( 'WooCommerce &gt; System Status &gt; Logs', 'woocommerce-mercadopago-module' ) . '</a>';
1539
+ }
1540
+
1541
+ // Return boolean indicating if currency is supported.
1542
+ protected function is_supported_currency() {
1543
+ return get_woocommerce_currency() == $this->country_configs['currency'];
1544
+ }
1545
+
1546
+ // Called automatically by WooCommerce, verify if Module is available to use.
1547
+ public function is_available() {
1548
+ if ( ! did_action( 'wp_loaded' ) ) {
1549
+ return false;
1550
+ }
1551
+ global $woocommerce;
1552
+ $w_cart = $woocommerce->cart;
1553
+ // Check if we have SSL.
1554
+ if ( empty( $_SERVER['HTTPS'] ) || $_SERVER['HTTPS'] == 'off' ) {
1555
+ if ( empty( $this->sandbox ) && $this->sandbox == 'no' ) {
1556
+ return false;
1557
+ }
1558
+ }
1559
+ // Check for recurrent product checkout.
1560
+ if ( isset( $w_cart ) ) {
1561
+ if ( WC_WooMercadoPago_Module::is_subscription( $w_cart->get_cart() ) ) {
1562
+ return false;
1563
+ }
1564
+ }
1565
+ // Check if this gateway is enabled and well configured.
1566
+ $available = ( 'yes' == $this->settings['enabled'] ) &&
1567
+ ! empty( $this->public_key ) &&
1568
+ ! empty( $this->access_token) ;
1569
+ return $available;
1570
+ }
1571
+
1572
+ public function check_ssl_absence() {
1573
+ if ( empty( $_SERVER['HTTPS'] ) || $_SERVER['HTTPS'] == 'off' ) {
1574
+ if ( 'yes' == $this->settings['enabled'] ) {
1575
+ echo '<div class="error"><p><strong>' .
1576
+ __( 'Custom Checkout is Inactive', 'woocommerce-mercadopago-module' ) .
1577
+ '</strong>: ' .
1578
+ sprintf(
1579
+ __( 'Your site appears to not have SSL certification. SSL is a pre-requisite because the payment process is made in your server.', 'woocommerce-mercadopago-module' )
1580
+ ) . '</p></div>';
1581
+ }
1582
+ }
1583
+ }
1584
+
1585
+ // Get the URL to admin page.
1586
+ protected function admin_url() {
1587
+ if (defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.1', '>=' ) ) {
1588
+ return admin_url(
1589
+ 'admin.php?page=wc-settings&tab=checkout&section=wc_woomercadopagocustom_gateway'
1590
+ );
1591
+ }
1592
+ return admin_url(
1593
+ 'admin.php?page=woocommerce_settings&tab=payment_gateways&section=WC_WooMercadoPagoCustom_Gateway'
1594
+ );
1595
+ }
1596
+
1597
+ // Notify that public_key and/or access_token are not valid.
1598
+ public function credentials_missing_message() {
1599
+ echo '<div class="error"><p><strong>' .
1600
+ __( 'Custom Checkout is Inactive', 'woocommerce-mercadopago-module' ) .
1601
+ '</strong>: ' .
1602
+ __( 'Your Mercado Pago credentials Public Key/Access Token appears to be misconfigured.', 'woocommerce-mercadopago-module' ) .
1603
+ '</p></div>';
1604
+ }
1605
+
1606
+ public function get_order_status( $status_detail ) {
1607
+ switch ( $status_detail ) {
1608
+ case 'accredited':
1609
+ return __( 'Done, your payment was accredited!', 'woocommerce-mercadopago-module' );
1610
+ case 'pending_contingency':
1611
+ return __( 'We are processing the payment. In less than an hour we will e-mail you the results.', 'woocommerce-mercadopago-module' );
1612
+ case 'pending_review_manual':
1613
+ return __( 'We are processing the payment. In less than 2 business days we will tell you by e-mail whether it has accredited or we need more information.', 'woocommerce-mercadopago-module' );
1614
+ case 'cc_rejected_bad_filled_card_number':
1615
+ return __( 'Check the card number.', 'woocommerce-mercadopago-module' );
1616
+ case 'cc_rejected_bad_filled_date':
1617
+ return __( 'Check the expiration date.', 'woocommerce-mercadopago-module' );
1618
+ case 'cc_rejected_bad_filled_other':
1619
+ return __( 'Check the information.', 'woocommerce-mercadopago-module' );
1620
+ case 'cc_rejected_bad_filled_security_code':
1621
+ return __( 'Check the security code.', 'woocommerce-mercadopago-module' );
1622
+ case 'cc_rejected_blacklist':
1623
+ return __( 'We could not process your payment.', 'woocommerce-mercadopago-module' );
1624
+ case 'cc_rejected_call_for_authorize':
1625
+ return __( 'You must authorize the payment of your orders.', 'woocommerce-mercadopago-module' );
1626
+ case 'cc_rejected_card_disabled':
1627
+ return __( 'Call your card issuer to activate your card. The phone is on the back of your card.', 'woocommerce-mercadopago-module' );
1628
+ case 'cc_rejected_card_error':
1629
+ return __( 'We could not process your payment.', 'woocommerce-mercadopago-module' );
1630
+ case 'cc_rejected_duplicated_payment':
1631
+ return __( 'You already made a payment for that amount. If you need to repay, use another card or other payment method.', 'woocommerce-mercadopago-module' );
1632
+ case 'cc_rejected_high_risk':
1633
+ return __( 'Your payment was rejected. Choose another payment method. We recommend cash.', 'woocommerce-mercadopago-module' );
1634
+ case 'cc_rejected_insufficient_amount':
1635
+ return __( 'Your payment do not have sufficient funds.', 'woocommerce-mercadopago-module' );
1636
+ case 'cc_rejected_invalid_installments':
1637
+ return __( 'Your payment does not process payments with selected installments.', 'woocommerce-mercadopago-module' );
1638
+ case 'cc_rejected_max_attempts':
1639
+ return __( 'You have reached the limit of allowed attempts. Choose another card or another payment method.', 'woocommerce-mercadopago-module' );
1640
+ case 'cc_rejected_other_reason':
1641
+ return __( 'This payment method did not process the payment.', 'woocommerce-mercadopago-module' );
1642
+ default:
1643
+ return __( 'This payment method did not process the payment.', 'woocommerce-mercadopago-module' );
1644
+ }
1645
+ }
1646
+
1647
+ /*
1648
+ * ========================================================================
1649
+ * IPN MECHANICS (SERVER SIDE)
1650
+ * ========================================================================
1651
+ */
1652
+
1653
+ /**
1654
+ * Summary: This call checks any incoming notifications from Mercado Pago server.
1655
+ * Description: This call checks any incoming notifications from Mercado Pago server.
1656
+ */
1657
+ public function process_http_request() {
1658
+ @ob_clean();
1659
+ if ( 'yes' == $this->debug ) {
1660
+ $this->log->add(
1661
+ $this->id,
1662
+ '[process_http_request] - Received _get content: ' .
1663
+ json_encode( $_GET, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1664
+ );
1665
+ }
1666
+ if ( isset( $_GET['coupon_id'] ) && $_GET['coupon_id'] != '' ) {
1667
+ // Process coupon evaluations.
1668
+ if ( isset( $_GET['payer'] ) && $_GET['payer'] != '' ) {
1669
+ $logged_user_email = $_GET['payer'];
1670
+ $coupon_id = $_GET['coupon_id'];
1671
+ if ( 'yes' == $this->sandbox )
1672
+ $this->mp->sandbox_mode( true );
1673
+ else
1674
+ $this->mp->sandbox_mode( false );
1675
+ $response = $this->mp->check_discount_campaigns(
1676
+ $_GET['amount'],
1677
+ $logged_user_email,
1678
+ $coupon_id
1679
+ );
1680
+ header( 'HTTP/1.1 200 OK' );
1681
+ header( 'Content-Type: application/json' );
1682
+ echo json_encode( $response );
1683
+ } else {
1684
+ $obj = new stdClass();
1685
+ $obj->status = 404;
1686
+ $obj->response = array(
1687
+ 'message' =>
1688
+ __( 'Please, inform your email in billing address to use this feature', 'woocommerce-mercadopago-module' ),
1689
+ 'error' => 'payer_not_found',
1690
+ 'status' => 404,
1691
+ 'cause' => array()
1692
+ );
1693
+ header( 'HTTP/1.1 200 OK' );
1694
+ header( 'Content-Type: application/json' );
1695
+ echo json_encode( $obj );
1696
+ }
1697
+ exit( 0 );
1698
+ } else {
1699
+ // Process IPN messages.
1700
+ $data = $this->check_ipn_request_is_valid( $_GET );
1701
+ if ( $data ) {
1702
+ header( 'HTTP/1.1 200 OK' );
1703
+ do_action( 'valid_mercadopagocustom_ipn_request', $data );
1704
+ }
1705
+ }
1706
+ }
1707
+
1708
+ /**
1709
+ * Summary: Get received data from IPN and checks if its a merchant_order or a payment.
1710
+ * Description: If we have these information, we return data to be processed by
1711
+ * successful_request function.
1712
+ * @return boolean indicating if it was successfuly processed.
1713
+ */
1714
+ public function check_ipn_request_is_valid( $data ) {
1715
+
1716
+ if ( ! isset( $data['data_id'] ) || ! isset( $data['type'] ) ) {
1717
+ if ( 'yes' == $this->debug ) {
1718
+ $this->log->add(
1719
+ $this->id,
1720
+ '[check_ipn_request_is_valid] - data_id or type not set: ' .
1721
+ json_encode( $data, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1722
+ );
1723
+ }
1724
+ // At least, check if its a v0 ipn.
1725
+ if ( ! isset( $data['id'] ) || ! isset( $data['topic'] ) ) {
1726
+ if ( 'yes' == $this->debug ) {
1727
+ $this->log->add(
1728
+ $this->id,
1729
+ '[check_ipn_request_is_valid] - Mercado Pago Request failure: ' .
1730
+ json_encode( $_GET, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1731
+ );
1732
+ }
1733
+ wp_die( __( 'Mercado Pago Request Failure', 'woocommerce-mercadopago-module' ) );
1734
+ } else {
1735
+ header( 'HTTP/1.1 200 OK' );
1736
+ }
1737
+ // No ID? No process!
1738
+ return false;
1739
+ }
1740
+
1741
+ if ( 'yes' == $this->sandbox ) {
1742
+ $this->mp->sandbox_mode( true );
1743
+ } else {
1744
+ $this->mp->sandbox_mode( false );
1745
+ }
1746
+
1747
+ try {
1748
+ // Get the payment reported by the IPN.
1749
+ if ( $data['type'] == 'payment' ) {
1750
+ $access_token = array( 'access_token' => $this->mp->get_access_token() );
1751
+ $payment_info = $this->mp->get(
1752
+ '/v1/payments/' . $data['data_id'], $access_token, false
1753
+ );
1754
+ if ( ! is_wp_error( $payment_info ) &&
1755
+ ( $payment_info['status'] == 200 || $payment_info['status'] == 201 ) ) {
1756
+ return $payment_info['response'];
1757
+ } else {
1758
+ if ( 'yes' == $this->debug) {
1759
+ $this->log->add(
1760
+ $this->id,
1761
+ '[check_ipn_request_is_valid] - error when processing received data: ' .
1762
+ json_encode( $payment_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1763
+ );
1764
+ }
1765
+ return false;
1766
+ }
1767
+ }
1768
+ } catch ( MercadoPagoException $e ) {
1769
+ if ( 'yes' == $this->debug ) {
1770
+ $this->log->add(
1771
+ $this->id,
1772
+ '[check_ipn_request_is_valid] - MercadoPagoException: ' .
1773
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1774
+ );
1775
+ }
1776
+ return false;
1777
+ }
1778
+ return true;
1779
+ }
1780
+
1781
+ /**
1782
+ * Summary: Properly handles each case of notification, based in payment status.
1783
+ * Description: Properly handles each case of notification, based in payment status.
1784
+ */
1785
+ public function successful_request( $data ) {
1786
+
1787
+ if ( 'yes' == $this->debug ) {
1788
+ $this->log->add(
1789
+ $this->id,
1790
+ '[successful_request] - starting to process ipn update...'
1791
+ );
1792
+ }
1793
+
1794
+ // Get the order and check its presence.
1795
+ $order_key = $data['external_reference'];
1796
+ if ( empty( $order_key ) ) {
1797
+ return;
1798
+ }
1799
+ $id = (int) str_replace( $this->invoice_prefix, '', $order_key );
1800
+ $order = wc_get_order( $id );
1801
+
1802
+ // Check if order exists.
1803
+ if ( ! $order ) {
1804
+ return;
1805
+ }
1806
+
1807
+ // WooCommerce 3.0 or later.
1808
+ if ( method_exists( $order, 'get_id' ) ) {
1809
+ $order_id = $order->get_id();
1810
+ } else {
1811
+ $order_id = $order->id;
1812
+ }
1813
+
1814
+ // Check if we have the correct order.
1815
+ if ( $order_id !== $id ) {
1816
+ return;
1817
+ }
1818
+
1819
+ if ( 'yes' == $this->debug ) {
1820
+ $this->log->add(
1821
+ $this->id,
1822
+ '[successful_request] - updating metadata and status with data: ' .
1823
+ json_encode( $data, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1824
+ );
1825
+ }
1826
+
1827
+ // Here, we process the status... this is the business rules!
1828
+ // Reference: https://www.mercadopago.com.br/developers/en/api-docs/basic-checkout/ipn/payment-status/
1829
+ $status = isset( $data['status'] ) ? $data['status'] : 'pending';
1830
+ $total_paid = isset( $data['transaction_details']['total_paid_amount'] ) ? $data['transaction_details']['total_paid_amount'] : 0.00;
1831
+ $total_refund = isset( $data['transaction_amount_refunded'] ) ? $data['transaction_amount_refunded'] : 0.00;
1832
+ $total = $data['transaction_amount'];
1833
+
1834
+ if ( method_exists( $order, 'update_meta_data' ) ) {
1835
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPagoCustom_Gateway' );
1836
+
1837
+ if ( ! empty( $data['payer']['email'] ) ) {
1838
+ $order->update_meta_data( __( 'Payer email', 'woocommerce-mercadopago-module' ), $data['payer']['email'] );
1839
+ }
1840
+
1841
+ if ( ! empty( $data['payment_type_id'] ) ) {
1842
+ $order->update_meta_data( __( 'Payment type', 'woocommerce-mercadopago-module' ), $data['payment_type_id'] );
1843
+ }
1844
+
1845
+ $payment_id = $data['id'];
1846
+
1847
+ $order->update_meta_data( 'Mercado Pago - Payment ' . $payment_id,
1848
+ 'Mercado Pago - Payment ' . $payment_id,
1849
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1850
+ ']/[Amount ' . $total .
1851
+ ']/[Paid ' . $total_paid .
1852
+ ']/[Refund ' . $total_refund . ']'
1853
+ );
1854
+
1855
+ $order->update_meta_data( '_Mercado_Pago_Payment_IDs', $payment_id );
1856
+ $order->save();
1857
+
1858
+ } else {
1859
+ update_post_meta( $order_id, '_used_gateway', 'WC_WooMercadoPagoCustom_Gateway' );
1860
+
1861
+ if ( ! empty( $data['payer']['email'] ) ) {
1862
+ update_post_meta(
1863
+ $order_id,
1864
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1865
+ $data['payer']['email']
1866
+ );
1867
+ }
1868
+ if ( ! empty( $data['payment_type_id'] ) ) {
1869
+ update_post_meta(
1870
+ $order_id,
1871
+ __( 'Payment type', 'woocommerce-mercadopago-module' ),
1872
+ $data['payment_type_id']
1873
+ );
1874
+ }
1875
+ $payment_id = $data['id'];
1876
+ update_post_meta(
1877
+ $order_id,
1878
+ 'Mercado Pago - Payment ' . $payment_id,
1879
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1880
+ ']/[Amount ' . $total .
1881
+ ']/[Paid ' . $total_paid .
1882
+ ']/[Refund ' . $total_refund . ']'
1883
+ );
1884
+ update_post_meta(
1885
+ $order_id,
1886
+ '_Mercado_Pago_Payment_IDs',
1887
+ $payment_id
1888
+ );
1889
+ }
1890
+
1891
+ // Switch the status and update in WooCommerce
1892
+ switch ( $status ) {
1893
+ case 'approved':
1894
+ $order->add_order_note(
1895
+ 'Mercado Pago: ' . __( 'Payment approved.', 'woocommerce-mercadopago-module' )
1896
+ );
1897
+ $this->check_and_save_customer_card( $data );
1898
+ $order->payment_complete();
1899
+ break;
1900
+ case 'pending':
1901
+ $order->add_order_note(
1902
+ 'Mercado Pago: ' . __( 'Customer haven\'t paid yet.', 'woocommerce-mercadopago-module' )
1903
+ );
1904
+ break;
1905
+ case 'in_process':
1906
+ $order->update_status(
1907
+ 'on-hold',
1908
+ 'Mercado Pago: ' . __( 'Payment under review.', 'woocommerce-mercadopago-module' )
1909
+ );
1910
+ break;
1911
+ case 'rejected':
1912
+ $order->update_status(
1913
+ 'failed',
1914
+ 'Mercado Pago: ' .
1915
+ __( 'The payment was refused. The customer can try again.', 'woocommerce-mercadopago-module' )
1916
+ );
1917
+ break;
1918
+ case 'refunded':
1919
+ $order->update_status(
1920
+ 'refunded',
1921
+ 'Mercado Pago: ' .
1922
+ __( 'The payment was refunded to the customer.', 'woocommerce-mercadopago-module' )
1923
+ );
1924
+ break;
1925
+ case 'cancelled':
1926
+ $this->process_cancel_order_meta_box_actions( $order );
1927
+ $order->update_status(
1928
+ 'cancelled',
1929
+ 'Mercado Pago: ' .
1930
+ __( 'The payment was cancelled.', 'woocommerce-mercadopago-module' )
1931
+ );
1932
+ break;
1933
+ case 'in_mediation':
1934
+ $order->add_order_note(
1935
+ 'Mercado Pago: ' .
1936
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1937
+ );
1938
+ break;
1939
+ case 'charged-back':
1940
+ $order->add_order_note(
1941
+ 'Mercado Pago: ' .
1942
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1943
+ );
1944
+ break;
1945
+ default:
1946
+ break;
1947
+ }
1948
+ }
1949
+
1950
+ }
1951
+
1952
+ new WC_WooMercadoPagoCustom_Gateway( true );
mercadopago/mercadopago-gateway.php CHANGED
@@ -1,680 +1,1464 @@
1
  <?php
2
- /**
3
- * Plugin Name: Woo Mercado Pago Module
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
- * Author: Mercado Pago
7
- * Author URI: https://www.mercadopago.com.br/developers/
8
- * Developer: Marcelo Tomio Hama / marcelo.hama@mercadolivre.com
9
- * Copyright: Copyright(c) MercadoPago [http://www.mercadopago.com]
10
- * Version: 1.0.3
11
- * License: http://www.gnu.org/licenses/gpl.html GPL version 2 or higher
12
- * Text Domain: woocommerce-mercadopago-module
13
- * Domain Path: /languages/
14
- */
15
 
16
  /**
17
- * Implementation references:
18
- * 1. https://docs.woothemes.com/document/payment-gateway-api/
19
- * 2. https://www.mercadopago.com.br/developers/en/api-docs/
 
 
20
  */
21
 
22
  // This include Mercado Pago library SDK
23
- require_once "sdk/lib/mercadopago.php";
24
 
25
  /**
26
- * Extending from WooCommerce Payment Gateway class.
27
- * TODO: better describe this class functionalities.
 
28
  */
29
  class WC_WooMercadoPago_Gateway extends WC_Payment_Gateway {
30
-
31
- // This array stores each banner image, depending on the country it belongs to or on
32
- // the type of checkout we use.
33
- private $banners = array(
34
- "mercadopago_custom" => array(),
35
- "mercadopago_customticket" => array(),
36
- "mercadopago_standard" => array(
37
- "MLA" => 'MLA.jpg',
38
- "MLB" => 'MLB.jpg',
39
- "MCO" => 'MCO.jpg',
40
- "MLC" => 'MLC.gif',
41
- "MLV" => 'MLV.jpg',
42
- "MLM" => 'MLM.jpg'
43
- )
44
- );
45
-
46
- // Sponsor ID array by country
47
- private $sponsor_id = array(
48
- "MLA" => '208682286',
49
- "MLB" => '208686191',
50
- "MCO" => '208687643',
51
- "MLC" => '208690789',
52
- "MLV" => '208692735',
53
- "MLM" => '208692380'
54
- );
55
-
56
- // Required inherited method from WC_Payment_Gateway class: __construct.
57
- // Please check:
58
- // [https://docs.woothemes.com/wc-apidocs/class-WC_Payment_Gateway.html]
59
- // for documentation and further information.
60
  public function __construct() {
61
-
62
- $this->domain = get_site_url() . '/index.php';
63
- //$this->domain = 'http://7a2bb004.ngrok.io';
64
 
65
- // These fields are declared because we use them dinamically in our gateway class.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
66
  $this->site_id = null;
67
- $this->isTestUser = false;
 
 
 
 
 
68
  $this->payment_methods = array();
 
69
  $this->store_categories_id = array();
70
- $this->store_categories_description = array();
71
-
72
- // Within your constructor, you should define the following variables.
 
73
  $this->id = 'woocommerce-mercadopago-module';
 
74
  $this->icon = apply_filters(
75
  'woocommerce_mercadopago_icon',
76
- plugins_url('images/mercadopago.png', plugin_dir_path(__FILE__))
77
  );
78
- $this->method_title = 'Mercado Pago';
79
  $this->method_description = '<img width="200" height="52" src="' .
80
- plugins_url('images/mplogo.png', plugin_dir_path(__FILE__)) . '"><br><br>' . '<strong>' .
81
- wordwrap(__('This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store.', 'woocommerce-mercadopago-module'), 80, "\n") .
82
- '</strong>';
83
-
84
- // These fields are used in our Mercado Pago Module configuration page.
85
- $this->client_id = $this->get_option('client_id');
86
- $this->client_secret = $this->get_option('client_secret');
87
- $this->title = $this->get_option('title');
88
- $this->description = $this->get_option('description');
89
- $this->category_id = $this->get_option('category_id');
90
- $this->invoice_prefix = $this->get_option('invoice_prefix', 'WC-');
91
- $this->method = $this->get_option('method', 'modal');
92
- $this->iframe_width = $this->get_option('iframe_width', 640);
93
- $this->iframe_height = $this->get_option('iframe_height', 800);
94
- $this->auto_return = $this->get_option('auto_return', true);
95
- $this->installments = $this->get_option('installments', '24');
96
- $this->ex_payments = $this->get_option('ex_payments', 'n/d');
97
- $this->sandbox = $this->get_option('sandbox', false);
98
- $this->debug = $this->get_option('debug');
99
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
100
  // Render our configuration page and init/load fields.
101
  $this->init_form_fields();
102
  $this->init_settings();
103
-
104
- // Hook actions for WordPress.
105
- add_action( // Used by IPN to receive IPN incomings.
106
  'woocommerce_api_wc_woomercadopago_gateway',
107
- array($this, 'check_ipn_response')
108
  );
109
- add_action( // Used by IPN to process valid incomings.
 
110
  'valid_mercadopago_ipn_request',
111
- array($this, 'successful_request')
112
  );
113
- add_action( // Used by WordPress to render the custom checkout page.
 
 
 
 
 
 
114
  'woocommerce_receipt_' . $this->id,
115
- array($this, 'receipt_page')
116
  );
117
- add_action( // Used to fix CSS in some older WordPress/WooCommerce versions.
118
- 'wp_head', array($this, 'css')
 
 
119
  );
120
- add_action( // Used in settings page to hook "save settings" action.
 
121
  'woocommerce_update_options_payment_gateways_' . $this->id,
122
- array($this, 'process_admin_options')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
123
  );
124
-
125
- // Verify if client_id or client_secret is empty.
126
- if (empty($this->client_id) || empty($this->client_secret)) {
127
- add_action('admin_notices', array($this, 'clientIdOrSecretMissingMessage'));
128
- }
129
-
130
- // Verify if currency is supported.
131
- if (!$this->isSupportedCurrency()) {
132
- add_action('admin_notices', array($this, 'currencyNotSupportedMessage'));
133
- }
134
 
135
- // Logging and debug.
136
- if ('yes' == $this->debug) {
137
- if (class_exists('WC_Logger')) {
138
- $this->log = new WC_Logger();
139
- } else {
140
- $this->log = WC_MercadoPago_Module::woocommerce_instance()->logger();
141
  }
142
  }
143
-
144
  }
145
-
146
- // Required inherited method from WC_Payment_Gateway class: init_form_fields.
147
- // Initialise Gateway settings form fields with a customized page.
 
 
148
  public function init_form_fields() {
149
-
 
 
 
 
 
 
 
 
 
 
 
 
 
150
  $api_secret_locale = sprintf(
151
- '<a href="https://www.mercadopago.com/mla/herramientas/aplicaciones" target="_blank">%s</a>, <a href="https://www.mercadopago.com/mlb/ferramentas/aplicacoes" target="_blank">%s</a>, <a href="https://www.mercadopago.com/mlc/herramientas/aplicaciones" target="_blank">%s</a>, <a href="https://www.mercadopago.com/mco/ferramentas/aplicacoes" target="_blank">%s</a>, <a href="https://www.mercadopago.com/mlm/herramientas/aplicaciones" target="_blank">%s</a> %s <a href="https://www.mercadopago.com/mlv/herramientas/aplicaciones" target="_blank">%s</a>',
152
- __('Argentine', 'woocommerce-mercadopago-module'),
153
- __('Brazil', 'woocommerce-mercadopago-module'),
154
- __('Chile', 'woocommerce-mercadopago-module'),
155
- __('Colombia', 'woocommerce-mercadopago-module'),
156
- __('Mexico', 'woocommerce-mercadopago-module'),
157
- __('or', 'woocommerce-mercadopago-module'),
158
- __('Venezuela', 'woocommerce-mercadopago-module')
 
 
 
 
 
 
 
 
 
159
  );
160
-
161
  // Trigger API to get payment methods and site_id, also validates Client_id/Client_secret.
162
- if ($this->validateCredentials()) {
163
- try {
164
- $mp = new MP($this->client_id, $this->client_secret);
165
- $access_token = $mp->get_access_token();
166
- $get_request = $mp->get("/users/me?access_token=" . $access_token);
167
- $this->isTestUser = in_array('test_user', $get_request['response']['tags']);
168
- $this->site_id = $get_request['response']['site_id'];
169
- $payments = $mp->get("/v1/payment_methods/?access_token=" . $access_token);
170
- array_push($this->payment_methods, "n/d");
171
- foreach ($payments["response"] as $payment) {
172
- array_push($this->payment_methods, str_replace("_", " ", $payment['id']));
 
 
 
 
 
 
 
 
 
173
  }
174
- $this->payment_desc =
175
- __('Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago.', 'woocommerce-mercadopago-module');
176
- $this->credentials_message = '<img width="12" height="12" src="' .
177
- plugins_url('images/check.png', plugin_dir_path(__FILE__)) . '">' .
178
- ' ' . __('Your credentials are <strong>valid</strong> for', 'woocommerce-mercadopago-module') .
179
- ': ' . $this->getCountryName($this->site_id) . ' <img width="18.6" height="12" src="' .
180
- plugins_url('images/' . $this->site_id . '.png', plugin_dir_path(__FILE__)) . '"> ';
181
- } catch (MercadoPagoException $e) {
182
- array_push($this->payment_methods, "n/d");
183
- $this->payment_desc = '<img width="12" height="12" src="' .
184
- plugins_url('images/warning.png', plugin_dir_path(__FILE__)) . '">' .
185
- ' ' . __('Configure your Client_id and Client_secret to have access to more options.', 'woocommerce-mercadopago-module');
186
- $this->credentials_message = '<img width="12" height="12" src="' .
187
- plugins_url('images/error.png', plugin_dir_path(__FILE__)) . '">' .
188
- ' ' . __('Your credentials are <strong>not valid</strong>!', 'woocommerce-mercadopago-module');
189
  }
 
 
 
 
 
 
190
  } else {
191
- array_push($this->payment_methods, "n/d");
 
192
  $this->payment_desc = '<img width="12" height="12" src="' .
193
- plugins_url('images/warning.png', plugin_dir_path(__FILE__)) . '">' .
194
- ' ' . __('Configure your Client_id and Client_secret to have access to more options.', 'woocommerce-mercadopago-module');
195
- $this->credentials_message = '<img width="12" height="12" src="' .
196
- plugins_url('images/error.png', plugin_dir_path(__FILE__)) . '">' .
197
- ' ' . __('Your credentials are <strong>not valid</strong>!', 'woocommerce-mercadopago-module');
198
- }
199
-
200
- // Fills categoy selector. We do not need credentials to make this call.
201
- $categories = MPRestClient::get(array("uri" => "/item_categories"));
202
- foreach ($categories["response"] as $category) {
203
- array_push($this->store_categories_id, str_replace("_", " ", $category['id']));
204
- array_push($this->store_categories_description, str_replace("_", " ", $category['description']));
205
- }
206
-
207
  // Checks validity of iFrame width/height fields.
208
- if (!is_numeric($this->iframe_width)) {
209
  $this->iframe_width_desc = '<img width="12" height="12" src="' .
210
- plugins_url('images/warning.png', plugin_dir_path(__FILE__)) . '">' .
211
- ' ' . __('This field should be an integer.', 'woocommerce-mercadopago-module');
212
  } else {
213
  $this->iframe_width_desc =
214
- __('If your integration method is iFrame, please inform the payment iFrame width.', 'woocommerce-mercadopago-module');
215
  }
216
- if (!is_numeric($this->iframe_height)) {
217
  $this->iframe_height_desc = '<img width="12" height="12" src="' .
218
- plugins_url('images/warning.png', plugin_dir_path(__FILE__)) . '">' .
219
- ' ' . __('This field should be an integer.', 'woocommerce-mercadopago-module');
220
  } else {
221
  $this->iframe_height_desc =
222
- __('If your integration method is iFrame, please inform the payment iFrame height.', 'woocommerce-mercadopago-module');
223
  }
224
-
225
  // Checks if max installments is a number.
226
- if (!is_numeric($this->installments)) {
227
  $this->installments_desc = '<img width="12" height="12" src="' .
228
- plugins_url('images/warning.png', plugin_dir_path(__FILE__)) . '">' .
229
- ' ' . __('This field should be an integer.', 'woocommerce-mercadopago-module');
230
  } else {
231
  $this->installments_desc =
232
- __('Select the max number of installments for your customers.', 'woocommerce-mercadopago-module');
233
  }
234
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
235
  // This array draws each UI (text, selector, checkbox, label, etc).
236
  $this->form_fields = array(
237
  'enabled' => array(
238
- 'title' => __('Enable/Disable', 'woocommerce-mercadopago-module'),
239
  'type' => 'checkbox',
240
- 'label' => __('Enable Mercado Pago Module', 'woocommerce-mercadopago-module'),
241
- 'default' => 'yes'
242
  ),
243
  'credentials_title' => array(
244
- 'title' => __('Mercado Pago Credentials', 'woocommerce-mercadopago-module'),
245
  'type' => 'title',
246
- 'description' => sprintf('%s', $this->credentials_message) . '<br>' . sprintf(__('You can obtain your credentials for', 'woocommerce-mercadopago-module') . ' %s.', $api_secret_locale)
 
 
 
247
  ),
248
  'client_id' => array(
249
  'title' => 'Client_id',
250
  'type' => 'text',
251
- 'description' => __('Insert your Mercado Pago Client_id.', 'woocommerce-mercadopago-module'),
 
252
  'default' => '',
253
  'required' => true
254
  ),
255
  'client_secret' => array(
256
  'title' => 'Client_secret',
257
  'type' => 'text',
258
- 'description' => __('Insert your Mercado Pago Client_secret.', 'woocommerce-mercadopago-module'),
 
259
  'default' => '',
260
  'required' => true
261
  ),
262
  'ipn_url' => array(
263
- 'title' => __('Instant Payment Notification (IPN) URL', 'woocommerce-mercadopago-module'),
 
264
  'type' => 'title',
265
- 'description' => sprintf(__('Your IPN URL to receive instant payment notifications is', 'woocommerce-mercadopago-module') . '<br>%s', '<code>' . $this->domain . '/' . $this->id . '/?wc-api=WC_WooMercadoPago_Gateway' . '</code>.')
 
 
 
266
  ),
267
  'checkout_options_title' => array(
268
- 'title' => __('Checkout Options', 'woocommerce-mercadopago-module'),
269
  'type' => 'title',
270
  'description' => ''
271
  ),
272
  'title' => array(
273
- 'title' => __('Title', 'woocommerce-mercadopago-module'),
274
  'type' => 'text',
275
- 'description' => __('Title shown to the client in the checkout.', 'woocommerce-mercadopago-module'),
276
- 'default' => 'Mercado Pago'
 
277
  ),
278
  'description' => array(
279
- 'title' => __('Description', 'woocommerce-mercadopago-module'),
280
  'type' => 'textarea',
281
- 'description' => __('Description shown to the client in the checkout.', 'woocommerce-mercadopago-module'),
282
- 'default' => __('Pay with Mercado Pago', 'woocommerce-mercadopago-module')
 
283
  ),
284
  'category_id' => array(
285
- 'title' => __('Store Category', 'woocommerce-mercadopago-module'),
286
  'type' => 'select',
287
- 'description' => __('Define which type of products your store sells.', 'woocommerce-mercadopago-module'),
 
288
  'options' => $this->store_categories_id
289
  ),
290
  'invoice_prefix' => array(
291
- 'title' => __('Store Identificator', 'woocommerce-mercadopago-module'),
292
  'type' => 'text',
293
- 'description' => __('Please, inform a prefix to your store.', 'woocommerce-mercadopago-module') . ' ' . __('If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same identificators.', 'woocommerce-mercadopago-module'),
 
 
 
294
  'default' => 'WC-'
295
  ),
296
  'method' => array(
297
- 'title' => __('Integration Method', 'woocommerce-mercadopago-module'),
298
  'type' => 'select',
299
- 'description' => __('Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an internal window is embedded to the page layout).', 'woocommerce-mercadopago-module'),
300
  'default' => 'iframe',
301
  'options' => array(
302
- 'iframe' => __('iFrame', 'woocommerce-mercadopago-module'),
303
- 'modal' => __('Modal Window', 'woocommerce-mercadopago-module'),
304
- 'redirect' => __('Redirect', 'woocommerce-mercadopago-module')
305
  )
306
  ),
307
  'iframe_width' => array(
308
- 'title' => __('iFrame Width', 'woocommerce-mercadopago-module'),
309
  'type' => 'text',
310
  'description' => $this->iframe_width_desc,
311
  'default' => '640'
312
  ),
313
  'iframe_height' => array(
314
- 'title' => __('iFrame Height', 'woocommerce-mercadopago-module'),
315
  'type' => 'text',
316
  'description' => $this->iframe_height_desc,
317
  'default' => '800'
318
  ),
319
  'auto_return' => array(
320
- 'title' => __('Auto Return', 'woocommerce-mercadopago-module'),
321
  'type' => 'checkbox',
322
- 'label' => __('Automatic Return After Payment', 'woocommerce-mercadopago-module'),
323
  'default' => 'yes',
324
- 'description' => __('After the payment, client is automatically redirected.', 'woocommerce-mercadopago-module'),
 
 
 
 
 
 
 
 
 
 
 
 
325
  ),
326
- 'testing_title' => array(
327
- 'title' => __('Payment Options', 'woocommerce-mercadopago-module'),
 
 
 
 
 
 
 
 
 
 
 
 
328
  'type' => 'title',
329
  'description' => ''
330
  ),
 
 
 
 
 
 
 
 
331
  'installments' => array(
332
- 'title' => __('Max installments', 'woocommerce-mercadopago-module'),
333
  'type' => 'text',
334
  'description' => $this->installments_desc,
335
  'default' => '24'
336
  ),
337
  'ex_payments' => array(
338
- 'title' => __('Exclude Payment Methods', 'woocommerce-mercadopago-module'),
339
- 'description' => $this->payment_desc,
340
- 'type' => 'multiselect',
341
- 'options' => $this->payment_methods,
342
- 'default' => ''
343
- ),
 
 
 
 
 
 
 
 
 
 
 
 
 
 
344
  'testing' => array(
345
- 'title' => __('Test and Debug Options', 'woocommerce-mercadopago-module'),
346
  'type' => 'title',
347
  'description' => ''
348
  ),
349
- 'sandbox' => array(
350
- 'title' => __('Mercado Pago Sandbox', 'woocommerce-mercadopago-module'),
351
- 'type' => 'checkbox',
352
- 'label' => __('Enable Mercado Pago Sandbox', 'woocommerce-mercadopago-module'),
353
- 'default' => 'no',
354
- 'description' => __('This options allows you to test payments inside a sandbox environment.', 'woocommerce-mercadopago-module'),
355
- ),
 
356
  'debug' => array(
357
- 'title' => __('Debug and Log', 'woocommerce-mercadopago-module'),
358
  'type' => 'checkbox',
359
- 'label' => __('Enable log', 'woocommerce-mercadopago-module'),
360
  'default' => 'no',
361
- 'description' => sprintf(__('Register event logs of Mercado Pago, such as API requests, in the file', 'woocommerce-mercadopago-module') . ' %s.', '<code>wordpress/wp-content/uploads/wc-logs/' . $this->id . '-' . sanitize_file_name(wp_hash($this->id)) . '.txt</code>')
 
 
 
 
 
362
  )
363
  );
364
-
365
  }
366
-
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
367
  /*
368
  * ========================================================================
369
- * CHECKOUT BUSINESS RULES
370
  * ========================================================================
371
  */
372
-
373
- // 1. First step occurs when the customer selects Mercado Pago and proceed to
374
- // checkout. This method verify which integration method was selected and
375
- // makes the build for the checkout URL.
376
- public function process_payment($order_id) {
377
- $order = new WC_Order($order_id);
378
- // Check for the type of integration.
379
- if ('redirect' == $this->method) {
380
- if ('yes' == $this->debug) {
381
- $this->log->add($this->id, $this->id . ': @[process_payment] - customer being redirected to Mercado Pago environment.');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
382
  }
383
  return array(
384
  'result' => 'success',
385
- 'redirect' => $this->createUrl($order)
386
  );
387
- } else if ('modal' == $this->method || 'iframe' == $this->method) {
388
- if ('yes' == $this->debug) {
389
- $this->log->add($this->id, $this->id . ': @[process_payment] - preparing to render Mercado Pago checkout view.');
390
- }
391
- if (defined('WC_VERSION') && version_compare(WC_VERSION, '2.1', '>=')) {
392
- return array(
393
- 'result' => 'success',
394
- 'redirect' => $order->get_checkout_payment_url(true)
395
- );
396
- } else {
397
- return array(
398
- 'result' => 'success',
399
- 'redirect' => add_query_arg('order', $order->id, add_query_arg('key', $order->order_key, get_permalink(woocommerce_get_page_id('pay'))))
400
  );
401
  }
 
 
 
 
402
  }
403
  }
404
 
405
- // 2. Order page and this generates the form that shows the pay button. This step
406
- // generates the form to proceed to checkout.
407
- public function receipt_page($order) {
408
- echo $this->renderOrderForm($order);
 
 
 
 
409
  }
 
410
  // --------------------------------------------------
411
- public function renderOrderForm($order_id) {
412
- $order = new WC_Order($order_id);
413
- $url = $this->createUrl($order);
414
- if ($url) {
415
- // Display checkout.
 
 
416
  $html =
417
- $this->iframe_width_desc = '<img width="468" height="60" src="' .
418
- plugins_url('images/' . $this->banners['mercadopago_standard'][$this->site_id], plugin_dir_path(__FILE__)) . '">';
419
- if ('iframe' != $this->method) {
420
- if ('yes' == $this->debug) {
421
- $this->log->add($this->id, $this->id . ': @[renderOrderForm] - rendering Mercado Pago lightbox (modal window).');
 
 
 
422
  }
423
- $html .= '<p></p><p>' . wordwrap(
424
- __('Thank you for your order. Please, proceed with your payment clicking in the bellow button.', 'woocommerce-mercadopago-module'),
425
- 60, '<br>') . '</p>';
426
  $html .=
427
- '<a id="submit-payment" href="' . $url . '" name="MP-Checkout" class="button alt" mp-mode="modal">' .
428
- __('Pay with Mercado Pago', 'woocommerce-mercadopago-module') .
429
- '</a> ';
 
 
430
  $html .=
431
- '<a class="button cancel" href="' . esc_url($order->get_cancel_order_url()) . '">' .
432
- __('Cancel order &amp; Clear cart', 'woocommerce-mercadopago-module') .
433
- '</a><style type="text/css">#MP-Checkout-dialog #MP-Checkout-IFrame { bottom: -28px !important; height: 590px !important; }</style>';
434
- // Includes javascript.
435
- $html .=
436
- '<script type="text/javascript">(function(){function $MPBR_load(){window.$MPBR_loaded !== true && (function(){var s = document.createElement("script");s.type = "text/javascript";s.async = true;s.src = ("https:"==document.location.protocol?"https://www.mercadopago.com/org-img/jsapi/mptools/buttons/":"http://mp-tools.mlstatic.com/buttons/")+"render.js";var x = document.getElementsByTagName("script")[0];x.parentNode.insertBefore(s, x);window.$MPBR_loaded = true;})();}window.$MPBR_loaded !== true ? (window.attachEvent ? window.attachEvent("onload", $MPBR_load) : window.addEventListener("load", $MPBR_load, false)) : null;})();</script>';
 
 
 
 
 
 
 
437
  } else {
438
- if ('yes' == $this->debug) {
439
- $this->log->add($this->id, $this->id . ': @[renderOrderForm] - embedding Mercado Pago iFrame.');
 
 
 
 
440
  }
441
- $html .= '<p></p><p>' . wordwrap(
442
- __('Thank you for your order. Proceed with your payment completing the following information.', 'woocommerce-mercadopago-module'),
443
- 60, '<br>') . '</p>';
444
  $html .=
445
- '<iframe src="' . $url . '" name="MP-Checkout" ' .
446
- 'width="' . (is_numeric((int)$this->iframe_width) ? $this->iframe_width : 640) . '" ' .
447
- 'height="' . (is_numeric((int)$this->iframe_height) ? $this->iframe_height : 800) . '" ' .
 
 
 
 
 
448
  'frameborder="0" scrolling="no" id="checkout_mercadopago"></iframe>';
449
  }
450
  return $html;
451
  } else {
452
- $html =
453
- '<p>' . __('An error occurred when proccessing your payment. Please try again or contact us for assistence.', 'woocommerce-mercadopago-module') . '</p>';
 
 
 
 
 
 
454
  $html .=
455
- '<a class="button cancel" href="' . esc_url($order->get_cancel_order_url()) . '">' .
456
- __('Click to try again', 'woocommerce-mercadopago-module') .
 
 
 
 
457
  '</a>';
458
  return $html;
459
  }
460
  }
461
-
462
- // 3. Create Mercado Pago preference and get init_point URL based in the
463
- // order options from the cart.
464
- public function buildPaymentPreference($order) {
465
-
466
- // Here we build the array that contains ordered itens, from customer cart
 
 
 
 
 
 
 
 
 
 
467
  $items = array();
468
- if (sizeof($order->get_items()) > 0) {
469
- foreach ($order->get_items() as $item) {
470
- if ($item['qty']) {
471
- $product = new WC_product($item['product_id']);
472
- array_push($items, array(
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
473
  'id' => $item['product_id'],
474
- 'title' => ($product->post->post_title . ' x ' . $item['qty']),
475
- 'description' => (
476
  // This handles description width limit of Mercado Pago.
477
- strlen($product->post->post_content) > 230 ?
478
- substr($product->post->post_content, 0, 230) . "..." :
479
- $product->post->post_content
 
 
 
 
480
  ),
481
- 'picture_url' => $product->get_image(),
482
  'category_id' => $this->store_categories_id[$this->category_id],
483
  'quantity' => 1,
484
- 'unit_price' => (float)$item['line_total'],
485
- 'currency_id' => get_woocommerce_currency()
486
- ));
487
  }
488
  }
489
- // shipment cost as an item (if we enable it in custom, we loss the 2 cards feature)
490
- /*array_push($items, array(
491
- 'title' => $order->get_shipping_to_display(),
492
- 'description' => $order->get_shipping_to_display(),
493
- 'category_id' => $this->store_categories_id[$this->category_id],
494
- 'quantity' => 1,
495
- 'unit_price' => (float)$order->get_total_shipping(),
496
- 'currency_id' => get_woocommerce_currency()
497
- ));*/
498
- }
499
-
500
- // Find excluded payment methods. If 'n/d' is in array index, we should
501
- // disconsider the remaining values.
502
- $excluded_payment_methods = array();
503
- try { // in some PHP versions, $this->ex_payments is interpreted as a not iterable object
504
- foreach ($this->ex_payments as $excluded) {
505
- if ($excluded == 0) // if "n/d" is selected, we just not add any items to the array
506
- break;
507
- array_push($excluded_payment_methods, array(
508
- "id" => $this->payment_methods[$excluded]
509
- ));
510
- }
511
- } catch (MercadoPagoException $e) {
512
- if ('yes' == $this->debug) {
513
- $this->log->add($this->id, $this->id . ': @[DEBUG] - excluded payments: exception caught: ' . print_r($e, true));
514
- }
515
- }
516
- $payment_methods = array(
517
- 'installments' => (is_numeric((int)$this->installments) ? (int)$this->installments : 24),
518
- 'default_installments' => 1
519
- );
520
- // Set excluded payment methods.
521
- if (count($excluded_payment_methods) > 0) {
522
- $payment_methods['excluded_payment_methods'] = $excluded_payment_methods;
523
- }
524
-
525
- // Create Mercado Pago preference.
526
- $preferences = array(
527
- 'items' => $items,
528
- // Payer should be filled with billing info because orders can be made with non-logged customers.
529
- 'payer' => array(
530
- 'name' => $order->billing_first_name,
531
- 'surname' => $order->billing_last_name,
532
- 'email' => $order->billing_email,
533
- 'phone' => array(
534
- 'number' => $order->billing_phone
535
- ),
536
- 'address' => array(
537
- 'street_name' => $order->billing_address_1 . ' / ' .
538
- $order->billing_city . ' ' .
539
- $order->billing_state . ' ' .
540
- $order->billing_country,
541
- 'zip_code' => $order->billing_postcode
542
- )
543
- ),
544
- 'back_urls' => array(
545
- 'success' => esc_url($this->get_return_url($order)),
546
- 'failure' => str_replace('&amp;', '&', $order->get_cancel_order_url()),
547
- 'pending' => esc_url($this->get_return_url($order))
548
- ),
549
- //'marketplace' => $this->site_id,
550
- //'marketplace_fee' =>
551
- 'shipments' => array(
552
- 'cost' => (float)$order->get_total_shipping(),
553
- 'mode' => 'custom',
554
- 'receiver_address' => array(
555
- 'zip_code' => $order->shipping_postcode,
556
- //'street_number' =>
557
- 'street_name' => $order->shipping_address_1 . ' ' .
558
- $order->shipping_city . ' ' .
559
- $order->shipping_state . ' ' .
560
- $order->shipping_country,
561
- //'floor' =>
562
- 'apartment' => $order->shipping_address_2
563
- )
564
- ),
565
- 'payment_methods' => $payment_methods,
566
- 'notification_url' => $this->domain . '/' . $this->id . '/?wc-api=WC_WooMercadoPago_Gateway',
567
- 'external_reference' => $this->invoice_prefix . $order->id
568
- //'additional_info' => $order->customer_message
569
- //'expires' =>
570
- //'expiration_date_from' =>
571
- //'expiration_date_to' =>
572
  );
573
- // Set sponsor ID
574
- if (!$this->isTestUser) {
575
- $preferences['sponsor_id'] = (int)($sponsor_id[$this->site_id]);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
576
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
577
  // Auto return options.
578
- if ('yes' == $this->auto_return) {
579
- $preferences['auto_return'] = "approved";
580
  }
581
- if ('yes' == $this->debug) {
582
- $this->log->add($this->id, $this->id . ': @[buildPaymentPreference] - requesting mercado pago preference creation with following structure: ' . print_r($preferences, true));
 
 
 
 
583
  }
584
- $preferences = apply_filters('woocommerce_mercadopago_module_preferences', $preferences, $order);
 
 
 
 
585
  return $preferences;
586
  }
 
587
  // --------------------------------------------------
588
- protected function createUrl($order) {
589
- // Creates the order parameters by checking the cart configuration.
590
- $preferences = $this->buildPaymentPreference($order);
591
- $mp = new MP($this->client_id, $this->client_secret);
592
  // Checks for sandbox mode.
593
- if ('yes' == $this->sandbox) {
594
- $mp->sandbox_mode(true);
595
- if ('yes' == $this->debug) {
596
- $this->log->add($this->id, $this->id . ': @[createUrl] - sandbox mode is enabled');
 
 
 
597
  }
598
  } else {
599
- $mp->sandbox_mode(false);
600
  }
 
 
 
601
  // Create order preferences with Mercado Pago API request.
602
  try {
603
- $checkout_info = $mp->create_preference(json_encode($preferences));
604
- if (is_wp_error($checkout_info) || $checkout_info['status'] < 200 || $checkout_info['status'] >= 300) {
605
- if ('yes' == $this->debug) {
606
- $this->log->add($this->id, $this->id . ': @[createUrl] - payment creation failed with error: ' . $checkout_info['response']['status']);
 
 
 
 
 
 
 
 
 
 
 
 
 
607
  }
608
  return false;
609
  } else {
610
- if ('yes' == $this->debug) {
611
- $this->log->add($this->id, $this->id . ': @[createUrl] - payment link generated with success from mercado pago, with structure as follow: ' . print_r($checkout_info, true));
 
 
 
 
612
  }
613
- if ('yes' == $this->sandbox) {
614
  return $checkout_info['response']['sandbox_init_point'];
615
  } else {
616
  return $checkout_info['response']['init_point'];
617
  }
618
  }
619
- } catch (MercadoPagoException $e) {
620
- if ('yes' == $this->debug) {
621
- $this->log->add($this->id, $this->id . ': @[createUrl] - payment creation failed with exception: ' . print_r($e, true));
 
 
 
 
 
622
  }
623
  return false;
624
  }
 
625
  }
626
-
627
  /*
628
  * ========================================================================
629
- * AUXILIARY AND FEEDBACK METHODS
630
  * ========================================================================
631
  */
632
 
633
- // Check if we have valid credentials.
634
- public function validateCredentials() {
635
- if (empty($this->client_id)) return false;
636
- if (empty($this->client_secret)) return false;
637
- if (strlen($this->client_id) > 0 && strlen($this->client_secret) > 0) {
638
- try {
639
- $mp = new MP($this->client_id, $this->client_secret);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
640
  return true;
641
- } catch (Exception $e) {
 
 
642
  return false;
643
  }
 
 
 
 
 
 
 
 
 
 
 
644
  }
 
645
  return false;
 
646
  }
647
-
 
 
 
 
 
 
 
648
  // Return boolean indicating if currency is supported.
649
- protected function isSupportedCurrency() {
650
- return in_array(get_woocommerce_currency(), array('ARS', 'BRL', 'CLP', 'COP', 'MXN', 'USD', 'VEF'));
651
  }
652
 
653
  // Called automatically by WooCommerce, verify if Module is available to use.
654
  public function is_available() {
655
- // Test if is valid for use.
656
- $available = ('yes' == $this->settings['enabled']) &&
657
- ! empty($this->client_id) &&
658
- ! empty($this->client_secret) &&
659
- $this->isSupportedCurrency();
 
 
 
 
 
 
 
 
 
 
660
  return $available;
661
  }
662
-
663
  // Fix css for Mercado Pago in specific cases.
664
  public function css() {
665
- if (defined('WC_VERSION') && version_compare(WC_VERSION, '2.1', '>=')) {
666
- $page_id = wc_get_page_id('checkout');
667
  } else {
668
- $page_id = woocommerce_get_page_id('checkout');
669
  }
670
- if (is_page($page_id)) {
671
- echo '<style type="text/css">#MP-Checkout-dialog { z-index: 9999 !important; }</style>' . PHP_EOL;
 
672
  }
673
  }
674
-
675
  // Get the URL to admin page.
676
  protected function admin_url() {
677
- if (defined('WC_VERSION') && version_compare(WC_VERSION, '2.1', '>=')) {
678
  return admin_url(
679
  'admin.php?page=wc-settings&tab=checkout&section=wc_woomercadopago_gateway'
680
  );
@@ -685,218 +1469,558 @@ class WC_WooMercadoPago_Gateway extends WC_Payment_Gateway {
685
  }
686
 
687
  // Notify that Client_id and/or Client_secret are not valid.
688
- public function clientIdOrSecretMissingMessage() {
689
- echo '<div class="error"><p><strong>' .
690
- __('Mercado Pago is Inactive', 'woocommerce-mercadopago-module') .
691
- '</strong>: ' .
692
- sprintf(
693
- __('Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured.', 'woocommerce-mercadopago-module') . ' %s',
694
- '<a href="' . $this->admin_url() . '">' . __('Click here and configure!', 'woocommerce-mercadopago-module') . '</a>') .
695
- '</p></div>';
696
- }
697
-
698
- // Notify that currency is not supported.
699
- public function currencyNotSupportedMessage() {
700
  echo '<div class="error"><p><strong>' .
701
- __('Mercado Pago is Inactive', 'woocommerce-mercadopago-module') .
702
  '</strong>: ' .
703
- sprintf(
704
- __('The currency') . ' <code>%s</code> ' . __('is not supported. Supported currencies are: ARS, BRL, CLP, COP, MXN, USD, VEF.', 'woocommerce-mercadopago-module'),
705
- get_woocommerce_currency()) .
706
  '</p></div>';
707
  }
708
-
709
- public function getCountryName($site_id) {
710
- $country = $site_id;
711
- switch ($site_id) {
712
- case 'MLA': return __('Argentine', 'woocommerce-mercadopago-module');
713
- case 'MLB': return __('Brazil', 'woocommerce-mercadopago-module');
714
- case 'MCO': return __('Colombia', 'woocommerce-mercadopago-module');
715
- case 'MLC': return __('Chile', 'woocommerce-mercadopago-module');
716
- case 'MLV': return __('Mexico', 'woocommerce-mercadopago-module');
717
- case 'MLM': return __('Venezuela', 'woocommerce-mercadopago-module');
718
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
719
  }
720
-
721
  /*
722
  * ========================================================================
723
- * IPN MECHANICS
724
  * ========================================================================
725
  */
726
-
727
- // This call checks any incoming notifications from Mercado Pago server.
 
 
 
728
  public function check_ipn_response() {
729
- if ('yes' == $this->debug) {
730
- $this->log->add($this->id, $this->id . ': @[check_ipn_response] - got a call from mercado pago ipn');
731
- }
732
  @ob_clean();
733
- $data = $this->check_ipn_request_is_valid($_GET);
734
- if ($data) {
735
- header('HTTP/1.1 200 OK');
736
- if ('yes' == $this->debug) {
737
- $this->log->add($this->id, $this->id . ': @[check_ipn_response] - received _get call with following content: ' . print_r($data, true));
738
- }
739
- do_action('valid_mercadopago_ipn_request', $data);
740
- } else {
741
- if ('yes' == $this->debug) {
742
- $this->log->add($this->id, $this->id . ': @[check_ipn_response] - Mercado Pago Request Failure: ' . print_r($_GET, true));
743
- }
744
- wp_die(__('Mercado Pago Request Failure', 'woocommerce-mercadopago-module'));
745
  }
746
- }
747
-
748
- // Get received data from IPN and checks if we have a merchant_order or
749
- // payment associated. If we have these information, we return data to be
750
- // processed by successful_request function.
751
- public function check_ipn_request_is_valid($data) {
752
- if ('yes' == $this->debug) {
753
- $this->log->add($this->id, $this->id . ': @[check_ipn_request_is_valid] - received ipn message from mercado pago, checking validity with $data containing: ' . print_r($data, true));
754
- }
755
- if (!isset($data['id'])) {
756
- if ('yes' == $this->debug) {
757
- $this->log->add($this->id, $this->id . ': @[check_ipn_request_is_valid] - failing due to ID absent');
758
- }
759
- return false; // No ID? No process!
760
- }
761
- // Create MP object and setup sandbox mode.
762
- $mp = new MP($this->client_id, $this->client_secret);
763
- if ('yes' == $this->sandbox) {
764
- $mp->sandbox_mode(true);
765
- } else {
766
- $mp->sandbox_mode(false);
767
- }
768
- try { // Get the merchant_order reported by the IPN. Glossary of attributes response in https://developers.mercadopago.com
769
- $params = array("access_token" => $mp->get_access_token());
770
- if ($data["topic"] == 'merchant_order') {
771
- $merchant_order_info = $mp->get("/merchant_orders/" . $_GET["id"], $params, false);
772
- // If the payment's transaction amount is equal (or bigger) than the merchant order's amount you can release your items
773
- if (!is_wp_error($merchant_order_info) && ($merchant_order_info["status"] == 200)) {
774
- $payments = $merchant_order_info["response"]["payments"];
775
- // check if we have more than one payment method
776
- if (sizeof($payments) == 2) {
777
- if (strcasecmp($payments[0]['status'], $payments[1]['status']) != 0) {
778
- if ('yes' == $this->debug) {
779
- $this->log->add($this->id, $this->id . ': @[check_ipn_request_is_valid] - two payments with status not equal');
780
- }
781
- } else {
782
- return $merchant_order_info["response"];
783
  }
784
- } else { // If we have only one payment, we can go on its status
785
- return $merchant_order_info['response'];
786
- }
787
  } else {
788
- if ('yes' == $this->debug) {
789
- $this->log->add($this->id, $this->id . ': @[check_ipn_request_is_valid] - got status not equal 200 or some error');
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
790
  }
791
- return false;
792
  }
 
 
 
 
 
 
 
 
 
793
  }
794
- } catch (MercadoPagoException $e) {
795
- if ('yes' == $this->debug) {
796
- $this->log->add($this->id, $this->id . ': @[check_ipn_request_is_valid] - GOT EXCEPTION: ' . $e->getMessage());
 
 
 
 
 
 
 
 
 
 
 
 
 
797
  }
798
- return false;
 
799
  }
800
- return true;
801
  }
802
-
803
- // Properly handles each case of notification, based in payment status.
804
- public function successful_request($data) {
805
- if ('yes' == $this->debug) {
806
- $this->log->add($this->id, $this->id . ': @[successful_request] - starting to process ipn update...');
 
 
 
 
 
 
 
807
  }
 
 
808
  $order_key = $data['external_reference'];
809
- if (!empty($order_key)) {
810
- $order_id = (int)str_replace($this->invoice_prefix, '', $order_key);
811
- $order = new WC_Order($order_id);
812
- // Checks whether the invoice number matches the order. If true processes the payment.
813
- if ($order->id === $order_id) {
814
- if ( 'yes' == $this->debug ) {
815
- $this->log->add($this->id, $this->id . ': @[successful_request] - got order with ID ' . $order->id . ' and status ' . $data['payments'][0]['status']);
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
816
  }
817
- // Order details.
818
- if (!empty($data['id'])) {
819
- update_post_meta(
820
- $order_id,
821
- __('Mercado Pago Transaction ID', 'woocommerce-mercadopago-module'),
822
- $data['id']
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
823
  );
824
  }
825
- if (!empty($data['payer']['email'])) {
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
826
  update_post_meta(
827
  $order_id,
828
- __('Payer email', 'woocommerce-mercadopago-module'),
829
- $data['payer']['email']
 
 
 
830
  );
831
  }
832
- if (!empty($data['payment_type'])) {
833
  update_post_meta(
834
  $order_id,
835
- __('Payment type', 'woocommerce-mercadopago-module'),
836
- $data['payment_type']
837
  );
838
  }
839
- if (!empty($data['payments'])) {
840
- $payment_ids = array();
841
- foreach ($data['payments'] as $payment) {
842
- $payment_ids[] = $payment['id'];
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
843
  }
844
- if (sizeof($payment_ids) > 0) {
845
- update_post_meta(
846
- $order_id,
847
- __('Mercado Pago Payment ID', 'woocommerce-mercadopago-module'),
848
- implode(', ', $payment_ids)
849
- );
850
  }
851
- }
852
- switch ($data['payments'][0]['status']) {
853
- case 'approved':
854
- $order->add_order_note(
855
- 'Mercado Pago: ' . __('Payment approved.', 'woocommerce-mercadopago-module')
856
- );
857
- $order->payment_complete();
858
- break;
859
- case 'pending':
860
- $order->add_order_note(
861
- 'Mercado Pago: ' . __('Customer haven\'t paid yet.', 'woocommerce-mercadopago-module')
862
- );
863
- break;
864
- case 'in_process':
865
- $order->update_status('on-hold',
866
- 'Mercado Pago: ' . __('Payment under review.', 'woocommerce-mercadopago-module')
867
- );
868
- break;
869
- case 'rejected':
870
- $order->update_status('failed',
871
- 'Mercado Pago: ' . __('The payment was refused. The customer can try again.', 'woocommerce-mercadopago-module')
872
- );
873
- break;
874
- case 'refunded':
875
- $order->update_status(
876
- 'refunded',
877
- 'Mercado Pago: ' . __('The payment was refunded to the customer.', 'woocommerce-mercadopago-module')
878
- );
879
- break;
880
- case 'cancelled':
881
- $order->update_status(
882
- 'cancelled',
883
- 'Mercado Pago: ' . __('The payment was cancelled.', 'woocommerce-mercadopago-module')
884
- );
885
- break;
886
- case 'in_mediation':
887
- $order->add_order_note(
888
- 'Mercado Pago: ' . __('The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module')
889
- );
890
- break;
891
- case 'charged-back':
892
- $order->add_order_note(
893
- 'Mercado Pago: ' . __('The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module')
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
894
  );
895
- default:
896
- break;
897
  }
 
898
  }
899
  }
 
900
  }
901
-
902
  }
1
  <?php
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
  /**
4
+ * Part of Woo Mercado Pago Module
5
+ * Author - Mercado Pago
6
+ * Developer - Marcelo Tomio Hama / marcelo.hama@mercadolivre.com
7
+ * Copyright - Copyright(c) MercadoPago [https://www.mercadopago.com]
8
+ * License - https://www.gnu.org/licenses/gpl.html GPL version 2 or higher
9
  */
10
 
11
  // This include Mercado Pago library SDK
12
+ require_once dirname( __FILE__ ) . '/sdk/lib/mercadopago.php';
13
 
14
  /**
15
+ * Summary: Extending from WooCommerce Payment Gateway class.
16
+ * Description: This class implements Mercado Pago Basic checkout.
17
+ * @since 1.0.0
18
  */
19
  class WC_WooMercadoPago_Gateway extends WC_Payment_Gateway {
20
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
21
  public function __construct() {
 
 
 
22
 
23
+ // Creating PHP version message.
24
+ $min_php_message = phpversion() >= WC_WooMercadoPago_Module::MIN_PHP ?
25
+ '<img width="14" height="14" src="' . plugins_url( 'images/check.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
26
+ __( 'Your PHP version is OK.', 'woocommerce-mercadopago-module' ) :
27
+ '<img width="14" height="14" src="' . plugins_url( 'images/error.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
28
+ sprintf(
29
+ __( 'Your PHP version do not support this module. You have %s, minimal required is %s.', 'woocommerce-mercadopago-module' ),
30
+ phpversion(), WC_WooMercadoPago_Module::MIN_PHP
31
+ );
32
+ // Check cURL.
33
+ $curl_message = in_array( 'curl', get_loaded_extensions() ) ?
34
+ '<img width="14" height="14" src="' . plugins_url( 'images/check.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
35
+ __( 'cURL is installed.', 'woocommerce-mercadopago-module' ) :
36
+ '<img width="14" height="14" src="' . plugins_url( 'images/error.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
37
+ __( 'cURL is not installed.', 'woocommerce-mercadopago-module' );
38
+ // Check SSL.
39
+ $is_ssl_message = empty( $_SERVER['HTTPS'] ) || $_SERVER['HTTPS'] == 'off' ?
40
+ '<img width="14" height="14" src="' . plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
41
+ __( 'SSL is missing in your site.', 'woocommerce-mercadopago-module' ) :
42
+ '<img width="14" height="14" src="' . plugins_url( 'images/check.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
43
+ __( 'Your site has SSL enabled.', 'woocommerce-mercadopago-module' );
44
+
45
+ // Mercado Pago fields.
46
+ $this->mp = null;
47
  $this->site_id = null;
48
+ $this->collector_id = null;
49
+ $this->currency_ratio = -1;
50
+ $this->is_test_user = false;
51
+
52
+ // Auxiliary fields.
53
+ $this->currency_message = '';
54
  $this->payment_methods = array();
55
+ $this->country_configs = array();
56
  $this->store_categories_id = array();
57
+ $this->store_categories_description = array();
58
+
59
+ // WooCommerce fields.
60
+ $this->supports = array( 'products', 'refunds' );
61
  $this->id = 'woocommerce-mercadopago-module';
62
+ $this->domain = get_site_url() . '/index.php';
63
  $this->icon = apply_filters(
64
  'woocommerce_mercadopago_icon',
65
+ plugins_url( 'images/mercadopago.png', plugin_dir_path( __FILE__ ) )
66
  );
67
+ $this->method_title = __( 'Mercado Pago - Basic Checkout', 'woocommerce-mercadopago-module' );
68
  $this->method_description = '<img width="200" height="52" src="' .
69
+ plugins_url(
70
+ 'images/mplogo.png',
71
+ plugin_dir_path( __FILE__ )
72
+ ) . '"><br><br>' . '<strong>' .
73
+ __( 'This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store.', 'woocommerce-mercadopago-module' ) .
74
+ '</strong>' . '<br><br>' .
75
+ $min_php_message . '<br>' .
76
+ $is_ssl_message . '<br>' .
77
+ $curl_message;
78
+
79
+ // Fields used in Mercado Pago Module configuration page.
80
+ $this->client_id = $this->get_option( 'client_id' );
81
+ $this->client_secret = $this->get_option( 'client_secret' );
82
+ $this->title = $this->get_option( 'title' );
83
+ $this->description = $this->get_option( 'description' );
84
+ $this->category_id = $this->get_option( 'category_id' );
85
+ $this->invoice_prefix = $this->get_option( 'invoice_prefix', 'WC-' );
86
+ $this->method = $this->get_option( 'method', 'iframe' );
87
+ $this->iframe_width = $this->get_option( 'iframe_width', 640 );
88
+ $this->iframe_height = $this->get_option( 'iframe_height', 800 );
89
+ $this->auto_return = $this->get_option( 'auto_return', true );
90
+ $this->success_url = $this->get_option( 'success_url', '' );
91
+ $this->failure_url = $this->get_option( 'failure_url', '' );
92
+ $this->pending_url = $this->get_option( 'pending_url', '' );
93
+ $this->currency_conversion = $this->get_option( 'currency_conversion', false );
94
+ $this->installments = $this->get_option( 'installments', '24' );
95
+ $this->ex_payments = $this->get_option( 'ex_payments', 'n/d' );
96
+ $this->gateway_discount = $this->get_option( 'gateway_discount', 0 );
97
+ $this->payment_split_mode = 'inactive';
98
+ //$this->sandbox = $this->get_option( 'sandbox', false );
99
+ $this->sandbox = 'no';
100
+ $this->debug = $this->get_option( 'debug' );
101
+
102
+ // Logging and debug.
103
+ if ( 'yes' == $this->debug ) {
104
+ if ( class_exists( 'WC_Logger' ) ) {
105
+ $this->log = new WC_Logger();
106
+ } else {
107
+ $this->log = WC_MercadoPago_Module::woocommerce_instance()->logger();
108
+ }
109
+ }
110
+
111
  // Render our configuration page and init/load fields.
112
  $this->init_form_fields();
113
  $this->init_settings();
114
+
115
+ // Used by IPN to receive IPN incomings.
116
+ add_action(
117
  'woocommerce_api_wc_woomercadopago_gateway',
118
+ array( $this, 'check_ipn_response' )
119
  );
120
+ // Used by IPN to process valid incomings.
121
+ add_action(
122
  'valid_mercadopago_ipn_request',
123
+ array( $this, 'successful_request' )
124
  );
125
+ // Process the cancel order meta box order action.
126
+ add_action(
127
+ 'woocommerce_order_action_cancel_order',
128
+ array( $this, 'process_cancel_order_meta_box_actions' )
129
+ );
130
+ // Used by WordPress to render the custom checkout page.
131
+ add_action(
132
  'woocommerce_receipt_' . $this->id,
133
+ array( $this, 'receipt_page' )
134
  );
135
+ // Used to fix CSS in some older WordPress/WooCommerce versions.
136
+ add_action(
137
+ 'wp_head',
138
+ array( $this, 'css' )
139
  );
140
+ // Used in settings page to hook "save settings" action.
141
+ add_action(
142
  'woocommerce_update_options_payment_gateways_' . $this->id,
143
+ array( $this, 'custom_process_admin_options' )
144
+ );
145
+ // Scripts for order configuration.
146
+ add_action(
147
+ 'woocommerce_after_checkout_form',
148
+ array( $this, 'add_checkout_script' )
149
+ );
150
+ // Display discount in payment method title.
151
+ add_filter(
152
+ 'woocommerce_gateway_title',
153
+ array( $this, 'get_payment_method_title_basic' ), 10, 2
154
+ );
155
+ // Checkout updates.
156
+ add_action(
157
+ 'woocommerce_thankyou',
158
+ array( $this, 'update_checkout_status' )
159
  );
 
 
 
 
 
 
 
 
 
 
160
 
161
+ // Verify if client_id or client_secret is empty.
162
+ if ( empty( $this->client_id ) || empty( $this->client_secret ) ) {
163
+ if ( ! empty( $this->settings['enabled'] ) && 'yes' == $this->settings['enabled'] ) {
164
+ add_action( 'admin_notices', array( $this, 'client_id_or_secret_missing_message' ) );
 
 
165
  }
166
  }
167
+
168
  }
169
+
170
+ /**
171
+ * Summary: Initialise Gateway Settings Form Fields.
172
+ * Description: Initialise Gateway settings form fields with a customized page.
173
+ */
174
  public function init_form_fields() {
175
+
176
+ // If module is disabled, we do not need to load and process the settings page.
177
+ if ( empty( $this->settings['enabled'] ) || 'no' == $this->settings['enabled'] ) {
178
+ $this->form_fields = array(
179
+ 'enabled' => array(
180
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
181
+ 'type' => 'checkbox',
182
+ 'label' => __( 'Enable Basic Checkout', 'woocommerce-mercadopago-module' ),
183
+ 'default' => 'no'
184
+ )
185
+ );
186
+ return;
187
+ }
188
+
189
  $api_secret_locale = sprintf(
190
+ '<a href="https://www.mercadopago.com/mla/account/credentials?type=basic" target="_blank">%s</a>, ' .
191
+ '<a href="https://www.mercadopago.com/mlb/account/credentials?type=basic" target="_blank">%s</a>, ' .
192
+ '<a href="https://www.mercadopago.com/mlc/account/credentials?type=basic" target="_blank">%s</a>, ' .
193
+ '<a href="https://www.mercadopago.com/mco/account/credentials?type=basic" target="_blank">%s</a>, ' .
194
+ '<a href="https://www.mercadopago.com/mlm/account/credentials?type=basic" target="_blank">%s</a>, ' .
195
+ '<a href="https://www.mercadopago.com/mpe/account/credentials?type=basic" target="_blank">%s</a>, ' .
196
+ '<a href="https://www.mercadopago.com/mlu/account/credentials?type=basic" target="_blank">%s</a> %s ' .
197
+ '<a href="https://www.mercadopago.com/mlv/account/credentials?type=basic" target="_blank">%s</a>',
198
+ __( 'Argentine', 'woocommerce-mercadopago-module' ),
199
+ __( 'Brazil', 'woocommerce-mercadopago-module' ),
200
+ __( 'Chile', 'woocommerce-mercadopago-module' ),
201
+ __( 'Colombia', 'woocommerce-mercadopago-module' ),
202
+ __( 'Mexico', 'woocommerce-mercadopago-module' ),
203
+ __( 'Peru', 'woocommerce-mercadopago-module' ),
204
+ __( 'Uruguay', 'woocommerce-mercadopago-module' ),
205
+ __( 'or', 'woocommerce-mercadopago-module' ),
206
+ __( 'Venezuela', 'woocommerce-mercadopago-module' )
207
  );
208
+
209
  // Trigger API to get payment methods and site_id, also validates Client_id/Client_secret.
210
+ if ( $this->validate_credentials() ) {
211
+ // Checking the currency.
212
+ $this->currency_message = '';
213
+ if ( ! $this->is_supported_currency() && 'yes' == $this->settings['enabled'] ) {
214
+ if ( $this->currency_conversion == 'no' ) {
215
+ $this->currency_ratio = -1;
216
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_not_converted_msg(
217
+ $this->country_configs['currency'],
218
+ $this->country_configs['country_name']
219
+ );
220
+ } elseif ( $this->currency_conversion == 'yes' && $this->currency_ratio != -1) {
221
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_converted_msg(
222
+ $this->country_configs['currency'],
223
+ $this->currency_ratio
224
+ );
225
+ } else {
226
+ $this->currency_ratio = -1;
227
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_conversion_err_msg(
228
+ $this->country_configs['currency']
229
+ );
230
  }
231
+ } else {
232
+ $this->currency_ratio = -1;
 
 
 
 
 
 
 
 
 
 
 
 
 
233
  }
234
+ $this->credentials_message = WC_WooMercadoPago_Module::build_valid_credentials_msg(
235
+ $this->country_configs['country_name'],
236
+ $this->site_id
237
+ );
238
+ $this->payment_desc =
239
+ __( 'Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago.', 'woocommerce-mercadopago-module' );
240
  } else {
241
+ array_push( $this->payment_methods, 'n/d' );
242
+ $this->credentials_message = WC_WooMercadoPago_Module::build_invalid_credentials_msg();
243
  $this->payment_desc = '<img width="12" height="12" src="' .
244
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
245
+ __( 'Configure your Client_id and Client_secret to have access to more options.', 'woocommerce-mercadopago-module' );
246
+ }
247
+
248
+ // fill categories (can be handled without credentials).
249
+ $categories = WC_WooMercadoPago_Module::get_categories();
250
+ $this->store_categories_id = $categories['store_categories_id'];
251
+ $this->store_categories_description = $categories['store_categories_description'];
252
+
 
 
 
 
 
253
  // Checks validity of iFrame width/height fields.
254
+ if ( ! is_numeric( $this->iframe_width) ) {
255
  $this->iframe_width_desc = '<img width="12" height="12" src="' .
256
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
257
+ __( 'This field should be an integer.', 'woocommerce-mercadopago-module' );
258
  } else {
259
  $this->iframe_width_desc =
260
+ __( 'If your integration method is iFrame, please inform the payment iFrame width.', 'woocommerce-mercadopago-module' );
261
  }
262
+ if ( ! is_numeric( $this->iframe_height) ) {
263
  $this->iframe_height_desc = '<img width="12" height="12" src="' .
264
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
265
+ __( 'This field should be an integer.', 'woocommerce-mercadopago-module' );
266
  } else {
267
  $this->iframe_height_desc =
268
+ __( 'If your integration method is iFrame, please inform the payment iFrame height.', 'woocommerce-mercadopago-module' );
269
  }
270
+
271
  // Checks if max installments is a number.
272
+ if ( ! is_numeric( $this->installments ) ) {
273
  $this->installments_desc = '<img width="12" height="12" src="' .
274
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
275
+ __( 'This field should be an integer.', 'woocommerce-mercadopago-module' );
276
  } else {
277
  $this->installments_desc =
278
+ __( 'Select the max number of installments for your customers.', 'woocommerce-mercadopago-module' );
279
  }
280
+
281
+ // Validate discount field.
282
+ if ( ! is_numeric( $this->gateway_discount ) ) {
283
+ $this->gateway_discount_desc = '<img width="12" height="12" src="' .
284
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
285
+ __( 'This field should be an integer greater or equal 0 and smaller than 100.', 'woocommerce-mercadopago-module' );
286
+ } elseif ( $this->gateway_discount < 0 || $this->gateway_discount >= 100 ) {
287
+ $this->gateway_discount_desc = '<img width="12" height="12" src="' .
288
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
289
+ __( 'This field should be an integer greater or equal 0 and smaller than 100.', 'woocommerce-mercadopago-module' );
290
+ } else {
291
+ $this->gateway_discount_desc =
292
+ __( 'Give a percentual discount for your customers if they use this payment gateway.', 'woocommerce-mercadopago-module' );
293
+ }
294
+
295
  // This array draws each UI (text, selector, checkbox, label, etc).
296
  $this->form_fields = array(
297
  'enabled' => array(
298
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
299
  'type' => 'checkbox',
300
+ 'label' => __( 'Enable Basic Checkout', 'woocommerce-mercadopago-module' ),
301
+ 'default' => 'no'
302
  ),
303
  'credentials_title' => array(
304
+ 'title' => __( 'Mercado Pago Credentials', 'woocommerce-mercadopago-module' ),
305
  'type' => 'title',
306
+ 'description' => sprintf( '%s', $this->credentials_message ) . '<br>' . sprintf(
307
+ __( 'You can obtain your credentials for', 'woocommerce-mercadopago-module' ) .
308
+ ' %s.', $api_secret_locale
309
+ )
310
  ),
311
  'client_id' => array(
312
  'title' => 'Client_id',
313
  'type' => 'text',
314
+ 'description' =>
315
+ __( 'Insert your Mercado Pago Client_id.', 'woocommerce-mercadopago-module' ),
316
  'default' => '',
317
  'required' => true
318
  ),
319
  'client_secret' => array(
320
  'title' => 'Client_secret',
321
  'type' => 'text',
322
+ 'description' =>
323
+ __( 'Insert your Mercado Pago Client_secret.', 'woocommerce-mercadopago-module' ),
324
  'default' => '',
325
  'required' => true
326
  ),
327
  'ipn_url' => array(
328
+ 'title' =>
329
+ __( 'Instant Payment Notification (IPN) URL', 'woocommerce-mercadopago-module' ),
330
  'type' => 'title',
331
+ 'description' => sprintf(
332
+ __( 'Your IPN URL to receive instant payment notifications is', 'woocommerce-mercadopago-module' ) .
333
+ '<br>%s', '<code>' . WC()->api_request_url( 'WC_WooMercadoPago_Gateway' ) . '</code>.'
334
+ )
335
  ),
336
  'checkout_options_title' => array(
337
+ 'title' => __( 'Checkout Options', 'woocommerce-mercadopago-module' ),
338
  'type' => 'title',
339
  'description' => ''
340
  ),
341
  'title' => array(
342
+ 'title' => __( 'Title', 'woocommerce-mercadopago-module' ),
343
  'type' => 'text',
344
+ 'description' =>
345
+ __( 'Title shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
346
+ 'default' => __( 'Mercado Pago', 'woocommerce-mercadopago-module' )
347
  ),
348
  'description' => array(
349
+ 'title' => __( 'Description', 'woocommerce-mercadopago-module' ),
350
  'type' => 'textarea',
351
+ 'description' =>
352
+ __( 'Description shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
353
+ 'default' => __( 'Pay with Mercado Pago', 'woocommerce-mercadopago-module' )
354
  ),
355
  'category_id' => array(
356
+ 'title' => __( 'Store Category', 'woocommerce-mercadopago-module' ),
357
  'type' => 'select',
358
+ 'description' =>
359
+ __( 'Define which type of products your store sells.', 'woocommerce-mercadopago-module' ),
360
  'options' => $this->store_categories_id
361
  ),
362
  'invoice_prefix' => array(
363
+ 'title' => __( 'Store Identificator', 'woocommerce-mercadopago-module' ),
364
  'type' => 'text',
365
+ 'description' =>
366
+ __( 'Please, inform a prefix to your store.', 'woocommerce-mercadopago-module' )
367
+ . ' ' .
368
+ __( 'If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same identificators.', 'woocommerce-mercadopago-module' ),
369
  'default' => 'WC-'
370
  ),
371
  'method' => array(
372
+ 'title' => __( 'Integration Method', 'woocommerce-mercadopago-module' ),
373
  'type' => 'select',
374
+ 'description' => __( 'Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an internal window is embedded to the page layout).', 'woocommerce-mercadopago-module' ),
375
  'default' => 'iframe',
376
  'options' => array(
377
+ 'iframe' => __( 'iFrame', 'woocommerce-mercadopago-module' ),
378
+ 'modal' => __( 'Modal Window', 'woocommerce-mercadopago-module' ),
379
+ 'redirect' => __( 'Redirect', 'woocommerce-mercadopago-module' )
380
  )
381
  ),
382
  'iframe_width' => array(
383
+ 'title' => __( 'iFrame Width', 'woocommerce-mercadopago-module' ),
384
  'type' => 'text',
385
  'description' => $this->iframe_width_desc,
386
  'default' => '640'
387
  ),
388
  'iframe_height' => array(
389
+ 'title' => __( 'iFrame Height', 'woocommerce-mercadopago-module' ),
390
  'type' => 'text',
391
  'description' => $this->iframe_height_desc,
392
  'default' => '800'
393
  ),
394
  'auto_return' => array(
395
+ 'title' => __( 'Auto Return', 'woocommerce-mercadopago-module' ),
396
  'type' => 'checkbox',
397
+ 'label' => __( 'Automatic Return After Payment', 'woocommerce-mercadopago-module' ),
398
  'default' => 'yes',
399
+ 'description' =>
400
+ __( 'After the payment, client is automatically redirected.', 'woocommerce-mercadopago-module' ),
401
+ ),
402
+ 'back_url_title' => array(
403
+ 'title' => __( 'Back URL Options', 'woocommerce-mercadopago-module' ),
404
+ 'type' => 'title',
405
+ 'description' => ''
406
+ ),
407
+ 'success_url' => array(
408
+ 'title' => __( 'Sucess URL', 'woocommerce-mercadopago-module' ),
409
+ 'type' => 'text',
410
+ 'description' => __( 'Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page.', 'woocommerce-mercadopago-module' ),
411
+ 'default' => ''
412
  ),
413
+ 'failure_url' => array(
414
+ 'title' => __( 'Failure URL', 'woocommerce-mercadopago-module' ),
415
+ 'type' => 'text',
416
+ 'description' => __( 'Where customers should be redirected after a failed purchase. Let blank to redirect to the default store order resume page.', 'woocommerce-mercadopago-module' ),
417
+ 'default' => ''
418
+ ),
419
+ 'pending_url' => array(
420
+ 'title' => __( 'Pending URL', 'woocommerce-mercadopago-module' ),
421
+ 'type' => 'text',
422
+ 'description' => __( 'Where customers should be redirected after a pending purchase. Let blank to redirect to the default store order resume page.', 'woocommerce-mercadopago-module' ),
423
+ 'default' => ''
424
+ ),
425
+ 'payment_title' => array(
426
+ 'title' => __( 'Payment Options', 'woocommerce-mercadopago-module' ),
427
  'type' => 'title',
428
  'description' => ''
429
  ),
430
+ 'currency_conversion' => array(
431
+ 'title' => __( 'Currency Conversion', 'woocommerce-mercadopago-module' ),
432
+ 'type' => 'checkbox',
433
+ 'label' =>
434
+ __( 'If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio.', 'woocommerce-mercadopago-module' ),
435
+ 'default' => 'no',
436
+ 'description' => sprintf( '%s', $this->currency_message )
437
+ ),
438
  'installments' => array(
439
+ 'title' => __( 'Max installments', 'woocommerce-mercadopago-module' ),
440
  'type' => 'text',
441
  'description' => $this->installments_desc,
442
  'default' => '24'
443
  ),
444
  'ex_payments' => array(
445
+ 'title' => __( 'Exclude Payment Methods', 'woocommerce-mercadopago-module' ),
446
+ 'description' => $this->payment_desc,
447
+ 'type' => 'multiselect',
448
+ 'options' => $this->payment_methods,
449
+ 'default' => ''
450
+ ),
451
+ 'gateway_discount' => array(
452
+ 'title' => __( 'Discount by Gateway', 'woocommerce-mercadopago-module' ),
453
+ 'type' => 'number',
454
+ 'description' => $this->gateway_discount_desc,
455
+ 'default' => '0'
456
+ ),
457
+ 'payment_split_mode' => array(
458
+ 'title' => __( 'Two Cards Mode', 'woocommerce-mercadopago-module' ),
459
+ 'type' => 'checkbox',
460
+ 'label' => __( 'Payments with Two Cards', 'woocommerce-mercadopago-module' ),
461
+ 'default' => ( $this->payment_split_mode == 'active' ? 'yes' : 'no' ),
462
+ 'description' =>
463
+ __( 'Your customer will be able to use two different cards to pay the order.', 'woocommerce-mercadopago-module' ),
464
+ ),
465
  'testing' => array(
466
+ 'title' => __( 'Test and Debug Options', 'woocommerce-mercadopago-module' ),
467
  'type' => 'title',
468
  'description' => ''
469
  ),
470
+ //'sandbox' => array(
471
+ // 'title' => __( 'Mercado Pago Sandbox', 'woocommerce-mercadopago-module' ),
472
+ // 'type' => 'checkbox',
473
+ // 'label' => __( 'Enable Mercado Pago Sandbox', 'woocommerce-mercadopago-module' ),
474
+ // 'default' => 'no',
475
+ // 'description' =>
476
+ // __( 'This option allows you to test payments inside a sandbox environment.', 'woocommerce-mercadopago-module' ),
477
+ //),
478
  'debug' => array(
479
+ 'title' => __( 'Debug and Log', 'woocommerce-mercadopago-module' ),
480
  'type' => 'checkbox',
481
+ 'label' => __( 'Enable log', 'woocommerce-mercadopago-module' ),
482
  'default' => 'no',
483
+ 'description' => sprintf(
484
+ __( 'Register event logs of Mercado Pago, such as API requests, in the file', 'woocommerce-mercadopago-module' ) .
485
+ ' %s.', $this->build_log_path_string() . '.<br>' .
486
+ __( 'File location: ', 'woocommerce-mercadopago-module' ) .
487
+ '<code>wordpress/wp-content/uploads/wc-logs/' . $this->id . '-' .
488
+ sanitize_file_name( wp_hash( $this->id) ) . '.log</code>' )
489
  )
490
  );
491
+
492
  }
493
+
494
+ /**
495
+ * Processes and saves options.
496
+ * If there is an error thrown, will continue to save and validate fields, but will leave the
497
+ * erroring field out.
498
+ * @return bool was anything saved?
499
+ */
500
+ public function custom_process_admin_options() {
501
+ $this->init_settings();
502
+
503
+ $post_data = $this->get_post_data();
504
+
505
+ foreach ( $this->get_form_fields() as $key => $field ) {
506
+ if ( 'title' !== $this->get_field_type( $field ) ) {
507
+ try {
508
+ if ( $key == 'payment_split_mode' ) {
509
+ // We dont save split mode as it should come from api.
510
+ $value = $this->get_field_value( $key, $field, $post_data );
511
+ $this->payment_split_mode = ( $value == 'yes' ? 'active' : 'inactive' );
512
+ } else {
513
+ $this->settings[$key] = $this->get_field_value( $key, $field, $post_data );
514
+ }
515
+ } catch ( Exception $e ) {
516
+ $this->add_error( $e->getMessage() );
517
+ }
518
+ }
519
+ }
520
+
521
+ if ( ! empty( $this->settings['client_id'] ) && ! empty( $this->settings['client_secret'] ) ) {
522
+ $this->mp = new MP(
523
+ WC_WooMercadoPago_Module::get_module_version(),
524
+ $this->settings['client_id'],
525
+ $this->settings['client_secret']
526
+ );
527
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
528
+ $this->mp->set_email( $email );
529
+ } else {
530
+ $this->mp = null;
531
+ }
532
+
533
+ // analytics
534
+ if ( $this->mp != null && ! $this->is_test_user ) {
535
+ $infra_data = WC_WooMercadoPago_Module::get_common_settings();
536
+ $infra_data['checkout_basic'] = ( $this->settings['enabled'] == 'yes' ? 'true' : 'false' );
537
+ $infra_data['two_cards'] = ( $this->payment_split_mode == 'active' ? 'true' : 'false' );
538
+ $response = $this->mp->analytics_save_settings( $infra_data );
539
+ if ( 'yes' == $this->debug) {
540
+ $this->log->add(
541
+ $this->id,
542
+ '[custom_process_admin_options] - analytics response: ' .
543
+ json_encode( $response, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
544
+ );
545
+ }
546
+ }
547
+
548
+ // two cards mode
549
+ if ( $this->mp != null ) {
550
+ $response = $this->mp->set_two_cards_mode( $this->payment_split_mode );
551
+ }
552
+
553
+ return update_option(
554
+ $this->get_option_key(),
555
+ apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->settings )
556
+ );
557
+ }
558
+
559
+ /**
560
+ * Handles the manual order refunding in server-side.
561
+ */
562
+ public function process_refund( $order_id, $amount = null, $reason = '' ) {
563
+
564
+ $payments = get_post_meta(
565
+ $order_id,
566
+ '_Mercado_Pago_Payment_IDs',
567
+ true
568
+ );
569
+
570
+ // Validate.
571
+ if ( $this->mp == null || empty( $payments ) ) {
572
+ if ( 'yes' == $this->debug ) {
573
+ $this->log->add(
574
+ $this->id,
575
+ '[process_refund] - no payments or credentials invalid'
576
+ );
577
+ }
578
+ return false;
579
+ }
580
+
581
+ $total_available = 0;
582
+ $payment_structs = array();
583
+ $payment_ids = explode( ', ', $payments );
584
+ foreach ( $payment_ids as $p_id ) {
585
+ $p = get_post_meta(
586
+ $order_id,
587
+ 'Mercado Pago - Payment ' . $p_id,
588
+ true
589
+ );
590
+ $p = explode( '/', $p );
591
+ $paid_arr = explode( ' ', substr( $p[2], 1, -1 ) );
592
+ $paid = ( (float) $paid_arr[1] );
593
+ $refund_arr = explode( ' ', substr( $p[3], 1, -1 ) );
594
+ $refund = ( (float) $refund_arr[1] );
595
+ $p_struct = array(
596
+ 'id' => $p_id,
597
+ 'available_to_refund' => $paid - $refund
598
+ );
599
+ $total_available += $paid - $refund;
600
+ $payment_structs[] = $p_struct;
601
+ }
602
+
603
+ if ( 'yes' == $this->debug ) {
604
+ $this->log->add(
605
+ $this->id,
606
+ '[process_refund] - refunding ' . $amount . ' because of ' . $reason . ' and payments ' .
607
+ json_encode( $payment_structs, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
608
+ );
609
+ }
610
+
611
+ // Do not allow refund more than available or invalid amounts.
612
+ if ( $amount > $total_available || $amount <= 0 ) {
613
+ return false;
614
+ }
615
+
616
+ $remaining_to_refund = $amount;
617
+ foreach ( $payment_structs as $to_refund ) {
618
+ if ( $remaining_to_refund <= $to_refund['available_to_refund'] ) {
619
+ // We want to refund an amount that is less than the available for this payment, so we
620
+ // can just refund and return.
621
+ $response = $this->mp->partial_refund_payment(
622
+ $to_refund['id'],
623
+ $remaining_to_refund,
624
+ $reason,
625
+ $this->invoice_prefix . $order_id
626
+ );
627
+ $message = $response['response']['message'];
628
+ $status = $response['status'];
629
+ if ( 'yes' == $this->debug ) {
630
+ $this->log->add(
631
+ $this->id,
632
+ '[process_refund] - refund payment of id ' . $p_id .
633
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
634
+ );
635
+ }
636
+ if ( $status >= 200 && $status < 300 ) {
637
+ return true;
638
+ } else {
639
+ return false;
640
+ }
641
+ } elseif ( $to_refund['available_to_refund'] > 0 ) {
642
+ // We want to refund an amount that exceeds the available for this payment, so we
643
+ // totally refund this payment, and try to complete refund in other/next payments.
644
+ $response = $this->mp->partial_refund_payment(
645
+ $to_refund['id'],
646
+ $to_refund['available_to_refund'],
647
+ $reason,
648
+ $this->invoice_prefix . $order_id
649
+ );
650
+ $message = $response['response']['message'];
651
+ $status = $response['status'];
652
+ if ( 'yes' == $this->debug ) {
653
+ $this->log->add(
654
+ $this->id,
655
+ '[process_refund] - refund payment of id ' . $p_id .
656
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
657
+ );
658
+ }
659
+ if ( $status < 200 || $status >= 300 ) {
660
+ return false;
661
+ }
662
+ $remaining_to_refund -= $to_refund['available_to_refund'];
663
+ }
664
+ if ( $remaining_to_refund == 0 )
665
+ return true;
666
+ }
667
+
668
+ // Reaching here means that there we run out of payments, and there is an amount
669
+ // remaining to be refund, which is impossible as it implies refunding more than
670
+ // available on paid amounts.
671
+ return false;
672
+
673
+ }
674
+
675
+ /**
676
+ * Handles the manual order cancellation in server-side.
677
+ */
678
+ public function process_cancel_order_meta_box_actions( $order ) {
679
+
680
+ // WooCommerce 3.0 or later.
681
+ if ( method_exists( $order, 'get_meta' ) ) {
682
+ $used_gateway = $order->get_meta( '_used_gateway' );
683
+ $payments = $order->get_meta( '_Mercado_Pago_Payment_IDs' );
684
+ } else {
685
+ $used_gateway = get_post_meta( $order->id, '_used_gateway', true );
686
+ $payments = get_post_meta( $order->id, '_Mercado_Pago_Payment_IDs', true );
687
+ }
688
+
689
+ if ( $used_gateway != 'WC_WooMercadoPago_Gateway' ) {
690
+ return;
691
+ }
692
+
693
+ if ( 'yes' == $this->debug ) {
694
+ $this->log->add(
695
+ $this->id,
696
+ '[process_cancel_order_meta_box_actions] - cancelling payments for ' . $payments
697
+ );
698
+ }
699
+
700
+ if ( $this->mp != null && ! empty( $payments ) ) {
701
+ $payment_ids = explode( ', ', $payments );
702
+ foreach ( $payment_ids as $p_id ) {
703
+ $response = $this->mp->cancel_payment( $p_id );
704
+ $message = $response['response']['message'];
705
+ $status = $response['status'];
706
+ if ( 'yes' == $this->debug ) {
707
+ $this->log->add(
708
+ $this->id,
709
+ '[process_cancel_order_meta_box_actions] - cancel payment of id ' . $p_id .
710
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
711
+ );
712
+ }
713
+ }
714
+ } else {
715
+ if ( 'yes' == $this->debug ) {
716
+ $this->log->add(
717
+ $this->id,
718
+ '[process_cancel_order_meta_box_actions] - no payments or credentials invalid'
719
+ );
720
+ }
721
+ }
722
+
723
+ }
724
+
725
  /*
726
  * ========================================================================
727
+ * CHECKOUT BUSINESS RULES (CLIENT SIDE)
728
  * ========================================================================
729
  */
730
+
731
+ public function payment_fields() {
732
+ // basic checkout
733
+ if ( $description = $this->get_description() ) {
734
+ echo wpautop(wptexturize( $description ) );
735
+ }
736
+ if ( $this->supports( 'default_credit_card_form' ) ) {
737
+ $this->credit_card_form();
738
+ }
739
+ }
740
+
741
+ public function add_checkout_script() {
742
+
743
+ $client_id = $this->get_option( 'client_id' );
744
+
745
+ if ( ! empty( $client_id ) && ! $this->is_test_user ) {
746
+
747
+ $w = WC_WooMercadoPago_Module::woocommerce_instance();
748
+ $logged_user_email = null;
749
+ $payments = array();
750
+ $gateways = WC()->payment_gateways->get_available_payment_gateways();
751
+ foreach ( $gateways as $g ) {
752
+ $payments[] = $g->id;
753
+ }
754
+ $payments = str_replace( '-', '_', implode( ', ', $payments ) );
755
+
756
+ if ( wp_get_current_user()->ID != 0 ) {
757
+ $logged_user_email = wp_get_current_user()->user_email;
758
+ }
759
+
760
+ ?>
761
+ <script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
762
+ <script type="text/javascript">
763
+ var MA = ModuleAnalytics;
764
+ MA.setToken( '<?php echo $client_id; ?>' );
765
+ MA.setPlatform( 'WooCommerce' );
766
+ MA.setPlatformVersion( '<?php echo $w->version; ?>' );
767
+ MA.setModuleVersion( '<?php echo WC_WooMercadoPago_Module::VERSION; ?>' );
768
+ MA.setPayerEmail( '<?php echo ( $logged_user_email != null ? $logged_user_email : "" ); ?>' );
769
+ MA.setUserLogged( <?php echo ( empty( $logged_user_email ) ? 0 : 1 ); ?> );
770
+ MA.setInstalledModules( '<?php echo $payments; ?>' );
771
+ MA.post();
772
+ </script>
773
+ <?php
774
+
775
+ }
776
+
777
+ }
778
+
779
+ public function update_checkout_status( $order_id ) {
780
+
781
+ $client_id = $this->get_option( 'client_id' );
782
+
783
+ if ( ! empty( $client_id ) && ! $this->is_test_user ) {
784
+
785
+ if ( get_post_meta( $order_id, '_used_gateway', true ) != 'WC_WooMercadoPago_Gateway' ) {
786
+ return;
787
+ }
788
+
789
+ if ( 'yes' == $this->debug ) {
790
+ $this->log->add(
791
+ $this->id,
792
+ '[update_checkout_status] - updating order of ID ' . $order_id
793
+ );
794
+ }
795
+
796
+ echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
797
+ <script type="text/javascript">
798
+ var MA = ModuleAnalytics;
799
+ MA.setToken( ' . $client_id . ' );
800
+ MA.setPaymentType("basic");
801
+ MA.setCheckoutType("basic");
802
+ MA.put();
803
+ </script>';
804
+
805
+ }
806
+
807
+ }
808
+
809
+ /**
810
+ * Summary: Handle the payment and processing the order.
811
+ * Description: First step occurs when the customer selects Mercado Pago and proceed to checkout.
812
+ * This method verify which integration method was selected and makes the build for the checkout
813
+ * URL.
814
+ * @return an array containing the result of the processment and the URL to redirect.
815
+ */
816
+ public function process_payment( $order_id ) {
817
+ $order = wc_get_order( $order_id );
818
+
819
+ if ( method_exists( $order, 'update_meta_data' ) ) {
820
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPago_Gateway' );
821
+ $order->save();
822
+ } else {
823
+ update_post_meta( $order_id, '_used_gateway', 'WC_WooMercadoPago_Gateway' );
824
+ }
825
+
826
+ if ( 'redirect' == $this->method ) {
827
+ // The checkout is made by redirecting customer to Mercado Pago.
828
+ if ( 'yes' == $this->debug) {
829
+ $this->log->add(
830
+ $this->id,
831
+ '[process_payment] - customer being redirected to Mercado Pago.'
832
+ );
833
  }
834
  return array(
835
  'result' => 'success',
836
+ 'redirect' => $this->create_url( $order )
837
  );
838
+ } elseif ( 'modal' == $this->method || 'iframe' == $this->method ) {
839
+ // The checkout is made by customizing the view, either by iframe or showing a modal.
840
+ if ( 'yes' == $this->debug ) {
841
+ $this->log->add(
842
+ $this->id,
843
+ '[process_payment] - preparing to render Mercado Pago checkout view.'
 
 
 
 
 
 
 
844
  );
845
  }
846
+ return array(
847
+ 'result' => 'success',
848
+ 'redirect' => $order->get_checkout_payment_url( true )
849
+ );
850
  }
851
  }
852
 
853
+ /**
854
+ * Summary: Show the custom renderization for the checkout.
855
+ * Description: Order page and this generates the form that shows the pay button. This step
856
+ * generates the form to proceed to checkout.
857
+ * @return the html to be rendered.
858
+ */
859
+ public function receipt_page( $order ) {
860
+ echo $this->render_order_form( $order );
861
  }
862
+
863
  // --------------------------------------------------
864
+
865
+ public function render_order_form( $order_id ) {
866
+
867
+ $order = wc_get_order( $order_id );
868
+ $url = $this->create_url( $order );
869
+
870
+ if ( $url ) {
871
  $html =
872
+ '<img width="468" height="60" src="' . $this->country_configs['checkout_banner'] . '">';
873
+ if ( 'modal' == $this->method ) {
874
+ // The checkout is made by displaying a modal to the customer.
875
+ if ( 'yes' == $this->debug ) {
876
+ $this->log->add(
877
+ $this->id,
878
+ '[render_order_form] - rendering Mercado Pago lightbox (modal window).'
879
+ );
880
  }
 
 
 
881
  $html .=
882
+ '<p></p><p>' . wordwrap(
883
+ __( 'Thank you for your order. Please, proceed with your payment clicking in the bellow button.', 'woocommerce-mercadopago-module' ),
884
+ 60, '<br>'
885
+ ) . '</p>';
886
+ // === Buttons.
887
  $html .=
888
+ '<a id="submit-payment" href="' . esc_url( $url ) . '" name="MP-Checkout" class="button alt" mp-mode="modal">' .
889
+ __( 'Pay with Mercado Pago', 'woocommerce-mercadopago-module' ) .
890
+ '</a> <a class="button cancel" href="' . esc_url( $order->get_cancel_order_url() ) . '">' .
891
+ __( 'Cancel order &amp; Clear cart', 'woocommerce-mercadopago-module' ) .
892
+ '</a>';
893
+
894
+ // === Style.
895
+ $html .= '<style type="text/css">';
896
+ $html .= '#MP-Checkout-dialog #MP-Checkout-IFrame { bottom: -28px !important; height: 590px !important; }';
897
+ $html .= '</style>';
898
+ // === Includes the javascript of lightbox.
899
+ $html .= '<script type="text/javascript" src="https://secure.mlstatic.com/mptools/render.js"></script>';
900
+ $html .= '<script type="text/javascript">(function() { $MPC.openCheckout({ url: "' . esc_url( $url ) . '", mode: "modal" }); })();</script>';
901
  } else {
902
+ // The checkout is made by rendering Mercado Pago form within a iframe.
903
+ if ( 'yes' == $this->debug ) {
904
+ $this->log->add(
905
+ $this->id,
906
+ '[render_order_form] - embedding Mercado Pago iframe.'
907
+ );
908
  }
 
 
 
909
  $html .=
910
+ '<p></p><p>' . wordwrap(
911
+ __( 'Thank you for your order. Proceed with your payment completing the following information.', 'woocommerce-mercadopago-module' ),
912
+ 60, '<br>'
913
+ ) . '</p>';
914
+ $html .=
915
+ '<iframe src="' . esc_url( $url ) . '" name="MP-Checkout" ' .
916
+ 'width="' . ( is_numeric( (int) $this->iframe_width ) ? $this->iframe_width : 640 ) . '" ' .
917
+ 'height="' . ( is_numeric( (int) $this->iframe_height ) ? $this->iframe_height : 800 ) . '" ' .
918
  'frameborder="0" scrolling="no" id="checkout_mercadopago"></iframe>';
919
  }
920
  return $html;
921
  } else {
922
+ // Reaching at this point means that the URL could not be build by some reason.
923
+ if ( 'yes' == $this->debug ) {
924
+ $this->log->add(
925
+ $this->id,
926
+ '[render_order_form] - unable to build Mercado Pago checkout URL.'
927
+ );
928
+ }
929
+ $html = '<script type="text/javascript" src="//secure.mlstatic.com/mptools/render.js"></script>';
930
  $html .=
931
+ '<p>' .
932
+ __( 'An error occurred when proccessing your payment. Please try again or contact us for assistence.', 'woocommerce-mercadopago-module' ) .
933
+ '</p>';
934
+ $html .=
935
+ '<a class="button" href="' . esc_url( $order->get_checkout_payment_url() ) . '">' .
936
+ __( 'Click to try again', 'woocommerce-mercadopago-module' ) .
937
  '</a>';
938
  return $html;
939
  }
940
  }
941
+
942
+ /**
943
+ * Summary: Build Mercado Pago preference.
944
+ * Description: Create Mercado Pago preference and get init_point URL based in the order options
945
+ * from the cart.
946
+ * @return the preference object.
947
+ */
948
+ public function build_payment_preference( $order ) {
949
+
950
+ // A string to register items (workaround to deal with API problem that shows only first item)
951
+ $list_of_items = array();
952
+
953
+ // Selected shipping
954
+ $selected_shipping = $order->get_shipping_method();
955
+
956
+ // Here we build the array that contains ordered items, from customer cart
957
  $items = array();
958
+ if ( sizeof( $order->get_items() ) > 0 ) {
959
+ foreach ( $order->get_items() as $item ) {
960
+ if ( $item['qty'] ) {
961
+ $product = new WC_product( $item['product_id'] );
962
+
963
+ // WooCommerce 3.0 or later.
964
+ if ( method_exists( $product, 'get_description' ) ) {
965
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
966
+ $product->get_name()
967
+ );
968
+ $product_content = WC_WooMercadoPago_Module::utf8_ansi(
969
+ $product->get_description()
970
+ );
971
+ } else {
972
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
973
+ $product->post->post_title
974
+ );
975
+ $product_content = WC_WooMercadoPago_Module::utf8_ansi(
976
+ $product->post->post_content
977
+ );
978
+ }
979
+
980
+ // Calculate discount for payment method.
981
+ $unit_price = floor( ( (float) $item['line_total'] + (float) $item['line_tax'] ) *
982
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 ) * 100 ) / 100;
983
+ if ( is_numeric( $this->gateway_discount ) ) {
984
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
985
+ $price_percent = $this->gateway_discount / 100;
986
+ $discount = $unit_price * $price_percent;
987
+ if ( $discount > 0 ) {
988
+ $unit_price -= $discount;
989
+ }
990
+ }
991
+ }
992
+
993
+ // Remove decimals if MCO/MLC
994
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
995
+ $unit_price = floor( $unit_price );
996
+ }
997
+
998
+ array_push( $list_of_items, $product_title . ' x ' . $item['qty'] );
999
+ array_push( $items, array(
1000
  'id' => $item['product_id'],
1001
+ 'title' => ( html_entity_decode( $product_title ) . ' x ' . $item['qty'] ),
1002
+ 'description' => sanitize_file_name( html_entity_decode(
1003
  // This handles description width limit of Mercado Pago.
1004
+ ( strlen( $product_content ) > 230 ?
1005
+ substr( $product_content, 0, 230 ) . '...' :
1006
+ $product_content )
1007
+ ) ),
1008
+ 'picture_url' => ( sizeof( $order->get_items() ) > 1 ?
1009
+ plugins_url( 'images/cart.png', plugin_dir_path( __FILE__ ) ) :
1010
+ wp_get_attachment_url( $product->get_image_id() )
1011
  ),
 
1012
  'category_id' => $this->store_categories_id[$this->category_id],
1013
  'quantity' => 1,
1014
+ 'unit_price' => $unit_price,
1015
+ 'currency_id' => $this->country_configs['currency']
1016
+ ) );
1017
  }
1018
  }
1019
+
1020
+ // Check if is NOT Mercado Envios.
1021
+ if ( strpos( $selected_shipping, 'Mercado Envios' ) !== 0 ) {
1022
+ // Shipment cost as an item (workaround to prevent API showing shipment setup again).
1023
+ $ship_cost = ( (float) $order->get_total_shipping() + (float) $order->get_shipping_tax() ) *
1024
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 );
1025
+ // Remove decimals if MCO/MLC
1026
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
1027
+ $ship_cost = floor( $ship_cost );
1028
+ }
1029
+ if ( $ship_cost > 0 ) {
1030
+ array_push(
1031
+ $list_of_items,
1032
+ __( 'Shipping service used by store', 'woocommerce-mercadopago-module' )
1033
+ );
1034
+ array_push( $items, array(
1035
+ 'id' => 2147483647,
1036
+ 'title' => implode( ', ', $list_of_items ),
1037
+ 'description' => implode( ', ', $list_of_items ),
1038
+ 'category_id' => $this->store_categories_id[$this->category_id],
1039
+ 'quantity' => 1,
1040
+ 'unit_price' => floor( $ship_cost * 100 ) / 100,
1041
+ 'currency_id' => $this->country_configs['currency']
1042
+ ) );
1043
+ }
1044
+ }
1045
+
1046
+ // String of item names (workaround to deal with API problem that shows only first item).
1047
+ $items[0]['title'] = implode( ', ', $list_of_items );
1048
+ }
1049
+
1050
+ // Find excluded methods. If 'n/d' is in array, we should disconsider the remaining values.
1051
+ $excluded_payment_methods = array();
1052
+ if ( is_array( $this->ex_payments ) || is_object( $this->ex_payments ) ) {
1053
+ foreach ( $this->ex_payments as $excluded ) {
1054
+ // if 'n/d' is selected, we just not add any items to the array.
1055
+ if ( $excluded == 0 )
1056
+ break;
1057
+ array_push( $excluded_payment_methods, array(
1058
+ 'id' => $this->payment_methods[$excluded]
1059
+ ) );
1060
+ }
1061
+ }
1062
+ $payment_methods = array(
1063
+ 'installments' => ( is_numeric( (int) $this->installments) ? (int) $this->installments : 24 ),
1064
+ 'default_installments' => 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1065
  );
1066
+ // Set excluded payment methods.
1067
+ if ( count( $excluded_payment_methods ) > 0 ) {
1068
+ $payment_methods['excluded_payment_methods'] = $excluded_payment_methods;
1069
+ }
1070
+
1071
+ // WooCommerce 3.0 or later.
1072
+ if ( method_exists( $order, 'get_id' ) ) {
1073
+ // Create Mercado Pago preference.
1074
+ $preferences = array(
1075
+ 'items' => $items,
1076
+ // Payer should be filled with billing info as orders can be made with non-logged users.
1077
+ 'payer' => array(
1078
+ 'name' => html_entity_decode( $order->get_billing_first_name() ),
1079
+ 'surname' => html_entity_decode( $order->get_billing_last_name() ),
1080
+ 'email' => $order->get_billing_email(),
1081
+ 'phone' => array(
1082
+ 'number' => $order->get_billing_phone()
1083
+ ),
1084
+ 'address' => array(
1085
+ 'street_name' => html_entity_decode(
1086
+ $order->get_billing_address_1() . ' / ' .
1087
+ $order->get_billing_city() . ' ' .
1088
+ $order->get_billing_state() . ' ' .
1089
+ $order->get_billing_country()
1090
+ ),
1091
+ 'zip_code' => $order->get_billing_postcode()
1092
+ )
1093
+ ),
1094
+ 'back_urls' => array(
1095
+ 'success' => ( empty( $this->success_url ) ?
1096
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
1097
+ esc_url( $this->get_return_url( $order ) )
1098
+ ) : $this->success_url
1099
+ ),
1100
+ 'failure' => ( empty( $this->failure_url ) ?
1101
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
1102
+ str_replace( '&amp;', '&', $order->get_cancel_order_url() )
1103
+ ) : $this->failure_url
1104
+ ),
1105
+ 'pending' => ( empty( $this->pending_url ) ?
1106
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
1107
+ esc_url( $this->get_return_url( $order) )
1108
+ ) : $this->pending_url
1109
+ )
1110
+ ),
1111
+ //'marketplace' =>
1112
+ //'marketplace_fee' =>
1113
+ 'shipments' => array(
1114
+ //'cost' =>
1115
+ //'mode' =>
1116
+ 'receiver_address' => array(
1117
+ 'zip_code' => $order->get_shipping_postcode(),
1118
+ //'street_number' =>
1119
+ 'street_name' => html_entity_decode(
1120
+ $order->get_shipping_address_1() . ' ' .
1121
+ $order->get_shipping_city() . ' ' .
1122
+ $order->get_shipping_state() . ' ' .
1123
+ $order->get_shipping_country()
1124
+ ),
1125
+ //'floor' =>
1126
+ 'apartment' => $order->get_shipping_address_2()
1127
+ )
1128
+ ),
1129
+ 'payment_methods' => $payment_methods,
1130
+ //'notification_url' =>
1131
+ 'external_reference' => $this->invoice_prefix . $order->get_id()
1132
+ //'additional_info' =>
1133
+ //'expires' =>
1134
+ //'expiration_date_from' =>
1135
+ //'expiration_date_to' =>
1136
+ );
1137
+ } else {
1138
+ // Create Mercado Pago preference.
1139
+ $preferences = array(
1140
+ 'items' => $items,
1141
+ // Payer should be filled with billing info as orders can be made with non-logged users.
1142
+ 'payer' => array(
1143
+ 'name' => html_entity_decode( $order->billing_first_name ),
1144
+ 'surname' => html_entity_decode( $order->billing_last_name ),
1145
+ 'email' => $order->billing_email,
1146
+ 'phone' => array(
1147
+ 'number' => $order->billing_phone
1148
+ ),
1149
+ 'address' => array(
1150
+ 'street_name' => html_entity_decode(
1151
+ $order->billing_address_1 . ' / ' .
1152
+ $order->billing_city . ' ' .
1153
+ $order->billing_state . ' ' .
1154
+ $order->billing_country
1155
+ ),
1156
+ 'zip_code' => $order->billing_postcode
1157
+ )
1158
+ ),
1159
+ 'back_urls' => array(
1160
+ 'success' => ( empty( $this->success_url ) ?
1161
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
1162
+ esc_url( $this->get_return_url( $order) )
1163
+ ) : $this->success_url
1164
+ ),
1165
+ 'failure' => ( empty( $this->failure_url ) ?
1166
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
1167
+ str_replace( '&amp;', '&', $order->get_cancel_order_url() )
1168
+ ) : $this->failure_url
1169
+ ),
1170
+ 'pending' => ( empty( $this->pending_url ) ?
1171
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
1172
+ esc_url( $this->get_return_url( $order) )
1173
+ ) : $this->pending_url
1174
+ )
1175
+ ),
1176
+ //'marketplace' =>
1177
+ //'marketplace_fee' =>
1178
+ 'shipments' => array(
1179
+ //'cost' =>
1180
+ //'mode' =>
1181
+ 'receiver_address' => array(
1182
+ 'zip_code' => $order->shipping_postcode,
1183
+ //'street_number' =>
1184
+ 'street_name' => html_entity_decode(
1185
+ $order->shipping_address_1 . ' ' .
1186
+ $order->shipping_city . ' ' .
1187
+ $order->shipping_state . ' ' .
1188
+ $order->shipping_country
1189
+ ),
1190
+ //'floor' =>
1191
+ 'apartment' => $order->shipping_address_2
1192
+ )
1193
+ ),
1194
+ 'payment_methods' => $payment_methods,
1195
+ //'notification_url' =>
1196
+ 'external_reference' => $this->invoice_prefix . $order->id
1197
+ //'additional_info' =>
1198
+ //'expires' =>
1199
+ //'expiration_date_from' =>
1200
+ //'expiration_date_to' =>
1201
+ );
1202
+ }
1203
+
1204
+ // Set Mercado Envios
1205
+ if ( strpos($selected_shipping, 'Mercado Envios' ) === 0 ) {
1206
+ $preferences['shipments']['mode'] = 'me2';
1207
+
1208
+ foreach ( $order->get_shipping_methods() as $shipping ) {
1209
+
1210
+ $preferences['shipments']['dimensions'] = $shipping['dimensions'];
1211
+ $preferences['shipments']['default_shipping_method'] = (int) $shipping['shipping_method_id'];
1212
+ $preferences['shipments']['free_methods'] = array();
1213
+
1214
+ // Get shipping method id
1215
+ $prepare_method_id = explode( ':', $shipping['method_id'] );
1216
+
1217
+ // Get instance_id
1218
+ $shipping_id = $prepare_method_id[count( $prepare_method_id ) - 1];
1219
+
1220
+ // TODO: REFACTOR
1221
+ // Get zone by instance_id
1222
+ $shipping_zone = WC_Shipping_Zones::get_zone_by( 'instance_id', $shipping_id );
1223
+
1224
+ // Get all shipping and filter by free_shipping (Mercado Envios)
1225
+ foreach ($shipping_zone->get_shipping_methods() as $key => $shipping_object) {
1226
+
1227
+ // Check is a free method
1228
+ if ($shipping_object->get_option( 'free_shipping' ) == 'yes' ) {
1229
+ // Get shipping method id (Mercado Envios)
1230
+ $shipping_method_id = $shipping_object->get_shipping_method_id( $this->site_id );
1231
+ $preferences['shipments']['free_methods'][] = array( 'id' => (int) $shipping_method_id );
1232
+ }
1233
+ }
1234
+ }
1235
  }
1236
+
1237
+ // Do not set IPN url if it is a localhost.
1238
+ if ( ! strrpos( $this->domain, 'localhost' ) ) {
1239
+ $preferences['notification_url'] = WC_WooMercadoPago_Module::workaround_ampersand_bug(
1240
+ WC()->api_request_url( 'WC_WooMercadoPago_Gateway' )
1241
+ );
1242
+ }
1243
+
1244
+ // Set sponsor ID.
1245
+ if ( ! $this->is_test_user ) {
1246
+ $preferences['sponsor_id'] = $this->country_configs['sponsor_id'];
1247
+ }
1248
+
1249
  // Auto return options.
1250
+ if ( 'yes' == $this->auto_return ) {
1251
+ $preferences['auto_return'] = 'approved';
1252
  }
1253
+
1254
+ if ( 'yes' == $this->debug ) {
1255
+ $this->log->add(
1256
+ $this->id,
1257
+ '[build_payment_preference] - preference created with following structure: ' .
1258
+ json_encode( $preferences, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE ) );
1259
  }
1260
+
1261
+ $preferences = apply_filters(
1262
+ 'woocommerce_mercadopago_module_preferences', $preferences, $order
1263
+ );
1264
+
1265
  return $preferences;
1266
  }
1267
+
1268
  // --------------------------------------------------
1269
+
1270
+ protected function create_url( $order ) {
1271
+
 
1272
  // Checks for sandbox mode.
1273
+ if ( 'yes' == $this->sandbox ) {
1274
+ $this->mp->sandbox_mode( true);
1275
+ if ( 'yes' == $this->debug ) {
1276
+ $this->log->add(
1277
+ $this->id,
1278
+ '[create_url] - sandbox mode is enabled'
1279
+ );
1280
  }
1281
  } else {
1282
+ $this->mp->sandbox_mode( false );
1283
  }
1284
+
1285
+ // Creates the order parameters by checking the cart configuration.
1286
+ $preferences = $this->build_payment_preference( $order );
1287
  // Create order preferences with Mercado Pago API request.
1288
  try {
1289
+ $checkout_info = $this->mp->create_preference( json_encode( $preferences ) );
1290
+ if ( $checkout_info['status'] < 200 || $checkout_info['status'] >= 300 ) {
1291
+ // Mercado Pago trowed an error.
1292
+ if ( 'yes' == $this->debug ) {
1293
+ $this->log->add(
1294
+ $this->id,
1295
+ '[create_url] - mercado pago gave error, payment creation failed with error: ' .
1296
+ $checkout_info['response']['message'] );
1297
+ }
1298
+ return false;
1299
+ } elseif ( is_wp_error( $checkout_info ) ) {
1300
+ // WordPress throwed an error.
1301
+ if ( 'yes' == $this->debug ) {
1302
+ $this->log->add(
1303
+ $this->id,
1304
+ '[create_url] - wordpress gave error, payment creation failed with error: ' .
1305
+ $checkout_info['response']['message'] );
1306
  }
1307
  return false;
1308
  } else {
1309
+ // Obtain the URL.
1310
+ if ( 'yes' == $this->debug ) {
1311
+ $this->log->add(
1312
+ $this->id,
1313
+ '[create_url] - payment link generated with success from mercado pago, with structure as follow: ' .
1314
+ json_encode( $checkout_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE ) );
1315
  }
1316
+ if ( 'yes' == $this->sandbox) {
1317
  return $checkout_info['response']['sandbox_init_point'];
1318
  } else {
1319
  return $checkout_info['response']['init_point'];
1320
  }
1321
  }
1322
+ } catch ( MercadoPagoException $e ) {
1323
+ // Something went wrong with the payment creation.
1324
+ if ( 'yes' == $this->debug ) {
1325
+ $this->log->add(
1326
+ $this->id,
1327
+ '[create_url] - payment creation failed with exception: ' .
1328
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1329
+ );
1330
  }
1331
  return false;
1332
  }
1333
+
1334
  }
1335
+
1336
  /*
1337
  * ========================================================================
1338
+ * AUXILIARY AND FEEDBACK METHODS (SERVER SIDE)
1339
  * ========================================================================
1340
  */
1341
 
1342
+ /**
1343
+ * Summary: Check if we have valid credentials.
1344
+ * Description: Check if we have valid credentials.
1345
+ * @return boolean true/false depending on the validation result.
1346
+ */
1347
+ public function validate_credentials() {
1348
+
1349
+ if ( empty( $this->client_id ) || empty( $this->client_secret ) ) {
1350
+ return false;
1351
+ }
1352
+
1353
+ if ( ! is_numeric( $this->client_id ) ) {
1354
+ return false;
1355
+ }
1356
+
1357
+ try {
1358
+
1359
+ $this->mp = new MP(
1360
+ WC_WooMercadoPago_Module::get_module_version(),
1361
+ $this->client_id,
1362
+ $this->client_secret
1363
+ );
1364
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
1365
+ $this->mp->set_email( $email );
1366
+ $access_token = $this->mp->get_access_token();
1367
+ $get_request = $this->mp->get( '/users/me?access_token=' . $access_token );
1368
+
1369
+ if ( isset( $get_request['response']['site_id'] ) ) {
1370
+
1371
+ $this->is_test_user = in_array( 'test_user', $get_request['response']['tags'] );
1372
+ $this->site_id = $get_request['response']['site_id'];
1373
+ $this->collector_id = $get_request['response']['id'];
1374
+ $this->country_configs = WC_WooMercadoPago_Module::get_country_config( $this->site_id );
1375
+ $this->payment_split_mode = $this->mp->check_two_cards();
1376
+
1377
+ $payments = $this->mp->get( '/v1/payment_methods/?access_token=' . $access_token );
1378
+ array_push( $this->payment_methods, 'n/d' );
1379
+ foreach ( $payments['response'] as $payment ) {
1380
+ array_push( $this->payment_methods, str_replace( '_', ' ', $payment['id'] ) );
1381
+ }
1382
+
1383
+ // Check for auto converstion of currency (only if it is enabled).
1384
+ $this->currency_ratio = -1;
1385
+ if ( $this->currency_conversion == 'yes' ) {
1386
+ $this->currency_ratio = WC_WooMercadoPago_Module::get_conversion_rate(
1387
+ $this->country_configs['currency']
1388
+ );
1389
+ }
1390
+
1391
  return true;
1392
+
1393
+ } else {
1394
+ $this->mp = null;
1395
  return false;
1396
  }
1397
+
1398
+ } catch ( MercadoPagoException $e ) {
1399
+ if ( 'yes' == $this->debug) {
1400
+ $this->log->add(
1401
+ $this->id,
1402
+ '[validate_credentials] - while validating credentials, got exception: ' .
1403
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1404
+ );
1405
+ }
1406
+ $this->mp = null;
1407
+ return false;
1408
  }
1409
+
1410
  return false;
1411
+
1412
  }
1413
+
1414
+ // Build the string representing the path to the log file.
1415
+ protected function build_log_path_string() {
1416
+ return '<a href="' . esc_url( admin_url( 'admin.php?page=wc-status&tab=logs&log_file=' .
1417
+ esc_attr( $this->id ) . '-' . sanitize_file_name( wp_hash( $this->id ) ) . '.log' ) ) . '">' .
1418
+ __( 'WooCommerce &gt; System Status &gt; Logs', 'woocommerce-mercadopago-module' ) . '</a>';
1419
+ }
1420
+
1421
  // Return boolean indicating if currency is supported.
1422
+ protected function is_supported_currency() {
1423
+ return get_woocommerce_currency() == $this->country_configs['currency'];
1424
  }
1425
 
1426
  // Called automatically by WooCommerce, verify if Module is available to use.
1427
  public function is_available() {
1428
+ if ( ! did_action( 'wp_loaded' ) ) {
1429
+ return false;
1430
+ }
1431
+ global $woocommerce;
1432
+ $w_cart = $woocommerce->cart;
1433
+ // Check for recurrent product checkout.
1434
+ if ( isset( $w_cart ) ) {
1435
+ if ( WC_WooMercadoPago_Module::is_subscription( $w_cart->get_cart() ) ) {
1436
+ return false;
1437
+ }
1438
+ }
1439
+ // Check if this gateway is enabled and well configured.
1440
+ $available = ( 'yes' == $this->settings['enabled'] ) &&
1441
+ ! empty( $this->client_id ) &&
1442
+ ! empty( $this->client_secret );
1443
  return $available;
1444
  }
1445
+
1446
  // Fix css for Mercado Pago in specific cases.
1447
  public function css() {
1448
+ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.1', '>=' ) ) {
1449
+ $page_id = wc_get_page_id( 'checkout' );
1450
  } else {
1451
+ $page_id = woocommerce_get_page_id( 'checkout' );
1452
  }
1453
+ if ( is_page( $page_id ) ) {
1454
+ echo '<style type="text/css">#MP-Checkout-dialog { z-index: 9999 !important; }</style>' .
1455
+ PHP_EOL;
1456
  }
1457
  }
1458
+
1459
  // Get the URL to admin page.
1460
  protected function admin_url() {
1461
+ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.1', '>=' ) ) {
1462
  return admin_url(
1463
  'admin.php?page=wc-settings&tab=checkout&section=wc_woomercadopago_gateway'
1464
  );
1469
  }
1470
 
1471
  // Notify that Client_id and/or Client_secret are not valid.
1472
+ public function client_id_or_secret_missing_message() {
 
 
 
 
 
 
 
 
 
 
 
1473
  echo '<div class="error"><p><strong>' .
1474
+ __( 'Basic Checkout is Inactive', 'woocommerce-mercadopago-module' ) .
1475
  '</strong>: ' .
1476
+ __( 'Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured.', 'woocommerce-mercadopago-module' ) .
 
 
1477
  '</p></div>';
1478
  }
1479
+
1480
+ // Display the discount in payment method title.
1481
+ public function get_payment_method_title_basic( $title, $id ) {
1482
+
1483
+ if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
1484
+ return $title;
1485
+ }
1486
+
1487
+ if ( $title != $this->title || $this->gateway_discount == 0 ) {
1488
+ return $title;
1489
  }
1490
+
1491
+ if ( WC()->session->chosen_payment_method == 'woocommerce-mercadopago-subscription-module' ) {
1492
+ return $title;
1493
+ }
1494
+
1495
+ $total = (float) WC()->cart->subtotal;
1496
+ if ( is_numeric( $this->gateway_discount ) ) {
1497
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
1498
+ $price_percent = $this->gateway_discount / 100;
1499
+ if ( $price_percent > 0 ) {
1500
+ $title .= ' (' . __( 'Discount Of ', 'woocommerce-mercadopago-module' ) .
1501
+ strip_tags( wc_price( $total * $price_percent ) ) . ' )';
1502
+ }
1503
+ }
1504
+ }
1505
+
1506
+ return $title;
1507
  }
1508
+
1509
  /*
1510
  * ========================================================================
1511
+ * IPN MECHANICS (SERVER SIDE)
1512
  * ========================================================================
1513
  */
1514
+
1515
+ /**
1516
+ * Summary: This call checks any incoming notifications from Mercado Pago server.
1517
+ * Description: This call checks any incoming notifications from Mercado Pago server.
1518
+ */
1519
  public function check_ipn_response() {
1520
+
 
 
1521
  @ob_clean();
1522
+
1523
+ if ( 'yes' == $this->debug ) {
1524
+ $this->log->add(
1525
+ $this->id,
1526
+ '[check_ipn_response] - received _get content: ' .
1527
+ json_encode( $_GET, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1528
+ );
 
 
 
 
 
1529
  }
1530
+
1531
+ // Setup sandbox mode.
1532
+ $this->mp->sandbox_mode( 'yes' == $this->sandbox );
1533
+
1534
+ // Over here, $_GET should come with this JSON structure:
1535
+ // {
1536
+ // "topic": <string>,
1537
+ // "id": <string>
1538
+ // }
1539
+ // If not, the IPN is corrupted in some way.
1540
+ $data = $_GET;
1541
+ if ( isset( $data['id'] ) && isset( $data['topic'] ) ) {
1542
+
1543
+ // We have received a normal IPN call for this gateway, start process by getting the access token...
1544
+ $access_token = array( 'access_token' => $this->mp->get_access_token() );
1545
+
1546
+ // Now, we should handle the topic type that has come...
1547
+ if ( $data['topic'] == 'merchant_order' ) {
1548
+
1549
+ // Get the merchant_order reported by the IPN.
1550
+ $merchant_order_info = $this->mp->get( '/merchant_orders/' . $data['id'], $access_token, false );
1551
+ if ( ! is_wp_error( $merchant_order_info ) && ( $merchant_order_info['status'] == 200 || $merchant_order_info['status'] == 201 ) ) {
1552
+ $payments = $merchant_order_info['response']['payments'];
1553
+ // If the payment's transaction amount is equal (or bigger) than the merchant order's amount we can release the items.
1554
+ if ( sizeof( $payments ) >= 1 ) {
1555
+ // We have payments...
1556
+ $merchant_order_info['response']['ipn_type'] = 'merchant_order';
1557
+ do_action( 'valid_mercadopago_ipn_request', $merchant_order_info['response'] );
1558
+ } else {
1559
+ // We have no payments?
1560
+ if ( 'yes' == $this->debug ) {
1561
+ $this->log->add(
1562
+ $this->id,
1563
+ '[check_ipn_response] - order received but has no payment'
1564
+ );
 
 
1565
  }
1566
+ }
1567
+ header( 'HTTP/1.1 200 OK' );
 
1568
  } else {
1569
+ if ( 'yes' == $this->debug ) {
1570
+ $this->log->add(
1571
+ $this->id,
1572
+ '[check_ipn_response] - got status not equal 200: ' .
1573
+ json_encode( $preapproval_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1574
+ );
1575
+ }
1576
+ }
1577
+
1578
+ } elseif ( $data['topic'] == 'payment' ) {
1579
+
1580
+ $payment_info = $this->mp->get( '/v1/payments/' . $data['id'], $access_token, false );
1581
+ if ( ! is_wp_error( $payment_info ) && ( $payment_info['status'] == 200 || $payment_info['status'] == 201 ) ) {
1582
+ $payments = $payment_info['response']['payments'];
1583
+ // If the payment's transaction amount is equal (or bigger) than the merchant order's amount we can release the items.
1584
+ if ( sizeof( $payments ) >= 1 ) {
1585
+ // We have payments...
1586
+ $payment_info['response']['ipn_type'] = 'payment';
1587
+ do_action( 'valid_mercadopago_ipn_request', $payment_info['response'] );
1588
+ } else {
1589
+ // We have no payments?
1590
+ if ( 'yes' == $this->debug ) {
1591
+ $this->log->add(
1592
+ $this->id,
1593
+ '[check_ipn_response] - order received but has no payment'
1594
+ );
1595
+ }
1596
+ }
1597
+ header( 'HTTP/1.1 200 OK' );
1598
+ } else {
1599
+ if ( 'yes' == $this->debug) {
1600
+ $this->log->add(
1601
+ $this->id,
1602
+ '[check_ipn_request_is_valid] - error when processing received data: ' .
1603
+ json_encode( $payment_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1604
+ );
1605
  }
 
1606
  }
1607
+
1608
+ } else {
1609
+
1610
+ // We have received an unhandled topic...
1611
+ $this->log->add(
1612
+ $this->id,
1613
+ '[check_ipn_response] - request failure, received an unhandled topic'
1614
+ );
1615
+
1616
  }
1617
+
1618
+ } elseif ( isset( $data['data_id'] ) && isset( $data['type'] ) ) {
1619
+
1620
+ // We have received a bad, however valid) IPN call for this gateway (data is set for API V1).
1621
+ // At least, we should respond 200 to notify server that we already received it.
1622
+ header( 'HTTP/1.1 200 OK' );
1623
+
1624
+ } else {
1625
+
1626
+ // Reaching here means that we received an IPN call but there are no data!
1627
+ // Just kills the processment. No IDs? No process!
1628
+ if ( 'yes' == $this->debug ) {
1629
+ $this->log->add(
1630
+ $this->id,
1631
+ '[check_ipn_response] - request failure, received ipn call with no data'
1632
+ );
1633
  }
1634
+ wp_die( __( 'Mercado Pago Request Failure', 'woocommerce-mercadopago-module' ) );
1635
+
1636
  }
1637
+
1638
  }
1639
+
1640
+ /**
1641
+ * Summary: Properly handles each case of notification, based in payment status.
1642
+ * Description: Properly handles each case of notification, based in payment status.
1643
+ */
1644
+ public function successful_request( $data ) {
1645
+
1646
+ if ( 'yes' == $this->debug ) {
1647
+ $this->log->add(
1648
+ $this->id,
1649
+ '[successful_request] - starting to process ipn update...'
1650
+ );
1651
  }
1652
+
1653
+ // Get the order and check its presence.
1654
  $order_key = $data['external_reference'];
1655
+ if ( empty( $order_key ) ) {
1656
+ return;
1657
+ }
1658
+ $id = (int) str_replace( $this->invoice_prefix, '', $order_key );
1659
+ $order = wc_get_order( $id );
1660
+
1661
+ // Check if order exists.
1662
+ if ( ! $order ) {
1663
+ return;
1664
+ }
1665
+
1666
+ // WooCommerce 3.0 or later.
1667
+ if ( method_exists( $order, 'get_id' ) ) {
1668
+ $order_id = $order->get_id();
1669
+ } else {
1670
+ $order_id = $order->id;
1671
+ }
1672
+
1673
+ // Check if we have the correct order.
1674
+ if ( $order_id !== $id ) {
1675
+ return;
1676
+ }
1677
+
1678
+ if ( 'yes' == $this->debug ) {
1679
+ $this->log->add(
1680
+ $this->id,
1681
+ '[successful_request] - updating metadata and status with data: ' .
1682
+ json_encode( $data, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1683
+ );
1684
+ }
1685
+
1686
+ // Here, we process the status... this is the business rules!
1687
+ // Reference: https://www.mercadopago.com.br/developers/en/api-docs/basic-checkout/ipn/payment-status/
1688
+ $status = 'pending';
1689
+ $payments = $data['payments'];
1690
+
1691
+ if ( sizeof( $payments ) == 1 ) {
1692
+ // If we have only one payment, just set status as its status
1693
+ $status = $payments[0]['status'];
1694
+ } elseif ( sizeof( $payments ) > 1 ) {
1695
+ // However, if we have multiple payments, the overall payment have some rules...
1696
+ $total_paid = 0.00;
1697
+ $total_refund = 0.00;
1698
+ $total = $data['shipping_cost'] + $data['total_amount'];
1699
+ // Grab some information...
1700
+ foreach ( $data['payments'] as $payment ) {
1701
+ if ( $payment['status'] === 'approved' ) {
1702
+ // Get the total paid amount, considering only approved incomings.
1703
+ $total_paid += (float) $payment['total_paid_amount'];
1704
+ } elseif ( $payment['status'] === 'refunded' ) {
1705
+ // Get the total refounded amount.
1706
+ $total_refund += (float) $payment['amount_refunded'];
1707
  }
1708
+ }
1709
+ if ( $total_paid >= $total ) {
1710
+ $status = 'approved';
1711
+ } elseif ( $total_refund >= $total ) {
1712
+ $status = 'refunded';
1713
+ } else {
1714
+ $status = 'pending';
1715
+ }
1716
+ }
1717
+
1718
+ // WooCommerce 3.0 or later.
1719
+ if ( method_exists( $order, 'update_meta_data' ) ) {
1720
+ // Updates the type of gateway.
1721
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPago_Gateway' );
1722
+
1723
+ if ( ! empty( $data['payer']['email'] ) ) {
1724
+ $order->update_meta_data( __( 'Payer email', 'woocommerce-mercadopago-module' ), $data['payer']['email'] );
1725
+ }
1726
+ if ( ! empty( $data['payment_type'] ) ) {
1727
+ $order->update_meta_data( __( 'Payment type', 'woocommerce-mercadopago-module' ), $data['payment_type'] );
1728
+ }
1729
+ if ( ! empty( $data['payments'] ) ) {
1730
+ $payment_ids = array();
1731
+ foreach ( $data['payments'] as $payment ) {
1732
+ $payment_ids[] = $payment['id'];
1733
+ $order->update_meta_data( 'Mercado Pago - Payment ' . $payment['id'],
1734
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $payment['date_created'] ) ) .
1735
+ ']/[Amount ' . $payment['transaction_amount'] .
1736
+ ']/[Paid ' . $payment['total_paid_amount'] .
1737
+ ']/[Refund ' . $payment['amount_refunded'] . ']'
1738
  );
1739
  }
1740
+ if ( sizeof( $payment_ids ) > 0 ) {
1741
+ $order->update_meta_data( '_Mercado_Pago_Payment_IDs', implode( ', ', $payment_ids ) );
1742
+ }
1743
+ }
1744
+
1745
+ $order->save();
1746
+ } else {
1747
+ // Updates the type of gateway.
1748
+ update_post_meta( $order->id, '_used_gateway', 'WC_WooMercadoPago_Gateway' );
1749
+
1750
+ if ( ! empty( $data['payer']['email'] ) ) {
1751
+ update_post_meta(
1752
+ $order_id,
1753
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1754
+ $data['payer']['email']
1755
+ );
1756
+ }
1757
+ if ( ! empty( $data['payment_type'] ) ) {
1758
+ update_post_meta(
1759
+ $order_id,
1760
+ __( 'Payment type', 'woocommerce-mercadopago-module' ),
1761
+ $data['payment_type']
1762
+ );
1763
+ }
1764
+ if ( ! empty( $data['payments'] ) ) {
1765
+ $payment_ids = array();
1766
+ foreach ( $data['payments'] as $payment ) {
1767
+ $payment_ids[] = $payment['id'];
1768
  update_post_meta(
1769
  $order_id,
1770
+ 'Mercado Pago - Payment ' . $payment['id'],
1771
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $payment['date_created'] ) ) .
1772
+ ']/[Amount ' . $payment['transaction_amount'] .
1773
+ ']/[Paid ' . $payment['total_paid_amount'] .
1774
+ ']/[Refund ' . $payment['amount_refunded'] . ']'
1775
  );
1776
  }
1777
+ if ( sizeof( $payment_ids ) > 0 ) {
1778
  update_post_meta(
1779
  $order_id,
1780
+ '_Mercado_Pago_Payment_IDs',
1781
+ implode( ', ', $payment_ids )
1782
  );
1783
  }
1784
+ }
1785
+ }
1786
+
1787
+ // Switch the status and update in WooCommerce.
1788
+ switch ( $status ) {
1789
+ case 'approved':
1790
+ $order->add_order_note(
1791
+ 'Mercado Pago: ' .
1792
+ __( 'Payment approved.', 'woocommerce-mercadopago-module' )
1793
+ );
1794
+ $order->payment_complete();
1795
+ break;
1796
+ case 'pending':
1797
+ $order->add_order_note(
1798
+ 'Mercado Pago: ' .
1799
+ __( 'Customer haven\'t paid yet.', 'woocommerce-mercadopago-module' )
1800
+ );
1801
+ break;
1802
+ case 'in_process':
1803
+ $order->update_status(
1804
+ 'on-hold',
1805
+ 'Mercado Pago: ' .
1806
+ __( 'Payment under review.', 'woocommerce-mercadopago-module' )
1807
+ );
1808
+ break;
1809
+ case 'rejected':
1810
+ $order->update_status(
1811
+ 'failed',
1812
+ 'Mercado Pago: ' .
1813
+ __( 'The payment was refused. The customer can try again.', 'woocommerce-mercadopago-module' )
1814
+ );
1815
+ break;
1816
+ case 'refunded':
1817
+ $order->update_status(
1818
+ 'refunded',
1819
+ 'Mercado Pago: ' .
1820
+ __( 'The payment was refunded to the customer.', 'woocommerce-mercadopago-module' )
1821
+ );
1822
+ break;
1823
+ case 'cancelled':
1824
+ $this->process_cancel_order_meta_box_actions( $order );
1825
+ $order->update_status(
1826
+ 'cancelled',
1827
+ 'Mercado Pago: ' .
1828
+ __( 'The payment was cancelled.', 'woocommerce-mercadopago-module' )
1829
+ );
1830
+ break;
1831
+ case 'in_mediation':
1832
+ $order->add_order_note(
1833
+ 'Mercado Pago: ' .
1834
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1835
+ );
1836
+ break;
1837
+ case 'charged-back':
1838
+ $order->add_order_note(
1839
+ 'Mercado Pago: ' .
1840
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1841
+ );
1842
+ break;
1843
+ default:
1844
+ break;
1845
+ }
1846
+
1847
+ $this->check_mercado_envios( $data );
1848
+
1849
+ }
1850
+
1851
+ /**
1852
+ * Summary: Check IPN data and updates Mercado Envios tag and informaitons.
1853
+ * Description: Check IPN data and updates Mercado Envios tag and informaitons.
1854
+ */
1855
+ public function check_mercado_envios( $merchant_order ) {
1856
+
1857
+ $order_key = $merchant_order['external_reference'];
1858
+
1859
+ if ( ! empty( $order_key ) ) {
1860
+ $order_id = (int) str_replace( $this->invoice_prefix, '', $order_key );
1861
+ $order = wc_get_order( $order_id );
1862
+
1863
+ if ( count( $merchant_order['shipments'] ) > 0 ) {
1864
+ foreach ( $merchant_order['shipments'] as $shipment ) {
1865
+
1866
+ $shipment_id = $shipment['id'];
1867
+
1868
+ // Get shipping data on merchant_order.
1869
+ $shipment_name = $shipment['shipping_option']['name'];
1870
+ $shipment_cost = $shipment['shipping_option']['cost'];
1871
+ $shipping_method_id = $shipment['shipping_option']['shipping_method_id'];
1872
+
1873
+ // Get data shipping selected on checkout.
1874
+ $shipping_meta = $order->get_items( 'shipping' );
1875
+ $order_item_shipping_id = null;
1876
+ $method_id = null;
1877
+ foreach ( $shipping_meta as $key => $shipping ) {
1878
+ $order_item_shipping_id = $key;
1879
+ $method_id = $shipping['method_id'];
1880
  }
1881
+
1882
+ $free_shipping_text = '';
1883
+ $free_shipping_status = 'no';
1884
+ if ( $shipment_cost == 0 ) {
1885
+ $free_shipping_status = 'yes';
1886
+ $free_shipping_text = ' (' . __( 'Free Shipping', 'woocommerce' ) . ')';
1887
  }
1888
+
1889
+ // WooCommerce 3.0 or later.
1890
+ if ( method_exists( $order, 'get_id' ) ) {
1891
+ $shipping_item = $order->get_item( $order_item_shipping_id );
1892
+ $shipping_item->set_order_id( $order->get_id() );
1893
+
1894
+ // Update shipping cost and method title.
1895
+ $shipping_item->set_props( array(
1896
+ 'method_title' => 'Mercado Envios - ' . $shipment_name . $free_shipping_text,
1897
+ 'method_id' => $method_id,
1898
+ 'total' => wc_format_decimal( $shipment_cost ),
1899
+ ) );
1900
+ $shipping_item->save();
1901
+ $this->calculate_shipping();
1902
+ } else {
1903
+ // Update shipping cost and method title.
1904
+ $r = $order->update_shipping( $order_item_shipping_id, array(
1905
+ 'method_title' => 'Mercado Envios - ' . $shipment_name . $free_shipping_text,
1906
+ 'method_id' => $method_id,
1907
+ 'cost' => wc_format_decimal( $shipment_cost )
1908
+ ) );
1909
+ }
1910
+
1911
+ // WTF?
1912
+ // https://docs.woocommerce.com/wc-apidocs/source-class-WC_Abstract_Order.html#541
1913
+ // FORCE UPDATE SHIPPING
1914
+ $order->set_total( wc_format_decimal( $shipment_cost ) , 'shipping' );
1915
+
1916
+ // Update total order.
1917
+ $order->set_total(
1918
+ wc_format_decimal( $order->get_subtotal() )
1919
+ + wc_format_decimal( $order->get_total_shipping() )
1920
+ + wc_format_decimal( $order->get_total_tax() )
1921
+ - wc_format_decimal( $order->get_total_discount() )
1922
+ );
1923
+
1924
+ // Update additional info.
1925
+ wc_update_order_item_meta( $order_item_shipping_id, 'shipping_method_id', $shipping_method_id );
1926
+ wc_update_order_item_meta( $order_item_shipping_id, 'free_shipping', $free_shipping_status );
1927
+
1928
+ $access_token = $this->mp->get_access_token();
1929
+ $request = array(
1930
+ 'uri' => '/shipments/' . $shipment_id,
1931
+ 'params' => array(
1932
+ 'access_token' => $access_token
1933
+ )
1934
+ );
1935
+
1936
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
1937
+ MeliRestClient::set_email( $email );
1938
+ $shipments_data = MeliRestClient::get( $request, '' );
1939
+
1940
+ switch ( $shipments_data['response']['substatus'] ) {
1941
+
1942
+ case 'ready_to_print':
1943
+ $substatus_description = __( 'Tag ready to print', 'woocommerce-mercadopago-module' );
1944
+ break;
1945
+ case 'printed':
1946
+ $substatus_description = __( 'Tag printed', 'woocommerce-mercadopago-module' );
1947
+ break;
1948
+ case 'stale':
1949
+ $substatus_description = __( 'Unsuccessful', 'woocommerce-mercadopago-module' );
1950
+ break;
1951
+ case 'delayed':
1952
+ $substatus_description = __( 'Delayed shipping', 'woocommerce-mercadopago-module' );
1953
+ break;
1954
+ case 'receiver_absent':
1955
+ $substatus_description = __( 'Missing recipient for delivery', 'woocommerce-mercadopago-module' );
1956
+ break;
1957
+ case 'returning_to_sender':
1958
+ $substatus_description = __( 'In return to sender', 'woocommerce-mercadopago-module' );
1959
+ break;
1960
+ case 'claimed_me':
1961
+ $substatus_description = __( 'Buyer initiates complaint and requested a refund.', 'woocommerce-mercadopago-module' );
1962
+ break;
1963
+ default:
1964
+ $substatus_description = $shipments_data['response']['substatus'];
1965
+ break;
1966
+ }
1967
+
1968
+ if ( $substatus_description == '' ) {
1969
+ $substatus_description = $shipments_data['response']['status'];
1970
+ }
1971
+
1972
+ $order->add_order_note( 'Mercado Envios: ' . $substatus_description );
1973
+
1974
+ $this->log->add(
1975
+ $this->id,
1976
+ '[check_mercado_envios] - Mercado Envios - shipments_data : ' .
1977
+ json_encode( $shipments_data, JSON_PRETTY_PRINT )
1978
+ );
1979
+
1980
+ // Add tracking number in meta data to use in order page.
1981
+ update_post_meta( $order_id, '_mercadoenvios_tracking_number', $shipments_data['response']['tracking_number'] );
1982
+ // Add shipiment_id in meta data to use in order page.
1983
+ update_post_meta( $order_id, '_mercadoenvios_shipment_id', $shipment_id );
1984
+ // Add status in meta data to use in order page.
1985
+ update_post_meta( $order_id, '_mercadoenvios_status', $shipments_data['response']['status'] );
1986
+ // Add substatus in meta data to use in order page.
1987
+ update_post_meta( $order_id, '_mercadoenvios_substatus', $shipments_data['response']['substatus'] );
1988
+
1989
+ // Send email to customer.
1990
+ $tracking_id = $shipments_data['response']['tracking_number'];
1991
+ if ( isset( $order->billing_email ) && isset( $tracking_id ) ) {
1992
+ $list_of_items = array();
1993
+ $items = $order->get_items();
1994
+ foreach ( $items as $item ) {
1995
+ $product = new WC_product( $item['product_id'] );
1996
+ if ( method_exists( $product, 'get_description' ) ) {
1997
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
1998
+ $product->get_name()
1999
+ );
2000
+ } else {
2001
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
2002
+ $product->post->post_title
2003
+ );
2004
+ }
2005
+ array_push( $list_of_items, $product_title . ' x ' . $item['qty'] );
2006
+ }
2007
+ wp_mail(
2008
+ $order->billing_email,
2009
+ __( 'Order', 'woocommerce-mercadopago-module' ) . ' ' . $order_id . ' - ' . __( 'Mercado Envios Tracking ID', 'woocommerce-mercadopago-module' ),
2010
+ __( 'Hello,', 'woocommerce-mercadopago-module' ) . "\r\n\r\n" .
2011
+ __( 'Your order', 'woocommerce-mercadopago-module' ) . ' ' . ' [ ' . implode( ', ', $list_of_items ) . ' ] ' .
2012
+ __( 'made in', 'woocommerce-mercadopago-module' ) . ' ' . get_site_url() . ' ' .
2013
+ __( 'used Mercado Envios as its shipment method.', 'woocommerce-mercadopago-module' ) . "\r\n" .
2014
+ __( 'You can track it with the following Tracking ID:', 'woocommerce-mercadopago-module' ) . ' ' . $tracking_id . ".\r\n\r\n" .
2015
+ __( 'Best regards.', 'woocommerce-mercadopago-module' )
2016
  );
2017
+ }
2018
+
2019
  }
2020
+
2021
  }
2022
  }
2023
+
2024
  }
2025
+
2026
  }
mercadopago/mercadopago-subscription-gateway.php ADDED
@@ -0,0 +1,1481 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Part of Woo Mercado Pago Module
5
+ * Author - Mercado Pago
6
+ * Developer - Marcelo Tomio Hama / marcelo.hama@mercadolivre.com
7
+ * Copyright - Copyright(c) MercadoPago [https://www.mercadopago.com]
8
+ * License - https://www.gnu.org/licenses/gpl.html GPL version 2 or higher
9
+ */
10
+
11
+ // This include Mercado Pago library SDK
12
+ require_once dirname( __FILE__ ) . '/sdk/lib/mercadopago.php';
13
+
14
+ /**
15
+ * Summary: Extending from WooCommerce Payment Gateway class.
16
+ * Description: This class implements Mercado Pago Subscription checkout.
17
+ * @since 2.2.0
18
+ */
19
+ class WC_WooMercadoPagoSubscription_Gateway extends WC_Payment_Gateway {
20
+
21
+ public function __construct() {
22
+
23
+ // Creating PHP version message.
24
+ $min_php_message = phpversion() >= WC_WooMercadoPago_Module::MIN_PHP ?
25
+ '<img width="14" height="14" src="' . plugins_url( 'images/check.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
26
+ __( 'Your PHP version is OK.', 'woocommerce-mercadopago-module' ) :
27
+ '<img width="14" height="14" src="' . plugins_url( 'images/error.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
28
+ sprintf(
29
+ __( 'Your PHP version do not support this module. You have %s, minimal required is %s.', 'woocommerce-mercadopago-module' ),
30
+ phpversion(), WC_WooMercadoPago_Module::MIN_PHP
31
+ );
32
+ // Check cURL.
33
+ $curl_message = in_array( 'curl', get_loaded_extensions() ) ?
34
+ '<img width="14" height="14" src="' . plugins_url( 'images/check.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
35
+ __( 'cURL is installed.', 'woocommerce-mercadopago-module' ) :
36
+ '<img width="14" height="14" src="' . plugins_url( 'images/error.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
37
+ __( 'cURL is not installed.', 'woocommerce-mercadopago-module' );
38
+ // Check SSL.
39
+ $is_ssl_message = empty( $_SERVER['HTTPS'] ) || $_SERVER['HTTPS'] == 'off' ?
40
+ '<img width="14" height="14" src="' . plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
41
+ __( 'SSL is missing in your site.', 'woocommerce-mercadopago-module' ) :
42
+ '<img width="14" height="14" src="' . plugins_url( 'images/check.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
43
+ __( 'Your site has SSL enabled.', 'woocommerce-mercadopago-module' );
44
+
45
+ // Mercado Pago fields.
46
+ $this->mp = null;
47
+ $this->site_id = null;
48
+ $this->currency_ratio = -1;
49
+ $this->is_test_user = false;
50
+
51
+ // Auxiliary fields.
52
+ $this->currency_message = '';
53
+ $this->payment_methods = array();
54
+ $this->country_configs = array();
55
+
56
+ // WooCommerce fields.
57
+ //$this->supports = array( 'products', 'refunds' );
58
+ $this->id = 'woocommerce-mercadopago-subscription-module';
59
+ $this->domain = get_site_url() . '/index.php';
60
+ $this->method_title = __( 'Mercado Pago - Subscription', 'woocommerce-mercadopago-module' );
61
+ $this->method_description = '<img width="200" height="52" src="' .
62
+ plugins_url(
63
+ 'images/mplogo.png',
64
+ plugin_dir_path( __FILE__ )
65
+ ) . '"><br><br>' . '<strong>' .
66
+ __( 'This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store.', 'woocommerce-mercadopago-module' ) .
67
+ '</strong>' . '<br><br>' .
68
+ $min_php_message . '<br>' .
69
+ $is_ssl_message . '<br>' .
70
+ $curl_message;
71
+
72
+ // Fields used in Mercado Pago Module configuration page.
73
+ $this->client_id = $this->get_option( 'client_id' );
74
+ $this->client_secret = $this->get_option( 'client_secret' );
75
+ $this->title = $this->get_option( 'title' );
76
+ $this->description = $this->get_option( 'description' );
77
+ $this->invoice_prefix = $this->get_option( 'invoice_prefix', 'WC-' );
78
+ $this->method = $this->get_option( 'method', 'iframe' );
79
+ $this->iframe_width = $this->get_option( 'iframe_width', 640 );
80
+ $this->iframe_height = $this->get_option( 'iframe_height', 800 );
81
+ $this->success_url = $this->get_option( 'success_url', '' );
82
+ $this->currency_conversion = $this->get_option( 'currency_conversion', false );
83
+ $this->gateway_discount = 0;
84
+ $this->debug = $this->get_option( 'debug' );
85
+
86
+ // Logging and debug.
87
+ if ( 'yes' == $this->debug ) {
88
+ if ( class_exists( 'WC_Logger' ) ) {
89
+ $this->log = new WC_Logger();
90
+ } else {
91
+ $this->log = WC_MercadoPago_Module::woocommerce_instance()->logger();
92
+ }
93
+ }
94
+
95
+ // Render our configuration page and init/load fields.
96
+ $this->init_form_fields();
97
+ $this->init_settings();
98
+
99
+ // Used by IPN to receive IPN incomings.
100
+ add_action(
101
+ 'woocommerce_api_wc_woomercadopagosubscription_gateway',
102
+ array( $this, 'check_ipn_response' )
103
+ );
104
+ // Used by IPN to process valid incomings.
105
+ add_action(
106
+ 'valid_mercadopagosubscription_ipn_request',
107
+ array( $this, 'successful_request' )
108
+ );
109
+ // process the cancel order meta box order action
110
+ add_action(
111
+ 'woocommerce_order_action_cancel_order',
112
+ array( $this, 'process_cancel_order_meta_box_actions' )
113
+ );
114
+ // Used by WordPress to render the custom checkout page.
115
+ add_action(
116
+ 'woocommerce_receipt_' . $this->id,
117
+ array( $this, 'receipt_page' )
118
+ );
119
+ // Used to fix CSS in some older WordPress/WooCommerce versions.
120
+ add_action(
121
+ 'wp_head',
122
+ array( $this, 'css' )
123
+ );
124
+ // Used in settings page to hook "save settings" action.
125
+ add_action(
126
+ 'woocommerce_update_options_payment_gateways_' . $this->id,
127
+ array( $this, 'process_admin_options' )
128
+ );
129
+ // Scripts for order configuration.
130
+ add_action(
131
+ 'woocommerce_after_checkout_form',
132
+ array( $this, 'add_checkout_script' )
133
+ );
134
+ // Display discount in payment method title.
135
+ add_filter(
136
+ 'woocommerce_gateway_title',
137
+ array( $this, 'get_payment_method_title_subscription' ), 10, 2
138
+ );
139
+ // Checkout updates.
140
+ add_action(
141
+ 'woocommerce_thankyou',
142
+ array( $this, 'update_checkout_status' )
143
+ );
144
+
145
+ // Verify if client_id or client_secret is empty.
146
+ if ( empty( $this->client_id ) || empty( $this->client_secret ) ) {
147
+ if ( ! empty( $this->settings['enabled'] ) && 'yes' == $this->settings['enabled'] ) {
148
+ add_action( 'admin_notices', array( $this, 'client_id_or_secret_missing_message' ) );
149
+ }
150
+ }
151
+
152
+ }
153
+
154
+ /**
155
+ * Summary: Initialise Gateway Settings Form Fields.
156
+ * Description: Initialise Gateway settings form fields with a customized page.
157
+ */
158
+ public function init_form_fields() {
159
+
160
+ // If module is disabled, we do not need to load and process the settings page.
161
+ if ( empty( $this->settings['enabled'] ) || 'no' == $this->settings['enabled'] ) {
162
+ $this->form_fields = array(
163
+ 'enabled' => array(
164
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
165
+ 'type' => 'checkbox',
166
+ 'label' => __( 'Enable Subscription', 'woocommerce-mercadopago-module' ),
167
+ 'default' => 'no'
168
+ )
169
+ );
170
+ return;
171
+ }
172
+
173
+ $api_secret_locale = sprintf(
174
+ '<a href="https://www.mercadopago.com/mla/account/credentials?type=basic" target="_blank">%s</a>, ' .
175
+ '<a href="https://www.mercadopago.com/mlb/account/credentials?type=basic" target="_blank">%s</a> %s ' .
176
+ '<a href="https://www.mercadopago.com/mlm/account/credentials?type=basic" target="_blank">%s</a>, ',
177
+ __( 'Argentine', 'woocommerce-mercadopago-module' ),
178
+ __( 'Brazil', 'woocommerce-mercadopago-module' ),
179
+ __( 'or', 'woocommerce-mercadopago-module' ),
180
+ __( 'Mexico', 'woocommerce-mercadopago-module' )
181
+ );
182
+
183
+ $ipn_locale = sprintf(
184
+ '<a href="https://www.mercadopago.com.ar/ipn-notifications" target="_blank">%s</a>, ' .
185
+ '<a href="https://www.mercadopago.com.br/ipn-notifications" target="_blank">%s</a> %s ' .
186
+ '<a href="https://www.mercadopago.com.mx/ipn-notifications" target="_blank">%s</a>, ',
187
+ __( 'Argentine', 'woocommerce-mercadopago-module' ),
188
+ __( 'Brazil', 'woocommerce-mercadopago-module' ),
189
+ __( 'or', 'woocommerce-mercadopago-module' ),
190
+ __( 'Mexico', 'woocommerce-mercadopago-module' )
191
+ );
192
+
193
+ // Trigger API to get payment methods and site_id, also validates Client_id/Client_secret.
194
+ if ( $this->validate_credentials() ) {
195
+ // Checking the currency.
196
+ $this->currency_message = '';
197
+ if ( ! $this->is_supported_currency() && 'yes' == $this->settings['enabled'] ) {
198
+ if ( $this->currency_conversion == 'no' ) {
199
+ $this->currency_ratio = -1;
200
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_not_converted_msg(
201
+ $this->country_configs['currency'],
202
+ $this->country_configs['country_name']
203
+ );
204
+ } elseif ( $this->currency_conversion == 'yes' && $this->currency_ratio != -1) {
205
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_converted_msg(
206
+ $this->country_configs['currency'],
207
+ $this->currency_ratio
208
+ );
209
+ } else {
210
+ $this->currency_ratio = -1;
211
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_conversion_err_msg(
212
+ $this->country_configs['currency']
213
+ );
214
+ }
215
+ } else {
216
+ $this->currency_ratio = -1;
217
+ }
218
+ $this->credentials_message = WC_WooMercadoPago_Module::build_valid_credentials_msg(
219
+ $this->country_configs['country_name'],
220
+ $this->site_id
221
+ );
222
+ } else {
223
+ array_push( $this->payment_methods, 'n/d' );
224
+ $this->credentials_message = WC_WooMercadoPago_Module::build_invalid_credentials_msg();
225
+ }
226
+
227
+ // Checks validity of iFrame width/height fields.
228
+ if ( ! is_numeric( $this->iframe_width ) ) {
229
+ $this->iframe_width_desc = '<img width="12" height="12" src="' .
230
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
231
+ __( 'This field should be an integer.', 'woocommerce-mercadopago-module' );
232
+ } else {
233
+ $this->iframe_width_desc =
234
+ __( 'If your integration method is iFrame, please inform the payment iFrame width.', 'woocommerce-mercadopago-module' );
235
+ }
236
+ if ( ! is_numeric( $this->iframe_height ) ) {
237
+ $this->iframe_height_desc = '<img width="12" height="12" src="' .
238
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
239
+ __( 'This field should be an integer.', 'woocommerce-mercadopago-module' );
240
+ } else {
241
+ $this->iframe_height_desc =
242
+ __( 'If your integration method is iFrame, please inform the payment iFrame height.', 'woocommerce-mercadopago-module' );
243
+ }
244
+
245
+ // This array draws each UI (text, selector, checkbox, label, etc).
246
+ $this->form_fields = array(
247
+ 'enabled' => array(
248
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
249
+ 'type' => 'checkbox',
250
+ 'label' => __( 'Enable Subscription', 'woocommerce-mercadopago-module' ),
251
+ 'default' => 'no'
252
+ ),
253
+ 'credentials_title' => array(
254
+ 'title' => __( 'Mercado Pago Credentials', 'woocommerce-mercadopago-module' ),
255
+ 'type' => 'title',
256
+ 'description' => sprintf( '%s', $this->credentials_message ) . '<br>' . sprintf(
257
+ __( 'You can obtain your credentials for', 'woocommerce-mercadopago-module' ) .
258
+ ' %s.', $api_secret_locale
259
+ )
260
+ ),
261
+ 'client_id' => array(
262
+ 'title' => 'Client_id',
263
+ 'type' => 'text',
264
+ 'description' =>
265
+ __( 'Insert your Mercado Pago Client_id.', 'woocommerce-mercadopago-module' ),
266
+ 'default' => '',
267
+ 'required' => true
268
+ ),
269
+ 'client_secret' => array(
270
+ 'title' => 'Client_secret',
271
+ 'type' => 'text',
272
+ 'description' =>
273
+ __( 'Insert your Mercado Pago Client_secret.', 'woocommerce-mercadopago-module' ),
274
+ 'default' => '',
275
+ 'required' => true
276
+ ),
277
+ 'ipn_url' => array(
278
+ 'title' =>
279
+ __( 'Instant Payment Notification (IPN) URL', 'woocommerce-mercadopago-module' ),
280
+ 'type' => 'title',
281
+ 'description' => sprintf(
282
+ __( 'For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:', 'woocommerce-mercadopago-module' ) .
283
+ '<br>' . ' %s.', $ipn_locale . '. ' . sprintf(
284
+ __( 'Your IPN URL to receive instant payment notifications is', 'woocommerce-mercadopago-module' ) .
285
+ ':<br>%s', '<code>' . WC()->api_request_url( 'WC_WooMercadoPagoSubscription_Gateway' ) . '</code>' )
286
+ )
287
+ ),
288
+ 'checkout_options_title' => array(
289
+ 'title' => __( 'Checkout Options', 'woocommerce-mercadopago-module' ),
290
+ 'type' => 'title',
291
+ 'description' => ''
292
+ ),
293
+ 'title' => array(
294
+ 'title' => __( 'Title', 'woocommerce-mercadopago-module' ),
295
+ 'type' => 'text',
296
+ 'description' =>
297
+ __( 'Title shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
298
+ 'default' => __( 'Mercado Pago', 'woocommerce-mercadopago-module' )
299
+ ),
300
+ 'description' => array(
301
+ 'title' => __( 'Description', 'woocommerce-mercadopago-module' ),
302
+ 'type' => 'textarea',
303
+ 'description' =>
304
+ __( 'Description shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
305
+ 'default' => __( 'Subscribe with Mercado Pago', 'woocommerce-mercadopago-module' )
306
+ ),
307
+ 'invoice_prefix' => array(
308
+ 'title' => __( 'Store Identificator', 'woocommerce-mercadopago-module' ),
309
+ 'type' => 'text',
310
+ 'description' =>
311
+ __( 'Please, inform a prefix to your store.', 'woocommerce-mercadopago-module' )
312
+ . ' ' .
313
+ __( 'If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same identificators.', 'woocommerce-mercadopago-module' ),
314
+ 'default' => 'WC-'
315
+ ),
316
+ 'method' => array(
317
+ 'title' => __( 'Integration Method', 'woocommerce-mercadopago-module' ),
318
+ 'type' => 'select',
319
+ 'description' => __( 'Select how your clients should interact with Mercado Pago. Modal Window (inside your store), Redirect (Client is redirected to Mercado Pago), or iFrame (an internal window is embedded to the page layout).', 'woocommerce-mercadopago-module' ),
320
+ 'default' => 'iframe',
321
+ 'options' => array(
322
+ 'iframe' => __( 'iFrame', 'woocommerce-mercadopago-module' ),
323
+ 'modal' => __( 'Modal Window', 'woocommerce-mercadopago-module' ),
324
+ 'redirect' => __( 'Redirect', 'woocommerce-mercadopago-module' )
325
+ )
326
+ ),
327
+ 'iframe_width' => array(
328
+ 'title' => __( 'iFrame Width', 'woocommerce-mercadopago-module' ),
329
+ 'type' => 'text',
330
+ 'description' => $this->iframe_width_desc,
331
+ 'default' => '640'
332
+ ),
333
+ 'iframe_height' => array(
334
+ 'title' => __( 'iFrame Height', 'woocommerce-mercadopago-module' ),
335
+ 'type' => 'text',
336
+ 'description' => $this->iframe_height_desc,
337
+ 'default' => '800'
338
+ ),
339
+ 'back_url_title' => array(
340
+ 'title' => __( 'Back URL Options', 'woocommerce-mercadopago-module' ),
341
+ 'type' => 'title',
342
+ 'description' => ''
343
+ ),
344
+ 'success_url' => array(
345
+ 'title' => __( 'Sucess URL', 'woocommerce-mercadopago-module' ),
346
+ 'type' => 'text',
347
+ 'description' => __( 'Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page.', 'woocommerce-mercadopago-module' ),
348
+ 'default' => ''
349
+ ),
350
+ 'payment_title' => array(
351
+ 'title' => __( 'Payment Options', 'woocommerce-mercadopago-module' ),
352
+ 'type' => 'title',
353
+ 'description' => ''
354
+ ),
355
+ 'currency_conversion' => array(
356
+ 'title' => __( 'Currency Conversion', 'woocommerce-mercadopago-module' ),
357
+ 'type' => 'checkbox',
358
+ 'label' =>
359
+ __( 'If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio.', 'woocommerce-mercadopago-module' ),
360
+ 'default' => 'no',
361
+ 'description' => sprintf( '%s', $this->currency_message )
362
+ ),
363
+ 'testing' => array(
364
+ 'title' => __( 'Test and Debug Options', 'woocommerce-mercadopago-module' ),
365
+ 'type' => 'title',
366
+ 'description' => ''
367
+ ),
368
+ 'debug' => array(
369
+ 'title' => __( 'Debug and Log', 'woocommerce-mercadopago-module' ),
370
+ 'type' => 'checkbox',
371
+ 'label' => __( 'Enable log', 'woocommerce-mercadopago-module' ),
372
+ 'default' => 'no',
373
+ 'description' => sprintf(
374
+ __( 'Register event logs of Mercado Pago, such as API requests, in the file', 'woocommerce-mercadopago-module' ) .
375
+ ' %s.', $this->build_log_path_string() . '.<br>' .
376
+ __( 'File location: ', 'woocommerce-mercadopago-module' ) .
377
+ '<code>wordpress/wp-content/uploads/wc-logs/' . $this->id . '-' .
378
+ sanitize_file_name( wp_hash( $this->id) ) . '.log</code>' )
379
+ )
380
+ );
381
+
382
+ }
383
+
384
+ /**
385
+ * Processes and saves options.
386
+ * If there is an error thrown, will continue to save and validate fields, but will leave the
387
+ * erroring field out.
388
+ * @return bool was anything saved?
389
+ */
390
+ public function custom_process_admin_options() {
391
+ $this->init_settings();
392
+
393
+ if ( ! empty( $this->settings['client_id'] ) && ! empty( $this->settings['client_secret'] ) ) {
394
+ $this->mp = new MP(
395
+ WC_WooMercadoPago_Module::get_module_version(),
396
+ $this->settings['client_id'],
397
+ $this->settings['client_secret']
398
+ );
399
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
400
+ $this->mp->set_email( $email );
401
+ } else {
402
+ $this->mp = null;
403
+ }
404
+
405
+ // analytics
406
+ if ( $this->mp != null && ! $this->is_test_user ) {
407
+ $infra_data = WC_WooMercadoPago_Module::get_common_settings();
408
+ $infra_data['checkout_subscription'] = ( $this->settings['enabled'] == 'yes' ? 'true' : 'false' );
409
+ $response = $this->mp->analytics_save_settings( $infra_data );
410
+ if ( 'yes' == $this->debug) {
411
+ $this->log->add(
412
+ $this->id,
413
+ '[custom_process_admin_options] - analytics response: ' .
414
+ json_encode( $response, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
415
+ );
416
+ }
417
+ }
418
+
419
+ return update_option(
420
+ $this->get_option_key(),
421
+ apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->settings )
422
+ );
423
+ }
424
+
425
+ /**
426
+ * Handles the manual order cancellation in server-side.
427
+ */
428
+ public function process_cancel_order_meta_box_actions( $order ) {
429
+ // WooCommerce 3.0 or later.
430
+ if ( method_exists( $order, 'get_meta' ) ) {
431
+ $used_gateway = $order->get_meta( '_used_gateway' );
432
+ $preapproval = $order->get_meta( 'Mercado Pago Pre-Approval' );
433
+ } else {
434
+ $used_gateway = get_post_meta( $order->id, '_used_gateway', true );
435
+ $preapproval = get_post_meta( $order->id, 'Mercado Pago Pre-Approval', true );
436
+ }
437
+
438
+ if ( $used_gateway != 'WC_WooMercadoPagoSubscription_Gateway' ) {
439
+ return;
440
+ }
441
+
442
+ $preapproval = explode( '/', $preapproval );
443
+ $preapproval = explode( ' ', substr( $preapproval[0], 1, -1 ) );
444
+ $preapproval_id = $preapproval[1];
445
+
446
+ if ( 'yes' == $this->debug ) {
447
+ $this->log->add(
448
+ $this->id,
449
+ '[process_cancel_order_meta_box_actions] - cancelling preapproval for ' . $preapproval_id
450
+ );
451
+ }
452
+
453
+ if ( $this->mp != null && ! empty( $preapproval_id ) ) {
454
+ $response = $this->mp->cancel_preapproval_payment( $preapproval_id );
455
+ $message = $response['response']['message'];
456
+ $status = $response['status'];
457
+ if ( 'yes' == $this->debug ) {
458
+ $this->log->add(
459
+ $this->id,
460
+ '[process_cancel_order_meta_box_actions] - cancel preapproval of id ' . $preapproval_id .
461
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
462
+ );
463
+ }
464
+ } else {
465
+ if ( 'yes' == $this->debug ) {
466
+ $this->log->add(
467
+ $this->id,
468
+ '[process_cancel_order_meta_box_actions] - no preapproval or credentials invalid'
469
+ );
470
+ }
471
+ }
472
+
473
+ }
474
+
475
+ /*
476
+ * ========================================================================
477
+ * CHECKOUT BUSINESS RULES (CLIENT SIDE)
478
+ * ========================================================================
479
+ */
480
+
481
+ public function payment_fields() {
482
+ // subscription checkout
483
+ if ( $description = $this->get_description() ) {
484
+ echo wpautop(wptexturize( $description ) );
485
+ }
486
+ if ( $this->supports( 'default_credit_card_form' ) ) {
487
+ $this->credit_card_form();
488
+ }
489
+ }
490
+
491
+ public function add_checkout_script() {
492
+
493
+ $client_id = $this->get_option( 'client_id' );
494
+
495
+ if ( ! empty( $client_id ) && ! $this->is_test_user ) {
496
+
497
+ $w = WC_WooMercadoPago_Module::woocommerce_instance();
498
+ $logged_user_email = null;
499
+ $payments = array();
500
+ $gateways = WC()->payment_gateways->get_available_payment_gateways();
501
+ foreach ( $gateways as $g ) {
502
+ $payments[] = $g->id;
503
+ }
504
+ $payments = str_replace( '-', '_', implode( ', ', $payments ) );
505
+
506
+ if ( wp_get_current_user()->ID != 0 ) {
507
+ $logged_user_email = wp_get_current_user()->user_email;
508
+ }
509
+
510
+ ?>
511
+ <script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
512
+ <script type="text/javascript">
513
+ var MA = ModuleAnalytics;
514
+ MA.setToken( '<?php echo $client_id; ?>' );
515
+ MA.setPlatform( 'WooCommerce' );
516
+ MA.setPlatformVersion( '<?php echo $w->version; ?>' );
517
+ MA.setModuleVersion( '<?php echo WC_WooMercadoPago_Module::VERSION; ?>' );
518
+ MA.setPayerEmail( '<?php echo ( $logged_user_email != null ? $logged_user_email : "" ); ?>' );
519
+ MA.setUserLogged( <?php echo ( empty( $logged_user_email ) ? 0 : 1 ); ?> );
520
+ MA.setInstalledModules( '<?php echo $payments; ?>' );
521
+ MA.post();
522
+ </script>
523
+ <?php
524
+
525
+ }
526
+
527
+ }
528
+
529
+ public function update_checkout_status( $order_id ) {
530
+
531
+ $client_id = $this->get_option( 'client_id' );
532
+
533
+ if ( ! empty( $client_id ) && ! $this->is_test_user ) {
534
+
535
+ if ( get_post_meta( $order_id, '_used_gateway', true ) != 'WC_WooMercadoPagoSubscription_Gateway' ) {
536
+ return;
537
+ }
538
+
539
+ if ( 'yes' == $this->debug ) {
540
+ $this->log->add(
541
+ $this->id,
542
+ '[update_checkout_status] - updating order of ID ' . $order_id
543
+ );
544
+ }
545
+
546
+ echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
547
+ <script type="text/javascript">
548
+ var MA = ModuleAnalytics;
549
+ MA.setToken( ' . $client_id . ' );
550
+ MA.setPaymentType("subscription");
551
+ MA.setCheckoutType("subscription");
552
+ MA.put();
553
+ </script>';
554
+
555
+ }
556
+
557
+ }
558
+
559
+ /**
560
+ * Summary: Handle the payment and processing the order.
561
+ * Description: First step occurs when the customer selects Mercado Pago and proceed to checkout.
562
+ * This method verify which integration method was selected and makes the build for the checkout
563
+ * URL.
564
+ * @return an array containing the result of the processment and the URL to redirect.
565
+ */
566
+ public function process_payment( $order_id ) {
567
+ $order = wc_get_order( $order_id );
568
+
569
+ // WooCommerce 3.0 or later.
570
+ if ( method_exists( $order, 'update_meta_data' ) ) {
571
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPagoSubscription_Gateway' );
572
+ $order->save();
573
+ } else {
574
+ update_post_meta( $order_id, '_used_gateway', 'WC_WooMercadoPagoSubscription_Gateway' );
575
+ }
576
+
577
+ if ( 'redirect' == $this->method ) {
578
+ // The checkout is made by redirecting customer to Mercado Pago.
579
+ if ( 'yes' == $this->debug) {
580
+ $this->log->add(
581
+ $this->id,
582
+ '[process_payment] - customer being redirected to Mercado Pago.'
583
+ );
584
+ }
585
+ return array(
586
+ 'result' => 'success',
587
+ 'redirect' => $this->create_url( $order )
588
+ );
589
+ } elseif ( 'modal' == $this->method || 'iframe' == $this->method ) {
590
+ // The checkout is made by customizing the view, either by iframe or showing a modal.
591
+ if ( 'yes' == $this->debug ) {
592
+ $this->log->add(
593
+ $this->id,
594
+ '[process_payment] - preparing to render Mercado Pago checkout view.'
595
+ );
596
+ }
597
+ return array(
598
+ 'result' => 'success',
599
+ 'redirect' => $order->get_checkout_payment_url( true )
600
+ );
601
+ }
602
+ }
603
+
604
+ /**
605
+ * Summary: Show the custom renderization for the checkout.
606
+ * Description: Order page and this generates the form that shows the pay button. This step
607
+ * generates the form to proceed to checkout.
608
+ * @return the html to be rendered.
609
+ */
610
+ public function receipt_page( $order ) {
611
+ echo $this->render_order_form( $order );
612
+ }
613
+
614
+ // --------------------------------------------------
615
+
616
+ public function render_order_form( $order_id ) {
617
+
618
+ $order = wc_get_order( $order_id );
619
+ $url = $this->create_url( $order );
620
+
621
+ if ( $url ) {
622
+ $html =
623
+ '<img width="468" height="60" src="' . $this->country_configs['checkout_banner'] . '">';
624
+ if ( 'modal' == $this->method ) {
625
+ // The checkout is made by displaying a modal to the customer.
626
+ if ( 'yes' == $this->debug ) {
627
+ $this->log->add(
628
+ $this->id,
629
+ '[render_order_form] - rendering Mercado Pago lightbox (modal window).'
630
+ );
631
+ }
632
+ $html .= '<p></p><p>' . wordwrap(
633
+ __( 'Thank you for your order. Please, proceed with your payment clicking in the bellow button.', 'woocommerce-mercadopago-module' ),
634
+ 60, '<br>'
635
+ ) . '</p>';
636
+ $html .=
637
+ '<a id="submit-payment" href="' . $url .
638
+ '" name="MP-Checkout" class="button alt" mp-mode="modal">' .
639
+ __( 'Pay with Mercado Pago', 'woocommerce-mercadopago-module' ) .
640
+ '</a> ';
641
+ $html .=
642
+ '<a class="button cancel" href="' . esc_url( $order->get_cancel_order_url() ) . '">' .
643
+ __( 'Cancel order &amp; Clear cart', 'woocommerce-mercadopago-module' ) .
644
+ '</a><style type="text/css">#MP-Checkout-dialog #MP-Checkout-IFrame { bottom: -28px !important; height: 590px !important; }</style>';
645
+ // Includes the javascript of lightbox.
646
+ $html .=
647
+ '<script type="text/javascript">(function(){function $MPBR_load(){window.$MPBR_loaded !== true && (function(){var s = document.createElement("script");s.type = "text/javascript";s.async = true;s.src = ("https:"==document.location.protocol?"https://www.mercadopago.com/org-img/jsapi/mptools/buttons/":"https://mp-tools.mlstatic.com/buttons/")+"render.js";var x = document.getElementsByTagName("script")[0];x.parentNode.insertBefore(s, x);window.$MPBR_loaded = true;})();}window.$MPBR_loaded !== true ? (window.attachEvent ? window.attachEvent("onload", $MPBR_load) : window.addEventListener("load", $MPBR_load, false) ) : null;})();</script>';
648
+ } else {
649
+ // The checkout is made by rendering Mercado Pago form within a iframe.
650
+ if ( 'yes' == $this->debug ) {
651
+ $this->log->add(
652
+ $this->id,
653
+ '[render_order_form] - embedding Mercado Pago iframe.'
654
+ );
655
+ }
656
+ $html .= '<p></p><p>' . wordwrap(
657
+ __( 'Thank you for your order. Proceed with your payment completing the following information.', 'woocommerce-mercadopago-module' ),
658
+ 60, '<br>'
659
+ ) . '</p>';
660
+ $html .= '<iframe src="' . $url . '" name="MP-Checkout" ' .
661
+ 'width="' . ( is_numeric( (int) $this->iframe_width ) ? $this->iframe_width : 640 ) .
662
+ '" ' .
663
+ 'height="' . ( is_numeric( (int) $this->iframe_height ) ? $this->iframe_height : 800 ) .
664
+ '" ' .
665
+ 'frameborder="0" scrolling="no" id="checkout_mercadopago"></iframe>';
666
+ }
667
+ return $html;
668
+ } else {
669
+ // Reaching at this point means that the URL could not be build by some reason.
670
+ if ( 'yes' == $this->debug ) {
671
+ $this->log->add(
672
+ $this->id,
673
+ '[render_order_form] - unable to build Mercado Pago checkout URL.'
674
+ );
675
+ }
676
+ $html = '<p>' .
677
+ __( 'An error occurred when proccessing your payment. Please try again or contact us for assistence.', 'woocommerce-mercadopago-module' ) .
678
+ '</p>';
679
+ $html .= '<a class="button" href="' . esc_url( $order->get_checkout_payment_url() ) . '">' .
680
+ __( 'Click to try again', 'woocommerce-mercadopago-module' ) .
681
+ '</a>';
682
+ return $html;
683
+ }
684
+ }
685
+
686
+ /**
687
+ * Summary: Build Mercado Pago preapproval.
688
+ * Description: Create Mercado Pago preapproval structure and get init_point URL based in the order options
689
+ * from the cart.
690
+ * @return the preapproval structure.
691
+ */
692
+ public function build_preapproval( $order ) {
693
+
694
+ // Here we build the array that contains ordered items, from customer cart
695
+ $preapproval = null;
696
+
697
+ $arr = $order->get_items();
698
+ foreach ( $order->get_items() as $item ) {
699
+ if ( $item['qty'] ) {
700
+ $product = new WC_product( $item['product_id'] );
701
+
702
+ // WooCommerce 3.0 or later.
703
+ if ( method_exists( $product, 'get_name' ) ) {
704
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
705
+ $product->get_name()
706
+ );
707
+ } else {
708
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
709
+ $product->post->post_title
710
+ );
711
+ }
712
+
713
+ $unit_price = floor( ( (float) $item['line_total'] + (float) $item['line_tax'] ) *
714
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 ) * 100 ) / 100;
715
+
716
+ // Add shipment cost
717
+ $unit_price += ( (float) $order->get_total_shipping() + (float) $order->get_shipping_tax() ) *
718
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 );
719
+
720
+ // Round to two decimals.
721
+ $unit_price = floor( $unit_price * 100 ) / 100;
722
+
723
+ // Remove decimals if MCO/MLC
724
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
725
+ $unit_price = floor( $unit_price );
726
+ }
727
+
728
+ // Get the custom fields
729
+ $frequency = get_post_meta( $item['product_id'], '_mp_recurring_frequency', true );
730
+ $frequency_type = get_post_meta( $item['product_id'], '_mp_recurring_frequency_type', true );
731
+ $start_date = get_post_meta( $item['product_id'], '_mp_recurring_start_date', true );
732
+ $end_date = get_post_meta( $item['product_id'], '_mp_recurring_end_date', true );
733
+
734
+ // WooCommerce 3.0 or later.
735
+ if ( method_exists( $order, 'get_id' ) ) {
736
+ // Creates the pre-approval structure
737
+ $preapproval = array(
738
+ 'payer_email' => $order->get_billing_email(),
739
+ 'back_url' => ( empty( $this->success_url ) ?
740
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
741
+ esc_url( $this->get_return_url( $order ) )
742
+ ) : $this->success_url
743
+ ),
744
+ 'reason' => $product_title,
745
+ 'external_reference' => $this->invoice_prefix . $order->get_id(),
746
+ 'auto_recurring' => array(
747
+ 'frequency' => $frequency,
748
+ 'frequency_type' => $frequency_type,
749
+ 'transaction_amount' => $unit_price,
750
+ 'currency_id' => $this->country_configs['currency']
751
+ )
752
+ );
753
+ } else {
754
+ // Creates the pre-approval structure
755
+ $preapproval = array(
756
+ 'payer_email' => $order->billing_email,
757
+ 'back_url' => ( empty( $this->success_url ) ?
758
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
759
+ esc_url( $this->get_return_url( $order) )
760
+ ) : $this->success_url
761
+ ),
762
+ 'reason' => $product_title,
763
+ 'external_reference' => $this->invoice_prefix . $order->id,
764
+ 'auto_recurring' => array(
765
+ 'frequency' => $frequency,
766
+ 'frequency_type' => $frequency_type,
767
+ 'transaction_amount' => $unit_price,
768
+ 'currency_id' => $this->country_configs['currency']
769
+ )
770
+ );
771
+ }
772
+
773
+ if ( isset( $start_date ) && ! empty( $start_date ) )
774
+ $preapproval['auto_recurring']['start_date'] = $start_date . 'T16:00:00.000-03:00';
775
+ if ( isset( $end_date ) && ! empty( $end_date ) )
776
+ $preapproval['auto_recurring']['end_date'] = $end_date . 'T16:00:00.000-03:00';
777
+ // Do not set IPN url if it is a localhost.
778
+ if ( ! strrpos( $this->domain, 'localhost' ) ) {
779
+ $preapproval['notification_url'] = WC_WooMercadoPago_Module::workaround_ampersand_bug(
780
+ WC()->api_request_url( 'WC_WooMercadoPagoSubscription_Gateway' )
781
+ );
782
+ }
783
+ // Set sponsor ID.
784
+ if ( ! $this->is_test_user ) {
785
+ $preapproval['sponsor_id'] = $this->country_configs['sponsor_id'];
786
+ }
787
+ // Log debug message.
788
+ if ( 'yes' == $this->debug ) {
789
+ $this->log->add(
790
+ $this->id,
791
+ '[build_preapproval] - preapproval created with following structure: ' .
792
+ json_encode( $preapproval, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE ) );
793
+ }
794
+ }
795
+ }
796
+
797
+ return $preapproval;
798
+ }
799
+
800
+ // --------------------------------------------------
801
+
802
+ protected function create_url( $order ) {
803
+
804
+ $this->mp->sandbox_mode( false );
805
+
806
+ // Creates the order parameters by checking the cart configuration.
807
+ $preapproval_payment = $this->build_preapproval( $order );
808
+ // Create order preferences with Mercado Pago API request.
809
+ try {
810
+ $checkout_info = $this->mp->create_preapproval_payment( json_encode( $preapproval_payment ) );
811
+ if ( $checkout_info['status'] < 200 || $checkout_info['status'] >= 300 ) {
812
+ // Mercado Pago trowed an error.
813
+ if ( 'yes' == $this->debug ) {
814
+ $this->log->add(
815
+ $this->id,
816
+ '[create_url] - mercado pago gave error, payment creation failed with error: ' .
817
+ $checkout_info['response']['message']
818
+ );
819
+ }
820
+ return false;
821
+ } elseif ( is_wp_error( $checkout_info ) ) {
822
+ // WordPress throwed an error.
823
+ if ( 'yes' == $this->debug ) {
824
+ $this->log->add(
825
+ $this->id,
826
+ '[create_url] - wordpress gave error, payment creation failed with error: ' .
827
+ $checkout_info['response']['message']
828
+ );
829
+ }
830
+ return false;
831
+ } else {
832
+ // Obtain the URL.
833
+ if ( 'yes' == $this->debug ) {
834
+ $this->log->add(
835
+ $this->id,
836
+ '[create_url] - pre-approval link generated with success from mercado pago, with structure as follow: ' .
837
+ json_encode( $checkout_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
838
+ );
839
+ }
840
+ return $checkout_info['response']['init_point'];
841
+ }
842
+ } catch ( MercadoPagoException $e ) {
843
+ // Something went wrong with the payment creation.
844
+ if ( 'yes' == $this->debug ) {
845
+ $this->log->add(
846
+ $this->id,
847
+ '[create_url] - payment creation failed with exception: ' .
848
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
849
+ );
850
+ }
851
+ return false;
852
+ }
853
+
854
+ }
855
+
856
+ // Display the discount in payment method title.
857
+ public function get_payment_method_title_subscription( $title, $id ) {
858
+
859
+ if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
860
+ return $title;
861
+ }
862
+
863
+ if ( $title != $this->title || $this->gateway_discount == 0 ) {
864
+ return $title;
865
+ }
866
+
867
+ $total = (float) WC()->cart->subtotal;
868
+ if ( is_numeric( $this->gateway_discount ) ) {
869
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
870
+ $price_percent = $this->gateway_discount / 100;
871
+ if ( $price_percent > 0 ) {
872
+ $title .= ' (' . __( 'Discount Of ', 'woocommerce-mercadopago-module' ) .
873
+ strip_tags( wc_price( $total * $price_percent ) ) . ' )';
874
+ }
875
+ }
876
+ }
877
+
878
+ return $title;
879
+ }
880
+
881
+ /*
882
+ * ========================================================================
883
+ * AUXILIARY AND FEEDBACK METHODS (SERVER SIDE)
884
+ * ========================================================================
885
+ */
886
+
887
+ /**
888
+ * Summary: Check if we have valid credentials.
889
+ * Description: Check if we have valid credentials.
890
+ * @return boolean true/false depending on the validation result.
891
+ */
892
+ public function validate_credentials() {
893
+
894
+ if ( empty( $this->client_id ) || empty( $this->client_secret ) ) {
895
+ return false;
896
+ }
897
+
898
+ if ( ! is_numeric( $this->client_id ) ) {
899
+ return false;
900
+ }
901
+
902
+ try {
903
+
904
+ $this->mp = new MP(
905
+ WC_WooMercadoPago_Module::get_module_version(),
906
+ $this->client_id,
907
+ $this->client_secret
908
+ );
909
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
910
+ $this->mp->set_email( $email );
911
+ $access_token = $this->mp->get_access_token();
912
+ $get_request = $this->mp->get( '/users/me?access_token=' . $access_token );
913
+
914
+ if ( isset( $get_request['response']['site_id'] ) ) {
915
+
916
+ $s_id = $get_request['response']['site_id'];
917
+ if ( $s_id != 'MLA' && $s_id != 'MLB' && $s_id != 'MLM') {
918
+ $this->mp = null;
919
+ return false;
920
+ }
921
+
922
+ $this->is_test_user = in_array( 'test_user', $get_request['response']['tags'] );
923
+ $this->site_id = $get_request['response']['site_id'];
924
+ $this->country_configs = WC_WooMercadoPago_Module::get_country_config( $this->site_id );
925
+
926
+ $payments = $this->mp->get( '/v1/payment_methods/?access_token=' . $access_token );
927
+ array_push( $this->payment_methods, 'n/d' );
928
+ foreach ( $payments['response'] as $payment ) {
929
+ array_push( $this->payment_methods, str_replace( '_', ' ', $payment['id'] ) );
930
+ }
931
+
932
+ // Check for auto converstion of currency (only if it is enabled).
933
+ $this->currency_ratio = -1;
934
+ if ( $this->currency_conversion == 'yes' ) {
935
+ $this->currency_ratio = WC_WooMercadoPago_Module::get_conversion_rate(
936
+ $this->country_configs['currency']
937
+ );
938
+ }
939
+
940
+ return true;
941
+
942
+ } else {
943
+ $this->mp = null;
944
+ return false;
945
+ }
946
+
947
+ } catch ( MercadoPagoException $e ) {
948
+ if ( 'yes' == $this->debug) {
949
+ $this->log->add(
950
+ $this->id,
951
+ '[validate_credentials] - while validating credentials, got exception: ' .
952
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
953
+ );
954
+ }
955
+ $this->mp = null;
956
+ return false;
957
+ }
958
+
959
+ return false;
960
+
961
+ }
962
+
963
+ // Build the string representing the path to the log file.
964
+ protected function build_log_path_string() {
965
+ return '<a href="' . esc_url( admin_url( 'admin.php?page=wc-status&tab=logs&log_file=' .
966
+ esc_attr( $this->id ) . '-' . sanitize_file_name( wp_hash( $this->id ) ) . '.log' ) ) . '">' .
967
+ __( 'WooCommerce &gt; System Status &gt; Logs', 'woocommerce-mercadopago-module' ) . '</a>';
968
+ }
969
+
970
+ // Return boolean indicating if currency is supported.
971
+ protected function is_supported_currency() {
972
+ return get_woocommerce_currency() == $this->country_configs['currency'];
973
+ }
974
+
975
+ // Called automatically by WooCommerce, verify if Module is available to use.
976
+ public function is_available() {
977
+ if ( ! did_action( 'wp_loaded' ) ) {
978
+ return false;
979
+ }
980
+ global $woocommerce;
981
+ $w_cart = $woocommerce->cart;
982
+ // Check for recurrent product checkout.
983
+ if ( isset( $w_cart ) ) {
984
+ if ( ! WC_WooMercadoPago_Module::is_subscription( $w_cart->get_cart() ) ) {
985
+ return false;
986
+ }
987
+ }
988
+ $available = ( 'yes' == $this->settings['enabled'] ) &&
989
+ ! empty( $this->client_id ) &&
990
+ ! empty( $this->client_secret );
991
+ return $available;
992
+ }
993
+
994
+ // Fix css for Mercado Pago in specific cases.
995
+ public function css() {
996
+ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.1', '>=' ) ) {
997
+ $page_id = wc_get_page_id( 'checkout' );
998
+ } else {
999
+ $page_id = woocommerce_get_page_id( 'checkout' );
1000
+ }
1001
+ if ( is_page( $page_id ) ) {
1002
+ echo '<style type="text/css">#MP-Checkout-dialog { z-index: 9999 !important; }</style>' .
1003
+ PHP_EOL;
1004
+ }
1005
+ }
1006
+
1007
+ // Get the URL to admin page.
1008
+ protected function admin_url() {
1009
+ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.1', '>=' ) ) {
1010
+ return admin_url(
1011
+ 'admin.php?page=wc-settings&tab=checkout&section=WC_WooMercadoPagoSubscription_Gateway'
1012
+ );
1013
+ }
1014
+ return admin_url(
1015
+ 'admin.php?page=woocommerce_settings&tab=payment_gateways&section=WC_WooMercadoPagoSubscription_Gateway'
1016
+ );
1017
+ }
1018
+
1019
+ // Notify that Client_id and/or Client_secret are not valid.
1020
+ public function client_id_or_secret_missing_message() {
1021
+ echo '<div class="error"><p><strong>' .
1022
+ __( 'Subscription is Inactive', 'woocommerce-mercadopago-module' ) .
1023
+ '</strong>: ' .
1024
+ __( 'Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured.', 'woocommerce-mercadopago-module' ) .
1025
+ '</p></div>';
1026
+ }
1027
+
1028
+ /*
1029
+ * ========================================================================
1030
+ * IPN MECHANICS (SERVER SIDE)
1031
+ * ========================================================================
1032
+ */
1033
+
1034
+ /**
1035
+ * Summary: This call checks any incoming notifications from Mercado Pago server.
1036
+ * Description: This call checks any incoming notifications from Mercado Pago server.
1037
+ */
1038
+ public function check_ipn_response() {
1039
+
1040
+ @ob_clean();
1041
+
1042
+ if ( 'yes' == $this->debug ) {
1043
+ $this->log->add(
1044
+ $this->id,
1045
+ '[check_ipn_response] - received _get content: ' .
1046
+ json_encode( $_GET, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1047
+ );
1048
+ }
1049
+
1050
+ // Setup sandbox mode.
1051
+ $this->mp->sandbox_mode( false );
1052
+
1053
+ // Over here, $_GET should come with this JSON structure:
1054
+ // {
1055
+ // "topic": <string>,
1056
+ // "id": <string>
1057
+ // }
1058
+ // If not, the IPN is corrupted in some way.
1059
+ $data = $_GET;
1060
+ if ( isset( $data['action_mp_payment_id'] ) && isset( $data['action_mp_payment_amount'] ) ) {
1061
+
1062
+ if ( $data['action_mp_payment_action'] === 'cancel' ) {
1063
+
1064
+ if ( 'yes' == $this->debug ) {
1065
+ $this->log->add(
1066
+ $this->id,
1067
+ '[check_ipn_response] - cancelling payment of ID ' . $data['action_mp_payment_id']
1068
+ );
1069
+ }
1070
+
1071
+ if ( $this->mp != null && ! empty( $data['action_mp_payment_id'] ) ) {
1072
+ $response = $this->mp->cancel_payment( $data['action_mp_payment_id'] );
1073
+ $message = $response['response']['message'];
1074
+ $status = $response['status'];
1075
+ if ( 'yes' == $this->debug ) {
1076
+ $this->log->add(
1077
+ $this->id,
1078
+ '[check_ipn_response] - cancel payment of id ' . $data['action_mp_payment_id'] .
1079
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
1080
+ );
1081
+ }
1082
+ if ( $status >= 200 && $status < 300 ) {
1083
+ header( 'HTTP/1.1 200 OK' );
1084
+ echo json_encode( array(
1085
+ 'status' => 200,
1086
+ 'message' => __( 'Operation successfully completed.', 'woocommerce-mercadopago-module' )
1087
+ ) );
1088
+ } else {
1089
+ header( 'HTTP/1.1 200 OK' );
1090
+ echo json_encode( array(
1091
+ 'status' => $status,
1092
+ 'message' => $message
1093
+ ) );
1094
+ }
1095
+ } else {
1096
+ if ( 'yes' == $this->debug ) {
1097
+ $this->log->add(
1098
+ $this->id,
1099
+ '[check_ipn_response] - no payments or credentials invalid'
1100
+ );
1101
+ }
1102
+ header( 'HTTP/1.1 500 OK' );
1103
+ }
1104
+
1105
+ } elseif ( $data['action_mp_payment_action'] === 'refund' ) {
1106
+
1107
+ if ( 'yes' == $this->debug ) {
1108
+ $this->log->add(
1109
+ $this->id,
1110
+ '[check_ipn_response] - refunding payment of ID ' . $data['action_mp_payment_id']
1111
+ );
1112
+ }
1113
+
1114
+ if ( $this->mp != null && ! empty( $data['action_mp_payment_id'] ) ) {
1115
+ $response = $this->mp->partial_refund_payment(
1116
+ $data['action_mp_payment_id'],
1117
+ (float) str_replace( ',', '.', $data['action_mp_payment_amount'] ),
1118
+ // TODO: here, we should improve by placing the actual reason and the external refarence
1119
+ __( 'Refund Payment', 'woocommerce-mercadopago-module' ) . ' ' . $data['action_mp_payment_id'],
1120
+ __( 'Refund Payment', 'woocommerce-mercadopago-module' ) . ' ' . $data['action_mp_payment_id']
1121
+ );
1122
+ $message = $response['response']['message'];
1123
+ $status = $response['status'];
1124
+ if ( 'yes' == $this->debug ) {
1125
+ $this->log->add(
1126
+ $this->id,
1127
+ '[check_ipn_response] - refund payment of id ' . $data['action_mp_payment_id'] .
1128
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
1129
+ );
1130
+ }
1131
+ if ( $status >= 200 && $status < 300 ) {
1132
+ header( 'HTTP/1.1 200 OK' );
1133
+ echo json_encode( array(
1134
+ 'status' => 200,
1135
+ 'message' => __( 'Operation successfully completed.', 'woocommerce-mercadopago-module' )
1136
+ ) );
1137
+ } else {
1138
+ header( 'HTTP/1.1 200 OK' );
1139
+ echo json_encode( array(
1140
+ 'status' => $status,
1141
+ 'message' => $message
1142
+ ) );
1143
+ }
1144
+ } else {
1145
+ if ( 'yes' == $this->debug ) {
1146
+ $this->log->add(
1147
+ $this->id,
1148
+ '[check_ipn_response] - no payments or credentials invalid'
1149
+ );
1150
+ }
1151
+ header( 'HTTP/1.1 500 OK' );
1152
+ }
1153
+
1154
+ }
1155
+
1156
+ } elseif ( isset( $data['id'] ) && isset( $data['topic'] ) ) {
1157
+
1158
+ // We have received a normal IPN call for this gateway, start process by getting the access token...
1159
+ $access_token = array( 'access_token' => $this->mp->get_access_token() );
1160
+
1161
+ // Now, we should handle the topic type that has come...
1162
+ if ( $data['topic'] == 'payment' ) {
1163
+
1164
+ // Get the payment of a preapproval.
1165
+ $payment_info = $this->mp->get( '/v1/payments/' . $data['id'], $access_token, false );
1166
+ if ( ! is_wp_error( $payment_info ) && ( $payment_info['status'] == 200 || $payment_info['status'] == 201 ) ) {
1167
+ $payment_info['response']['ipn_type'] = 'payment';
1168
+ do_action( 'valid_mercadopagosubscription_ipn_request', $payment_info['response'] );
1169
+ header( 'HTTP/1.1 200 OK' );
1170
+ } else {
1171
+ if ( 'yes' == $this->debug) {
1172
+ $this->log->add(
1173
+ $this->id,
1174
+ '[check_ipn_response] - got status not equal 200: ' .
1175
+ json_encode( $payment_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1176
+ );
1177
+ }
1178
+ return false;
1179
+ }
1180
+
1181
+ } elseif ( $data['topic'] == 'preapproval' ) {
1182
+
1183
+ // Get the preapproval reported by the IPN.
1184
+ $preapproval_info = $this->mp->get_preapproval_payment( $_GET['id'] );
1185
+ if ( ! is_wp_error( $preapproval_info ) && ( $preapproval_info['status'] == 200 || $preapproval_info['status'] == 201 ) ) {
1186
+ $preapproval_info['response']['ipn_type'] = 'preapproval';
1187
+ do_action( 'valid_mercadopagosubscription_ipn_request', $preapproval_info['response'] );
1188
+ header( 'HTTP/1.1 200 OK' );
1189
+ } else {
1190
+ if ( 'yes' == $this->debug ) {
1191
+ $this->log->add(
1192
+ $this->id,
1193
+ '[check_ipn_response] - got status not equal 200: ' .
1194
+ json_encode( $preapproval_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1195
+ );
1196
+ }
1197
+ }
1198
+
1199
+ } else {
1200
+
1201
+ // We have received an unhandled topic...
1202
+ $this->log->add(
1203
+ $this->id,
1204
+ '[check_ipn_response] - request failure, received an unhandled topic'
1205
+ );
1206
+
1207
+ }
1208
+
1209
+ } elseif ( isset( $data['data_id'] ) && isset( $data['type'] ) ) {
1210
+
1211
+ // We have received a bad, however valid) IPN call for this gateway (data is set for API V1).
1212
+ // At least, we should respond 200 to notify server that we already received it.
1213
+ header( 'HTTP/1.1 200 OK' );
1214
+
1215
+ } else {
1216
+
1217
+ // Reaching here means that we received an IPN call but there are no data!
1218
+ // Just kills the processment. No IDs? No process!
1219
+ if ( 'yes' == $this->debug ) {
1220
+ $this->log->add(
1221
+ $this->id,
1222
+ '[check_ipn_response] - request failure, received ipn call with no data'
1223
+ );
1224
+ }
1225
+ wp_die( __( 'Mercado Pago Request Failure', 'woocommerce-mercadopago-module' ) );
1226
+
1227
+ }
1228
+
1229
+ exit;
1230
+
1231
+ }
1232
+
1233
+ /**
1234
+ * Summary: Properly handles each case of notification, based in payment status.
1235
+ * Description: Properly handles each case of notification, based in payment status.
1236
+ */
1237
+ public function successful_request( $data ) {
1238
+
1239
+ if ( 'yes' == $this->debug ) {
1240
+ $this->log->add(
1241
+ $this->id,
1242
+ '[successful_request] - starting to process ipn update...'
1243
+ );
1244
+ }
1245
+
1246
+ // Get the order and check its presence.
1247
+ $order_key = $data['external_reference'];
1248
+ if ( empty( $order_key ) ) {
1249
+ return;
1250
+ }
1251
+
1252
+ $id = (int) str_replace( $this->invoice_prefix, '', $order_key );
1253
+ $order = wc_get_order( $id );
1254
+
1255
+ // Check if order exists.
1256
+ if ( ! $order ) {
1257
+ return;
1258
+ }
1259
+
1260
+ // WooCommerce 3.0 or later.
1261
+ if ( method_exists( $order, 'get_id' ) ) {
1262
+ $order_id = $order->get_id();
1263
+ } else {
1264
+ $order_id = $order->id;
1265
+ }
1266
+
1267
+ // Check if we have the correct order.
1268
+ if ( $order_id !== $id ) {
1269
+ return;
1270
+ }
1271
+
1272
+ if ( 'yes' == $this->debug ) {
1273
+ $this->log->add(
1274
+ $this->id,
1275
+ '[successful_request] - updating metadata and status with data: ' .
1276
+ json_encode( $data, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1277
+ );
1278
+ }
1279
+
1280
+ // WooCommerce 3.0 or later.
1281
+ if ( method_exists( $order, 'update_meta_data' ) ) {
1282
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPagoSubscription_Gateway' );
1283
+
1284
+ // Here, we process the status... this is the business rules!
1285
+ // Reference: https://www.mercadopago.com.br/developers/en/api-docs/basic-checkout/ipn/payment-status/
1286
+ $status = isset( $data['status'] ) ? $data['status'] : 'pending';
1287
+
1288
+ // Updates the order metadata.
1289
+ if ( $data['ipn_type'] == 'payment' ) {
1290
+ $total_paid = isset( $data['transaction_details']['total_paid_amount'] ) ? $data['transaction_details']['total_paid_amount'] : 0.00;
1291
+ $total_refund = isset( $data['transaction_amount_refunded'] ) ? $data['transaction_amount_refunded'] : 0.00;
1292
+ $total = $data['transaction_amount'];
1293
+ if ( ! empty( $data['payer']['email'] ) ) {
1294
+ $order->update_meta_data(
1295
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1296
+ $data['payer']['email']
1297
+ );
1298
+ }
1299
+ if ( ! empty( $data['payment_type_id'] ) ) {
1300
+ $order->update_meta_data(
1301
+ __( 'Payment type', 'woocommerce-mercadopago-module' ),
1302
+ $data['payment_type_id']
1303
+ );
1304
+ }
1305
+ if ( ! empty( $data['id'] ) ) {
1306
+ $order->update_meta_data(
1307
+ 'Mercado Pago - Payment ID ' . $data['id'],
1308
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1309
+ ']/[Amount ' . $total .
1310
+ ']/[Paid ' . $total_paid .
1311
+ ']/[Refund ' . $total_refund . ']'
1312
+ );
1313
+ $payment_ids_str = $order->get_meta( '_Mercado_Pago_Sub_Payment_IDs' );
1314
+ $payment_ids = array();
1315
+ if ( ! empty( $payment_ids_str ) ) {
1316
+ $payment_ids = explode( ', ', $payment_ids_str );
1317
+ }
1318
+ $payment_ids[] = $data['id'];
1319
+ $order->update_meta_data(
1320
+ '_Mercado_Pago_Sub_Payment_IDs',
1321
+ implode( ', ', $payment_ids )
1322
+ );
1323
+ }
1324
+ $order->save();
1325
+ } elseif ( $data['ipn_type'] == 'preapproval' ) {
1326
+ $status = $data['status'];
1327
+ if ( ! empty( $data['payer_email'] ) ) {
1328
+ $order->update_meta_data(
1329
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1330
+ $data['payer_email']
1331
+ );
1332
+ }
1333
+ if ( ! empty( $data['id'] ) ) {
1334
+ $order->update_meta_data(
1335
+ 'Mercado Pago Pre-Approval',
1336
+ '[ID ' . $data['id'] .
1337
+ ']/[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1338
+ ']/[Amount ' . $data['auto_recurring']['transaction_amount'] .
1339
+ ']/[End ' . date( 'Y-m-d', strtotime( $data['auto_recurring']['end_date'] ) ) . ']'
1340
+ );
1341
+ }
1342
+
1343
+ $order->save();
1344
+ }
1345
+ } else {
1346
+ update_post_meta( $order->id, '_used_gateway', 'WC_WooMercadoPagoSubscription_Gateway' );
1347
+
1348
+ // Here, we process the status... this is the business rules!
1349
+ // Reference: https://www.mercadopago.com.br/developers/en/api-docs/basic-checkout/ipn/payment-status/
1350
+ $status = isset( $data['status'] ) ? $data['status'] : 'pending';
1351
+
1352
+ // Updates the order metadata.
1353
+ if ( $data['ipn_type'] == 'payment' ) {
1354
+ $total_paid = isset( $data['transaction_details']['total_paid_amount'] ) ? $data['transaction_details']['total_paid_amount'] : 0.00;
1355
+ $total_refund = isset( $data['transaction_amount_refunded'] ) ? $data['transaction_amount_refunded'] : 0.00;
1356
+ $total = $data['transaction_amount'];
1357
+ if ( ! empty( $data['payer']['email'] ) ) {
1358
+ update_post_meta(
1359
+ $order_id,
1360
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1361
+ $data['payer']['email']
1362
+ );
1363
+ }
1364
+ if ( ! empty( $data['payment_type_id'] ) ) {
1365
+ update_post_meta(
1366
+ $order_id,
1367
+ __( 'Payment type', 'woocommerce-mercadopago-module' ),
1368
+ $data['payment_type_id']
1369
+ );
1370
+ }
1371
+ if ( ! empty( $data['id'] ) ) {
1372
+ update_post_meta(
1373
+ $order_id,
1374
+ 'Mercado Pago - Payment ID ' . $data['id'],
1375
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1376
+ ']/[Amount ' . $total .
1377
+ ']/[Paid ' . $total_paid .
1378
+ ']/[Refund ' . $total_refund . ']'
1379
+ );
1380
+ $payment_ids_str = get_post_meta(
1381
+ $order->id,
1382
+ '_Mercado_Pago_Sub_Payment_IDs',
1383
+ true
1384
+ );
1385
+ $payment_ids = array();
1386
+ if ( ! empty( $payment_ids_str ) ) {
1387
+ $payment_ids = explode( ', ', $payment_ids_str );
1388
+ }
1389
+ $payment_ids[] = $data['id'];
1390
+ update_post_meta(
1391
+ $order_id,
1392
+ '_Mercado_Pago_Sub_Payment_IDs',
1393
+ implode( ', ', $payment_ids )
1394
+ );
1395
+ }
1396
+ } elseif ( $data['ipn_type'] == 'preapproval' ) {
1397
+ $status = $data['status'];
1398
+ if ( ! empty( $data['payer_email'] ) ) {
1399
+ update_post_meta(
1400
+ $order_id,
1401
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1402
+ $data['payer_email']
1403
+ );
1404
+ }
1405
+ if ( ! empty( $data['id'] ) ) {
1406
+ update_post_meta(
1407
+ $order_id,
1408
+ 'Mercado Pago Pre-Approval',
1409
+ '[ID ' . $data['id'] .
1410
+ ']/[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1411
+ ']/[Amount ' . $data['auto_recurring']['transaction_amount'] .
1412
+ ']/[End ' . date( 'Y-m-d', strtotime( $data['auto_recurring']['end_date'] ) ) . ']'
1413
+ );
1414
+ }
1415
+ }
1416
+ }
1417
+
1418
+ // Switch the status and update in WooCommerce.
1419
+ switch ( $status ) {
1420
+ case 'authorized':
1421
+ case 'approved':
1422
+ $order->add_order_note(
1423
+ 'Mercado Pago: ' .
1424
+ __( 'Payment approved.', 'woocommerce-mercadopago-module' )
1425
+ );
1426
+ $order->payment_complete();
1427
+ break;
1428
+ case 'pending':
1429
+ $order->add_order_note(
1430
+ 'Mercado Pago: ' .
1431
+ __( 'Customer haven\'t paid yet.', 'woocommerce-mercadopago-module' )
1432
+ );
1433
+ break;
1434
+ case 'in_process':
1435
+ $order->update_status(
1436
+ 'on-hold',
1437
+ 'Mercado Pago: ' .
1438
+ __( 'Payment under review.', 'woocommerce-mercadopago-module' )
1439
+ );
1440
+ break;
1441
+ case 'rejected':
1442
+ $order->update_status(
1443
+ 'failed',
1444
+ 'Mercado Pago: ' .
1445
+ __( 'The payment was refused. The customer can try again.', 'woocommerce-mercadopago-module' )
1446
+ );
1447
+ break;
1448
+ case 'refunded':
1449
+ $order->update_status(
1450
+ 'refunded',
1451
+ 'Mercado Pago: ' .
1452
+ __( 'The payment was refunded to the customer.', 'woocommerce-mercadopago-module' )
1453
+ );
1454
+ break;
1455
+ case 'cancelled':
1456
+ $this->process_cancel_order_meta_box_actions( $order );
1457
+ $order->update_status(
1458
+ 'cancelled',
1459
+ 'Mercado Pago: ' .
1460
+ __( 'The payment was cancelled.', 'woocommerce-mercadopago-module' )
1461
+ );
1462
+ break;
1463
+ case 'in_mediation':
1464
+ $order->add_order_note(
1465
+ 'Mercado Pago: ' .
1466
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1467
+ );
1468
+ break;
1469
+ case 'charged-back':
1470
+ $order->add_order_note(
1471
+ 'Mercado Pago: ' .
1472
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1473
+ );
1474
+ break;
1475
+ default:
1476
+ break;
1477
+ }
1478
+
1479
+ }
1480
+
1481
+ }
mercadopago/mercadopago-ticket-gateway.php ADDED
@@ -0,0 +1,1836 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Part of Woo Mercado Pago Module
5
+ * Author - Mercado Pago
6
+ * Developer - Marcelo Tomio Hama / marcelo.hama@mercadolivre.com
7
+ * Copyright - Copyright(c) MercadoPago [https://www.mercadopago.com]
8
+ * License - https://www.gnu.org/licenses/gpl.html GPL version 2 or higher
9
+ */
10
+
11
+ // This include Mercado Pago library SDK
12
+ require_once dirname( __FILE__ ) . '/sdk/lib/mercadopago.php';
13
+
14
+ /**
15
+ * Summary: Extending from WooCommerce Payment Gateway class.
16
+ * Description: This class implements Mercado Pago ticket payment method.
17
+ * @since 2.0.0
18
+ */
19
+ class WC_WooMercadoPagoTicket_Gateway extends WC_Payment_Gateway {
20
+
21
+ public function __construct( $is_instance = false ) {
22
+
23
+ // Creating PHP version message.
24
+ $min_php_message = phpversion() >= WC_WooMercadoPago_Module::MIN_PHP ?
25
+ '<img width="14" height="14" src="' . plugins_url( 'images/check.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
26
+ __( 'Your PHP version is OK.', 'woocommerce-mercadopago-module' ) :
27
+ '<img width="14" height="14" src="' . plugins_url( 'images/error.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
28
+ sprintf(
29
+ __( 'Your PHP version do not support this module. You have %s, minimal required is %s.', 'woocommerce-mercadopago-module' ),
30
+ phpversion(), WC_WooMercadoPago_Module::MIN_PHP
31
+ );
32
+ // Check cURL.
33
+ $curl_message = in_array( 'curl', get_loaded_extensions() ) ?
34
+ '<img width="14" height="14" src="' . plugins_url( 'images/check.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
35
+ __( 'cURL is installed.', 'woocommerce-mercadopago-module' ) :
36
+ '<img width="14" height="14" src="' . plugins_url( 'images/error.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
37
+ __( 'cURL is not installed.', 'woocommerce-mercadopago-module' );
38
+ // Check SSL.
39
+ $is_ssl_message = empty( $_SERVER['HTTPS'] ) || $_SERVER['HTTPS'] == 'off' ?
40
+ '<img width="14" height="14" src="' . plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
41
+ __( 'SSL is missing in your site.', 'woocommerce-mercadopago-module' ) :
42
+ '<img width="14" height="14" src="' . plugins_url( 'images/check.png', plugin_dir_path( __FILE__ ) ) . '"> ' .
43
+ __( 'Your site has SSL enabled.', 'woocommerce-mercadopago-module' );
44
+
45
+ // Mercado Pago fields.
46
+ $this->mp = null;
47
+ $this->site_id = null;
48
+ $this->collector_id = null;
49
+ $this->currency_ratio = -1;
50
+ $this->is_test_user = false;
51
+
52
+ // Auxiliary fields.
53
+ $this->currency_message = '';
54
+ $this->payment_methods = array();
55
+ $this->country_configs = array();
56
+ $this->store_categories_id = array();
57
+ $this->store_categories_description = array();
58
+
59
+ // WooCommerce fields.
60
+ $this->supports = array( 'products', 'refunds' );
61
+ $this->id = 'woocommerce-mercadopago-ticket-module';
62
+ $this->domain = get_site_url() . '/index.php';
63
+ $this->method_title = __( 'Mercado Pago - Ticket', 'woocommerce-mercadopago-module' );
64
+ $this->method_description = '<img width="200" height="52" src="' .
65
+ plugins_url(
66
+ 'images/mplogo.png',
67
+ plugin_dir_path( __FILE__ )
68
+ ) . '"><br><br>' . '<strong>' .
69
+ __( 'This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store.', 'woocommerce-mercadopago-module' ) .
70
+ '</strong>' . '<br><br>' .
71
+ $min_php_message . '<br>' .
72
+ $is_ssl_message . '<br>' .
73
+ $curl_message;
74
+
75
+ // Fields used in Mercado Pago Module configuration page.
76
+ $this->access_token = $this->get_option( 'access_token' );
77
+ $this->title = $this->get_option( 'title' );
78
+ $this->description = $this->get_option( 'description' );
79
+ $this->coupon_mode = $this->get_option( 'coupon_mode' );
80
+ $this->category_id = $this->get_option( 'category_id' );
81
+ $this->invoice_prefix = $this->get_option( 'invoice_prefix', 'WC-' );
82
+ $this->currency_conversion = $this->get_option( 'currency_conversion', false );
83
+ $this->gateway_discount = $this->get_option( 'gateway_discount', 0 );
84
+ $this->reduce_stock_on_order_gen = $this->get_option( 'reduce_stock_on_order_gen', false );
85
+ $this->debug = $this->get_option( 'debug' );
86
+
87
+ // Logging and debug.
88
+ if ( 'yes' == $this->debug ) {
89
+ if ( class_exists( 'WC_Logger' ) ) {
90
+ $this->log = new WC_Logger();
91
+ } else {
92
+ $this->log = WC_MercadoPago_Module::woocommerce_instance()->logger();
93
+ }
94
+ }
95
+
96
+ // Render our configuration page and init/load fields.
97
+ $this->init_form_fields();
98
+ $this->init_settings();
99
+
100
+ // Used by IPN to receive IPN incomings.
101
+ add_action(
102
+ 'woocommerce_api_wc_woomercadopagoticket_gateway',
103
+ array( $this, 'process_http_request' )
104
+ );
105
+ // Used by IPN to process valid incomings.
106
+ add_action(
107
+ 'valid_mercadopagoticket_ipn_request',
108
+ array( $this, 'successful_request' )
109
+ );
110
+ // process the cancel order meta box order action
111
+ add_action(
112
+ 'woocommerce_order_action_cancel_order',
113
+ array( $this, 'process_cancel_order_meta_box_actions' )
114
+ );
115
+ // Used in settings page to hook "save settings" action.
116
+ add_action(
117
+ 'woocommerce_update_options_payment_gateways_' . $this->id,
118
+ array( $this, 'process_admin_options' )
119
+ );
120
+ // Scripts for custom checkout.
121
+ add_action(
122
+ 'wp_enqueue_scripts',
123
+ array( $this, 'ticket_checkout_scripts' )
124
+ );
125
+ // Apply the discounts.
126
+ add_action(
127
+ 'woocommerce_cart_calculate_fees',
128
+ array( $this, 'add_discount_ticket' ), 10
129
+ );
130
+ // Used in settings page to hook "save settings" action.
131
+ add_action(
132
+ 'woocommerce_update_options_payment_gateways_' . $this->id,
133
+ array( $this, 'custom_process_admin_options' )
134
+ );
135
+ // Display discount in payment method title.
136
+ add_filter(
137
+ 'woocommerce_gateway_title',
138
+ array( $this, 'get_payment_method_title_ticket' ), 10, 2
139
+ );
140
+
141
+ if ( ! empty( $this->settings['enabled'] ) && $this->settings['enabled'] == 'yes' ) {
142
+ if ( $is_instance ) {
143
+ if ( empty( $this->access_token ) ) {
144
+ // Verify if access token is empty.
145
+ add_action( 'admin_notices', array( $this, 'credentials_missing_message' ) );
146
+ } else {
147
+ // Verify if SSL is supported.
148
+ add_action( 'admin_notices', array( $this, 'check_ssl_absence' ) );
149
+ }
150
+ } else {
151
+ // Scripts for order configuration.
152
+ add_action(
153
+ 'woocommerce_after_checkout_form',
154
+ array( $this, 'add_checkout_script' )
155
+ );
156
+ // Checkout updates.
157
+ add_action(
158
+ 'woocommerce_thankyou_' . $this->id,
159
+ array( $this, 'update_checkout_status' )
160
+ );
161
+ }
162
+ }
163
+
164
+ }
165
+
166
+ /**
167
+ * Summary: Initialise Gateway Settings Form Fields.
168
+ * Description: Initialise Gateway settings form fields with a customized page.
169
+ */
170
+ public function init_form_fields() {
171
+
172
+ // If module is disabled, we do not need to load and process the settings page.
173
+ if ( empty( $this->settings['enabled'] ) || 'no' == $this->settings['enabled'] ) {
174
+ $this->form_fields = array(
175
+ 'enabled' => array(
176
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
177
+ 'type' => 'checkbox',
178
+ 'label' => __( 'Enable Ticket Payment Method', 'woocommerce-mercadopago-module' ),
179
+ 'default' => 'no'
180
+ )
181
+ );
182
+ return;
183
+ }
184
+
185
+ $api_secret_locale = sprintf(
186
+ '<a href="https://www.mercadopago.com/mla/account/credentials?type=custom" target="_blank">%s</a>, ' .
187
+ '<a href="https://www.mercadopago.com/mlb/account/credentials?type=custom" target="_blank">%s</a>, ' .
188
+ '<a href="https://www.mercadopago.com/mlc/account/credentials?type=custom" target="_blank">%s</a>, ' .
189
+ '<a href="https://www.mercadopago.com/mco/account/credentials?type=custom" target="_blank">%s</a>, ' .
190
+ '<a href="https://www.mercadopago.com/mlm/account/credentials?type=custom" target="_blank">%s</a>, ' .
191
+ '<a href="https://www.mercadopago.com/mpe/account/credentials?type=custom" target="_blank">%s</a> %s ' .
192
+ '<a href="https://www.mercadopago.com/mlv/account/credentials?type=custom" target="_blank">%s</a>',
193
+ __( 'Argentine', 'woocommerce-mercadopago-module' ),
194
+ __( 'Brazil', 'woocommerce-mercadopago-module' ),
195
+ __( 'Chile', 'woocommerce-mercadopago-module' ),
196
+ __( 'Colombia', 'woocommerce-mercadopago-module' ),
197
+ __( 'Mexico', 'woocommerce-mercadopago-module' ),
198
+ __( 'Peru', 'woocommerce-mercadopago-module' ),
199
+ __( 'or', 'woocommerce-mercadopago-module' ),
200
+ __( 'Venezuela', 'woocommerce-mercadopago-module' )
201
+ );
202
+
203
+ // Trigger API to get payment methods and site_id, also validates access_token.
204
+ if ( $this->validate_credentials() ) {
205
+ // checking the currency
206
+ $this->currency_message = '';
207
+ if ( ! $this->is_supported_currency() && 'yes' == $this->settings['enabled'] ) {
208
+ if ( $this->currency_conversion == 'no' ) {
209
+ $this->currency_ratio = -1;
210
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_not_converted_msg(
211
+ $this->country_configs['currency'],
212
+ $this->country_configs['country_name']
213
+ );
214
+ } elseif ( $this->currency_conversion == 'yes' && $this->currency_ratio != -1 ) {
215
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_converted_msg(
216
+ $this->country_configs['currency'],
217
+ $this->currency_ratio
218
+ );
219
+ } else {
220
+ $this->currency_ratio = -1;
221
+ $this->currency_message .=
222
+ WC_WooMercadoPago_Module::build_currency_conversion_err_msg(
223
+ $this->country_configs['currency']
224
+ );
225
+ }
226
+ } else {
227
+ $this->currency_ratio = -1;
228
+ }
229
+ $this->credentials_message = WC_WooMercadoPago_Module::build_valid_credentials_msg(
230
+ $this->country_configs['country_name'],
231
+ $this->site_id
232
+ );
233
+ } else {
234
+ $this->credentials_message = WC_WooMercadoPago_Module::build_invalid_credentials_msg();
235
+ }
236
+
237
+ // fill categories (can be handled without credentials).
238
+ $categories = WC_WooMercadoPago_Module::get_categories();
239
+ $this->store_categories_id = $categories['store_categories_id'];
240
+ $this->store_categories_description = $categories['store_categories_description'];
241
+
242
+ // Validate discount field.
243
+ if ( ! is_numeric( $this->gateway_discount ) ) {
244
+ $this->gateway_discount_desc = '<img width="12" height="12" src="' .
245
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
246
+ __( 'This field should be an integer greater or equal 0 and smaller than 100.', 'woocommerce-mercadopago-module' );
247
+ } elseif ( $this->gateway_discount < 0 || $this->gateway_discount >= 100 ) {
248
+ $this->gateway_discount_desc = '<img width="12" height="12" src="' .
249
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
250
+ __( 'This field should be an integer greater or equal 0 and smaller than 100.', 'woocommerce-mercadopago-module' );
251
+ } else {
252
+ $this->gateway_discount_desc =
253
+ __( 'Give a percentual discount for your customers if they use this payment gateway.', 'woocommerce-mercadopago-module' );
254
+ }
255
+
256
+ // This array draws each UI (text, selector, checkbox, label, etc).
257
+ $this->form_fields = array(
258
+ 'enabled' => array(
259
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
260
+ 'type' => 'checkbox',
261
+ 'label' => __( 'Enable Ticket Payment Method', 'woocommerce-mercadopago-module' ),
262
+ 'default' => 'no'
263
+ ),
264
+ 'credentials_title' => array(
265
+ 'title' => __( 'Mercado Pago Credentials', 'woocommerce-mercadopago-module' ),
266
+ 'type' => 'title',
267
+ 'description' => sprintf( '%s', $this->credentials_message ) . '<br>' . sprintf(
268
+ __( 'You can obtain your credentials for', 'woocommerce-mercadopago-module' ) .
269
+ ' %s.', $api_secret_locale
270
+ )
271
+ ),
272
+ 'access_token' => array(
273
+ 'title' => 'Access token',
274
+ 'type' => 'text',
275
+ 'description' =>
276
+ __( 'Insert your Mercado Pago Access token.', 'woocommerce-mercadopago-module' ),
277
+ 'default' => '',
278
+ 'required' => true
279
+ ),
280
+ 'ipn_url' => array(
281
+ 'title' =>
282
+ __( 'Instant Payment Notification (IPN) URL', 'woocommerce-mercadopago-module' ),
283
+ 'type' => 'title',
284
+ 'description' => sprintf(
285
+ __( 'Your IPN URL to receive instant payment notifications is', 'woocommerce-mercadopago-module' ) .
286
+ '<br>%s', '<code>' . WC()->api_request_url( 'WC_WooMercadoPagoTicket_Gateway' ) . '</code>.'
287
+ )
288
+ ),
289
+ 'checkout_options_title' => array(
290
+ 'title' => __( 'Ticket Options', 'woocommerce-mercadopago-module' ),
291
+ 'type' => 'title',
292
+ 'description' => ''
293
+ ),
294
+ 'title' => array(
295
+ 'title' => __( 'Title', 'woocommerce-mercadopago-module' ),
296
+ 'type' => 'text',
297
+ 'description' =>
298
+ __( 'Title shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
299
+ 'default' => __( 'Mercado Pago - Ticket', 'woocommerce-mercadopago-module' )
300
+ ),
301
+ 'description' => array(
302
+ 'title' => __( 'Description', 'woocommerce-mercadopago-module' ),
303
+ 'type' => 'textarea',
304
+ 'description' =>
305
+ __( 'Description shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
306
+ 'default' => __( 'Pay with Mercado Pago', 'woocommerce-mercadopago-module' )
307
+ ),
308
+ 'coupon_mode' => array(
309
+ 'title' => __( 'Coupons', 'woocommerce-mercadopago-module' ),
310
+ 'type' => 'checkbox',
311
+ 'label' => __( 'Enable coupons of discounts', 'woocommerce-mercadopago-module' ),
312
+ 'default' => 'no',
313
+ 'description' =>
314
+ __( 'If there is a Mercado Pago campaign, allow your store to give discounts to customers.', 'woocommerce-mercadopago-module' )
315
+ ),
316
+ 'category_id' => array(
317
+ 'title' => __( 'Store Category', 'woocommerce-mercadopago-module' ),
318
+ 'type' => 'select',
319
+ 'description' =>
320
+ __( 'Define which type of products your store sells.', 'woocommerce-mercadopago-module' ),
321
+ 'options' => $this->store_categories_id
322
+ ),
323
+ 'invoice_prefix' => array(
324
+ 'title' => __( 'Store Identificator', 'woocommerce-mercadopago-module' ),
325
+ 'type' => 'text',
326
+ 'description' =>
327
+ __( 'Please, inform a prefix to your store.', 'woocommerce-mercadopago-module' )
328
+ . ' ' .
329
+ __( 'If you use your Mercado Pago account on multiple stores you should make sure that this prefix is unique as Mercado Pago will not allow orders with same identificators.', 'woocommerce-mercadopago-module' ),
330
+ 'default' => 'WC-'
331
+ ),
332
+ 'currency_conversion' => array(
333
+ 'title' => __( 'Currency Conversion', 'woocommerce-mercadopago-module' ),
334
+ 'type' => 'checkbox',
335
+ 'label' =>
336
+ __( 'If the used currency in WooCommerce is different or not supported by Mercado Pago, convert values of your transactions using Mercado Pago currency ratio.', 'woocommerce-mercadopago-module' ),
337
+ 'default' => 'no',
338
+ 'description' => sprintf( '%s', $this->currency_message )
339
+ ),
340
+ 'reduce_stock_on_order_gen' => array(
341
+ 'title' => __( 'Stock Reduce', 'woocommerce-mercadopago-module' ),
342
+ 'type' => 'checkbox',
343
+ 'label' =>
344
+ __( 'Reduce Stock in Order Generation', 'woocommerce-mercadopago-module' ),
345
+ 'default' => 'no',
346
+ 'description' => __( 'Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval.', 'woocommerce-mercadopago-module' )
347
+ ),
348
+ 'gateway_discount' => array(
349
+ 'title' => __( 'Discount by Gateway', 'woocommerce-mercadopago-module' ),
350
+ 'type' => 'number',
351
+ 'description' => $this->gateway_discount_desc,
352
+ 'default' => '0'
353
+ ),
354
+ 'testing' => array(
355
+ 'title' => __( 'Test and Debug Options', 'woocommerce-mercadopago-module' ),
356
+ 'type' => 'title',
357
+ 'description' => ''
358
+ ),
359
+ 'debug' => array(
360
+ 'title' => __( 'Debug and Log', 'woocommerce-mercadopago-module' ),
361
+ 'type' => 'checkbox',
362
+ 'label' => __( 'Enable log', 'woocommerce-mercadopago-module' ),
363
+ 'default' => 'no',
364
+ 'description' => sprintf(
365
+ __( 'Register event logs of Mercado Pago, such as API requests, in the file', 'woocommerce-mercadopago-module' ) .
366
+ ' %s.', $this->build_log_path_string() . '.<br>' .
367
+ __( 'File location: ', 'woocommerce-mercadopago-module' ) .
368
+ '<code>wordpress/wp-content/uploads/wc-logs/' . $this->id . '-' .
369
+ sanitize_file_name( wp_hash( $this->id ) ) . '.log</code>' )
370
+ )
371
+ );
372
+
373
+ }
374
+
375
+ /**
376
+ * Processes and saves options.
377
+ * If there is an error thrown, will continue to save and validate fields, but will leave the
378
+ * erroring field out.
379
+ * @return bool was anything saved?
380
+ */
381
+ public function custom_process_admin_options() {
382
+ $this->init_settings();
383
+
384
+ $post_data = $this->get_post_data();
385
+
386
+ foreach ( $this->get_form_fields() as $key => $field ) {
387
+ if ( 'title' !== $this->get_field_type( $field ) ) {
388
+ try {
389
+ $this->settings[$key] = $this->get_field_value( $key, $field, $post_data );
390
+ } catch ( Exception $e ) {
391
+ $this->add_error( $e->getMessage() );
392
+ }
393
+ }
394
+ }
395
+
396
+ if ( ! empty( $this->settings['access_token'] ) ) {
397
+ $this->mp = new MP(
398
+ WC_WooMercadoPago_Module::get_module_version(),
399
+ $this->settings['access_token']
400
+ );
401
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
402
+ $this->mp->set_email( $email );
403
+ } else {
404
+ $this->mp = null;
405
+ }
406
+
407
+ // analytics
408
+ if ( $this->mp != null && ! $this->is_test_user ) {
409
+ $infra_data = WC_WooMercadoPago_Module::get_common_settings();
410
+ $infra_data['checkout_custom_ticket'] = ( $this->settings['enabled'] == 'yes' ? 'true' : 'false' );
411
+ $infra_data['checkout_custom_ticket_coupon'] = ( $this->settings['coupon_mode'] == 'yes' ? 'true' : 'false' );
412
+ $response = $this->mp->analytics_save_settings( $infra_data );
413
+ if ( 'yes' == $this->debug) {
414
+ $this->log->add(
415
+ $this->id,
416
+ '[custom_process_admin_options] - analytics info response: ' .
417
+ json_encode( $response, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
418
+ );
419
+ }
420
+ }
421
+
422
+ return update_option(
423
+ $this->get_option_key(),
424
+ apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->settings )
425
+ );
426
+ }
427
+
428
+ /**
429
+ * Handles the manual order refunding in server-side.
430
+ */
431
+ public function process_refund( $order_id, $amount = null, $reason = '' ) {
432
+
433
+ $payments = get_post_meta(
434
+ $order_id,
435
+ '_Mercado_Pago_Payment_IDs',
436
+ true
437
+ );
438
+
439
+ // Validate.
440
+ if ( $this->mp == null || empty( $payments ) ) {
441
+ if ( 'yes' == $this->debug ) {
442
+ $this->log->add(
443
+ $this->id,
444
+ '[process_refund] - no payments or credentials invalid'
445
+ );
446
+ }
447
+ return false;
448
+ }
449
+
450
+ $total_available = 0;
451
+ $payment_structs = array();
452
+ $payment_ids = explode( ', ', $payments );
453
+ foreach ( $payment_ids as $p_id ) {
454
+ $p = get_post_meta(
455
+ $order_id,
456
+ 'Mercado Pago - Payment ' . $p_id,
457
+ true
458
+ );
459
+ $p = explode( '/', $p );
460
+ $paid_arr = explode( ' ', substr( $p[2], 1, -1 ) );
461
+ $paid = ( (float) $paid_arr[1] );
462
+ $refund_arr = explode( ' ', substr( $p[3], 1, -1 ) );
463
+ $refund = ( (float) $refund_arr[1] );
464
+ $p_struct = array(
465
+ 'id' => $p_id,
466
+ 'available_to_refund' => $paid - $refund
467
+ );
468
+ $total_available += $paid - $refund;
469
+ $payment_structs[] = $p_struct;
470
+ }
471
+
472
+ if ( 'yes' == $this->debug ) {
473
+ $this->log->add(
474
+ $this->id,
475
+ '[process_refund] - refunding ' . $amount . ' because of ' . $reason . ' and payments ' .
476
+ json_encode( $payment_structs, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
477
+ );
478
+ }
479
+
480
+ // Do not allow refund more than available or invalid amounts.
481
+ if ( $amount > $total_available || $amount <= 0 ) {
482
+ return false;
483
+ }
484
+
485
+ $remaining_to_refund = $amount;
486
+ foreach ( $payment_structs as $to_refund ) {
487
+ if ( $remaining_to_refund <= $to_refund['available_to_refund'] ) {
488
+ // We want to refund an amount that is less than the available for this payment, so we
489
+ // can just refund and return.
490
+ $response = $this->mp->partial_refund_payment(
491
+ $to_refund['id'],
492
+ $remaining_to_refund,
493
+ $reason,
494
+ $this->invoice_prefix . $order_id
495
+ );
496
+ $message = $response['response']['message'];
497
+ $status = $response['status'];
498
+ if ( 'yes' == $this->debug ) {
499
+ $this->log->add(
500
+ $this->id,
501
+ '[process_refund] - refund payment of id ' . $p_id .
502
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
503
+ );
504
+ }
505
+ if ( $status >= 200 && $status < 300 ) {
506
+ return true;
507
+ } else {
508
+ return false;
509
+ }
510
+ } elseif ( $to_refund['available_to_refund'] > 0 ) {
511
+ // We want to refund an amount that exceeds the available for this payment, so we
512
+ // totally refund this payment, and try to complete refund in other/next payments.
513
+ $response = $this->mp->partial_refund_payment(
514
+ $to_refund['id'],
515
+ $to_refund['available_to_refund'],
516
+ $reason,
517
+ $this->invoice_prefix . $order_id
518
+ );
519
+ $message = $response['response']['message'];
520
+ $status = $response['status'];
521
+ if ( 'yes' == $this->debug ) {
522
+ $this->log->add(
523
+ $this->id,
524
+ '[process_refund] - refund payment of id ' . $p_id .
525
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
526
+ );
527
+ }
528
+ if ( $status < 200 || $status >= 300 ) {
529
+ return false;
530
+ }
531
+ $remaining_to_refund -= $to_refund['available_to_refund'];
532
+ }
533
+ if ( $remaining_to_refund == 0 )
534
+ return true;
535
+ }
536
+
537
+ // Reaching here means that there we run out of payments, and there is an amount
538
+ // remaining to be refund, which is impossible as it implies refunding more than
539
+ // available on paid amounts.
540
+ return false;
541
+
542
+ }
543
+
544
+ /**
545
+ * Handles the manual order cancellation in server-side.
546
+ */
547
+ public function process_cancel_order_meta_box_actions( $order ) {
548
+
549
+ // WooCommerce 3.0 or later.
550
+ if ( method_exists( $order, 'get_meta' ) ) {
551
+ $used_gateway = $order->get_meta( '_used_gateway' );
552
+ $payments = $order->get_meta( '_Mercado_Pago_Payment_IDs' );
553
+ } else {
554
+ $used_gateway = get_post_meta( $order->id, '_used_gateway', true );
555
+ $payments = get_post_meta( $order->id, '_Mercado_Pago_Payment_IDs', true );
556
+ }
557
+
558
+ if ( $used_gateway != 'WC_WooMercadoPago_Gateway' ) {
559
+ return;
560
+ }
561
+
562
+ if ( 'yes' == $this->debug ) {
563
+ $this->log->add(
564
+ $this->id,
565
+ '[process_cancel_order_meta_box_actions] - cancelling payments for ' . $payments
566
+ );
567
+ }
568
+
569
+ if ( $this->mp != null && ! empty( $payments ) ) {
570
+ $payment_ids = explode( ', ', $payments );
571
+ foreach ( $payment_ids as $p_id ) {
572
+ $response = $this->mp->cancel_payment( $p_id );
573
+ $message = $response['response']['message'];
574
+ $status = $response['status'];
575
+ if ( 'yes' == $this->debug ) {
576
+ $this->log->add(
577
+ $this->id,
578
+ '[process_cancel_order_meta_box_actions] - cancel payment of id ' . $p_id .
579
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
580
+ );
581
+ }
582
+ }
583
+ } else {
584
+ if ( 'yes' == $this->debug ) {
585
+ $this->log->add(
586
+ $this->id,
587
+ '[process_cancel_order_meta_box_actions] - no payments or credentials invalid'
588
+ );
589
+ }
590
+ }
591
+
592
+ }
593
+
594
+ /*
595
+ * ========================================================================
596
+ * CHECKOUT BUSINESS RULES (CLIENT SIDE)
597
+ * ========================================================================
598
+ */
599
+
600
+ public function add_checkout_script() {
601
+
602
+ $client_id = WC_WooMercadoPago_Module::get_client_id( $this->get_option( 'access_token' ) );
603
+
604
+ if ( ! empty( $client_id ) && ! $this->is_test_user ) {
605
+
606
+ $w = WC_WooMercadoPago_Module::woocommerce_instance();
607
+ $logged_user_email = null;
608
+ $payments = array();
609
+ $gateways = WC()->payment_gateways->get_available_payment_gateways();
610
+ foreach ( $gateways as $g ) {
611
+ $payments[] = $g->id;
612
+ }
613
+ $payments = str_replace( '-', '_', implode( ', ', $payments ) );
614
+
615
+ if ( wp_get_current_user()->ID != 0 ) {
616
+ $logged_user_email = wp_get_current_user()->user_email;
617
+ }
618
+
619
+ ?>
620
+ <script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
621
+ <script type="text/javascript">
622
+ var MA = ModuleAnalytics;
623
+ MA.setToken( '<?php echo $client_id; ?>' );
624
+ MA.setPlatform( 'WooCommerce' );
625
+ MA.setPlatformVersion( '<?php echo $w->version; ?>' );
626
+ MA.setModuleVersion( '<?php echo WC_WooMercadoPago_Module::VERSION; ?>' );
627
+ MA.setPayerEmail( '<?php echo ( $logged_user_email != null ? $logged_user_email : "" ); ?>' );
628
+ MA.setUserLogged( <?php echo ( empty( $logged_user_email ) ? 0 : 1 ); ?> );
629
+ MA.setInstalledModules( '<?php echo $payments; ?>' );
630
+ MA.post();
631
+ </script>
632
+ <?php
633
+
634
+ }
635
+
636
+ }
637
+
638
+ public function update_checkout_status( $order_id ) {
639
+
640
+ $access_token = WC_WooMercadoPago_Module::get_client_id( $this->get_option( 'access_token' ) );
641
+
642
+ if ( ! empty( $access_token ) && ! $this->is_test_user ) {
643
+
644
+ if ( get_post_meta( $order_id, '_used_gateway', true ) != 'WC_WooMercadoPagoTicket_Gateway' ) {
645
+ return;
646
+ }
647
+
648
+ if ( 'yes' == $this->debug ) {
649
+ $this->log->add(
650
+ $this->id,
651
+ '[update_checkout_status] - updating order of ID ' . $order_id
652
+ );
653
+ }
654
+
655
+ echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
656
+ <script type="text/javascript">
657
+ var MA = ModuleAnalytics;
658
+ MA.setToken( ' . $access_token . ' );
659
+ MA.setPaymentType("ticket");
660
+ MA.setCheckoutType("custom");
661
+ MA.put();
662
+ </script>';
663
+
664
+ }
665
+
666
+ // WooCommerce 3.0 or later.
667
+ $order = wc_get_order( $order_id );
668
+ if ( method_exists( $order, 'get_meta' ) ) {
669
+ $used_gateway = $order->get_meta( '_used_gateway' );
670
+ $transaction_details = $order->get_meta( '_transaction_details_ticket' );
671
+ } else {
672
+ $used_gateway = get_post_meta( $order->id, '_used_gateway', true );
673
+ $transaction_details = get_post_meta( $order->id, '_transaction_details_ticket', true );
674
+ }
675
+
676
+ // Prevent showing ticket button for other payment methods.
677
+ if ( empty( $transaction_details ) || $used_gateway != 'WC_WooMercadoPagoTicket_Gateway' ) {
678
+ return;
679
+ }
680
+
681
+ $html = '<p>' .
682
+ __( 'Thank you for your order. Please, pay the ticket to get your order approved.', 'woocommerce-mercadopago-module' ) .
683
+ '</p>';
684
+ $html .= '<p><iframe src="' . $transaction_details . '" style="width:100%; height:1000px;"></iframe></p>';
685
+ $html .= '<a id="submit-payment" target="_blank" href="' .
686
+ $transaction_details . '" class="button alt"' .
687
+ ' style="font-size:1.25rem; width:75%; height:48px; line-height:24px; text-align:center;">' .
688
+ __( 'Print the Ticket', 'woocommerce-mercadopago-module' ) .
689
+ '</a> ';
690
+ $added_text = '<p>' . $html . '</p>';
691
+ echo $added_text;
692
+
693
+ }
694
+
695
+ public function ticket_checkout_scripts() {
696
+ if ( is_checkout() && $this->is_available() ) {
697
+ if ( ! get_query_var( 'order-received' ) ) {
698
+ wp_enqueue_style(
699
+ 'woocommerce-mercadopago-style', plugins_url(
700
+ 'assets/css/custom_checkout_mercadopago.css',
701
+ plugin_dir_path( __FILE__ ) ) );
702
+ wp_enqueue_script(
703
+ 'woocommerce-mercadopago-v1',
704
+ 'https://secure.mlstatic.com/sdk/javascript/v1/mercadopago.js' );
705
+ }
706
+ }
707
+ }
708
+
709
+ public function payment_fields() {
710
+ $amount = $this->get_order_total();
711
+
712
+ $parameters = array(
713
+ 'payment_methods' => $this->payment_methods,
714
+ 'site_id' => $this->site_id,
715
+ 'images_path' => plugins_url( 'images/', plugin_dir_path( __FILE__ ) ),
716
+ 'amount' => $amount * ( ( float ) $this->currency_ratio > 0 ? ( float ) $this->currency_ratio : 1 ),
717
+ 'coupon_mode' => $this->coupon_mode,
718
+ 'is_currency_conversion' => $this->currency_ratio,
719
+ 'woocommerce_currency' => get_woocommerce_currency(),
720
+ 'account_currency' => $this->country_configs['currency'],
721
+ 'discount_action_url' => $this->domain .
722
+ '/woocommerce-mercadopago-module/?wc-api=WC_WooMercadoPagoTicket_Gateway',
723
+ 'form_labels' => array(
724
+ 'febraban' => array(
725
+ 'firstname' => '',
726
+ 'lastname' => '',
727
+ 'docNumber' => '',
728
+ 'address' => '',
729
+ 'number' => '',
730
+ 'city' => '',
731
+ 'state' => '',
732
+ 'zipcode' => ''
733
+ ),
734
+ 'form' => array(
735
+ 'payment_converted' =>
736
+ __( 'Payment converted from', 'woocommerce-mercadopago-module' ),
737
+ 'to' => __( 'to', 'woocommerce-mercadopago-module' ),
738
+ 'coupon_empty' =>
739
+ __( 'Please, inform your coupon code', 'woocommerce-mercadopago-module' ),
740
+ 'apply' => __( 'Apply', 'woocommerce-mercadopago-module' ),
741
+ 'remove' => __( 'Remove', 'woocommerce-mercadopago-module' ),
742
+ 'discount_info1' => __( 'You will save', 'woocommerce-mercadopago-module' ),
743
+ 'discount_info2' => __( 'with discount from', 'woocommerce-mercadopago-module' ),
744
+ 'discount_info3' => __( 'Total of your purchase:', 'woocommerce-mercadopago-module' ),
745
+ 'discount_info4' =>
746
+ __( 'Total of your purchase with discount:', 'woocommerce-mercadopago-module' ),
747
+ 'discount_info5' => __( '*Uppon payment approval', 'woocommerce-mercadopago-module' ),
748
+ 'discount_info6' =>
749
+ __( 'Terms and Conditions of Use', 'woocommerce-mercadopago-module' ),
750
+ 'coupon_of_discounts' => __( 'Discount Coupon', 'woocommerce-mercadopago-module' ),
751
+ 'label_choose' => __( 'Choose', 'woocommerce-mercadopago-module' ),
752
+ 'issuer_selection' =>
753
+ __( 'Please, select the ticket issuer of your preference.', 'woocommerce-mercadopago-module' ),
754
+ 'payment_instructions' =>
755
+ __( 'Click "Place order" button. The ticket will be generated and you will be redirected to print it.', 'woocommerce-mercadopago-module' ),
756
+ 'ticket_note' =>
757
+ __( 'Important: The order will be confirmed only after the payment approval.', 'woocommerce-mercadopago-module' ),
758
+ 'febraban_rules' => __( 'Informações solicitadas em conformidade com as normas das circulares Nro. 3.461/09, 3.598/12 e 3.656/13 do Banco Central do Brasil.', 'woocommerce-mercadopago-module' ),
759
+ 'select' => __( 'SELECT...', 'woocommerce-mercadopago-module' ),
760
+ 'fisicalPerson' => __( 'Fisical Person', 'woocommerce-mercadopago-module' ),
761
+ 'legalPerson' => __( 'Legal Person', 'woocommerce-mercadopago-module' ),
762
+ 'name' => __( 'NAME', 'woocommerce-mercadopago-module' ),
763
+ 'socialName' => __( 'SOCIAL NAME', 'woocommerce-mercadopago-module' ),
764
+ 'surname' => __( 'SURNAME', 'woocommerce-mercadopago-module' ),
765
+ 'docNumber' => __( 'DOCUMENT', 'woocommerce-mercadopago-module' ),
766
+ 'docNumberLegal' => __( 'CNPJ', 'woocommerce-mercadopago-module' ),
767
+ 'address' => __( 'ADDRESS', 'woocommerce-mercadopago-module' ),
768
+ 'number' => __( 'NUMBER', 'woocommerce-mercadopago-module' ),
769
+ 'city' => __( 'CITY', 'woocommerce-mercadopago-module' ),
770
+ 'state' => __( 'STATE', 'woocommerce-mercadopago-module' ),
771
+ 'zipcode' => __( 'ZIP', 'woocommerce-mercadopago-module' ),
772
+ 'FEB001' => __( 'You must inform you NAME', 'woocommerce-mercadopago-module' ),
773
+ 'FEB002' => __( 'You must inform your SURNAME', 'woocommerce-mercadopago-module' ),
774
+ 'FEB003' => __( 'You must inform your DOCUMENT', 'woocommerce-mercadopago-module' ),
775
+ 'FEB004' => __( 'You must inform your ADDRESS', 'woocommerce-mercadopago-module' ),
776
+ 'FEB005' => __( 'You must inform your ADDRESS NUMBER', 'woocommerce-mercadopago-module' ),
777
+ 'FEB006' => __( 'You must inform your CITY', 'woocommerce-mercadopago-module' ),
778
+ 'FEB007' => __( 'You must inform your STATE', 'woocommerce-mercadopago-module' ),
779
+ 'FEB008' => __( 'You must inform your ZIP', 'woocommerce-mercadopago-module' )
780
+ )
781
+ )
782
+ );
783
+
784
+ // Find logged user.
785
+ try {
786
+ $logged_user_email = null;
787
+ $parameters['payer_email'] = null;
788
+ if ( wp_get_current_user()->ID != 0 ) {
789
+ $logged_user_email = wp_get_current_user()->user_email;
790
+ $address = get_user_meta( wp_get_current_user()->ID, 'shipping_address_1', true );
791
+ $address_2 = get_user_meta( wp_get_current_user()->ID, 'shipping_address_2', true );
792
+ $address .= ( ! empty( $address_2 ) ? ' - ' . $address_2 : '' );
793
+ $country = get_user_meta( wp_get_current_user()->ID, 'shipping_country', true );
794
+ $address .= ( ! empty( $country ) ? ' - ' . $country : '' );
795
+ $parameters['form_labels']['febraban'] = array(
796
+ 'firstname' => wp_get_current_user()->user_firstname,
797
+ 'lastname' => wp_get_current_user()->user_lastname,
798
+ 'docNumber' => '',
799
+ 'address' => $address,
800
+ 'number' => '',
801
+ 'city' => get_user_meta( wp_get_current_user()->ID, 'shipping_city', true ),
802
+ 'state' => get_user_meta( wp_get_current_user()->ID, 'shipping_state', true ),
803
+ 'zipcode' => get_user_meta( wp_get_current_user()->ID, 'shipping_postcode', true )
804
+ );
805
+ }
806
+ if ( isset( $logged_user_email ) ) {
807
+ if ( isset( $logged_user_email ) ) {
808
+ $parameters['payer_email'] = $logged_user_email;
809
+ }
810
+ } else {
811
+ $parameters['coupon_mode'] = 'no';
812
+ }
813
+ } catch ( Exception $e ) {
814
+ $parameters['coupon_mode'] = 'no';
815
+ if ( 'yes' == $this->debug ) {
816
+ $this->log->add(
817
+ $this->id,
818
+ '[process_fields] - there is a problem when retrieving information for cards: ' .
819
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
820
+ );
821
+ }
822
+ }
823
+
824
+ wc_get_template(
825
+ 'ticket/ticket-form.php',
826
+ $parameters,
827
+ 'woocommerce/mercadopago/',
828
+ WC_WooMercadoPago_Module::get_templates_path()
829
+ );
830
+ }
831
+
832
+ /**
833
+ * Summary: Handle the payment and processing the order.
834
+ * Description: This function is called after we click on [place_order] button, and each field is
835
+ * passed to this function through $_POST variable.
836
+ * @return an array containing the result of the processment and the URL to redirect.
837
+ */
838
+ public function process_payment( $order_id ) {
839
+
840
+ if ( ! isset( $_POST['mercadopago_ticket'] ) ) {
841
+ return;
842
+ }
843
+
844
+ $order = wc_get_order( $order_id );
845
+ $mercadopago_ticket = $_POST['mercadopago_ticket'];
846
+
847
+ // WooCommerce 3.0 or later.
848
+ if ( method_exists( $order, 'update_meta_data' ) ) {
849
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPagoTicket_Gateway' );
850
+ $order->save();
851
+ } else {
852
+ update_post_meta( $order_id, '_used_gateway', 'WC_WooMercadoPagoTicket_Gateway' );
853
+ }
854
+
855
+ // We have got parameters from checkout page, now its time to charge the card.
856
+ if ( 'yes' == $this->debug ) {
857
+ $this->log->add(
858
+ $this->id,
859
+ '[process_payment] - Received [$_POST] from customer front-end page: ' .
860
+ json_encode( $_POST, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
861
+ );
862
+ }
863
+
864
+ if ( isset( $mercadopago_ticket['amount'] ) && ! empty( $mercadopago_ticket['amount'] ) &&
865
+ isset( $mercadopago_ticket['paymentMethodId'] ) && ! empty( $mercadopago_ticket['paymentMethodId'] ) ) {
866
+ if ( $this->site_id == 'MLB' ) {
867
+ if ( isset( $mercadopago_ticket['firstname'] ) && ! empty( $mercadopago_ticket['firstname'] ) &&
868
+ isset( $mercadopago_ticket['lastname'] ) && ! empty( $mercadopago_ticket['lastname'] ) &&
869
+ isset( $mercadopago_ticket['docNumber'] ) && ! empty( $mercadopago_ticket['docNumber'] ) &&
870
+ (strlen( $mercadopago_ticket['docNumber'] ) == 14 || strlen( $mercadopago_ticket['docNumber'] ) == 18) &&
871
+ isset( $mercadopago_ticket['address'] ) && ! empty( $mercadopago_ticket['address'] ) &&
872
+ isset( $mercadopago_ticket['number'] ) && ! empty( $mercadopago_ticket['number'] ) &&
873
+ isset( $mercadopago_ticket['city'] ) && ! empty( $mercadopago_ticket['city'] ) &&
874
+ isset( $mercadopago_ticket['state'] ) && ! empty( $mercadopago_ticket['state'] ) &&
875
+ isset( $mercadopago_ticket['zipcode'] ) && ! empty( $mercadopago_ticket['zipcode'] ) ) {
876
+
877
+ return self::create_url( $order, $mercadopago_ticket );
878
+
879
+ } else {
880
+ wc_add_notice(
881
+ '<p>' .
882
+ __( 'A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?', 'woocommerce-mercadopago-module' ) .
883
+ '</p>',
884
+ 'error'
885
+ );
886
+ return array(
887
+ 'result' => 'fail',
888
+ 'redirect' => '',
889
+ );
890
+ }
891
+ }
892
+ return self::create_url( $order, $mercadopago_ticket );
893
+ } else {
894
+ // process when fields are imcomplete.
895
+ wc_add_notice(
896
+ '<p>' .
897
+ __( 'A problem was occurred when processing your payment. Please, try again.', 'woocommerce-mercadopago-module' ) .
898
+ '</p>',
899
+ 'error'
900
+ );
901
+ return array(
902
+ 'result' => 'fail',
903
+ 'redirect' => '',
904
+ );
905
+ }
906
+
907
+ }
908
+
909
+ /**
910
+ * Summary: Build Mercado Pago preference.
911
+ * Description: Create Mercado Pago preference and get init_point URL based in the order options
912
+ * from the cart.
913
+ * @return the preference object.
914
+ */
915
+ private function build_payment_preference( $order, $ticket_checkout ) {
916
+
917
+ // A string to register items (workaround to deal with API problem that shows only first item).
918
+ $list_of_items = array();
919
+ $order_total = 0;
920
+ $discount_amount_of_items = 0;
921
+
922
+ // Here we build the array that contains ordered items, from customer cart.
923
+ $items = array();
924
+ if ( sizeof( $order->get_items() ) > 0 ) {
925
+ foreach ( $order->get_items() as $item ) {
926
+ if ( $item['qty'] ) {
927
+ $product = new WC_product( $item['product_id'] );
928
+
929
+ // WooCommerce 3.0 or later.
930
+ if ( method_exists( $product, 'get_description' ) ) {
931
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
932
+ $product->get_name()
933
+ );
934
+ $product_content = WC_WooMercadoPago_Module::utf8_ansi(
935
+ $product->get_description()
936
+ );
937
+ } else {
938
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
939
+ $product->post->post_title
940
+ );
941
+ $product_content = WC_WooMercadoPago_Module::utf8_ansi(
942
+ $product->post->post_content
943
+ );
944
+ }
945
+
946
+ // Calculate discount for payment method.
947
+ $unit_price = floor( ( (float) $item['line_total'] + (float) $item['line_tax'] ) *
948
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 ) * 100 ) / 100;
949
+ if ( is_numeric( $this->gateway_discount ) ) {
950
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
951
+ $price_percent = $this->gateway_discount / 100;
952
+ $discount = $unit_price * $price_percent;
953
+ if ( $discount > 0 ) {
954
+ $discount_amount_of_items += $discount;
955
+ }
956
+ }
957
+ }
958
+
959
+ // Remove decimals if MCO/MLC
960
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
961
+ $unit_price = floor( $unit_price );
962
+ $discount_amount_of_items = floor( $discount_amount_of_items );
963
+ }
964
+
965
+ $order_total += $unit_price;
966
+
967
+ array_push( $list_of_items, $product_title . ' x ' . $item['qty'] );
968
+ array_push( $items, array(
969
+ 'id' => $item['product_id'],
970
+ 'title' => ( html_entity_decode( $product_title ) . ' x ' . $item['qty'] ),
971
+ 'description' => sanitize_file_name( html_entity_decode(
972
+ // This handles description width limit of Mercado Pago.
973
+ ( strlen( $product_content ) > 230 ?
974
+ substr( $product_content, 0, 230 ) . '...' :
975
+ $product_content )
976
+ ) ),
977
+ 'picture_url' => wp_get_attachment_url( $product->get_image_id() ),
978
+ 'category_id' => $this->store_categories_id[$this->category_id],
979
+ 'quantity' => 1,
980
+ 'unit_price' => $unit_price
981
+ ) );
982
+ }
983
+ }
984
+ }
985
+
986
+ // Creates the shipment cost structure.
987
+ $ship_cost = ( (float) $order->get_total_shipping() + (float) $order->get_shipping_tax() ) *
988
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 );
989
+
990
+ // Remove decimals if MCO/MLC
991
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
992
+ $ship_cost = floor( $ship_cost );
993
+ }
994
+
995
+ if ( $ship_cost > 0 ) {
996
+ $order_total += $ship_cost;
997
+ $item = array(
998
+ 'id' => 2147483647,
999
+ 'title' => sanitize_file_name( $order->get_shipping_to_display() ),
1000
+ 'description' => __( 'Shipping service used by store', 'woocommerce-mercadopago-module' ),
1001
+ 'category_id' => $this->store_categories_id[$this->category_id],
1002
+ 'quantity' => 1,
1003
+ 'unit_price' => floor( $ship_cost * 100 ) / 100
1004
+ );
1005
+ $items[] = $item;
1006
+ }
1007
+
1008
+ // Discounts features.
1009
+ if ( isset( $ticket_checkout['discount'] ) && $ticket_checkout['discount'] != '' &&
1010
+ $ticket_checkout['discount'] > 0 && isset( $ticket_checkout['coupon_code'] ) &&
1011
+ $ticket_checkout['coupon_code'] != '' &&
1012
+ WC()->session->chosen_payment_method == 'woocommerce-mercadopago-ticket-module' ) {
1013
+
1014
+ // Remove decimals if MCO/MLC
1015
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
1016
+ $ticket_checkout['discount'] = floor( $ticket_checkout['discount'] );
1017
+ }
1018
+
1019
+ $item = array(
1020
+ 'id' => 2147483646,
1021
+ 'title' => __( 'Discount', 'woocommerce-mercadopago-module' ),
1022
+ 'description' => __( 'Discount provided by store', 'woocommerce-mercadopago-module' ),
1023
+ 'category_id' => $this->store_categories_id[$this->category_id],
1024
+ 'quantity' => 1,
1025
+ 'unit_price' => -( ( float ) $ticket_checkout['discount'] )
1026
+ );
1027
+ $items[] = $item;
1028
+ }
1029
+
1030
+ if ( method_exists( $order, 'get_id' ) ) {
1031
+ // Build additional information from the customer data.
1032
+ $payer_additional_info = array(
1033
+ 'first_name' => html_entity_decode( $order->get_billing_first_name() ),
1034
+ 'last_name' => html_entity_decode( $order->get_billing_last_name() ),
1035
+ //'registration_date' =>
1036
+ 'phone' => array(
1037
+ //'area_code' =>
1038
+ 'number' => $order->get_billing_phone()
1039
+ ),
1040
+ 'address' => array(
1041
+ 'zip_code' => $order->get_billing_postcode(),
1042
+ 'street_name' => html_entity_decode(
1043
+ $order->get_billing_address_1() . ' ' .
1044
+ $order->get_billing_address_2() . ' ' .
1045
+ $order->get_billing_city() . ' ' .
1046
+ $order->get_billing_state() . ' ' .
1047
+ $order->get_billing_country()
1048
+ )
1049
+ //'street_number' =>
1050
+ )
1051
+ );
1052
+ // Create the shipment address information set.
1053
+ $shipments = array(
1054
+ 'receiver_address' => array(
1055
+ 'zip_code' => $order->get_shipping_postcode(),
1056
+ 'street_name' => html_entity_decode(
1057
+ $order->get_shipping_address_1() . ' ' .
1058
+ $order->get_shipping_address_2() . ' ' .
1059
+ $order->get_shipping_city() . ' ' .
1060
+ $order->get_shipping_state() . ' ' .
1061
+ $order->get_shipping_country()
1062
+ )
1063
+ //'street_number' =>
1064
+ //'floor' =>
1065
+ //'apartment' =>
1066
+ )
1067
+ );
1068
+ // The payment preference.
1069
+ $preferences = array(
1070
+ 'transaction_amount' => floor( ( ( float ) ( $order_total - $discount_amount_of_items ) ) * 100 ) / 100,
1071
+ 'description' => implode( ', ', $list_of_items ),
1072
+ 'payment_method_id' => $ticket_checkout['paymentMethodId'],
1073
+ 'payer' => array(
1074
+ 'email' => $order->get_billing_email()
1075
+ ),
1076
+ 'external_reference' => $this->invoice_prefix . $order->get_id(),
1077
+ 'additional_info' => array(
1078
+ 'items' => $items,
1079
+ 'payer' => $payer_additional_info,
1080
+ 'shipments' => $shipments
1081
+ )
1082
+ );
1083
+ } else {
1084
+ // Build additional information from the customer data.
1085
+ $payer_additional_info = array(
1086
+ 'first_name' => html_entity_decode( $order->billing_first_name ),
1087
+ 'last_name' => html_entity_decode( $order->billing_last_name ),
1088
+ //'registration_date' =>
1089
+ 'phone' => array(
1090
+ //'area_code' =>
1091
+ 'number' => $order->billing_phone
1092
+ ),
1093
+ 'address' => array(
1094
+ 'zip_code' => $order->billing_postcode,
1095
+ 'street_name' => html_entity_decode(
1096
+ $order->billing_address_1 . ' ' .
1097
+ $order->billing_address_2 . ' ' .
1098
+ $order->billing_city . ' ' .
1099
+ $order->billing_state . ' ' .
1100
+ $order->billing_country
1101
+ )
1102
+ //'street_number' =>
1103
+ )
1104
+ );
1105
+ // Create the shipment address information set.
1106
+ $shipments = array(
1107
+ 'receiver_address' => array(
1108
+ 'zip_code' => $order->shipping_postcode,
1109
+ 'street_name' => html_entity_decode(
1110
+ $order->shipping_address_1 . ' ' .
1111
+ $order->shipping_address_2 . ' ' .
1112
+ $order->shipping_city . ' ' .
1113
+ $order->shipping_state . ' ' .
1114
+ $order->shipping_country
1115
+ )
1116
+ //'street_number' =>
1117
+ //'floor' =>
1118
+ //'apartment' =>
1119
+ )
1120
+ );
1121
+ // The payment preference.
1122
+ $preferences = array(
1123
+ 'transaction_amount' => floor( ( ( float ) ( $order_total - $discount_amount_of_items ) ) * 100 ) / 100,
1124
+ 'description' => implode( ', ', $list_of_items ),
1125
+ 'payment_method_id' => $ticket_checkout['paymentMethodId'],
1126
+ 'payer' => array(
1127
+ 'email' => $order->billing_email
1128
+ ),
1129
+ 'external_reference' => $this->invoice_prefix . $order->id,
1130
+ 'additional_info' => array(
1131
+ 'items' => $items,
1132
+ 'payer' => $payer_additional_info,
1133
+ 'shipments' => $shipments
1134
+ )
1135
+ );
1136
+ }
1137
+
1138
+ // FEBRABAN rules.
1139
+ if ( $this->site_id == 'MLB' ) {
1140
+ $preferences['payer']['first_name'] = $ticket_checkout['firstname'];
1141
+ $preferences['payer']['last_name'] = strlen( $ticket_checkout['docNumber'] ) == 14 ? $ticket_checkout['lastname'] : $ticket_checkout['firstname'];
1142
+ $preferences['payer']['identification']['type'] = strlen( $ticket_checkout['docNumber'] ) == 14 ? 'CPF' : 'CNPJ';
1143
+ $preferences['payer']['identification']['number'] = $ticket_checkout['docNumber'];
1144
+ $preferences['payer']['address']['street_name'] = $ticket_checkout['address'];
1145
+ $preferences['payer']['address']['street_number'] = $ticket_checkout['number'];
1146
+ $preferences['payer']['address']['neighborhood'] = $ticket_checkout['city'];
1147
+ $preferences['payer']['address']['city'] = $ticket_checkout['city'];
1148
+ $preferences['payer']['address']['federal_unit'] = $ticket_checkout['state'];
1149
+ $preferences['payer']['address']['zip_code'] = $ticket_checkout['zipcode'];
1150
+ }
1151
+
1152
+ // Do not set IPN url if it is a localhost.
1153
+ if ( ! strrpos( $this->domain, 'localhost' ) ) {
1154
+ $preferences['notification_url'] = WC_WooMercadoPago_Module::workaround_ampersand_bug(
1155
+ WC()->api_request_url( 'WC_WooMercadoPagoTicket_Gateway' )
1156
+ );
1157
+ }
1158
+
1159
+ // Discounts features.
1160
+ if ( isset( $ticket_checkout['discount'] ) && $ticket_checkout['discount'] != '' &&
1161
+ $ticket_checkout['discount'] > 0 && isset( $ticket_checkout['coupon_code'] ) &&
1162
+ $ticket_checkout['coupon_code'] != '' &&
1163
+ WC()->session->chosen_payment_method == 'woocommerce-mercadopago-ticket-module' ) {
1164
+
1165
+ $preferences['campaign_id'] = (int) $ticket_checkout['campaign_id'];
1166
+ $preferences['coupon_amount'] = ( (float) $ticket_checkout['discount'] );
1167
+ $preferences['coupon_code'] = strtoupper( $ticket_checkout['coupon_code'] );
1168
+ }
1169
+
1170
+ // Set sponsor ID.
1171
+ if ( ! $this->is_test_user ) {
1172
+ $preferences['sponsor_id'] = $this->country_configs['sponsor_id'];
1173
+ }
1174
+
1175
+ if ( 'yes' == $this->debug ) {
1176
+ $this->log->add(
1177
+ $this->id,
1178
+ '[build_payment_preference] - returning just created [$preferences] structure: ' .
1179
+ json_encode( $preferences, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1180
+ );
1181
+ }
1182
+
1183
+ $preferences = apply_filters(
1184
+ 'woocommerce_mercadopago_module_ticket_preferences',
1185
+ $preferences, $order
1186
+ );
1187
+ return $preferences;
1188
+ }
1189
+
1190
+ // --------------------------------------------------
1191
+
1192
+ protected function create_url( $order, $ticket_checkout ) {
1193
+
1194
+ // Creates the order parameters by checking the cart configuration.
1195
+ $preferences = $this->build_payment_preference( $order, $ticket_checkout );
1196
+
1197
+ $this->mp->sandbox_mode( false );
1198
+
1199
+ // Create order preferences with Mercado Pago API request.
1200
+ try {
1201
+ $ticket_info = $this->mp->create_payment( json_encode( $preferences ) );
1202
+ if ( $ticket_info['status'] < 200 || $ticket_info['status'] >= 300 ) {
1203
+ // Mercado Pago trowed an error.
1204
+ if ( 'yes' == $this->debug ) {
1205
+ $this->log->add(
1206
+ $this->id,
1207
+ '[create_url] - mercado pago gave error, payment creation failed with error: ' .
1208
+ $ticket_info['response']['message'] );
1209
+ }
1210
+ return false;
1211
+ } elseif ( is_wp_error( $ticket_info ) ) {
1212
+ // WordPress throwed an error.
1213
+ if ( 'yes' == $this->debug ) {
1214
+ $this->log->add(
1215
+ $this->id,
1216
+ '[create_url] - wordpress gave error, payment creation failed with error: ' .
1217
+ $ticket_info['response']['message'] );
1218
+ }
1219
+ return false;
1220
+ } else {
1221
+ // Obtain the URL.
1222
+ $response = $ticket_info['response'];
1223
+ if ( array_key_exists( 'status', $response ) ) {
1224
+ if ( $response['status'] == 'pending' ) {
1225
+ if ( $response['status_detail'] == 'pending_waiting_payment' ) {
1226
+ WC()->cart->empty_cart();
1227
+ if ( $this->reduce_stock_on_order_gen == 'yes' ) {
1228
+ $order->reduce_order_stock();
1229
+ }
1230
+ /*$html = '<p></p><p>' . wordwrap(
1231
+ __( 'Thank you for your order. Please, pay the ticket to get your order approved.', 'woocommerce-mercadopago-module' ),
1232
+ 60, '<br>'
1233
+ ) . '</p>';
1234
+ $html .= '<a id="submit-payment" target="_blank" href="' .
1235
+ $response['transaction_details']['external_resource_url'] .
1236
+ '" class="button alt">' .
1237
+ __( 'Print the Ticket', 'woocommerce-mercadopago-module' ) .
1238
+ '</a> ';
1239
+ wc_add_notice( '<p>' . $html . '</p>', 'notice' );*/
1240
+
1241
+ // WooCommerce 3.0 or later.
1242
+ if ( method_exists( $order, 'update_meta_data' ) ) {
1243
+ $order->update_meta_data( '_transaction_details_ticket', $response['transaction_details']['external_resource_url'] );
1244
+ $order->save();
1245
+ } else {
1246
+ update_post_meta(
1247
+ $order->id,
1248
+ '_transaction_details_ticket',
1249
+ $response['transaction_details']['external_resource_url']
1250
+ );
1251
+ }
1252
+
1253
+ $order->add_order_note(
1254
+ 'Mercado Pago: ' .
1255
+ __( 'Customer haven\'t paid yet.', 'woocommerce-mercadopago-module' )
1256
+ );
1257
+ $order->add_order_note(
1258
+ 'Mercado Pago: ' .
1259
+ __( 'To reprint the ticket click ', 'woocommerce-mercadopago-module' ) .
1260
+ '<a target="_blank" href="' .
1261
+ $response['transaction_details']['external_resource_url'] . '">' .
1262
+ __( 'here', 'woocommerce-mercadopago-module' ) .
1263
+ '</a>', 1, false
1264
+ );
1265
+
1266
+ /*return array(
1267
+ 'result' => 'success',
1268
+ 'redirect' => $order->get_checkout_payment_url( true )
1269
+ );*/
1270
+ return array(
1271
+ 'result' => 'success',
1272
+ 'redirect' => $order->get_checkout_order_received_url()
1273
+ );
1274
+ }
1275
+ }
1276
+ }
1277
+ return false;
1278
+ }
1279
+ } catch ( MercadoPagoException $e ) {
1280
+ // Something went wrong with the payment creation.
1281
+ if ( 'yes' == $this->debug ) {
1282
+ $this->log->add(
1283
+ $this->id,
1284
+ '[create_url] - payment creation failed with exception: ' .
1285
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1286
+ );
1287
+ }
1288
+ }
1289
+ return false;
1290
+ }
1291
+
1292
+ /**
1293
+ * Summary: Receive post data and applies a discount based in the received values.
1294
+ * Description: Receive post data and applies a discount based in the received values.
1295
+ */
1296
+ public function add_discount_ticket() {
1297
+
1298
+ if ( ! isset( $_POST['mercadopago_ticket'] ) )
1299
+ return;
1300
+
1301
+ if ( is_admin() && ! defined( 'DOING_AJAX' ) || is_cart() ) {
1302
+ return;
1303
+ }
1304
+
1305
+ $mercadopago_ticket = $_POST['mercadopago_ticket'];
1306
+ if ( isset( $mercadopago_ticket['discount'] ) && $mercadopago_ticket['discount'] != '' &&
1307
+ $mercadopago_ticket['discount'] > 0 && isset( $mercadopago_ticket['coupon_code'] ) &&
1308
+ $mercadopago_ticket['coupon_code'] != '' &&
1309
+ WC()->session->chosen_payment_method == 'woocommerce-mercadopago-ticket-module' ) {
1310
+
1311
+ if ( 'yes' == $this->debug ) {
1312
+ $this->log->add(
1313
+ $this->id,
1314
+ '[add_discount_ticket] - ticket trying to apply discount...'
1315
+ );
1316
+ }
1317
+
1318
+ $value = ( $mercadopago_ticket['discount'] ) /
1319
+ ( ( float ) $this->currency_ratio > 0 ? ( float ) $this->currency_ratio : 1 );
1320
+
1321
+ global $woocommerce;
1322
+ if ( apply_filters(
1323
+ 'wc_mercadopagoticket_module_apply_discount',
1324
+ 0 < $value, $woocommerce->cart )
1325
+ ) {
1326
+ $woocommerce->cart->add_fee( sprintf(
1327
+ __( 'Discount for %s coupon', 'woocommerce-mercadopago-module' ),
1328
+ esc_attr( $mercadopago_ticket['campaign']
1329
+ ) ), ( $value * -1 ), false
1330
+ );
1331
+ }
1332
+ }
1333
+
1334
+ }
1335
+
1336
+ // Display the discount in payment method title.
1337
+ public function get_payment_method_title_ticket( $title, $id ) {
1338
+
1339
+ if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
1340
+ return $title;
1341
+ }
1342
+
1343
+ if ( $title != $this->title || $this->gateway_discount == 0 ) {
1344
+ return $title;
1345
+ }
1346
+
1347
+ $total = (float) WC()->cart->subtotal;
1348
+ if ( is_numeric( $this->gateway_discount ) ) {
1349
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
1350
+ $price_percent = $this->gateway_discount / 100;
1351
+ if ( $price_percent > 0 ) {
1352
+ $title .= ' (' . __( 'Discount Of ', 'woocommerce-mercadopago-module' ) .
1353
+ strip_tags( wc_price( $total * $price_percent ) ) . ' )';
1354
+ }
1355
+ }
1356
+ }
1357
+
1358
+ return $title;
1359
+ }
1360
+
1361
+ /*
1362
+ * ========================================================================
1363
+ * AUXILIARY AND FEEDBACK METHODS (SERVER SIDE)
1364
+ * ========================================================================
1365
+ */
1366
+
1367
+ /**
1368
+ * Summary: Check if we have valid credentials.
1369
+ * Description: Check if we have valid credentials.
1370
+ * @return boolean true/false depending on the validation result.
1371
+ */
1372
+ public function validate_credentials() {
1373
+
1374
+ if ( empty( $this->access_token ) ) {
1375
+ return false;
1376
+ }
1377
+
1378
+ if ( strpos( $this->access_token, 'APP_USR' ) === false && strpos( $this->access_token, 'TEST' ) === false ) {
1379
+ return false;
1380
+ }
1381
+
1382
+ try {
1383
+
1384
+ $this->mp = new MP(
1385
+ WC_WooMercadoPago_Module::get_module_version(),
1386
+ $this->access_token
1387
+ );
1388
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
1389
+ $this->mp->set_email( $email );
1390
+ $get_request = $this->mp->get( '/users/me?access_token=' . $this->access_token );
1391
+
1392
+ if ( isset( $get_request['response']['site_id'] ) ) {
1393
+
1394
+ // TODO: revalidate MLU
1395
+ if ( $get_request['response']['site_id'] == 'MLU' ) {
1396
+ $this->mp = null;
1397
+ return false;
1398
+ }
1399
+
1400
+ $this->is_test_user = in_array( 'test_user', $get_request['response']['tags'] );
1401
+ $this->site_id = $get_request['response']['site_id'];
1402
+ $this->collector_id = $get_request['response']['id'];
1403
+ $this->country_configs = WC_WooMercadoPago_Module::get_country_config( $this->site_id );
1404
+
1405
+ // Get ticket payments.
1406
+ $payments = $this->mp->get( '/v1/payment_methods/?access_token=' . $this->access_token );
1407
+ foreach ( $payments['response'] as $payment ) {
1408
+ if ( isset( $payment['payment_type_id'] ) ) {
1409
+ if ( $payment['payment_type_id'] != 'account_money' &&
1410
+ $payment['payment_type_id'] != 'credit_card' &&
1411
+ $payment['payment_type_id'] != 'debit_card' &&
1412
+ $payment['payment_type_id'] != 'prepaid_card' ) {
1413
+
1414
+ array_push( $this->payment_methods, $payment );
1415
+ }
1416
+ }
1417
+ }
1418
+
1419
+ // Check if there are available payments with ticket.
1420
+ if ( count( $this->payment_methods ) == 0 ) {
1421
+ return false;
1422
+ }
1423
+
1424
+ // Check for auto converstion of currency.
1425
+ $this->currency_ratio = -1;
1426
+ if ( $this->currency_conversion == 'yes' ) {
1427
+ $this->currency_ratio = WC_WooMercadoPago_Module::get_conversion_rate(
1428
+ $this->country_configs['currency']
1429
+ );
1430
+ }
1431
+
1432
+ return true;
1433
+
1434
+ } else {
1435
+ $this->mp = null;
1436
+ return false;
1437
+ }
1438
+
1439
+ } catch ( MercadoPagoException $e ) {
1440
+ if ( 'yes' == $this->debug ) {
1441
+ $this->log->add(
1442
+ $this->id,
1443
+ '[validate_credentials] - while validating credentials, got exception: ' .
1444
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1445
+ );
1446
+ }
1447
+ $this->mp = null;
1448
+ return false;
1449
+ }
1450
+
1451
+ return false;
1452
+
1453
+ }
1454
+
1455
+ // Build the string representing the path to the log file.
1456
+ protected function build_log_path_string() {
1457
+ return '<a href="' . esc_url( admin_url( 'admin.php?page=wc-status&tab=logs&log_file=' .
1458
+ esc_attr( $this->id ) . '-' . sanitize_file_name( wp_hash( $this->id ) ) . '.log' ) ) . '">' .
1459
+ __( 'WooCommerce &gt; System Status &gt; Logs', 'woocommerce-mercadopago-module' ) . '</a>';
1460
+ }
1461
+
1462
+ // Return boolean indicating if currency is supported.
1463
+ protected function is_supported_currency() {
1464
+ return get_woocommerce_currency() == $this->country_configs['currency'];
1465
+ }
1466
+
1467
+ // Called automatically by WooCommerce, verify if Module is available to use.
1468
+ public function is_available() {
1469
+ if ( ! did_action( 'wp_loaded' ) ) {
1470
+ return false;
1471
+ }
1472
+ global $woocommerce;
1473
+ $w_cart = $woocommerce->cart;
1474
+ // Check if we have SSL.
1475
+ if ( empty( $_SERVER['HTTPS'] ) || $_SERVER['HTTPS'] == 'off' ) {
1476
+ return false;
1477
+ }
1478
+ // Check for recurrent product checkout.
1479
+ if ( isset( $w_cart ) ) {
1480
+ if ( WC_WooMercadoPago_Module::is_subscription( $w_cart->get_cart() ) ) {
1481
+ return false;
1482
+ }
1483
+ }
1484
+ // Check if this gateway is enabled and well configured.
1485
+ $available = ( 'yes' == $this->settings['enabled'] ) && ! empty( $this->access_token );
1486
+ return $available;
1487
+ }
1488
+
1489
+ public function check_ssl_absence() {
1490
+ if ( empty( $_SERVER['HTTPS'] ) || $_SERVER['HTTPS'] == 'off' ) {
1491
+ if ( 'yes' == $this->settings['enabled'] ) {
1492
+ echo '<div class="error"><p><strong>' .
1493
+ __( 'Ticket is Inactive', 'woocommerce-mercadopago-module' ) .
1494
+ '</strong>: ' .
1495
+ sprintf(
1496
+ __( 'Your site appears to not have SSL certification. SSL is a pre-requisite because the payment process is made in your server.', 'woocommerce-mercadopago-module' )
1497
+ ) . '</p></div>';
1498
+ }
1499
+ }
1500
+ }
1501
+
1502
+ // Get the URL to admin page.
1503
+ protected function admin_url() {
1504
+ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.1', '>=' ) ) {
1505
+ return admin_url(
1506
+ 'admin.php?page=wc-settings&tab=checkout&section=wc_woomercadopagoticket_gateway'
1507
+ );
1508
+ }
1509
+ return admin_url(
1510
+ 'admin.php?page=woocommerce_settings&tab=payment_gateways&section=WC_WooMercadoPagoTicket_Gateway'
1511
+ );
1512
+ }
1513
+
1514
+ // Notify that access_token are not valid.
1515
+ public function credentials_missing_message() {
1516
+ echo '<div class="error"><p><strong>' .
1517
+ __( 'Ticket is Inactive', 'woocommerce-mercadopago-module' ) .
1518
+ '</strong>: ' .
1519
+ __( 'Your Mercado Pago credentials Access Token appears to be misconfigured.', 'woocommerce-mercadopago-module' ) .
1520
+ '</p></div>';
1521
+ }
1522
+
1523
+ /*
1524
+ * ========================================================================
1525
+ * IPN MECHANICS (SERVER SIDE)
1526
+ * ========================================================================
1527
+ */
1528
+
1529
+ /**
1530
+ * Summary: This call checks any incoming notifications from Mercado Pago server.
1531
+ * Description: This call checks any incoming notifications from Mercado Pago server.
1532
+ */
1533
+ public function process_http_request() {
1534
+ @ob_clean();
1535
+ if ( 'yes' == $this->debug ) {
1536
+ $this->log->add(
1537
+ $this->id,
1538
+ '[process_http_request] - Received _get content: ' .
1539
+ json_encode( $_GET, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1540
+ );
1541
+ }
1542
+ if ( isset( $_GET['coupon_id'] ) && $_GET['coupon_id'] != '' ) {
1543
+ // process coupon evaluations.
1544
+ if ( isset( $_GET['payer'] ) && $_GET['payer'] != '' ) {
1545
+ $logged_user_email = $_GET['payer'];
1546
+ $coupon_id = $_GET['coupon_id'];
1547
+ $this->mp->sandbox_mode( false );
1548
+ $response = $this->mp->check_discount_campaigns(
1549
+ $_GET['amount'],
1550
+ $logged_user_email,
1551
+ $coupon_id
1552
+ );
1553
+ header( 'HTTP/1.1 200 OK' );
1554
+ header( 'Content-Type: application/json' );
1555
+ echo json_encode( $response );
1556
+ } else {
1557
+ $obj = new stdClass();
1558
+ $obj->status = 404;
1559
+ $obj->response = array(
1560
+ 'message' =>
1561
+ __( 'Please, inform your email in billing address to use this feature', 'woocommerce-mercadopago-module' ),
1562
+ 'error' => 'payer_not_found',
1563
+ 'status' => 404,
1564
+ 'cause' => array()
1565
+ );
1566
+ header( 'HTTP/1.1 200 OK' );
1567
+ header( 'Content-Type: application/json' );
1568
+ echo json_encode( $obj );
1569
+ }
1570
+ exit( 0 );
1571
+ } else {
1572
+ // process IPN messages.
1573
+ $data = $this->check_ipn_request_is_valid( $_GET );
1574
+ if ( $data ) {
1575
+ header( 'HTTP/1.1 200 OK' );
1576
+ do_action( 'valid_mercadopagoticket_ipn_request', $data );
1577
+ }
1578
+ }
1579
+ }
1580
+
1581
+ /**
1582
+ * Summary: Get received data from IPN and checks if its a merchant_order or a payment.
1583
+ * Description: If we have these information, we return data to be processed by
1584
+ * successful_request function.
1585
+ * @return boolean indicating if it was successfuly processed.
1586
+ */
1587
+ public function check_ipn_request_is_valid( $data ) {
1588
+
1589
+ if ( ! isset( $data['data_id'] ) || ! isset( $data['type'] ) ) {
1590
+ if ( 'yes' == $this->debug ) {
1591
+ $this->log->add(
1592
+ $this->id,
1593
+ '[check_ipn_request_is_valid] - data_id or type not set: ' .
1594
+ json_encode( $data, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1595
+ );
1596
+ }
1597
+ // at least, check if its a v0 ipn.
1598
+ if ( ! isset( $data['id'] ) || ! isset( $data['topic'] ) ) {
1599
+ if ( 'yes' == $this->debug ) {
1600
+ $this->log->add(
1601
+ $this->id,
1602
+ '[check_ipn_response] - Mercado Pago Request Failure: ' .
1603
+ json_encode( $_GET, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1604
+ );
1605
+ }
1606
+ wp_die( __( 'Mercado Pago Request Failure', 'woocommerce-mercadopago-module' ) );
1607
+ } else {
1608
+ header( 'HTTP/1.1 200 OK' );
1609
+ }
1610
+ // No ID? No process!
1611
+ return false;
1612
+ }
1613
+
1614
+ $this->mp->sandbox_mode( false );
1615
+
1616
+ try {
1617
+ // Get the payment reported by the IPN.
1618
+ if ( $data['type'] == 'payment' ) {
1619
+ $access_token = array( 'access_token' => $this->mp->get_access_token() );
1620
+ $payment_info = $this->mp->get(
1621
+ '/v1/payments/' . $data['data_id'], $access_token, false
1622
+ );
1623
+ if ( ! is_wp_error( $payment_info ) &&
1624
+ ( $payment_info['status'] == 200 || $payment_info['status'] == 201 ) ) {
1625
+ return $payment_info['response'];
1626
+ } else {
1627
+ if ( 'yes' == $this->debug ) {
1628
+ $this->log->add(
1629
+ $this->id,
1630
+ '[check_ipn_request_is_valid] - error when processing received data: ' .
1631
+ json_encode( $payment_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1632
+ );
1633
+ }
1634
+ return false;
1635
+ }
1636
+ }
1637
+ } catch ( MercadoPagoException $e ) {
1638
+ if ( 'yes' == $this->debug ) {
1639
+ $this->log->add(
1640
+ $this->id,
1641
+ '[check_ipn_request_is_valid] - MercadoPagoException: ' .
1642
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1643
+ );
1644
+ }
1645
+ return false;
1646
+ }
1647
+ return true;
1648
+ }
1649
+
1650
+ /**
1651
+ * Summary: Properly handles each case of notification, based in payment status.
1652
+ * Description: Properly handles each case of notification, based in payment status.
1653
+ */
1654
+ public function successful_request( $data ) {
1655
+
1656
+ if ( 'yes' == $this->debug ) {
1657
+ $this->log->add(
1658
+ $this->id,
1659
+ '[successful_request] - starting to process ipn update...'
1660
+ );
1661
+ }
1662
+
1663
+ // Get the order and check its presence.
1664
+ $order_key = $data['external_reference'];
1665
+ if ( empty( $order_key ) ) {
1666
+ return;
1667
+ }
1668
+ $id = (int) str_replace( $this->invoice_prefix, '', $order_key );
1669
+ $order = wc_get_order( $id );
1670
+
1671
+ // Check if order exists.
1672
+ if ( ! $order ) {
1673
+ return;
1674
+ }
1675
+
1676
+ // WooCommerce 3.0 or later.
1677
+ if ( method_exists( $order, 'get_id' ) ) {
1678
+ $order_id = $order->get_id();
1679
+ } else {
1680
+ $order_id = $order->id;
1681
+ }
1682
+
1683
+ // Check if we have the correct order.
1684
+ if ( $order_id !== $id ) {
1685
+ return;
1686
+ }
1687
+
1688
+ if ( 'yes' == $this->debug ) {
1689
+ $this->log->add(
1690
+ $this->id,
1691
+ '[successful_request] - updating metadata and status with data: ' .
1692
+ json_encode( $data, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1693
+ );
1694
+ }
1695
+
1696
+ // Here, we process the status... this is the business rules!
1697
+ // Reference: https://www.mercadopago.com.br/developers/en/api-docs/basic-checkout/ipn/payment-status/
1698
+ $status = isset( $data['status'] ) ? $data['status'] : 'pending';
1699
+ $total_paid = isset( $data['transaction_details']['total_paid_amount'] ) ? $data['transaction_details']['total_paid_amount'] : 0.00;
1700
+ $total_refund = isset( $data['transaction_amount_refunded'] ) ? $data['transaction_amount_refunded'] : 0.00;
1701
+ $total = $data['transaction_amount'];
1702
+
1703
+ // WooCommerce 3.0 or later.
1704
+ if ( method_exists( $order, 'update_meta_data' ) ) {
1705
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPagoTicket_Gateway' );
1706
+
1707
+ if ( ! empty( $data['payer']['email'] ) ) {
1708
+ $order->update_meta_data( __( 'Payer email', 'woocommerce-mercadopago-module' ), $data['payer']['email'] );
1709
+ }
1710
+ if ( ! empty( $data['payment_type_id'] ) ) {
1711
+ $order->update_meta_data( __( 'Payment type', 'woocommerce-mercadopago-module' ), $data['payment_type_id'] );
1712
+ }
1713
+ $payment_id = $data['id'];
1714
+ $order->update_meta_data(
1715
+ 'Mercado Pago - Payment ' . $payment_id,
1716
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1717
+ ']/[Amount ' . $total .
1718
+ ']/[Paid ' . $total_paid .
1719
+ ']/[Refund ' . $total_refund . ']'
1720
+ );
1721
+ $order->update_meta_data( '_Mercado_Pago_Payment_IDs', $payment_id );
1722
+
1723
+ $order->save();
1724
+ } else {
1725
+ update_post_meta( $order->id, '_used_gateway', 'WC_WooMercadoPagoTicket_Gateway' );
1726
+
1727
+ if ( ! empty( $data['payer']['email'] ) ) {
1728
+ update_post_meta(
1729
+ $order_id,
1730
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1731
+ $data['payer']['email']
1732
+ );
1733
+ }
1734
+ if ( ! empty( $data['payment_type_id'] ) ) {
1735
+ update_post_meta(
1736
+ $order_id,
1737
+ __( 'Payment type', 'woocommerce-mercadopago-module' ),
1738
+ $data['payment_type_id']
1739
+ );
1740
+ }
1741
+ $payment_id = $data['id'];
1742
+ update_post_meta(
1743
+ $order_id,
1744
+ 'Mercado Pago - Payment ' . $payment_id,
1745
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1746
+ ']/[Amount ' . $total .
1747
+ ']/[Paid ' . $total_paid .
1748
+ ']/[Refund ' . $total_refund . ']'
1749
+ );
1750
+ update_post_meta(
1751
+ $order_id,
1752
+ '_Mercado_Pago_Payment_IDs',
1753
+ $payment_id
1754
+ );
1755
+ }
1756
+
1757
+ // Switch the status and update in WooCommerce.
1758
+ switch ( $status ) {
1759
+ case 'approved':
1760
+ $order->add_order_note(
1761
+ 'Mercado Pago: ' . __( 'Payment approved.', 'woocommerce-mercadopago-module' )
1762
+ );
1763
+ if ( $this->reduce_stock_on_order_gen == 'no' ) {
1764
+ $order->payment_complete();
1765
+ } else {
1766
+ $order->update_status( 'processing' );
1767
+ }
1768
+ break;
1769
+ case 'pending':
1770
+ // decrease stock if not yet decreased and order not exists.
1771
+ $notes = $order->get_customer_order_notes();
1772
+ $has_note = false;
1773
+ if ( sizeof( $notes ) > 1 ) {
1774
+ $has_note = true;
1775
+ break;
1776
+ }
1777
+ if ( ! $has_note ) {
1778
+ $order->add_order_note(
1779
+ 'Mercado Pago: ' .
1780
+ __( 'Waiting for the ticket payment.', 'woocommerce-mercadopago-module' )
1781
+ );
1782
+ $order->add_order_note(
1783
+ 'Mercado Pago: ' .
1784
+ __( 'Waiting for the ticket payment.', 'woocommerce-mercadopago-module' ),
1785
+ 1, false
1786
+ );
1787
+ }
1788
+ break;
1789
+ case 'in_process':
1790
+ $order->update_status(
1791
+ 'on-hold',
1792
+ 'Mercado Pago: ' . __( 'Payment under review.', 'woocommerce-mercadopago-module' )
1793
+ );
1794
+ break;
1795
+ case 'rejected':
1796
+ $order->update_status(
1797
+ 'failed',
1798
+ 'Mercado Pago: ' .
1799
+ __( 'The payment was refused. The customer can try again.', 'woocommerce-mercadopago-module' )
1800
+ );
1801
+ break;
1802
+ case 'refunded':
1803
+ $order->update_status(
1804
+ 'refunded',
1805
+ 'Mercado Pago: ' .
1806
+ __( 'The payment was refunded to the customer.', 'woocommerce-mercadopago-module' )
1807
+ );
1808
+ break;
1809
+ case 'cancelled':
1810
+ $this->process_cancel_order_meta_box_actions( $order );
1811
+ $order->update_status(
1812
+ 'cancelled',
1813
+ 'Mercado Pago: ' .
1814
+ __( 'The payment was cancelled.', 'woocommerce-mercadopago-module' )
1815
+ );
1816
+ break;
1817
+ case 'in_mediation':
1818
+ $order->add_order_note(
1819
+ 'Mercado Pago: ' .
1820
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1821
+ );
1822
+ break;
1823
+ case 'charged-back':
1824
+ $order->add_order_note(
1825
+ 'Mercado Pago: ' .
1826
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1827
+ );
1828
+ break;
1829
+ default:
1830
+ break;
1831
+ }
1832
+ }
1833
+
1834
+ }
1835
+
1836
+ new WC_WooMercadoPagoTicket_Gateway( true );
mercadopago/sdk/lib/mercadopago.php CHANGED
@@ -1,413 +1,761 @@
1
  <?php
2
 
3
  /**
4
- * MercadoPago Integration Library
5
- * Access MercadoPago for payments integration
6
- *
7
- * @author hcasatti
8
- *
9
  */
10
- $GLOBALS["LIB_LOCATION"] = dirname(__FILE__);
 
11
 
12
  class MP {
13
 
14
- const version = "0.5.2";
15
-
16
- private $client_id;
17
- private $client_secret;
18
- private $ll_access_token;
19
- private $access_data;
20
- private $sandbox = FALSE;
21
-
22
- function __construct() {
23
- $i = func_num_args();
24
-
25
- if ($i > 2 || $i < 1) {
26
- throw new MercadoPagoException("Invalid arguments. Use CLIENT_ID and CLIENT SECRET, or ACCESS_TOKEN");
27
- }
28
-
29
- if ($i == 1) {
30
- $this->ll_access_token = func_get_arg(0);
31
- }
32
-
33
- if ($i == 2) {
34
- $this->client_id = func_get_arg(0);
35
- $this->client_secret = func_get_arg(1);
36
- }
37
- }
38
-
39
- public function sandbox_mode($enable = NULL) {
40
- if (!is_null($enable)) {
41
- $this->sandbox = $enable === TRUE;
42
- }
43
-
44
- return $this->sandbox;
45
- }
46
-
47
- /**
48
- * Get Access Token for API use
49
- */
50
- public function get_access_token() {
51
- if (isset ($this->ll_access_token) && !is_null($this->ll_access_token)) {
52
- return $this->ll_access_token;
53
- }
54
-
55
- $app_client_values = array(
56
- 'client_id' => $this->client_id,
57
- 'client_secret' => $this->client_secret,
58
- 'grant_type' => 'client_credentials'
59
- );
60
-
61
- $access_data = MPRestClient::post(array(
62
- "uri" => "/oauth/token",
63
- "data" => $app_client_values,
64
- "headers" => array(
65
- "content-type" => "application/x-www-form-urlencoded"
66
- )
67
- ));
68
-
69
- if ($access_data["status"] != 200) {
70
- throw new MercadoPagoException ($access_data['response']['message'], $access_data['status']);
71
- }
72
-
73
- $this->access_data = $access_data['response'];
74
-
75
- return $this->access_data['access_token'];
76
- }
77
-
78
- /**
79
- * Get information for specific payment
80
- * @param int $id
81
- * @return array(json)
82
- */
83
- public function get_payment($id) {
84
- $uri_prefix = $this->sandbox ? "/sandbox" : "";
85
-
86
- $request = array(
87
- "uri" => $uri_prefix."/collections/notifications/{$id}",
88
- "params" => array(
89
- "access_token" => $this->get_access_token()
90
- )
91
- );
92
-
93
- $payment_info = MPRestClient::get($request);
94
- return $payment_info;
95
- }
96
- public function get_payment_info($id) {
97
- return $this->get_payment($id);
98
- }
99
-
100
- /**
101
- * Get information for specific authorized payment
102
- * @param id
103
- * @return array(json)
104
- */
105
- public function get_authorized_payment($id) {
106
- $request = array(
107
- "uri" => "/authorized_payments/{$id}",
108
- "params" => array(
109
- "access_token" => $this->get_access_token()
110
- )
111
- );
112
-
113
- $authorized_payment_info = MPRestClient::get($request);
114
- return $authorized_payment_info;
115
- }
116
-
117
- /**
118
- * Refund accredited payment
119
- * @param int $id
120
- * @return array(json)
121
- */
122
- public function refund_payment($id) {
123
- $request = array(
124
- "uri" => "/collections/{$id}",
125
- "params" => array(
126
- "access_token" => $this->get_access_token()
127
- ),
128
- "data" => array(
129
- "status" => "refunded"
130
- )
131
- );
132
-
133
- $response = MPRestClient::put($request);
134
- return $response;
135
- }
136
-
137
- /**
138
- * Cancel pending payment
139
- * @param int $id
140
- * @return array(json)
141
- */
142
- public function cancel_payment($id) {
143
- $request = array(
144
- "uri" => "/collections/{$id}",
145
- "params" => array(
146
- "access_token" => $this->get_access_token()
147
- ),
148
- "data" => array(
149
- "status" => "cancelled"
150
- )
151
- );
152
-
153
- $response = MPRestClient::put($request);
154
- return $response;
155
- }
156
-
157
- /**
158
- * Cancel preapproval payment
159
- * @param int $id
160
- * @return array(json)
161
- */
162
- public function cancel_preapproval_payment($id) {
163
- $request = array(
164
- "uri" => "/preapproval/{$id}",
165
- "params" => array(
166
- "access_token" => $this->get_access_token()
167
- ),
168
- "data" => array(
169
- "status" => "cancelled"
170
- )
171
- );
172
-
173
- $response = MPRestClient::put($request);
174
- return $response;
175
- }
176
-
177
- /**
178
- * Search payments according to filters, with pagination
179
- * @param array $filters
180
- * @param int $offset
181
- * @param int $limit
182
- * @return array(json)
183
- */
184
- public function search_payment($filters, $offset = 0, $limit = 0) {
185
- $filters["offset"] = $offset;
186
- $filters["limit"] = $limit;
187
-
188
- $uri_prefix = $this->sandbox ? "/sandbox" : "";
189
-
190
- $request = array(
191
- "uri" => $uri_prefix."/collections/search",
192
- "params" => array_merge ($filters, array(
193
- "access_token" => $this->get_access_token()
194
- ))
195
- );
196
-
197
- $collection_result = MPRestClient::get($request);
198
- return $collection_result;
199
- }
200
-
201
- /**
202
- * Create a checkout preference
203
- * @param array $preference
204
- * @return array(json)
205
- */
206
- public function create_preference($preference) {
207
- $request = array(
208
- "uri" => "/checkout/preferences",
209
- "params" => array(
210
- "access_token" => $this->get_access_token()
211
- ),
212
- "data" => $preference
213
- );
214
-
215
- $preference_result = MPRestClient::post($request);
216
- return $preference_result;
217
- }
218
-
219
- /**
220
- * Update a checkout preference
221
- * @param string $id
222
- * @param array $preference
223
- * @return array(json)
224
- */
225
- public function update_preference($id, $preference) {
226
- $request = array(
227
- "uri" => "/checkout/preferences/{$id}",
228
- "params" => array(
229
- "access_token" => $this->get_access_token()
230
- ),
231
- "data" => $preference
232
- );
233
-
234
- $preference_result = MPRestClient::put($request);
235
- return $preference_result;
236
- }
237
-
238
- /**
239
- * Get a checkout preference
240
- * @param string $id
241
- * @return array(json)
242
- */
243
- public function get_preference($id) {
244
- $request = array(
245
- "uri" => "/checkout/preferences/{$id}",
246
- "params" => array(
247
- "access_token" => $this->get_access_token()
248
- )
249
- );
250
-
251
- $preference_result = MPRestClient::get($request);
252
- return $preference_result;
253
- }
254
-
255
- /**
256
- * Create a preapproval payment
257
- * @param array $preapproval_payment
258
- * @return array(json)
259
- */
260
- public function create_preapproval_payment($preapproval_payment) {
261
- $request = array(
262
- "uri" => "/preapproval",
263
- "params" => array(
264
- "access_token" => $this->get_access_token()
265
- ),
266
- "data" => $preapproval_payment
267
- );
268
-
269
- $preapproval_payment_result = MPRestClient::post($request);
270
- return $preapproval_payment_result;
271
- }
272
-
273
- /**
274
- * Get a preapproval payment
275
- * @param string $id
276
- * @return array(json)
277
- */
278
- public function get_preapproval_payment($id) {
279
- $request = array(
280
- "uri" => "/preapproval/{$id}",
281
- "params" => array(
282
- "access_token" => $this->get_access_token()
283
- )
284
- );
285
-
286
- $preapproval_payment_result = MPRestClient::get($request);
287
- return $preapproval_payment_result;
288
- }
289
-
290
- /**
291
- * Update a preapproval payment
292
- * @param string $preapproval_payment, $id
293
- * @return array(json)
294
- */
295
-
296
- public function update_preapproval_payment($id, $preapproval_payment) {
297
- $request = array(
298
- "uri" => "/preapproval/{$id}",
299
- "params" => array(
300
- "access_token" => $this->get_access_token()
301
- ),
302
- "data" => $preapproval_payment
303
- );
304
-
305
- $preapproval_payment_result = MPRestClient::put($request);
306
- return $preapproval_payment_result;
307
- }
308
-
309
- /* Generic resource call methods */
310
-
311
- /**
312
- * Generic resource get
313
- * @param request
314
- * @param params (deprecated)
315
- * @param authenticate = true (deprecated)
316
- */
317
- public function get($request, $params = null, $authenticate = true) {
318
- if (is_string ($request)) {
319
- $request = array(
320
- "uri" => $request,
321
- "params" => $params,
322
- "authenticate" => $authenticate
323
- );
324
- }
325
-
326
- $request["params"] = isset ($request["params"]) && is_array ($request["params"]) ? $request["params"] : array();
327
-
328
- if (!isset ($request["authenticate"]) || $request["authenticate"] !== false) {
329
- $request["params"]["access_token"] = $this->get_access_token();
330
- }
331
-
332
- $result = MPRestClient::get($request);
333
- return $result;
334
- }
335
-
336
- /**
337
- * Generic resource post
338
- * @param request
339
- * @param data (deprecated)
340
- * @param params (deprecated)
341
- */
342
- public function post($request, $data = null, $params = null) {
343
- if (is_string ($request)) {
344
- $request = array(
345
- "uri" => $request,
346
- "data" => $data,
347
- "params" => $params
348
- );
349
- }
350
-
351
- $request["params"] = isset ($request["params"]) && is_array ($request["params"]) ? $request["params"] : array();
352
-
353
- if (!isset ($request["authenticate"]) || $request["authenticate"] !== false) {
354
- $request["params"]["access_token"] = $this->get_access_token();
355
- }
356
-
357
- $result = MPRestClient::post($request);
358
- return $result;
359
- }
360
-
361
- /**
362
- * Generic resource put
363
- * @param request
364
- * @param data (deprecated)
365
- * @param params (deprecated)
366
- */
367
- public function put($request, $data = null, $params = null) {
368
- if (is_string ($request)) {
369
- $request = array(
370
- "uri" => $request,
371
- "data" => $data,
372
- "params" => $params
373
- );
374
- }
375
-
376
- $request["params"] = isset ($request["params"]) && is_array ($request["params"]) ? $request["params"] : array();
377
-
378
- if (!isset ($request["authenticate"]) || $request["authenticate"] !== false) {
379
- $request["params"]["access_token"] = $this->get_access_token();
380
- }
381
-
382
- $result = MPRestClient::put($request);
383
- return $result;
384
- }
385
-
386
- /**
387
- * Generic resource delete
388
- * @param request
389
- * @param data (deprecated)
390
- * @param params (deprecated)
391
- */
392
- public function delete($request, $params = null) {
393
- if (is_string ($request)) {
394
- $request = array(
395
- "uri" => $request,
396
- "params" => $params
397
- );
398
- }
399
-
400
- $request["params"] = isset ($request["params"]) && is_array ($request["params"]) ? $request["params"] : array();
401
-
402
- if (!isset ($request["authenticate"]) || $request["authenticate"] !== false) {
403
- $request["params"]["access_token"] = $this->get_access_token();
404
- }
405
-
406
- $result = MPRestClient::delete($request);
407
- return $result;
408
- }
409
-
410
- /* **************************************************************************************** */
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
411
 
412
  }
413
 
@@ -415,164 +763,483 @@ class MP {
415
  * MercadoPago cURL RestClient
416
  */
417
  class MPRestClient {
418
- const API_BASE_URL = "https://api.mercadopago.com";
419
-
420
- private static function build_request($request) {
421
- if (!extension_loaded ("curl")) {
422
- throw new MercadoPagoException("cURL extension not found. You need to enable cURL in your php.ini or another configuration you have.");
423
- }
424
-
425
- if (!isset($request["method"])) {
426
- throw new MercadoPagoException("No HTTP METHOD specified");
427
- }
428
-
429
- if (!isset($request["uri"])) {
430
- throw new MercadoPagoException("No URI specified");
431
- }
432
-
433
- // Set headers
434
- $headers = array("accept: application/json");
435
- $json_content = true;
436
- $form_content = false;
437
- $default_content_type = true;
438
-
439
- if (isset($request["headers"]) && is_array($request["headers"])) {
440
- foreach ($request["headers"] as $h => $v) {
441
- $h = strtolower($h);
442
- $v = strtolower($v);
443
-
444
- if ($h == "content-type") {
445
- $default_content_type = false;
446
- $json_content = $v == "application/json";
447
- $form_content = $v == "application/x-www-form-urlencoded";
448
- }
449
-
450
- array_push ($headers, $h.": ".$v);
451
- }
452
- }
453
- if ($default_content_type) {
454
- array_push($headers, "content-type: application/json");
455
- }
456
-
457
- // Build $connect
458
- $connect = curl_init();
459
-
460
- curl_setopt($connect, CURLOPT_USERAGENT, "MercadoPago PHP SDK v" . MP::version);
461
- curl_setopt($connect, CURLOPT_RETURNTRANSFER, true);
462
- curl_setopt($connect, CURLOPT_SSL_VERIFYPEER, true);
463
- curl_setopt($connect, CURLOPT_CAINFO, $GLOBALS["LIB_LOCATION"] . "/cacert.pem");
464
- curl_setopt($connect, CURLOPT_CUSTOMREQUEST, $request["method"]);
465
- curl_setopt($connect, CURLOPT_HTTPHEADER, $headers);
466
-
467
- // Set parameters and url
468
- if (isset ($request["params"]) && is_array($request["params"]) && count($request["params"]) > 0) {
469
- $request["uri"] .= (strpos($request["uri"], "?") === false) ? "?" : "&";
470
- $request["uri"] .= self::build_query($request["params"]);
471
- }
472
- curl_setopt($connect, CURLOPT_URL, self::API_BASE_URL . $request["uri"]);
473
-
474
- // Set data
475
- if (isset($request["data"])) {
476
- if ($json_content) {
477
- if (gettype($request["data"]) == "string") {
478
- json_decode($request["data"], true);
479
- } else {
480
- $request["data"] = json_encode($request["data"]);
481
- }
482
-
483
- if(function_exists('json_last_error')) {
484
- $json_error = json_last_error();
485
- if ($json_error != JSON_ERROR_NONE) {
486
- throw new MercadoPagoException("JSON Error [{$json_error}] - Data: ".$request["data"]);
487
- }
488
- }
489
- } else if ($form_content) {
490
- $request["data"] = self::build_query($request["data"]);
491
- }
492
-
493
- curl_setopt($connect, CURLOPT_POSTFIELDS, $request["data"]);
494
- }
495
-
496
- return $connect;
497
- }
498
-
499
- private static function exec($request) {
500
- // private static function exec($method, $uri, $data, $content_type) {
501
-
502
- $connect = self::build_request($request);
503
-
504
- $api_result = curl_exec($connect);
505
- $api_http_code = curl_getinfo($connect, CURLINFO_HTTP_CODE);
506
-
507
- if ($api_result === FALSE) {
508
- throw new MercadoPagoException (curl_error ($connect));
509
- }
510
-
511
- $response = array(
512
- "status" => $api_http_code,
513
- "response" => json_decode($api_result, true)
514
- );
515
-
516
- if ($response['status'] >= 400) {
517
- $message = $response['response']['message'];
518
- if (isset ($response['response']['cause'])) {
519
- if (isset ($response['response']['cause']['code']) && isset ($response['response']['cause']['description'])) {
520
- $message .= " - ".$response['response']['cause']['code'].': '.$response['response']['cause']['description'];
521
- } else if (is_array ($response['response']['cause'])) {
522
- foreach ($response['response']['cause'] as $cause) {
523
- $message .= " - ".$cause['code'].': '.$cause['description'];
524
- }
525
- }
526
- }
527
-
528
- throw new MercadoPagoException ($message, $response['status']);
529
- }
530
-
531
- curl_close($connect);
532
-
533
- return $response;
534
- }
535
-
536
- private static function build_query($params) {
537
- if (function_exists("http_build_query")) {
538
- return http_build_query($params, "", "&");
539
- } else {
540
- foreach ($params as $name => $value) {
541
- $elements[] = "{$name}=" . urlencode($value);
542
- }
543
-
544
- return implode("&", $elements);
545
- }
546
- }
547
-
548
- public static function get($request) {
549
- $request["method"] = "GET";
550
-
551
- return self::exec($request);
552
- }
553
-
554
- public static function post($request) {
555
- $request["method"] = "POST";
556
-
557
- return self::exec($request);
558
- }
559
-
560
- public static function put($request) {
561
- $request["method"] = "PUT";
562
-
563
- return self::exec($request);
564
- }
565
-
566
- public static function delete($request) {
567
- $request["method"] = "DELETE";
568
-
569
- return self::exec($request);
570
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
571
  }
572
 
573
  class MercadoPagoException extends Exception {
574
- public function __construct($message, $code = 500, Exception $previous = null) {
575
- // Default code 500
576
- parent::__construct($message, $code, $previous);
577
- }
578
- }
1
  <?php
2
 
3
  /**
4
+ * Part of Woo Mercado Pago Module - MercadoPago Integration Library, Access MercadoPago for payments integration
5
+ * Author - Mercado Pago
6
+ * Developer - hcasatti, Marcelo Tomio Hama / marcelo.hama@mercadolivre.com
7
+ * Copyright - Copyright(c) MercadoPago [https://www.mercadopago.com]
8
+ * License - https://www.gnu.org/licenses/gpl.html GPL version 2 or higher
9
  */
10
+
11
+ $GLOBALS['LIB_LOCATION'] = dirname( __FILE__ );
12
 
13
  class MP {
14
 
15
+ private $version = '2.2.18';
16
+ private $client_id;
17
+ private $client_secret;
18
+ private $ll_access_token;
19
+ private $sandbox = FALSE;
20
+
21
+ /**
22
+ * Summary: Constructor.
23
+ * Description: Build an object with module version and credentials.
24
+ */
25
+ function __construct() {
26
+
27
+ $i = func_num_args();
28
+
29
+ if ( $i > 3 || $i < 2 ) {
30
+ throw new MercadoPagoException(
31
+ 'Invalid arguments. Use CLIENT_ID and CLIENT SECRET, or ACCESS_TOKEN'
32
+ );
33
+ }
34
+
35
+ if ( $i == 2 ) {
36
+ $this->version = func_get_arg( 0 );
37
+ $this->ll_access_token = func_get_arg( 1 );
38
+ }
39
+
40
+ if ( $i == 3 ) {
41
+ $this->version = func_get_arg( 0 );
42
+ $this->client_id = func_get_arg( 1 );
43
+ $this->client_secret = func_get_arg( 2 );
44
+ }
45
+
46
+ }
47
+
48
+ public function set_email( $email ) {
49
+ MPRestClient::set_email( $email );
50
+ MeliRestClient::set_email( $email );
51
+ }
52
+
53
+ public function sandbox_mode( $enable = NULL ) {
54
+ if ( ! is_null( $enable ) ) {
55
+ $this->sandbox = $enable === TRUE;
56
+ }
57
+ return $this->sandbox;
58
+ }
59
+
60
+ /**
61
+ * Summary: Get Access Token for API use.
62
+ * Description: Get Access Token for API use.
63
+ * @return a string that identifies the access token.
64
+ */
65
+ public function get_access_token() {
66
+
67
+ if ( isset( $this->ll_access_token ) && ! is_null( $this->ll_access_token ) ) {
68
+ return $this->ll_access_token;
69
+ }
70
+
71
+ $app_client_values = array(
72
+ 'client_id' => $this->client_id,
73
+ 'client_secret' => $this->client_secret,
74
+ 'grant_type' => 'client_credentials'
75
+ );
76
+
77
+ $access_data = MPRestClient::post(
78
+ array(
79
+ 'uri' => '/oauth/token',
80
+ 'data' => $app_client_values,
81
+ 'headers' => array(
82
+ 'content-type' => 'application/x-www-form-urlencoded'
83
+ )
84
+ ),
85
+ $this->version
86
+ );
87
+
88
+ if ( $access_data['status'] != 200 ) {
89
+ return null;
90
+ }
91
+
92
+ $access_data = $access_data['response'];
93
+ return $access_data['access_token'];
94
+
95
+ }
96
+
97
+ /**
98
+ * Summary: Search for a payment given its id.
99
+ * Description: Search for a payment given its id.
100
+ * @param string $id
101
+ * @return array( json )
102
+ */
103
+ public function search_paymentV1( $id ) {
104
+
105
+ $request = array(
106
+ 'uri' => '/v1/payments/' . $id,
107
+ 'params' => array(
108
+ 'access_token' => $this->get_access_token()
109
+ )
110
+ );
111
+
112
+ $payment = MPRestClient::get( $request, $this->version );
113
+ return $payment;
114
+
115
+ }
116
+
117
+ //=== CUSTOMER CARDS FUNCTIONS ===
118
+
119
+ /**
120
+ * Summary: Trigger API to find a card owner and create him if dont find.
121
+ * Description: Trigger API to find a card owner and create him if dont find.
122
+ * @param string $payer_email
123
+ * @return array( json )
124
+ */
125
+ public function get_or_create_customer( $payer_email ) {
126
+
127
+ $customer = $this->search_customer( $payer_email );
128
+
129
+ if ( $customer['status'] == 200 && $customer['response']['paging']['total'] > 0 ) {
130
+ $customer = $customer['response']['results'][0];
131
+ } else {
132
+ $resp = $this->create_customer( $payer_email );
133
+ $customer = $resp['response'];
134
+ }
135
+
136
+ return $customer;
137
+
138
+ }
139
+
140
+ /**
141
+ * Summary: Create a card owner.
142
+ * Description: Create a card owner.
143
+ * @param string $payer_email
144
+ * @return array( json )
145
+ */
146
+ public function create_customer( $email ) {
147
+
148
+ $request = array(
149
+ 'uri' => '/v1/customers',
150
+ 'params' => array(
151
+ 'access_token' => $this->get_access_token()
152
+ ),
153
+ 'data' => array(
154
+ 'email' => $email
155
+ )
156
+ );
157
+
158
+ $customer = MPRestClient::post( $request, $this->version );
159
+ return $customer;
160
+
161
+ }
162
+
163
+ /**
164
+ * Summary: Try to find a card owner.
165
+ * Description: Try to find a card owner.
166
+ * @param string $payer_email
167
+ * @return array( json )
168
+ */
169
+ public function search_customer( $email ) {
170
+
171
+ $request = array(
172
+ 'uri' => '/v1/customers/search',
173
+ 'params' => array(
174
+ 'access_token' => $this->get_access_token(),
175
+ 'email' => $email
176
+ )
177
+ );
178
+
179
+ $customer = MPRestClient::get( $request, $this->version );
180
+ return $customer;
181
+
182
+ }
183
+
184
+ /**
185
+ * Summary: Given a customer, create a card for him.
186
+ * Description: Given a customer, create a card for him.
187
+ * @param string $customer_id
188
+ * @param string $token
189
+ * @param string $payment_method_id
190
+ * @param string $issuer_id
191
+ * @return array( json )
192
+ */
193
+ public function create_card_in_customer( $customer_id, $token, $payment_method_id = null,
194
+ $issuer_id = null ) {
195
+
196
+ $request = array(
197
+ 'uri' => '/v1/customers/' . $customer_id . '/cards',
198
+ 'params' => array(
199
+ 'access_token' => $this->get_access_token()
200
+ ),
201
+ 'data' => array(
202
+ 'token' => $token,
203
+ 'issuer_id' => $issuer_id,
204
+ 'payment_method_id' => $payment_method_id
205
+ )
206
+ );
207
+
208
+ $card = MPRestClient::post( $request, $this->version );
209
+ return $card;
210
+
211
+ }
212
+
213
+ /**
214
+ * Summary: Given a customer, find all of his cards.
215
+ * Description: Given a customer, find all of his cards.
216
+ * @param string $customer_id
217
+ * @param string $token
218
+ * @return array( json )
219
+ */
220
+ public function get_all_customer_cards( $customer_id, $token ) {
221
+
222
+ $request = array(
223
+ 'uri' => '/v1/customers/' . $customer_id . '/cards',
224
+ 'params' => array(
225
+ 'access_token' => $this->get_access_token()
226
+ )
227
+ );
228
+
229
+ $cards = MPRestClient::get( $request, $this->version );
230
+ return $cards;
231
+
232
+ }
233
+
234
+ //=== COUPOM AND DISCOUNTS FUNCTIONS ===
235
+
236
+ /**
237
+ * Summary: Check for discounts for a combination of amount, payer and coupm code.
238
+ * Description: Check for discounts for a combination of amount, payer and coupm code.
239
+ * @param string $transaction_amount
240
+ * @param string $payer_email
241
+ * @param string $coupon_code
242
+ * @return array( json )
243
+ */
244
+ public function check_discount_campaigns( $transaction_amount, $payer_email, $coupon_code ) {
245
+
246
+ $request = array(
247
+ 'uri' => '/discount_campaigns',
248
+ 'params' => array(
249
+ 'access_token' => $this->get_access_token(),
250
+ 'transaction_amount' => $transaction_amount,
251
+ 'payer_email' => $payer_email,
252
+ 'coupon_code' => $coupon_code
253
+ )
254
+ );
255
+
256
+ $discount_info = MPRestClient::get( $request, $this->version );
257
+ return $discount_info;
258
+
259
+ }
260
+
261
+ //=== ACCOUNT SETTINGS FUNCTIONS ===
262
+
263
+ /**
264
+ * Summary: Check the status of a account regarding its option to use two cards for pay.
265
+ * Description: Check the status of a account regarding its option to use two cards for pay.
266
+ * @return array( json )
267
+ */
268
+ public function check_two_cards() {
269
+
270
+ $request = array(
271
+ 'uri' => '/account/settings?access_token=' . $this->get_access_token()
272
+ );
273
+
274
+ $two_cards_info = MPRestClient::get( $request, $this->version );
275
+ if ( $two_cards_info['status'] == 200 )
276
+ return $two_cards_info['response']['two_cards'];
277
+ else {
278
+ return 'inactive';
279
+ }
280
+
281
+ }
282
+
283
+ /**
284
+ * Summary: Set paymennts with two cards for the merchant.
285
+ * Description: Set paymennts with two cards for the merchant.
286
+ * @param string $mode ( should be 'active' or 'inactive' string )
287
+ * @return array( json )
288
+ */
289
+ public function set_two_cards_mode( $mode ) {
290
+
291
+ $request = array(
292
+ 'uri' => '/account/settings?access_token=' . $this->get_access_token(),
293
+ 'data' => array(
294
+ 'two_cards' => $mode
295
+ ),
296
+ 'headers' => array(
297
+ 'content-type' => 'application/json'
298
+ )
299
+ );
300
+
301
+ $two_cards_info = MPRestClient::put( $request, $this->version );
302
+ return $two_cards_info;
303
+
304
+ }
305
+
306
+ //=== CHECKOUT AUXILIARY FUNCTIONS ===
307
+
308
+ /**
309
+ * Summary: Get information for specific payment.
310
+ * Description: Get information for specific payment.
311
+ * @param int $id
312
+ * @return array( json )
313
+ */
314
+ public function get_payment_info( $id ) {
315
+
316
+ $uri_prefix = $this->sandbox ? '/sandbox' : '';
317
+
318
+ $request = array(
319
+ 'uri' => $uri_prefix.'/collections/notifications/{$id}',
320
+ 'params' => array(
321
+ 'access_token' => $this->get_access_token()
322
+ )
323
+ );
324
+
325
+ $payment_info = MPRestClient::get( $request, $this->version );
326
+ return $payment_info;
327
+
328
+ }
329
+
330
+ /**
331
+ * Summary: Search payments according to filters, with pagination.
332
+ * Description: Search payments according to filters, with pagination.
333
+ * @param array $filters
334
+ * @param int $offset
335
+ * @param int $limit
336
+ * @return array( json )
337
+ */
338
+ public function search_payment( $filters, $offset = 0, $limit = 0 ) {
339
+
340
+ $filters['offset'] = $offset;
341
+ $filters['limit'] = $limit;
342
+
343
+ $uri_prefix = $this->sandbox ? '/sandbox' : '';
344
+
345
+ $request = array(
346
+ 'uri' => $uri_prefix . '/collections/search',
347
+ 'params' => array_merge ( $filters, array(
348
+ 'access_token' => $this->get_access_token()
349
+ ) )
350
+ );
351
+
352
+ $collection_result = MPRestClient::get( $request, $this->version );
353
+ return $collection_result;
354
+
355
+ }
356
+
357
+ /**
358
+ * Summary: Get information for specific authorized payment.
359
+ * Description: Get information for specific authorized payment.
360
+ * @param id
361
+ * @return array( json )
362
+ */
363
+ public function get_authorized_payment( $id ) {
364
+
365
+ $request = array(
366
+ 'uri' => '/authorized_payments/{$id}',
367
+ 'params' => array(
368
+ 'access_token' => $this->get_access_token()
369
+ )
370
+ );
371
+
372
+ $authorized_payment_info = MPRestClient::get( $request, $this->version );
373
+ return $authorized_payment_info;
374
+
375
+ }
376
+
377
+ /**
378
+ * Summary: Create a checkout preference.
379
+ * Description: Create a checkout preference.
380
+ * @param array $preference
381
+ * @return array( json )
382
+ */
383
+ public function create_preference( $preference ) {
384
+
385
+ $request = array(
386
+ 'uri' => '/checkout/preferences',
387
+ 'params' => array(
388
+ 'access_token' => $this->get_access_token()
389
+ ),
390
+ 'headers' => array(
391
+ 'user-agent' => 'platform:desktop,type:woocommerce,so:' . $this->version
392
+ ),
393
+ 'data' => $preference
394
+ );
395
+
396
+ $preference_result = MPRestClient::post( $request, $this->version );
397
+ return $preference_result;
398
+
399
+ }
400
+
401
+ /**
402
+ * Summary: Update a checkout preference.
403
+ * Description: Update a checkout preference.
404
+ * @param string $id
405
+ * @param array $preference
406
+ * @return array( json )
407
+ */
408
+ public function update_preference( $id, $preference ) {
409
+
410
+ $request = array(
411
+ 'uri' => '/checkout/preferences/{$id}',
412
+ 'params' => array(
413
+ 'access_token' => $this->get_access_token()
414
+ ),
415
+ 'data' => $preference
416
+ );
417
+
418
+ $preference_result = MPRestClient::put( $request, $this->version );
419
+ return $preference_result;
420
+
421
+ }
422
+
423
+ /**
424
+ * Summary: Get a checkout preference.
425
+ * Description: Get a checkout preference.
426
+ * @param string $id
427
+ * @return array( json )
428
+ */
429
+ public function get_preference( $id ) {
430
+
431
+ $request = array(
432
+ 'uri' => '/checkout/preferences/{$id}',
433
+ 'params' => array(
434
+ 'access_token' => $this->get_access_token()
435
+ )
436
+ );
437
+
438
+ $preference_result = MPRestClient::get( $request, $this->version );
439
+ return $preference_result;
440
+
441
+ }
442
+
443
+ /**
444
+ * Summary: Create a checkout preference.
445
+ * Description: Create a checkout preference.
446
+ * @param array $preference
447
+ * @return array( json )
448
+ */
449
+ public function create_payment( $preference ) {
450
+
451
+ $request = array(
452
+ 'uri' => '/v1/payments',
453
+ 'params' => array(
454
+ 'access_token' => $this->get_access_token()
455
+ ),
456
+ 'headers' => array(
457
+ 'X-Tracking-Id' => 'platform:v1-whitelabel,type:woocommerce,so:' . $this->version
458
+ ),
459
+ 'data' => $preference
460
+ );
461
+
462
+ $payment = MPRestClient::post( $request, $this->version );
463
+ return $payment;
464
+ }
465
+
466
+ /**
467
+ * Summary: Create a preapproval payment.
468
+ * Description: Create a preapproval payment.
469
+ * @param array $preapproval_payment
470
+ * @return array( json )
471
+ */
472
+ public function create_preapproval_payment( $preapproval_payment ) {
473
+
474
+ $request = array(
475
+ 'uri' => '/preapproval',
476
+ 'params' => array(
477
+ 'access_token' => $this->get_access_token()
478
+ ),
479
+ 'data' => $preapproval_payment
480
+ );
481
+
482
+ $preapproval_payment_result = MPRestClient::post( $request, $this->version );
483
+ return $preapproval_payment_result;
484
+
485
+ }
486
+
487
+ /**
488
+ * Summary: Get a preapproval payment.
489
+ * Description: Get a preapproval payment.
490
+ * @param string $id
491
+ * @return array( json )
492
+ */
493
+ public function get_preapproval_payment( $id ) {
494
+
495
+ $request = array(
496
+ 'uri' => '/preapproval/' . $id,
497
+ 'params' => array(
498
+ 'access_token' => $this->get_access_token()
499
+ )
500
+ );
501
+
502
+ $preapproval_payment_result = MPRestClient::get( $request, $this->version );
503
+ return $preapproval_payment_result;
504
+
505
+ }
506
+
507
+ /**
508
+ * Summary: Update a preapproval payment.
509
+ * Description: Update a preapproval payment.
510
+ * @param string $preapproval_payment, $id
511
+ * @return array( json )
512
+ */
513
+ public function update_preapproval_payment( $id, $preapproval_payment ) {
514
+
515
+ $request = array(
516
+ 'uri' => '/preapproval/' . $id,
517
+ 'params' => array(
518
+ 'access_token' => $this->get_access_token()
519
+ ),
520
+ 'data' => $preapproval_payment
521
+ );
522
+
523
+ $preapproval_payment_result = MPRestClient::put( $request, $this->version );
524
+ return $preapproval_payment_result;
525
+
526
+ }
527
+
528
+ /**
529
+ * Summary: Cancel preapproval payment.
530
+ * Description: Cancel preapproval payment.
531
+ * @param int $id
532
+ * @return array( json )
533
+ */
534
+ public function cancel_preapproval_payment( $id ) {
535
+
536
+ $request = array(
537
+ 'uri' => '/preapproval/' . $id,
538
+ 'params' => array(
539
+ 'access_token' => $this->get_access_token()
540
+ ),
541
+ 'data' => array(
542
+ 'status' => 'cancelled'
543
+ )
544
+ );
545
+
546
+ $response = MPRestClient::put( $request, $this->version );
547
+ return $response;
548
+
549
+ }
550
+
551
+ //=== REFUND AND CANCELING FLOW FUNCTIONS ===
552
+
553
+ /**
554
+ * Summary: Refund accredited payment.
555
+ * Description: Refund accredited payment.
556
+ * @param int $id
557
+ * @return array( json )
558
+ */
559
+ public function refund_payment( $id ) {
560
+
561
+ $request = array(
562
+ 'uri' => '/collections/' . $id,
563
+ 'params' => array(
564
+ 'access_token' => $this->get_access_token()
565
+ ),
566
+ 'data' => '{"status":"refunded"}'
567
+ );
568
+
569
+ $response = MPRestClient::put( $request, $this->version );
570
+ return $response;
571
+
572
+ }
573
+
574
+ /**
575
+ * Summary: Partially refund accredited payment.
576
+ * Description: Partially refund accredited payment.
577
+ * @param int $id
578
+ * @return array( json )
579
+ */
580
+ public function partial_refund_payment( $id, $amount, $reason, $external_reference ) {
581
+
582
+ $request = array(
583
+ 'uri' => '/collections/' . $id . '/refunds?access_token=' . $this->get_access_token(),
584
+ 'data' => array(
585
+ 'amount' => $amount,
586
+ 'metadata' => array(
587
+ 'metadata' => $reason,
588
+ 'external_reference' => $external_reference
589
+ )
590
+ )
591
+ );
592
+
593
+ $response = MPRestClient::post( $request, $this->version );
594
+ return $response;
595
+
596
+ }
597
+
598
+ /**
599
+ * Summary: Cancel pending payment.
600
+ * Description: Cancel pending payment.
601
+ * @param int $id
602
+ * @return array( json )
603
+ */
604
+ public function cancel_payment( $id ) {
605
+
606
+ $request = array(
607
+ 'uri' => '/collections/' . $id,
608
+ 'params' => array(
609
+ 'access_token' => $this->get_access_token()
610
+ ),
611
+ 'data' => '{"status":"cancelled"}'
612
+ );
613
+
614
+ $response = MPRestClient::put( $request, $this->version );
615
+ return $response;
616
+
617
+ }
618
+
619
+ //=== GENERIC RESOURCE CALL METHODS ===
620
+
621
+ /**
622
+ * Summary: Generic resource get.
623
+ * Description: Generic resource get.
624
+ * @param request
625
+ * @param params (deprecated)
626
+ * @param authenticate = true (deprecated)
627
+ */
628
+ public function get( $request, $params = null, $authenticate = true ) {
629
+
630
+ if ( is_string ( $request ) ) {
631
+ $request = array(
632
+ 'uri' => $request,
633
+ 'params' => $params,
634
+ 'authenticate' => $authenticate
635
+ );
636
+ }
637
+
638
+ $request['params'] = isset( $request['params'] ) && is_array( $request['params'] ) ?
639
+ $request['params'] :
640
+ array();
641
+
642
+ if ( ! isset( $request['authenticate'] ) || $request['authenticate'] !== false ) {
643
+ $request['params']['access_token'] = $this->get_access_token();
644
+ }
645
+
646
+ $result = MPRestClient::get( $request, $this->version );
647
+ return $result;
648
+
649
+ }
650
+
651
+ /**
652
+ * Summary: Generic resource post.
653
+ * Description: Generic resource get.
654
+ * @param request
655
+ * @param data (deprecated)
656
+ * @param params (deprecated)
657
+ */
658
+ public function post( $request, $data = null, $params = null ) {
659
+
660
+ if ( is_string ( $request ) ) {
661
+ $request = array(
662
+ 'uri' => $request,
663
+ 'data' => $data,
664
+ 'params' => $params
665
+ );
666
+ }
667
+
668
+ $request['params'] = isset( $request['params'] ) && is_array( $request['params'] ) ?
669
+ $request["params"] :
670
+ array();
671
+
672
+ if ( ! isset ( $request['authenticate'] ) || $request['authenticate'] !== false ) {
673
+ $request['params']['access_token'] = $this->get_access_token();
674
+ }
675
+
676
+ $result = MPRestClient::post( $request, $this->version );
677
+ return $result;
678
+
679
+ }
680
+
681
+ /**
682
+ * Summary: Generic resource put.
683
+ * Description: Generic resource put.
684
+ * @param request
685
+ * @param data (deprecated)
686
+ * @param params (deprecated)
687
+ */
688
+ public function put( $request, $data = null, $params = null ) {
689
+
690
+ if ( is_string ( $request ) ) {
691
+ $request = array(
692
+ 'uri' => $request,
693
+ 'data' => $data,
694
+ 'params' => $params
695
+ );
696
+ }
697
+
698
+ $request['params'] = isset( $request['params'] ) && is_array( $request['params'] ) ?
699
+ $request['params'] :
700
+ array();
701
+
702
+ if ( ! isset ( $request['authenticate'] ) || $request['authenticate'] !== false ) {
703
+ $request['params']['access_token'] = $this->get_access_token();
704
+ }
705
+
706
+ $result = MPRestClient::put( $request, $this->version );
707
+ return $result;
708
+
709
+ }
710
+
711
+ /**
712
+ * Summary: Generic resource delete.
713
+ * Description: Generic resource delete.
714
+ * @param request
715
+ * @param data (deprecated)
716
+ * @param params (deprecated)
717
+ */
718
+ public function delete( $request, $params = null ) {
719
+
720
+ if ( is_string ( $request ) ) {
721
+ $request = array(
722
+ 'uri' => $request,
723
+ 'params' => $params
724
+ );
725
+ }
726
+
727
+ $request['params'] = isset( $request['params'] ) && is_array( $request['params'] ) ?
728
+ $request['params'] :
729
+ array();
730
+
731
+ if ( ! isset( $request['authenticate'] ) || $request['authenticate'] !== false ) {
732
+ $request['params']['access_token'] = $this->get_access_token();
733
+ }
734
+
735
+ $result = MPRestClient::delete( $request, $this->version );
736
+ return $result;
737
+
738
+ }
739
+
740
+ //=== MODULE ANALYTICS FUNCTIONS ===
741
+
742
+ /**
743
+ * Summary: Save the settings of the module for analytics purposes.
744
+ * Description: Save the settings of the module for analytics purposes.
745
+ * @param array( json )
746
+ * @return array( json )
747
+ */
748
+ public function analytics_save_settings( $module_info ) {
749
+
750
+ $request = array(
751
+ 'uri' => '/modules/tracking/settings?access_token=' . $this->get_access_token(),
752
+ 'data' => $module_info
753
+ );
754
+
755
+ $result = MPRestClient::post( $request, $this->version );
756
+ return $result;
757
+
758
+ }
759
 
760
  }
761
 
763
  * MercadoPago cURL RestClient
764
  */
765
  class MPRestClient {
766
+
767
+ const API_BASE_URL = 'https://api.mercadopago.com';
768
+ private static $email_admin = '';
769
+ private static $check_loop = 0;
770
+
771
+ private static function build_request( $request, $version ) {
772
+
773
+ if ( ! extension_loaded ( 'curl' ) ) {
774
+ throw new MercadoPagoException( 'cURL extension not found. You need to enable cURL in your php.ini or another configuration you have.' );
775
+ }
776
+
777
+ if ( ! isset( $request['method'] ) ) {
778
+ throw new MercadoPagoException( 'No HTTP METHOD specified' );
779
+ }
780
+
781
+ if ( ! isset( $request['uri'] ) ) {
782
+ throw new MercadoPagoException( 'No URI specified' );
783
+ }
784
+
785
+ // Set headers
786
+ $headers = array( 'accept: application/json' );
787
+ $json_content = true;
788
+ $form_content = false;
789
+ $default_content_type = true;
790
+
791
+ if ( isset( $request['headers'] ) && is_array( $request['headers'] ) ) {
792
+ foreach ( $request['headers'] as $h => $v ) {
793
+ $h = strtolower( $h );
794
+ $v = strtolower( $v );
795
+ if ( $h == 'content-type' ) {
796
+ $default_content_type = false;
797
+ $json_content = $v == 'application/json';
798
+ $form_content = $v == 'application/x-www-form-urlencoded';
799
+ }
800
+ array_push ( $headers, $h . ': ' . $v );
801
+ }
802
+ }
803
+ if ( $default_content_type ) {
804
+ array_push( $headers, 'content-type: application/json' );
805
+ }
806
+
807
+ // Build $connect
808
+ $connect = curl_init();
809
+
810
+ curl_setopt(
811
+ $connect,
812
+ CURLOPT_USERAGENT,
813
+ 'platform:v1-whitelabel,type:woocommerce,so:' . $version );
814
+ curl_setopt(
815
+ $connect,
816
+ CURLOPT_RETURNTRANSFER,
817
+ true );
818
+ curl_setopt(
819
+ $connect,
820
+ CURLOPT_SSL_VERIFYPEER,
821
+ true );
822
+ curl_setopt(
823
+ $connect,
824
+ CURLOPT_CAINFO,
825
+ $GLOBALS['LIB_LOCATION'] . '/cacert.pem' );
826
+ curl_setopt(
827
+ $connect,
828
+ CURLOPT_CUSTOMREQUEST,
829
+ $request['method'] );
830
+ curl_setopt(
831
+ $connect,
832
+ CURLOPT_HTTPHEADER,
833
+ $headers );
834
+
835
+ // Set parameters and url
836
+ if ( isset( $request['params'] ) && is_array( $request['params'] ) ) {
837
+ if ( count( $request['params'] > 0 ) ) {
838
+ $request['uri'] .= ( strpos( $request['uri'], '?' ) === false ) ? '?' : '&';
839
+ $request['uri'] .= self::build_query( $request['params'] );
840
+ }
841
+ }
842
+ curl_setopt( $connect, CURLOPT_URL, MPRestClient::API_BASE_URL . $request['uri'] );
843
+
844
+ // Set data
845
+ if ( isset( $request['data'] ) ) {
846
+ if ( $json_content ) {
847
+ if ( gettype( $request['data'] ) == 'string' ) {
848
+ json_decode( $request['data'], true );
849
+ } else {
850
+ $request['data'] = json_encode( $request['data'] );
851
+ }
852
+ if( function_exists( 'json_last_error' ) ) {
853
+ $json_error = json_last_error();
854
+ if ( $json_error != JSON_ERROR_NONE ) {
855
+ throw new MercadoPagoException(
856
+ "JSON Error [{$json_error}] - Data: " . $request['data']
857
+ );
858
+ }
859
+ }
860
+ } elseif ( $form_content ) {
861
+ $request['data'] = self::build_query( $request['data'] );
862
+ }
863
+ curl_setopt( $connect, CURLOPT_POSTFIELDS, $request['data'] );
864
+ }
865
+
866
+ return $connect;
867
+
868
+ }
869
+
870
+ private static function exec( $request, $version ) {
871
+
872
+ $response = null;
873
+ $connect = self::build_request( $request, $version );
874
+
875
+ $api_result = curl_exec( $connect );
876
+ $api_http_code = curl_getinfo( $connect, CURLINFO_HTTP_CODE );
877
+
878
+ if ( $api_result === FALSE ) {
879
+ throw new MercadoPagoException ( curl_error ( $connect ) );
880
+ }
881
+
882
+ if ( $api_http_code != null && $api_result != null ) {
883
+ // A common response without error.
884
+ $response = array (
885
+ 'status' => $api_http_code,
886
+ 'response' => json_decode( $api_result, true )
887
+ );
888
+ }
889
+
890
+ // Error log API.
891
+ if ( $response != null && $response['status'] >= 400 && self::$check_loop == 0 ) {
892
+ try {
893
+ self::$check_loop = 1;
894
+ $message = null;
895
+ $payloads = null;
896
+ $endpoint = null;
897
+ $errors = array();
898
+ if ( isset( $response['response'] ) ) {
899
+ if ( isset($response['response']['message'] ) ) {
900
+ $message = $response['response']['message'];
901
+ }
902
+ if ( isset( $response['response']['cause'] ) ) {
903
+ if ( isset( $response['response']['cause']['code'] ) && isset( $response['response']['cause']['description'] ) ) {
904
+ $message .= ' - ' . $response['response']['cause']['code'] . ': ' . $response['response']['cause']['description'];
905
+ } elseif ( is_array( $response['response']['cause'] ) ) {
906
+ foreach ( $response['response']['cause'] as $cause ) {
907
+ $message .= ' - ' . $cause['code'] . ': ' . $cause['description'];
908
+ }
909
+ }
910
+ }
911
+ }
912
+ if ( $request != null ) {
913
+ if ( isset( $request['data'] ) ) {
914
+ if ( $request['data'] != null ) {
915
+ $payloads = json_encode( $request['data'] );
916
+ }
917
+ }
918
+ if ( isset( $request['uri'] ) ) {
919
+ if ( $request['uri'] != null ) {
920
+ $endpoint = $request['uri'];
921
+ }
922
+ }
923
+ }
924
+ // Send error.
925
+ $errors[] = array(
926
+ 'endpoint' => $endpoint,
927
+ 'message' => $message,
928
+ 'payloads' => $payloads
929
+ );
930
+ self::sendErrorLog( $response['status'], $errors, $version );
931
+ } catch ( Exception $e ) {
932
+ throw new MercadoPagoException( 'error to call API LOGS' . $e );
933
+ }
934
+ }
935
+
936
+ self::$check_loop = 0;
937
+
938
+ curl_close( $connect );
939
+
940
+ return $response;
941
+ }
942
+
943
+ private static function sendErrorLog( $code, $errors, $version ) {
944
+ $data = array(
945
+ 'code' => $code,
946
+ 'module' => 'WooCommerce',
947
+ 'module_version' => $version,
948
+ 'url_store' => $_SERVER['HTTP_HOST'],
949
+ 'errors' => $errors,
950
+ 'email_admin' => self::$email_admin
951
+ );
952
+ $request = array(
953
+ 'uri' => '/modules/log',
954
+ 'data' => $data
955
+ );
956
+ $result_response = MPRestClient::post( $request, $version );
957
+ return $result_response;
958
+ }
959
+
960
+ private static function build_query( $params ) {
961
+
962
+ if ( function_exists( 'http_build_query' ) ) {
963
+ return http_build_query( $params, '', '&' );
964
+ } else {
965
+ foreach ( $params as $name => $value ) {
966
+ $elements[] = "{$name}=" . urlencode( $value );
967
+ }
968
+ return implode( '&', $elements );
969
+ }
970
+
971
+ }
972
+
973
+ public static function get( $request, $version ) {
974
+ $request['method'] = 'GET';
975
+
976
+ return self::exec( $request, $version );
977
+ }
978
+
979
+ public static function post( $request, $version ) {
980
+ $request['method'] = 'POST';
981
+
982
+ return self::exec( $request, $version );
983
+ }
984
+
985
+ public static function put( $request, $version ) {
986
+ $request['method'] = 'PUT';
987
+
988
+ return self::exec( $request, $version );
989
+ }
990
+
991
+ public static function delete( $request, $version ) {
992
+ $request['method'] = 'DELETE';
993
+
994
+ return self::exec( $request, $version );
995
+ }
996
+
997
+ public static function set_email( $email ) {
998
+ self::$email_admin = $email;
999
+ }
1000
+
1001
+ }
1002
+
1003
+ class MeliRestClient {
1004
+
1005
+ const API_BASE_URL = 'https://api.mercadolibre.com';
1006
+ private static $email_admin = '';
1007
+ private static $check_loop = 0;
1008
+
1009
+ private static function build_request( $request, $version ) {
1010
+
1011
+ if ( ! extension_loaded ( 'curl' ) ) {
1012
+ throw new MercadoPagoException( 'cURL extension not found. You need to enable cURL in your php.ini or another configuration you have.' );
1013
+ }
1014
+
1015
+ if ( ! isset( $request['method'] ) ) {
1016
+ throw new MercadoPagoException( 'No HTTP METHOD specified' );
1017
+ }
1018
+
1019
+ if ( ! isset( $request['uri'] ) ) {
1020
+ throw new MercadoPagoException( 'No URI specified' );
1021
+ }
1022
+
1023
+ // Set headers
1024
+ $headers = array( 'accept: application/json' );
1025
+ $json_content = true;
1026
+ $form_content = false;
1027
+ $default_content_type = true;
1028
+
1029
+ if ( isset( $request['headers'] ) && is_array( $request['headers'] ) ) {
1030
+ foreach ( $request['headers'] as $h => $v ) {
1031
+ $h = strtolower( $h );
1032
+ $v = strtolower( $v );
1033
+ if ( $h == 'content-type' ) {
1034
+ $default_content_type = false;
1035
+ $json_content = $v == 'application/json';
1036
+ $form_content = $v == 'application/x-www-form-urlencoded';
1037
+ }
1038
+ array_push ( $headers, $h . ': ' . $v );
1039
+ }
1040
+ }
1041
+ if ( $default_content_type ) {
1042
+ array_push( $headers, 'content-type: application/json' );
1043
+ }
1044
+
1045
+ // Build $connect
1046
+ $connect = curl_init();
1047
+
1048
+ curl_setopt(
1049
+ $connect,
1050
+ CURLOPT_USERAGENT,
1051
+ 'platform:v1-whitelabel,type:woocommerce,so:' . $version );
1052
+ curl_setopt(
1053
+ $connect,
1054
+ CURLOPT_RETURNTRANSFER,
1055
+ true );
1056
+ curl_setopt(
1057
+ $connect,
1058
+ CURLOPT_SSL_VERIFYPEER,
1059
+ true );
1060
+ curl_setopt(
1061
+ $connect,
1062
+ CURLOPT_CAINFO,
1063
+ $GLOBALS['LIB_LOCATION'] . '/cacert.pem' );
1064
+ curl_setopt(
1065
+ $connect,
1066
+ CURLOPT_CUSTOMREQUEST,
1067
+ $request['method'] );
1068
+ curl_setopt(
1069
+ $connect,
1070
+ CURLOPT_HTTPHEADER,
1071
+ $headers );
1072
+
1073
+ // Set parameters and url
1074
+ if ( isset( $request['params'] ) && is_array( $request['params'] ) ) {
1075
+ if ( count( $request['params'] > 0 ) ) {
1076
+ $request['uri'] .= ( strpos( $request['uri'], '?' ) === false ) ? '?' : '&';
1077
+ $request['uri'] .= self::build_query( $request['params'] );
1078
+ }
1079
+ }
1080
+ curl_setopt( $connect, CURLOPT_URL, MeliRestClient::API_BASE_URL . $request['uri'] );
1081
+
1082
+ // Set data
1083
+ if ( isset( $request['data'] ) ) {
1084
+ if ( $json_content ) {
1085
+ if ( gettype( $request['data'] ) == 'string' ) {
1086
+ json_decode( $request['data'], true );
1087
+ } else {
1088
+ $request['data'] = json_encode( $request['data'] );
1089
+ }
1090
+ if( function_exists( 'json_last_error' ) ) {
1091
+ $json_error = json_last_error();
1092
+ if ( $json_error != JSON_ERROR_NONE ) {
1093
+ throw new MercadoPagoException(
1094
+ "JSON Error [{$json_error}] - Data: " . $request['data']
1095
+ );
1096
+ }
1097
+ }
1098
+ } elseif ( $form_content ) {
1099
+ $request['data'] = self::build_query( $request['data'] );
1100
+ }
1101
+ curl_setopt( $connect, CURLOPT_POSTFIELDS, $request['data'] );
1102
+ }
1103
+
1104
+ return $connect;
1105
+ }
1106
+
1107
+ private static function exec( $request, $version ) {
1108
+
1109
+ $response = null;
1110
+ $connect = self::build_request( $request, $version );
1111
+
1112
+ $api_result = curl_exec( $connect );
1113
+ $api_http_code = curl_getinfo( $connect, CURLINFO_HTTP_CODE );
1114
+
1115
+ if ( $api_result === FALSE ) {
1116
+ throw new MercadoPagoException ( curl_error ( $connect ) );
1117
+ }
1118
+
1119
+ if ( $api_http_code != null && $api_result != null ) {
1120
+ // A common response without error.
1121
+ $response = array (
1122
+ 'status' => $api_http_code,
1123
+ 'response' => json_decode( $api_result, true ),
1124
+ );
1125
+ }
1126
+
1127
+ // Error log API.
1128
+ if ( $response != null && $response['status'] >= 400 && self::$check_loop == 0 ) {
1129
+ try {
1130
+ self::$check_loop = 1;
1131
+ $message = null;
1132
+ $payloads = null;
1133
+ $endpoint = null;
1134
+ $errors = array();
1135
+ if ( isset( $response['response'] ) ) {
1136
+ if ( isset($response['response']['message'] ) ) {
1137
+ $message = $response['response']['message'];
1138
+ }
1139
+ if ( isset( $response['response']['cause'] ) ) {
1140
+ if ( isset( $response['response']['cause']['code'] ) && isset( $response['response']['cause']['description'] ) ) {
1141
+ $message .= ' - ' . $response['response']['cause']['code'] . ': ' . $response['response']['cause']['description'];
1142
+ } elseif ( is_array( $response['response']['cause'] ) ) {
1143
+ foreach ( $response['response']['cause'] as $cause ) {
1144
+ $message .= ' - ' . $cause['code'] . ': ' . $cause['description'];
1145
+ }
1146
+ }
1147
+ }
1148
+ }
1149
+ if ( $request != null ) {
1150
+ if ( isset( $request['data'] ) ) {
1151
+ if ( $request['data'] != null ) {
1152
+ $payloads = json_encode( $request['data'] );
1153
+ }
1154
+ }
1155
+ if ( isset( $request['uri'] ) ) {
1156
+ if ( $request['uri'] != null ) {
1157
+ $endpoint = $request['uri'];
1158
+ }
1159
+ }
1160
+ }
1161
+ // Send error.
1162
+ $errors[] = array(
1163
+ 'endpoint' => $endpoint,
1164
+ 'message' => $message,
1165
+ 'payloads' => $payloads
1166
+ );
1167
+ self::sendErrorLog( $response['status'], $errors, $version );
1168
+ } catch ( Exception $e ) {
1169
+ throw new MercadoPagoException( 'error to call API LOGS' . $e );
1170
+ }
1171
+ }
1172
+
1173
+ self::$check_loop = 0;
1174
+
1175
+ curl_close( $connect );
1176
+
1177
+ return $response;
1178
+ }
1179
+
1180
+ private static function sendErrorLog( $code, $errors, $version ) {
1181
+ $data = array(
1182
+ 'code' => $code,
1183
+ 'module' => 'WooCommerce',
1184
+ 'module_version' => $version,
1185
+ 'url_store' => $_SERVER['HTTP_HOST'],
1186
+ 'errors' => $errors,
1187
+ 'email_admin' => self::$email_admin
1188
+ );
1189
+ $request = array(
1190
+ 'uri' => '/modules/log',
1191
+ 'data' => $data
1192
+ );
1193
+ $result_response = MeLiRestClient::post( $request, $version );
1194
+ return $result_response;
1195
+ }
1196
+
1197
+ private static function build_query( $params ) {
1198
+
1199
+ if ( function_exists( 'http_build_query' ) ) {
1200
+ return http_build_query( $params, '', '&' );
1201
+ } else {
1202
+ foreach ( $params as $name => $value ) {
1203
+ $elements[] = "{$name}=" . urlencode( $value );
1204
+ }
1205
+ return implode( '&', $elements );
1206
+ }
1207
+
1208
+ }
1209
+
1210
+ public static function get( $request, $version ) {
1211
+ $request['method'] = 'GET';
1212
+
1213
+ return self::exec( $request, $version );
1214
+ }
1215
+
1216
+ public static function post( $request, $version ) {
1217
+ $request['method'] = 'POST';
1218
+
1219
+ return self::exec( $request, $version );
1220
+ }
1221
+
1222
+ public static function put( $request, $version ) {
1223
+ $request['method'] = 'PUT';
1224
+
1225
+ return self::exec( $request, $version );
1226
+ }
1227
+
1228
+ public static function delete( $request, $version ) {
1229
+ $request['method'] = 'DELETE';
1230
+
1231
+ return self::exec( $request, $version );
1232
+ }
1233
+
1234
+ public static function set_email( $email ) {
1235
+ self::$email_admin = $email;
1236
+ }
1237
+
1238
  }
1239
 
1240
  class MercadoPagoException extends Exception {
1241
+ public function __construct( $message, $code = 500, Exception $previous = null ) {
1242
+ // Default code 500
1243
+ parent::__construct( $message, $code, $previous );
1244
+ }
1245
+ }
shipment/abstract-wc-mercadoenvios-shipping.php ADDED
@@ -0,0 +1,356 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Text Domain: woocommerce-mercadopago-module
5
+ * Domain Path: /languages/
6
+ */
7
+
8
+ if ( ! defined( 'ABSPATH' ) ) {
9
+ exit;
10
+ }
11
+
12
+ /**
13
+ * Mercado Envios Shipping Method for Mercado Pago.
14
+ *
15
+ * A simple shipping method allowing free pickup as a shipping method for Mercado Pago.
16
+ *
17
+ * @class WC_MercadoPago_Shipping_MercadoEnvios
18
+ * @version 2.2.0
19
+ * @package WooCommerce/Classes/Shipping
20
+ * @author Mercado Pago
21
+ */
22
+
23
+ include_once dirname( __FILE__ ) . '/../mercadopago/sdk/lib/mercadopago.php';
24
+
25
+ abstract class WC_MercadoEnvios_Shipping extends WC_Shipping_Method {
26
+
27
+ protected $shipments_id = array();
28
+
29
+ /**
30
+ * Constructor.
31
+ */
32
+ public function __construct( $instance_id = 0 ) {
33
+
34
+ add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
35
+
36
+ $this->instance_id = absint( $instance_id );
37
+ $this->method_description = __( 'Mercado Envios is a shipping method available only for payments with Mercado Pago.', 'woocommerce-mercadopago-module' );
38
+ $this->supports = array(
39
+ 'shipping-zones',
40
+ 'instance-settings',
41
+ 'instance-settings-modal',
42
+ );
43
+
44
+ // Log.
45
+ $this->log = new WC_Logger();
46
+ $this->init();
47
+
48
+ }
49
+
50
+ /**
51
+ * Initialize local pickup.
52
+ */
53
+ public function init() {
54
+
55
+ // Load the settings.
56
+ $this->init_form_fields();
57
+ $this->init_settings();
58
+
59
+ // Define user set variables.
60
+ $this->title = $this->get_option( 'title' );
61
+ $this->tax_status = $this->get_option( 'tax_status' );
62
+ $this->cost = $this->get_option( 'cost' );
63
+ $this->free_shipping = $this->get_option( 'free_shipping' );
64
+ $this->show_delivery_time = $this->get_option( 'show_delivery_time' );
65
+
66
+ // Actions.
67
+ add_action( 'woocommerce_update_options_shipping_' . $this->id, array( $this, 'process_admin_options' ) );
68
+
69
+ }
70
+
71
+ // Multi-language plugin.
72
+ public function load_plugin_textdomain() {
73
+ $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce-mercadopago-module' );
74
+ $module_root = 'woocommerce-mercadopago-module/woocommerce-mercadopago-module-';
75
+ load_textdomain(
76
+ 'woocommerce-mercadopago-module',
77
+ trailingslashit( WP_LANG_DIR ) . $module_root . $locale . '.mo'
78
+ );
79
+ load_plugin_textdomain(
80
+ 'woocommerce-mercadopago-module',
81
+ false,
82
+ dirname( plugin_basename( __FILE__ ) ) . '/languages/'
83
+ );
84
+ }
85
+
86
+ /**
87
+ * Calculate shipping function.
88
+ */
89
+ public function calculate_shipping( $package = array() ) {
90
+
91
+ $checkout_standard = new WC_WooMercadoPago_Gateway();
92
+
93
+ if ( $checkout_standard->get_option( 'enabled' ) != 'yes' ) {
94
+ $this->log->add(
95
+ $this->id,
96
+ '[calculate_shipping] mercado pago standard needs to be active... '
97
+ );
98
+ return;
99
+ }
100
+
101
+ $client_id = $checkout_standard->get_option( 'client_id' );
102
+ $client_secret = $checkout_standard->get_option( 'client_secret' );
103
+
104
+ $site_id = $checkout_standard->site_id;
105
+ $shipping_method_id = $this->get_shipping_method_id( $site_id );
106
+
107
+ $this->mp = new MP(
108
+ WC_WooMercadoPago_Module::get_module_version(),
109
+ $client_id,
110
+ $client_secret
111
+ );
112
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
113
+ $this->mp->set_email( $email );
114
+
115
+ // Object package.
116
+ $me_package = new WC_MercadoEnvios_Package( $package );
117
+ $dimensions = $me_package->get_data();
118
+
119
+ // Set zipcode.
120
+ $zip_code = $package['destination']['postcode'];
121
+
122
+ // Height x width x length (centimeters), weight (grams).
123
+ $params = array(
124
+ 'dimensions' => (int) $dimensions['height'] . 'x' . (int) $dimensions['width'] . 'x' .
125
+ (int) $dimensions['length'] . ',' . $dimensions['weight'] * 1000,
126
+ 'zip_code' => preg_replace( '([^0-9])', '', sanitize_text_field( $zip_code ) ),
127
+ 'item_price' => $package['contents_cost'],
128
+ 'access_token' => $this->mp->get_access_token()
129
+ );
130
+
131
+ if ( $this->get_option( 'free_shipping' ) == 'yes' ) {
132
+ $params['free_method'] = $shipping_method_id;
133
+ } else {
134
+ $list_shipping_methods = $this->get_shipping_methods_zone_by_shipping_id( $this->instance_id );
135
+ foreach ( $list_shipping_methods as $key => $shipping_object ) {
136
+ if ( $key == 'mercadoenvios-normal' || $key == 'mercadoenvios-express' ) {
137
+ // WTF?
138
+ $shipping_object = new $shipping_object( $shipping_object->instance_id );
139
+ if ( $shipping_object->get_option( 'free_shipping' ) == 'yes' ) {
140
+ $temp_shipping_method_id = $shipping_object->get_shipping_method_id( $checkout_standard->site_id );
141
+ $params['free_method'] = $temp_shipping_method_id;
142
+ }
143
+ }
144
+ }
145
+ }
146
+
147
+ $response = $this->mp->get( '/shipping_options', $params );
148
+ $this->log->add( $this->id, '[calculate_shipping] Params sent: ' . json_encode( $params, JSON_PRETTY_PRINT ) );
149
+ $this->log->add( $this->id, '[calculate_shipping] Shipments Response API: ' . json_encode( $response, JSON_PRETTY_PRINT ) );
150
+
151
+ if ( $response['status'] != 200 ) {
152
+ $this->log->add(
153
+ $this->id,
154
+ '[calculate_shipping] got response different of 200... returning false.'
155
+ );
156
+ return false;
157
+ }
158
+
159
+ // $shippiments = array();
160
+ foreach ( $response['response']['options'] as $shipping ) {
161
+ if ( $shipping_method_id == $shipping['shipping_method_id'] ) {
162
+ $label_free_shipping = '';
163
+ if ( $this->get_option( 'free_shipping' ) == 'yes' || $shipping['cost'] == 0 ) {
164
+ $label_free_shipping = __( 'Free Shipping', 'woocommerce-mercadopago-module' );
165
+ }
166
+ $label_delivery_time = '';
167
+ if ( $this->get_option( 'show_delivery_time' ) == 'yes' ) {
168
+ $days = $shipping['estimated_delivery_time']['shipping'] / 24;
169
+ if ( $days <= 1 ) {
170
+ $label_delivery_time = $days . ' ' . __( 'Day', 'woocommerce-mercadopago-module' );
171
+ } else {
172
+ $label_delivery_time = $days . ' ' . __( 'Days', 'woocommerce-mercadopago-module' );
173
+ }
174
+ }
175
+ $separator = '';
176
+ if ( $label_free_shipping != '' && $label_delivery_time != '' ) {
177
+ $separator = ' - ';
178
+ }
179
+ $label_info = '';
180
+ if ( $label_free_shipping != '' || $label_delivery_time ) {
181
+ $label_info = ' (' . $label_delivery_time . $separator . $label_free_shipping . ')';
182
+ }
183
+ $option = array(
184
+ 'label' => 'Mercado Envios - ' . $shipping['name'] . $label_info,
185
+ 'package' => $package,
186
+ 'cost' => (float) $shipping['cost'],
187
+ 'meta_data' => array(
188
+ 'dimensions' => $params['dimensions'],
189
+ 'shipping_method_id' => $shipping_method_id,
190
+ 'free_shipping' => $this->get_option( 'free_shipping' )
191
+ )
192
+ );
193
+ $this->log->add(
194
+ $this->id,
195
+ '-----> Optiond added: ' . json_encode( $option, JSON_PRETTY_PRINT )
196
+ );
197
+ $this->add_rate( $option );
198
+ }
199
+ }
200
+
201
+ }
202
+
203
+ /**
204
+ * Replace comma by dot.
205
+ *
206
+ * @param mixed $value Value to fix.
207
+ *
208
+ * @return mixed
209
+ */
210
+ private function fix_format( $value ) {
211
+ $value = str_replace( ',', '.', $value );
212
+ return $value;
213
+ }
214
+
215
+ /**
216
+ * Init form fields.
217
+ */
218
+ public function init_form_fields() {
219
+
220
+ // Force quit loop.
221
+ $mp = WC_WooMercadoPago_Module::init_mercado_pago_gateway_class();
222
+ if ( isset( $mp->mercado_envios_loop ) && $mp->mercado_envios_loop ) {
223
+ return false;
224
+ }
225
+
226
+ $warning_active_shipping_methods = '';
227
+
228
+ if ( $this->show_message_shipping_methods() ) {
229
+ $warning_active_shipping_methods = '<img width="12" height="12" src="' .
230
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
231
+ __( 'Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module.', 'woocommerce-mercadopago-module' );
232
+ }
233
+
234
+ $this->instance_form_fields = array(
235
+ 'mercado_envios_title' => array(
236
+ 'title' => __( 'Mercado Envios', 'woocommerce-mercadopago-module' ),
237
+ 'type' => 'title',
238
+ 'description' => sprintf( '%s', $warning_active_shipping_methods )
239
+ ),
240
+ // 'enabled' => array(
241
+ // 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
242
+ // 'type' => 'checkbox',
243
+ // 'label' => __( 'Enable this shipping method', 'woocommerce-mercadopago-module' ),
244
+ // 'default' => 'yes',
245
+ // ),
246
+ 'title' => array(
247
+ 'title' => __( 'Mercado Envios', 'woocommerce-mercadopago-module' ),
248
+ 'type' => 'text',
249
+ 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce-mercadopago-module' ),
250
+ 'default' => __( 'Mercado Envios', 'woocommerce-mercadopago-module' ),
251
+ 'desc_tip' => true,
252
+ ),
253
+ 'free_shipping' => array(
254
+ 'title' => __( 'Free Shipping', 'woocommerce-mercadopago-module' ),
255
+ 'type' => 'checkbox',
256
+ 'label' => __( 'Enable free shipping for this shipping method', 'woocommerce-mercadopago-module' ),
257
+ 'default' => 'no',
258
+ ),
259
+ 'show_delivery_time' => array(
260
+ 'title' => __( 'Delivery Time', 'woocommerce-mercadopago-module' ),
261
+ 'type' => 'checkbox',
262
+ 'label' => __( 'Show estimated delivery time', 'woocommerce-mercadopago-module' ),
263
+ 'description' => __( 'Display the estimated delivery time in working days.', 'woocommerce-mercadopago-module' ),
264
+ 'desc_tip' => true,
265
+ 'default' => 'no',
266
+ )
267
+ );
268
+
269
+ }
270
+
271
+ /**
272
+ * Return shipping methods by zone and shipping id.
273
+ */
274
+ public function get_shipping_methods_zone_by_shipping_id( $shipping_id ) {
275
+ $shipping_zone = WC_Shipping_Zones::get_zone_by( 'instance_id', $shipping_id );
276
+ // Set looping shipping methods.
277
+ $mp = WC_WooMercadoPago_Module::init_mercado_pago_gateway_class();
278
+ $mp->mercado_envios_loop = true;
279
+ $shipping_methods_list = array();
280
+ foreach ( $shipping_zone->get_shipping_methods() as $key => $shipping_object ) {
281
+ $shipping_methods_list[$shipping_object->id] = $shipping_object;
282
+ }
283
+ $mp->mercado_envios_loop = false;
284
+ return $shipping_methods_list;
285
+ }
286
+
287
+ /**
288
+ * Validate if it is necessary to enable message.
289
+ */
290
+ public function show_message_shipping_methods() {
291
+ // Check if is admin.
292
+ if ( is_admin() ) {
293
+ if ( $this->instance_id > 0 ) {
294
+ $shipping_methods_list = $this->get_shipping_methods_zone_by_shipping_id( $this->instance_id );
295
+ $shipping_methods = array();
296
+ foreach ( $shipping_methods_list as $key => $shipping_object ) {
297
+ $shipping_methods[$shipping_object->id] = $shipping_object->is_enabled();
298
+ }
299
+ if ( isset($shipping_methods['mercadoenvios-normal'] ) && isset( $shipping_methods['mercadoenvios-express'] ) ) {
300
+ if ( $shipping_methods['mercadoenvios-normal'] === true && $shipping_methods['mercadoenvios-express'] === true ) {
301
+ // Add settings.
302
+ $this->update_settings_api( 'true' );
303
+ // Not display message.
304
+ return false;
305
+ } elseif ( $shipping_methods['mercadoenvios-normal'] === false && $shipping_methods['mercadoenvios-express'] === false ) {
306
+ // Remove settings.
307
+ $this->update_settings_api( 'false' );
308
+ // Not display message.
309
+ return false;
310
+ }
311
+ }
312
+ // Show message.
313
+ return true;
314
+ } else {
315
+ return false;
316
+ }
317
+ }
318
+ }
319
+
320
+ /**
321
+ * Return shipping method id Mercado Envios.
322
+ */
323
+ public function get_shipping_method_id( $site_id ) {
324
+ return $this->shipments_id[$site_id];
325
+ }
326
+
327
+ /**
328
+ * Update settings api.
329
+ */
330
+ public function update_settings_api( $status ) {
331
+ $checkout_standard = new WC_WooMercadoPago_Gateway();
332
+ $client_id = $checkout_standard->get_option( 'client_id' );
333
+ $client_secret = $checkout_standard->get_option( 'client_secret' );
334
+
335
+ if ( $client_id != '' && $client_secret != '' ) {
336
+ $this->mp = new MP(
337
+ WC_WooMercadoPago_Module::get_module_version(),
338
+ $client_id,
339
+ $client_secret
340
+ );
341
+ $email = ( wp_get_current_user()->ID != 0 ) ? wp_get_current_user()->user_email : null;
342
+ $this->mp->set_email( $email );
343
+ // Get default data.
344
+ $infra_data = WC_WooMercadoPago_Module::get_common_settings();
345
+ $infra_data['mercado_envios'] = $status;
346
+ // Request.
347
+ $response = $this->mp->analytics_save_settings( $infra_data );
348
+ $this->log->add(
349
+ $this->id,
350
+ '[update_settings_api] - analytics response: ' .
351
+ json_encode( $response, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
352
+ );
353
+ }
354
+ }
355
+
356
+ }
shipment/class-wc-mercadoenvios-package.php ADDED
@@ -0,0 +1,257 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Mercado Envios Package.
4
+ * @since 3.0.0
5
+ * @version 3.0.0
6
+ * @reference WooCommerce Correios
7
+ */
8
+
9
+ if ( ! defined( 'ABSPATH' ) ) {
10
+ exit; // Exit if accessed directly.
11
+ }
12
+
13
+ /**
14
+ * WC_Mercado_Envios_Package class.
15
+ */
16
+ class WC_MercadoEnvios_Package {
17
+
18
+ /**
19
+ * Order package.
20
+ *
21
+ * @var array
22
+ */
23
+ protected $package = array();
24
+
25
+ /**
26
+ * Sets the package.
27
+ *
28
+ * @param array $package Package to calcule.
29
+ *
30
+ * @return array
31
+ */
32
+ public function __construct( $package = array() ) {
33
+ $this->package = $package;
34
+ }
35
+
36
+ /**
37
+ * Replace comma by dot.
38
+ *
39
+ * @param mixed $value Value to fix.
40
+ *
41
+ * @return mixed
42
+ */
43
+ private function fix_format( $value ) {
44
+ $value = str_replace( ',', '.', $value );
45
+
46
+ return $value;
47
+ }
48
+
49
+ /**
50
+ * Extracts the weight and dimensions from the package.
51
+ *
52
+ * @return array
53
+ */
54
+ protected function get_package_data() {
55
+ $count = 0;
56
+ $height = array();
57
+ $width = array();
58
+ $length = array();
59
+ $weight = array();
60
+
61
+ // Shipping per item.
62
+ foreach ( $this->package['contents'] as $item_id => $values ) {
63
+ $product = $values['data'];
64
+ $qty = $values['quantity'];
65
+
66
+ if ( $qty > 0 && $product->needs_shipping() ) {
67
+
68
+ // WooCommerce 3.0 or later.
69
+ if ( method_exists( $product, 'get_height' ) ) {
70
+ $_height = wc_get_dimension( $this->fix_format( $product->get_height() ), 'cm' );
71
+ $_width = wc_get_dimension( $this->fix_format( $product->get_width() ), 'cm' );
72
+ $_length = wc_get_dimension( $this->fix_format( $product->get_length() ), 'cm' );
73
+ $_weight = wc_get_weight( $this->fix_format( $product->get_weight() ), 'kg' );
74
+ } else {
75
+ $_height = wc_get_dimension( $this->fix_format( $product->height ), 'cm' );
76
+ $_width = wc_get_dimension( $this->fix_format( $product->width ), 'cm' );
77
+ $_length = wc_get_dimension( $this->fix_format( $product->length ), 'cm' );
78
+ $_weight = wc_get_weight( $this->fix_format( $product->weight ), 'kg' );
79
+ }
80
+
81
+ $height[ $count ] = $_height;
82
+ $width[ $count ] = $_width;
83
+ $length[ $count ] = $_length;
84
+ $weight[ $count ] = $_weight;
85
+
86
+ if ( $qty > 1 ) {
87
+ $n = $count;
88
+ for ( $i = 0; $i < $qty; $i++ ) {
89
+ $height[ $n ] = $_height;
90
+ $width[ $n ] = $_width;
91
+ $length[ $n ] = $_length;
92
+ $weight[ $n ] = $_weight;
93
+ $n++;
94
+ }
95
+ $count = $n;
96
+ }
97
+
98
+ $count++;
99
+ }
100
+ }
101
+
102
+ return array(
103
+ 'height' => array_values( $height ),
104
+ 'length' => array_values( $length ),
105
+ 'width' => array_values( $width ),
106
+ 'weight' => array_sum( $weight ),
107
+ );
108
+ }
109
+
110
+ /**
111
+ * Calculates the cubage of all products.
112
+ *
113
+ * @param array $height Package height.
114
+ * @param array $width Package width.
115
+ * @param array $length Package length.
116
+ *
117
+ * @return int
118
+ */
119
+ protected function cubage_total( $height, $width, $length ) {
120
+ // Sets the cubage of all products.
121
+ $all = array();
122
+ $total = 0;
123
+ $total_items = count( $height );
124
+
125
+ for ( $i = 0; $i < $total_items; $i++ ) {
126
+ $all[ $i ] = $height[ $i ] * $width[ $i ] * $length[ $i ];
127
+ }
128
+
129
+ foreach ( $all as $value ) {
130
+ $total += $value;
131
+ }
132
+
133
+ return $total;
134
+ }
135
+
136
+ /**
137
+ * Get the max values.
138
+ *
139
+ * @param array $height Package height.
140
+ * @param array $width Package width.
141
+ * @param array $length Package length.
142
+ *
143
+ * @return array
144
+ */
145
+ protected function get_max_values( $height, $width, $length ) {
146
+ $find = array(
147
+ 'height' => max( $height ),
148
+ 'width' => max( $width ),
149
+ 'length' => max( $length ),
150
+ );
151
+
152
+ return $find;
153
+ }
154
+
155
+ /**
156
+ * Calculates the square root of the scaling of all products.
157
+ *
158
+ * @param array $height Package height.
159
+ * @param array $width Package width.
160
+ * @param array $length Package length.
161
+ * @param array $max_values Package bigger values.
162
+ *
163
+ * @return float
164
+ */
165
+ protected function calculate_root( $height, $width, $length, $max_values ) {
166
+ $cubage_total = $this->cubage_total( $height, $width, $length );
167
+ $root = 0;
168
+ $biggest = max( $max_values );
169
+
170
+ if ( 0 !== $cubage_total && 0 !== $biggest ) {
171
+ // Dividing the value of scaling of all products.
172
+ // With the measured value of greater.
173
+ $division = $cubage_total / $biggest;
174
+ // Total square root.
175
+ $root = round( sqrt( $division ), 1 );
176
+ }
177
+
178
+ return $root;
179
+ }
180
+
181
+ /**
182
+ * Sets the final cubage.
183
+ *
184
+ * @param array $height Package height.
185
+ * @param array $width Package width.
186
+ * @param array $length Package length.
187
+ *
188
+ * @return array
189
+ */
190
+ protected function get_cubage( $height, $width, $length ) {
191
+ $cubage = array();
192
+ $max_values = $this->get_max_values( $height, $width, $length );
193
+ $root = $this->calculate_root( $height, $width, $length, $max_values );
194
+ $greatest = array_search( max( $max_values ), $max_values, true );
195
+
196
+ switch ( $greatest ) {
197
+ case 'height' :
198
+ $cubage = array(
199
+ 'height' => max( $height ),
200
+ 'width' => $root,
201
+ 'length' => $root,
202
+ );
203
+ break;
204
+ case 'width' :
205
+ $cubage = array(
206
+ 'height' => $root,
207
+ 'width' => max( $width ),
208
+ 'length' => $root,
209
+ );
210
+ break;
211
+ case 'length' :
212
+ $cubage = array(
213
+ 'height' => $root,
214
+ 'width' => $root,
215
+ 'length' => max( $length ),
216
+ );
217
+ break;
218
+
219
+ default :
220
+ $cubage = array(
221
+ 'height' => 0,
222
+ 'width' => 0,
223
+ 'length' => 0,
224
+ );
225
+ break;
226
+ }
227
+
228
+ return $cubage;
229
+ }
230
+
231
+ /**
232
+ * Get the package data.
233
+ *
234
+ * @return array
235
+ */
236
+ public function get_data() {
237
+ // Get the package data.
238
+ $data = apply_filters( 'woocommerce_mercado_envios_default_package', $this->get_package_data() );
239
+
240
+ if ( ! empty( $data['height'] ) && ! empty( $data['width'] ) && ! empty( $data['length'] ) ) {
241
+ $cubage = $this->get_cubage( $data['height'], $data['width'], $data['length'] );
242
+ } else {
243
+ $cubage = array(
244
+ 'height' => 0,
245
+ 'width' => 0,
246
+ 'length' => 0,
247
+ );
248
+ }
249
+
250
+ return array(
251
+ 'height' => apply_filters( 'woocommerce_mercado_envios_package_height', $cubage['height'] ),
252
+ 'width' => apply_filters( 'woocommerce_mercado_envios_package_width', $cubage['width'] ),
253
+ 'length' => apply_filters( 'woocommerce_mercado_envios_package_length', $cubage['length'] ),
254
+ 'weight' => apply_filters( 'woocommerce_mercado_envios_package_weight', $data['weight'] ),
255
+ );
256
+ }
257
+ }
shipment/class-wc-mercadoenvios-shipping-express.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ /**
8
+ * Mercado Envios Shipping Method for Mercado Pago.
9
+ *
10
+ * A simple shipping method allowing free pickup as a shipping method for Mercado Pago.
11
+ *
12
+ * @class WC_MercadoPago_Shipping_MercadoEnvios
13
+ * @version 2.2.0
14
+ * @package WooCommerce/Classes/Shipping
15
+ * @author Mercado Pago
16
+ */
17
+
18
+ class WC_MercadoEnvios_Shipping_Express extends WC_MercadoEnvios_Shipping {
19
+
20
+ protected $shipments_id = array(
21
+ 'MLA' => 73330,
22
+ 'MLB' => 182,
23
+ 'MLM' => 501345
24
+ );
25
+
26
+ /**
27
+ * Constructor.
28
+ */
29
+ public function __construct( $instance_id = 0 ) {
30
+ $this->id = 'mercadoenvios-express';
31
+ $this->method_title = __( 'Mercado Envios - Express', 'woocommerce-mercadopago-module' );
32
+ parent::__construct( $instance_id );
33
+ }
34
+
35
+ }
shipment/class-wc-mercadoenvios-shipping-normal.php ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ if ( ! defined( 'ABSPATH' ) ) {
4
+ exit;
5
+ }
6
+
7
+ /**
8
+ * Mercado Envios Shipping Method for Mercado Pago.
9
+ *
10
+ * A simple shipping method allowing free pickup as a shipping method for Mercado Pago.
11
+ *
12
+ * @class WC_MercadoPago_Shipping_MercadoEnvios
13
+ * @version 2.2.0
14
+ * @package WooCommerce/Classes/Shipping
15
+ * @author Mercado Pago
16
+ */
17
+
18
+ class WC_MercadoEnvios_Shipping_Normal extends WC_MercadoEnvios_Shipping {
19
+
20
+ protected $shipments_id = array(
21
+ 'MLA' => 73328,
22
+ 'MLB' => 100009,
23
+ 'MLM' => 501245
24
+ );
25
+
26
+ /**
27
+ * Constructor.
28
+ */
29
+ public function __construct( $instance_id = 0 ) {
30
+ $this->id = 'mercadoenvios-normal';
31
+ $this->method_title = __( 'Mercado Envios - Normal', 'woocommerce-mercadopago-module' );
32
+ parent::__construct( $instance_id );
33
+ }
34
+
35
+ }
templates/credit-card/payment-form.php ADDED
@@ -0,0 +1,1378 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Part of Woo Mercado Pago Module
5
+ * Author - Mercado Pago
6
+ * Developer - Marcelo Tomio Hama / marcelo.hama@mercadolivre.com
7
+ * Copyright - Copyright(c) MercadoPago [https://www.mercadopago.com]
8
+ * License - https://www.gnu.org/licenses/gpl.html GPL version 2 or higher
9
+ */
10
+
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
+ ?>
16
+
17
+ <div width="100%" style="margin:1px; padding:36px 36px 16px 36px; background:white;">
18
+ <img class="logo" src="<?php echo ($images_path . 'mplogo.png'); ?>" width="156" height="40"/>
19
+ <?php if ( ! empty( $banner_path ) ) : ?>
20
+ <img class="mp-creditcard-banner" src="<?php echo $banner_path;?>" width="312" height="40"/>
21
+ <?php endif; ?>
22
+ </div>
23
+ <fieldset style="background:white;">
24
+
25
+ <div class="mp-box-inputs mp-line" id="mercadopago-form-coupon"
26
+ style="padding:0px 12px 16px 12px;">
27
+ <label for="couponCodeLabel">
28
+ <?php echo $form_labels['form']['coupon_of_discounts']; ?>
29
+ </label>
30
+ <div class="mp-box-inputs mp-col-65">
31
+ <input type="text" id="couponCode" name="mercadopago_custom[coupon_code]"
32
+ autocomplete="off" maxlength="24"/>
33
+ </div>
34
+ <div class="mp-box-inputs mp-col-10">
35
+ <div id="mp-separete-date"></div>
36
+ </div>
37
+ <div class="mp-box-inputs mp-col-25">
38
+ <input type="button" class="button" id="applyCoupon"
39
+ value="<?php echo $form_labels['form']['apply']; ?>">
40
+ </div>
41
+ <div class="mp-box-inputs mp-col-100 mp-box-message">
42
+ <span class="mp-discount" id="mpCouponApplyed" ></span>
43
+ <span class="mp-error" id="mpCouponError" ></span>
44
+ </div>
45
+ </div>
46
+
47
+ <!-- payment method -->
48
+ <div id="mercadopago-form-customer-and-card" style="padding:0px 12px 0px 12px;">
49
+ <div class="mp-box-inputs mp-line">
50
+ <label for="paymentMethodIdSelector">
51
+ <?php echo $form_labels['form']['payment_method']; ?> <em>*</em>
52
+ </label>
53
+ <select id="paymentMethodSelector" name="mercadopago_custom[paymentMethodSelector]"
54
+ data-checkout="cardId">
55
+ <optgroup label=<?php echo $form_labels['form']['your_card']; ?>
56
+ id="payment-methods-for-customer-and-cards">
57
+ <?php foreach ($customer_cards as $card) : ?>
58
+ <option value=<?php echo $card['id']; ?>
59
+ first_six_digits=<?php echo $card['first_six_digits']; ?>
60
+ last_four_digits=<?php echo $card['last_four_digits']; ?>
61
+ security_code_length=<?php echo $card['security_code']['length']; ?>
62
+ type_checkout='customer_and_card'
63
+ payment_method_id=<?php echo $card['payment_method']['id']; ?>>
64
+ <?php echo ucfirst($card['payment_method']['name']); ?>
65
+ <?php echo $form_labels['form']['ended_in']; ?>
66
+ <?php echo $card['last_four_digits']; ?>
67
+ </option>
68
+ <?php endforeach; ?>
69
+ </optgroup>
70
+ <optgroup label="<?php echo $form_labels['form']['other_cards']; ?>"
71
+ id="payment-methods-list-other-cards">
72
+ <option value="-1"><?php echo $form_labels['form']['other_card']; ?></option>
73
+ </optgroup>
74
+ </select>
75
+ </div>
76
+ <div class="mp-box-inputs mp-line" id="mp-securityCode-customer-and-card">
77
+ <div class="mp-box-inputs mp-col-45">
78
+ <label for="customer-and-card-securityCode">
79
+ <?php echo $form_labels['form']['security_code']; ?> <em>*</em>
80
+ </label>
81
+ <input type="text" id="customer-and-card-securityCode" data-checkout="securityCode"
82
+ autocomplete="off" maxlength="4" style="padding: 8px;
83
+ background: url(<?php echo ($images_path . 'cvv.png'); ?>) 98% 50% no-repeat;"/>
84
+ <span class="mp-error" id="mp-error-224" data-main="#customer-and-card-securityCode">
85
+ <?php echo $form_labels['error']['224']; ?>
86
+ </span>
87
+ <span class="mp-error" id="mp-error-E302" data-main="#customer-and-card-securityCode">
88
+ <?php echo $form_labels['error']['E302']; ?>
89
+ </span>
90
+ <span class="mp-error" id="mp-error-E203" data-main="#customer-and-card-securityCode">
91
+ <?php echo $form_labels['error']['E203']; ?>
92
+ </span>
93
+ </div>
94
+ </div>
95
+ </div> <!-- end mercadopago-form-osc -->
96
+
97
+ <div id="mercadopago-form" style="padding:0px 12px 0px 12px;">
98
+ <!-- Card Number -->
99
+ <div class="mp-box-inputs mp-col-100">
100
+ <label for="cardNumber">
101
+ <?php echo $form_labels['form']['credit_card_number']; ?> <em>*</em>
102
+ </label>
103
+ <input type="text" id="cardNumber" data-checkout="cardNumber" autocomplete="off"
104
+ maxlength="19"/>
105
+ <span class="mp-error" id="mp-error-205" data-main="#cardNumber">
106
+ <?php echo $form_labels['error']['205']; ?>
107
+ </span>
108
+ <span class="mp-error" id="mp-error-E301" data-main="#cardNumber">
109
+ <?php echo $form_labels['error']['E301']; ?>
110
+ </span>
111
+ </div>
112
+ <!-- Expiry Date -->
113
+ <div class="mp-box-inputs mp-line">
114
+ <div class="mp-box-inputs mp-col-45">
115
+ <label for="cardExpirationMonth">
116
+ <?php echo $form_labels['form']['expiration_month']; ?> <em>*</em>
117
+ </label>
118
+ <select id="cardExpirationMonth" data-checkout="cardExpirationMonth"
119
+ name="mercadopago_custom[cardExpirationMonth]">
120
+ <option value="-1"> <?php echo $form_labels['form']['month']; ?> </option>
121
+ <?php for ($x=1; $x<=12; $x++) : ?>
122
+ <option value="<?php echo $x; ?>"> <?php echo $x; ?></option>
123
+ <?php endfor; ?>
124
+ </select>
125
+ </div>
126
+ <div class="mp-box-inputs mp-col-10">
127
+ <div id="mp-separete-date"> / </div>
128
+ </div>
129
+ <div class="mp-box-inputs mp-col-45">
130
+ <label for="cardExpirationYear">
131
+ <?php echo $form_labels['form']['expiration_year']; ?> <em>*</em>
132
+ </label>
133
+ <select id="cardExpirationYear" data-checkout="cardExpirationYear"
134
+ name="mercadopago_custom[cardExpirationYear]">
135
+ <option value="-1"> <?php echo $form_labels['form']['year']; ?> </option>
136
+ <?php for ($x=date("Y"); $x<= date("Y") + 10; $x++) : ?>
137
+ <option value="<?php echo $x; ?>"> <?php echo $x; ?> </option>
138
+ <?php endfor; ?>
139
+ </select>
140
+ </div>
141
+ <span class="mp-error" id="mp-error-208" data-main="#cardExpirationMonth">
142
+ <?php echo $form_labels['error']['208']; ?>
143
+ </span>
144
+ <span class="mp-error" id="mp-error-209" data-main="#cardExpirationYear"> </span>
145
+ <span class="mp-error" id="mp-error-325" data-main="#cardExpirationMonth">
146
+ <?php echo $form_labels['error']['325']; ?>
147
+ </span>
148
+ <span class="mp-error" id="mp-error-326" data-main="#cardExpirationYear"> </span>
149
+ </div>
150
+ <!-- Card Holder Name -->
151
+ <div class="mp-box-inputs mp-col-100">
152
+ <label for="cardholderName">
153
+ <?php echo $form_labels['form']['card_holder_name']; ?> <em>*</em>
154
+ </label>
155
+ <input type="text" id="cardholderName" name="mercadopago_custom[cardholderName]"
156
+ data-checkout="cardholderName" autocomplete="off" />
157
+ <span class="mp-error" id="mp-error-221" data-main="#cardholderName">
158
+ <?php echo $form_labels['error']['221']; ?>
159
+ </span>
160
+ <span class="mp-error" id="mp-error-316" data-main="#cardholderName">
161
+ <?php echo $form_labels['error']['316']; ?>
162
+ </span>
163
+ </div>
164
+ <!-- CVV -->
165
+ <div class="mp-box-inputs mp-line">
166
+ <div class="mp-box-inputs mp-col-45">
167
+ <label for="securityCode">
168
+ <?php echo $form_labels['form']['security_code']; ?> <em>*</em>
169
+ </label>
170
+ <input type="text" id="securityCode" data-checkout="securityCode"
171
+ autocomplete="off" maxlength="4" style="padding: 8px;
172
+ background: url(<?php echo ($images_path . 'cvv.png'); ?>) 98% 50% no-repeat;" />
173
+ <span class="mp-error" id="mp-error-224" data-main="#securityCode">
174
+ <?php echo $form_labels['error']['224']; ?>
175
+ </span>
176
+ <span class="mp-error" id="mp-error-E302" data-main="#securityCode">
177
+ <?php echo $form_labels['error']['E302']; ?>
178
+ </span>
179
+ </div>
180
+ </div>
181
+ <!-- Document Type -->
182
+ <div class="mp-box-inputs mp-col-100 mp-doc">
183
+ <div class="mp-box-inputs mp-col-35 mp-docType">
184
+ <label for="docType">
185
+ <?php echo $form_labels['form']['document_type']; ?> <em>*</em>
186
+ </label>
187
+ <select id="docType" data-checkout="docType"
188
+ name="mercadopago_custom[docType]"></select>
189
+ <span class="mp-error" id="mp-error-212" data-main="#docType">
190
+ <?php echo $form_labels['error']['212']; ?>
191
+ </span>
192
+ <span class="mp-error" id="mp-error-322" data-main="#docType">
193
+ <?php echo $form_labels['error']['322']; ?>
194
+ </span>
195
+ </div>
196
+ <div class="mp-box-inputs mp-col-65 mp-docNumber">
197
+ <label for="docNumber">
198
+ <?php echo $form_labels['form']['document_number']; ?> <em>*</em>
199
+ </label>
200
+ <input type="text" id="docNumber" data-checkout="docNumber"
201
+ name="mercadopago_custom[docNumber]" autocomplete="off" />
202
+ <span class="mp-error" id="mp-error-214" data-main="#docNumber">
203
+ <?php echo $form_labels['error']['214']; ?>
204
+ </span>
205
+ <span class="mp-error" id="mp-error-324" data-main="#docNumber">
206
+ <?php echo $form_labels['error']['324']; ?>
207
+ </span>
208
+ </div>
209
+ </div>
210
+ <!-- Issuer -->
211
+ <div class="mp-box-inputs mp-col-100 mp-issuer">
212
+ <label for="issuer">
213
+ <?php echo $form_labels['form']['issuer']; ?> <em>*</em>
214
+ </label>
215
+ <select id="issuer" data-checkout="issuer" name="mercadopago_custom[issuer]"></select>
216
+ <span class="mp-error" id="mp-error-220" data-main="#issuer">
217
+ <?php echo $form_labels['error']['220']; ?>
218
+ </span>
219
+ </div>
220
+ </div> <!-- end #mercadopago-form -->
221
+
222
+ <div id="mp-box-installments" class="mp-box-inputs mp-line">
223
+ <div class="form-row" >
224
+ <div id="mp-box-installments-selector" class="form-col-8" style="padding:0px 12px 0px 12px;">
225
+ <label for="installments">
226
+ <?php echo $form_labels['form']['installments']; ?>
227
+ <?php if ($is_currency_conversion > 0) :
228
+ echo "(" . $form_labels['form']['payment_converted'] . " " .
229
+ $woocommerce_currency . " " . $form_labels['form']['to'] . " " .
230
+ $account_currency . ")";
231
+ endif; ?> <em>*</em>
232
+ </label>
233
+ <select id="installments" data-checkout="installments" class="form-control-mine"
234
+ name="mercadopago_custom[installments]" style="width: 100%;"></select>
235
+ </div>
236
+ <div id="mp-box-input-tax-cft" class="form-col-4" style="padding:0px 12px 0px 12px;">
237
+ <div id="mp-box-input-tax-tea"><div id="mp-tax-tea-text"></div></div>
238
+ <div id="mp-tax-cft-text"></div>
239
+ </div>
240
+ </div>
241
+ </div>
242
+
243
+ <div class="mp-box-inputs mp-line" style="padding:0px 12px 0px 12px;">
244
+ <!-- NOT DELETE LOADING-->
245
+ <div class="mp-box-inputs mp-col-25">
246
+ <div id="mp-box-loading"></div>
247
+ </div>
248
+ </div>
249
+
250
+ <div class="mp-box-inputs mp-col-100" id="mercadopago-utilities"
251
+ style="padding:0px 12px 0px 12px;">
252
+ <input type="hidden" id="site_id" value='<?php echo $site_id; ?>' name="mercadopago_custom[site_id]"/>
253
+ <input type="hidden" id="amount" value='<?php echo $amount; ?>' name="mercadopago_custom[amount]"/>
254
+ <input type="hidden" id="campaign_id" name="mercadopago_custom[campaign_id]"/>
255
+ <input type="hidden" id="campaign" name="mercadopago_custom[campaign]"/>
256
+ <input type="hidden" id="discount" name="mercadopago_custom[discount]"/>
257
+ <input type="hidden" id="paymentMethodId" name="mercadopago_custom[paymentMethodId]"/>
258
+ <input type="hidden" id="token" name="mercadopago_custom[token]"/>
259
+ <input type="hidden" id="cardTruncated" name="mercadopago_custom[cardTruncated]"/>
260
+ <input type="hidden" id="CustomerAndCard" name="mercadopago_custom[CustomerAndCard]"/>
261
+ <input type="hidden" id="CustomerId" value='<?php echo $customerId; ?>' name="mercadopago_custom[CustomerId]"/>
262
+ </div>
263
+
264
+ </fieldset>
265
+
266
+ <script type="text/javascript">
267
+
268
+ ( function() {
269
+
270
+ var MPv1 = {
271
+ debug: true,
272
+ add_truncated_card: true,
273
+ site_id: "",
274
+ public_key: "",
275
+ coupon_of_discounts: {
276
+ discount_action_url: "",
277
+ payer_email: "",
278
+ default: true,
279
+ status: false
280
+ },
281
+ customer_and_card: {
282
+ default: true,
283
+ status: true
284
+ },
285
+ create_token_on: {
286
+ event: true, //if true create token on event, if false create on click and ignore others
287
+ keyup: false,
288
+ paste: true
289
+ },
290
+ inputs_to_create_discount: [
291
+ "couponCode",
292
+ "applyCoupon"
293
+ ],
294
+ inputs_to_create_token: [
295
+ "cardNumber",
296
+ "cardExpirationMonth",
297
+ "cardExpirationYear",
298
+ "cardholderName",
299
+ "securityCode",
300
+ "docType",
301
+ "docNumber"
302
+ ],
303
+ inputs_to_create_token_customer_and_card: [
304
+ "paymentMethodSelector",
305
+ "securityCode"
306
+ ],
307
+ selectors: {
308
+ // coupom
309
+ couponCode: "#couponCode",
310
+ applyCoupon: "#applyCoupon",
311
+ mpCouponApplyed: "#mpCouponApplyed",
312
+ mpCouponError: "#mpCouponError",
313
+ campaign_id: "#campaign_id",
314
+ campaign: "#campaign",
315
+ discount: "#discount",
316
+ // customer cards
317
+ paymentMethodSelector: "#paymentMethodSelector",
318
+ pmCustomerAndCards: "#payment-methods-for-customer-and-cards",
319
+ pmListOtherCards: "#payment-methods-list-other-cards",
320
+ // card data
321
+ mpSecurityCodeCustomerAndCard: "#mp-securityCode-customer-and-card",
322
+ cardNumber: "#cardNumber",
323
+ cardExpirationMonth: "#cardExpirationMonth",
324
+ cardExpirationYear: "#cardExpirationYear",
325
+ cardholderName: "#cardholderName",
326
+ securityCode: "#securityCode",
327
+ docType: "#docType",
328
+ docNumber: "#docNumber",
329
+ issuer: "#issuer",
330
+ installments: "#installments",
331
+ // document
332
+ mpDoc: ".mp-doc",
333
+ mpIssuer: ".mp-issuer",
334
+ mpDocType: ".mp-docType",
335
+ mpDocNumber: ".mp-docNumber",
336
+ // payment method and checkout
337
+ paymentMethodId: "#paymentMethodId",
338
+ amount: "#amount",
339
+ token: "#token",
340
+ cardTruncated: "#cardTruncated",
341
+ site_id: "#site_id",
342
+ CustomerAndCard: '#CustomerAndCard',
343
+ box_loading: "#mp-box-loading",
344
+ submit: "#submit",
345
+ // tax resolution AG 51/2017
346
+ boxInstallments: '#mp-box-installments',
347
+ boxInstallmentsSelector: '#mp-box-installments-selector',
348
+ taxCFT: '#mp-box-input-tax-cft',
349
+ taxTEA: '#mp-box-input-tax-tea',
350
+ taxTextCFT: '#mp-tax-cft-text',
351
+ taxTextTEA: '#mp-tax-tea-text',
352
+ // form
353
+ form: '#mercadopago-form',
354
+ formCoupon: '#mercadopago-form-coupon',
355
+ formCustomerAndCard: '#mercadopago-form-customer-and-card',
356
+ utilities_fields: "#mercadopago-utilities"
357
+ },
358
+ text: {
359
+ choose: "Choose",
360
+ other_bank: "Other Bank",
361
+ discount_info1: "You will save",
362
+ discount_info2: "with discount from",
363
+ discount_info3: "Total of your purchase:",
364
+ discount_info4: "Total of your purchase with discount:",
365
+ discount_info5: "*Uppon payment approval",
366
+ discount_info6: "Terms and Conditions of Use",
367
+ coupon_empty: "Please, inform your coupon code",
368
+ apply: "Apply",
369
+ remove: "Remove"
370
+ },
371
+ paths: {
372
+ loading: "images/loading.gif",
373
+ check: "images/check.png",
374
+ error: "images/error.png"
375
+ }
376
+ }
377
+
378
+ // === Coupon of Discounts
379
+
380
+ MPv1.currencyIdToCurrency = function ( currency_id ) {
381
+ if ( currency_id == "ARS" ) {
382
+ return "$";
383
+ } else if ( currency_id == "BRL" ) {
384
+ return "R$";
385
+ } else if ( currency_id == "COP" ) {
386
+ return "$";
387
+ } else if ( currency_id == "CLP" ) {
388
+ return "$";
389
+ } else if ( currency_id == "MXN" ) {
390
+ return "$";
391
+ } else if ( currency_id == "VEF" ) {
392
+ return "Bs";
393
+ } else if ( currency_id == "PEN" ) {
394
+ return "S/";
395
+ } else if ( currency_id == "UYU" ) {
396
+ return "$U";
397
+ } else {
398
+ return "$";
399
+ }
400
+ }
401
+
402
+ MPv1.checkCouponEligibility = function () {
403
+ if ( document.querySelector( MPv1.selectors.couponCode).value == "" ) {
404
+ // Coupon code is empty.
405
+ document.querySelector( MPv1.selectors.mpCouponApplyed ).style.display = "none";
406
+ document.querySelector( MPv1.selectors.mpCouponError ).style.display = "block";
407
+ document.querySelector( MPv1.selectors.mpCouponError ).innerHTML = MPv1.text.coupon_empty;
408
+ MPv1.coupon_of_discounts.status = false;
409
+ document.querySelector( MPv1.selectors.couponCode ).style.background = null;
410
+ document.querySelector( MPv1.selectors.applyCoupon ).value = MPv1.text.apply;
411
+ document.querySelector( MPv1.selectors.discount ).value = 0;
412
+ MPv1.cardsHandler();
413
+ } else if ( MPv1.coupon_of_discounts.status ) {
414
+ // We already have a coupon set, so we remove it.
415
+ document.querySelector( MPv1.selectors.mpCouponApplyed ).style.display = "none";
416
+ document.querySelector( MPv1.selectors.mpCouponError ).style.display = "none";
417
+ MPv1.coupon_of_discounts.status = false;
418
+ document.querySelector( MPv1.selectors.applyCoupon ).style.background = null;
419
+ document.querySelector( MPv1.selectors.applyCoupon ).value = MPv1.text.apply;
420
+ document.querySelector( MPv1.selectors.couponCode ).value = "";
421
+ document.querySelector( MPv1.selectors.couponCode ).style.background = null;
422
+ document.querySelector( MPv1.selectors.discount ).value = 0;
423
+ MPv1.cardsHandler();
424
+ } else {
425
+ // Set loading.
426
+ document.querySelector( MPv1.selectors.mpCouponApplyed ).style.display = "none";
427
+ document.querySelector( MPv1.selectors.mpCouponError ).style.display = "none";
428
+ document.querySelector( MPv1.selectors.couponCode ).style.background = "url(" + MPv1.paths.loading + ") 98% 50% no-repeat #fff";
429
+ document.querySelector( MPv1.selectors.applyCoupon ).disabled = true;
430
+
431
+ // Check if there are params in the url.
432
+ var url = MPv1.coupon_of_discounts.discount_action_url;
433
+ var sp = "?";
434
+ if ( url.indexOf( "?" ) >= 0 ) {
435
+ sp = "&";
436
+ }
437
+ url += sp + "site_id=" + MPv1.site_id;
438
+ url += "&coupon_id=" + document.querySelector( MPv1.selectors.couponCode ).value;
439
+ url += "&amount=" + document.querySelector( MPv1.selectors.amount ).value;
440
+ url += "&payer=" + MPv1.coupon_of_discounts.payer_email;
441
+ //url += "&payer=" + document.getElementById( "billing_email" ).value;
442
+
443
+ MPv1.AJAX({
444
+ url: url,
445
+ method : "GET",
446
+ timeout : 5000,
447
+ error: function() {
448
+ // Request failed.
449
+ document.querySelector( MPv1.selectors.mpCouponApplyed ).style.display = "none";
450
+ document.querySelector( MPv1.selectors.mpCouponError ).style.display = "none";
451
+ MPv1.coupon_of_discounts.status = false;
452
+ document.querySelector( MPv1.selectors.applyCoupon ).style.background = null;
453
+ document.querySelector( MPv1.selectors.applyCoupon ).value = MPv1.text.apply;
454
+ document.querySelector( MPv1.selectors.couponCode ).value = "";
455
+ document.querySelector( MPv1.selectors.couponCode ).style.background = null;
456
+ document.querySelector( MPv1.selectors.discount ).value = 0;
457
+ MPv1.cardsHandler();
458
+ },
459
+ success : function ( status, response ) {
460
+ if ( response.status == 200 ) {
461
+ document.querySelector( MPv1.selectors.mpCouponApplyed ).style.display =
462
+ "block";
463
+ document.querySelector( MPv1.selectors.discount ).value =
464
+ response.response.coupon_amount;
465
+ document.querySelector( MPv1.selectors.mpCouponApplyed ).innerHTML =
466
+ //"<div style='border-style: solid; border-width:thin; " +
467
+ //"border-color: #009EE3; padding: 8px 8px 8px 8px; margin-top: 4px;'>" +
468
+ MPv1.text.discount_info1 + " <strong>" +
469
+ MPv1.currencyIdToCurrency( response.response.currency_id ) + " " +
470
+ Math.round( response.response.coupon_amount * 100 ) / 100 +
471
+ "</strong> " + MPv1.text.discount_info2 + " " +
472
+ response.response.name + ".<br>" + MPv1.text.discount_info3 + " <strong>" +
473
+ MPv1.currencyIdToCurrency( response.response.currency_id ) + " " +
474
+ Math.round( MPv1.getAmountWithoutDiscount() * 100 ) / 100 +
475
+ "</strong><br>" + MPv1.text.discount_info4 + " <strong>" +
476
+ MPv1.currencyIdToCurrency( response.response.currency_id ) + " " +
477
+ Math.round( MPv1.getAmount() * 100 ) / 100 + "*</strong><br>" +
478
+ "<i>" + MPv1.text.discount_info5 + "</i><br>" +
479
+ "<a href='https://api.mercadolibre.com/campaigns/" +
480
+ response.response.id +
481
+ "/terms_and_conditions?format_type=html' target='_blank'>" +
482
+ MPv1.text.discount_info6 + "</a>";
483
+ document.querySelector( MPv1.selectors.mpCouponError ).style.display =
484
+ "none";
485
+ MPv1.coupon_of_discounts.status = true;
486
+ document.querySelector( MPv1.selectors.couponCode ).style.background =
487
+ null;
488
+ document.querySelector( MPv1.selectors.couponCode ).style.background =
489
+ "url(" + MPv1.paths.check + ") 98% 50% no-repeat #fff";
490
+ document.querySelector( MPv1.selectors.applyCoupon ).value =
491
+ MPv1.text.remove;
492
+ MPv1.cardsHandler();
493
+ document.querySelector( MPv1.selectors.campaign_id ).value =
494
+ response.response.id;
495
+ document.querySelector( MPv1.selectors.campaign ).value =
496
+ response.response.name;
497
+ } else if ( response.status == 400 || response.status == 404 ) {
498
+ document.querySelector( MPv1.selectors.mpCouponApplyed ).style.display = "none";
499
+ document.querySelector( MPv1.selectors.mpCouponError ).style.display = "block";
500
+ document.querySelector( MPv1.selectors.mpCouponError ).innerHTML = response.response.message;
501
+ MPv1.coupon_of_discounts.status = false;
502
+ document.querySelector( MPv1.selectors.couponCode ).style.background = null;
503
+ document.querySelector( MPv1.selectors.couponCode ).style.background = "url(" + MPv1.paths.error + ") 98% 50% no-repeat #fff";
504
+ document.querySelector( MPv1.selectors.applyCoupon ).value = MPv1.text.apply;
505
+ document.querySelector( MPv1.selectors.discount ).value = 0;
506
+ MPv1.cardsHandler();
507
+ }
508
+ document.querySelector( MPv1.selectors.applyCoupon ).disabled = false;
509
+ }
510
+ });
511
+ }
512
+ }
513
+
514
+ MPv1.getBin = function() {
515
+
516
+ var cardSelector = document.querySelector( MPv1.selectors.paymentMethodSelector );
517
+
518
+ if (cardSelector && cardSelector[cardSelector.options.selectedIndex].value != "-1") {
519
+ return cardSelector[cardSelector.options.selectedIndex]
520
+ .getAttribute( "first_six_digits" );
521
+ }
522
+
523
+ var ccNumber = document.querySelector( MPv1.selectors.cardNumber );
524
+ return ccNumber.value.replace( /[ .-]/g, "" ).slice( 0, 6 );
525
+
526
+ }
527
+
528
+ MPv1.clearOptions = function() {
529
+
530
+ var bin = MPv1.getBin();
531
+
532
+ if ( bin.length == 0 ) {
533
+
534
+ MPv1.hideIssuer();
535
+
536
+ var selectorInstallments = document.querySelector( MPv1.selectors.installments ),
537
+ fragment = document.createDocumentFragment(),
538
+ option = new Option( MPv1.text.choose + "...", "-1" );
539
+
540
+ selectorInstallments.options.length = 0;
541
+ fragment.appendChild( option );
542
+ selectorInstallments.appendChild( fragment );
543
+ selectorInstallments.setAttribute( "disabled", "disabled" );
544
+
545
+ }
546
+
547
+ }
548
+
549
+ MPv1.guessingPaymentMethod = function( event ) {
550
+
551
+ var bin = MPv1.getBin();
552
+ var amount = MPv1.getAmount();
553
+
554
+ if ( event.type == "keyup" ) {
555
+ if ( bin != null && bin.length == 6 ) {
556
+ Mercadopago.getPaymentMethod( {
557
+ "bin": bin
558
+ }, MPv1.setPaymentMethodInfo );
559
+ }
560
+ } else {
561
+ setTimeout( function() {
562
+ if ( bin.length >= 6 ) {
563
+ Mercadopago.getPaymentMethod( {
564
+ "bin": bin
565
+ }, MPv1.setPaymentMethodInfo );
566
+ }
567
+ }, 100 );
568
+ }
569
+
570
+ };
571
+
572
+ MPv1.setPaymentMethodInfo = function( status, response ) {
573
+
574
+ if ( status == 200 ) {
575
+
576
+ if ( MPv1.site_id != "MLM" ) {
577
+ // Guessing...
578
+ document.querySelector( MPv1.selectors.paymentMethodId ).value = response[0].id;
579
+ if ( MPv1.customer_and_card.status ) {
580
+ document.querySelector( MPv1.selectors.paymentMethodSelector )
581
+ .style.background = "url(" + response[0].secure_thumbnail + ") 95% 50% no-repeat #fff";
582
+ } else {
583
+ document.querySelector( MPv1.selectors.cardNumber ).style.background = "url(" +
584
+ response[0].secure_thumbnail + ") 98% 50% no-repeat #fff";
585
+ }
586
+ }
587
+
588
+ // Check if the security code (ex: Tarshop) is required.
589
+ var cardConfiguration = response[0].settings;
590
+ var bin = MPv1.getBin();
591
+ var amount = MPv1.getAmount();
592
+
593
+ Mercadopago.getInstallments(
594
+ { "bin": bin, "amount": amount },
595
+ MPv1.setInstallmentInfo
596
+ );
597
+
598
+ // Check if the issuer is necessary to pay.
599
+ var issuerMandatory = false, additionalInfo = response[0].additional_info_needed;
600
+
601
+ for ( var i=0; i<additionalInfo.length; i++ ) {
602
+ if ( additionalInfo[i] == "issuer_id" ) {
603
+ issuerMandatory = true;
604
+ }
605
+ };
606
+
607
+ if ( issuerMandatory && MPv1.site_id != "MLM" ) {
608
+ var payment_method_id = response[0].id;
609
+ MPv1.getIssuersPaymentMethod( payment_method_id );
610
+ } else {
611
+ MPv1.hideIssuer();
612
+ }
613
+
614
+ }
615
+
616
+ }
617
+
618
+ MPv1.changePaymetMethodSelector = function() {
619
+ var payment_method_id =
620
+ document.querySelector( MPv1.selectors.paymentMethodSelector ).value;
621
+ MPv1.getIssuersPaymentMethod( payment_method_id );
622
+ }
623
+
624
+ // === Issuers
625
+
626
+ MPv1.getIssuersPaymentMethod = function( payment_method_id ) {
627
+
628
+ var amount = MPv1.getAmount();
629
+
630
+ // flow: MLM mercadopagocard
631
+ if ( payment_method_id == "mercadopagocard" ) {
632
+ Mercadopago.getInstallments(
633
+ { "payment_method_id": payment_method_id, "amount": amount },
634
+ MPv1.setInstallmentInfo
635
+ );
636
+ }
637
+
638
+ Mercadopago.getIssuers( payment_method_id, MPv1.showCardIssuers );
639
+ MPv1.addListenerEvent(
640
+ document.querySelector( MPv1.selectors.issuer ),
641
+ "change",
642
+ MPv1.setInstallmentsByIssuerId
643
+ );
644
+
645
+ }
646
+
647
+ MPv1.showCardIssuers = function( status, issuers ) {
648
+
649
+ // If the API does not return any bank.
650
+ if ( issuers.length > 0 ) {
651
+ var issuersSelector = document.querySelector( MPv1.selectors.issuer );
652
+ var fragment = document.createDocumentFragment();
653
+
654
+ issuersSelector.options.length = 0;
655
+ var option = new Option( MPv1.text.choose + "...", "-1" );
656
+ fragment.appendChild( option );
657
+
658
+ for ( var i=0; i<issuers.length; i++ ) {
659
+ if ( issuers[i].name != "default" ) {
660
+ option = new Option( issuers[i].name, issuers[i].id );
661
+ } else {
662
+ option = new Option( "Otro", issuers[i].id );
663
+ }
664
+ fragment.appendChild( option );
665
+ }
666
+
667
+ issuersSelector.appendChild( fragment );
668
+ issuersSelector.removeAttribute( "disabled" );
669
+ } else {
670
+ MPv1.hideIssuer();
671
+ }
672
+
673
+ }
674
+
675
+ MPv1.setInstallmentsByIssuerId = function( status, response ) {
676
+
677
+ var issuerId = document.querySelector( MPv1.selectors.issuer ).value;
678
+ var amount = MPv1.getAmount();
679
+
680
+ if ( issuerId === "-1" ) {
681
+ return;
682
+ }
683
+
684
+ var params_installments = {
685
+ "bin": MPv1.getBin(),
686
+ "amount": amount,
687
+ "issuer_id": issuerId
688
+ }
689
+
690
+ if ( MPv1.site_id == "MLM" ) {
691
+ params_installments = {
692
+ "payment_method_id": document.querySelector(
693
+ MPv1.selectors.paymentMethodSelector
694
+ ).value,
695
+ "amount": amount,
696
+ "issuer_id": issuerId
697
+ }
698
+ }
699
+ Mercadopago.getInstallments( params_installments, MPv1.setInstallmentInfo );
700
+
701
+ }
702
+
703
+ MPv1.hideIssuer = function() {
704
+ var $issuer = document.querySelector( MPv1.selectors.issuer );
705
+ var opt = document.createElement( "option" );
706
+ opt.value = "-1";
707
+ opt.innerHTML = MPv1.text.other_bank;
708
+
709
+ $issuer.innerHTML = "";
710
+ $issuer.appendChild( opt );
711
+ $issuer.setAttribute( "disabled", "disabled" );
712
+ }
713
+
714
+ // === Installments
715
+
716
+ MPv1.setInstallmentInfo = function( status, response ) {
717
+
718
+ var selectorInstallments = document.querySelector( MPv1.selectors.installments );
719
+
720
+ if ( response.length > 0 ) {
721
+
722
+ var html_option = "<option value='-1'>" + MPv1.text.choose + "...</option>";
723
+ payerCosts = response[0].payer_costs;
724
+
725
+ // fragment.appendChild(option);
726
+ for ( var i=0; i<payerCosts.length; i++) {
727
+ /*html_option += "<option value='" + payerCosts[i].installments + "'>" +
728
+ ( payerCosts[i].recommended_message || payerCosts[i].installments ) +
729
+ "</option>";*/
730
+ // Resolution 51/2017
731
+ var dataInput = "";
732
+ if ( MPv1.site_id == "MLA" ) {
733
+ var tax = payerCosts[i].labels;
734
+ if ( tax.length > 0 ) {
735
+ for ( var l=0; l<tax.length; l++ ) {
736
+ if ( tax[l].indexOf( "CFT_" ) !== -1 ) {
737
+ dataInput = "data-tax='" + tax[l] + "'";
738
+ }
739
+ }
740
+ }
741
+ }
742
+ html_option += "<option value='" + payerCosts[i].installments + "' " + dataInput + ">" +
743
+ (payerCosts[i].recommended_message || payerCosts[i].installments) +
744
+ "</option>";
745
+ }
746
+
747
+ // Not take the user's selection if equal.
748
+ if ( selectorInstallments.innerHTML != html_option ) {
749
+ selectorInstallments.innerHTML = html_option;
750
+ }
751
+
752
+ selectorInstallments.removeAttribute( "disabled" );
753
+ MPv1.showTaxes();
754
+
755
+ }
756
+
757
+ }
758
+
759
+ MPv1.showTaxes = function() {
760
+ var selectorIsntallments = document.querySelector( MPv1.selectors.installments );
761
+ var tax = selectorIsntallments.options[selectorIsntallments.selectedIndex].getAttribute( "data-tax" );
762
+ var cft = "";
763
+ var tea = "";
764
+ if ( tax != null ) {
765
+ var tax_split = tax.split( "|" );
766
+ cft = tax_split[0].replace( "_", " ");
767
+ tea = tax_split[1].replace( "_", " ");
768
+ if ( cft == "CFT 0,00%" && tea == "TEA 0,00%" ) {
769
+ cft = "";
770
+ tea = "";
771
+ }
772
+ }
773
+ document.querySelector( MPv1.selectors.taxTextCFT ).innerHTML = cft;
774
+ document.querySelector( MPv1.selectors.taxTextTEA ).innerHTML = tea;
775
+ }
776
+
777
+ // === Customer & Cards
778
+
779
+ MPv1.cardsHandler = function() {
780
+
781
+ var cardSelector = document.querySelector( MPv1.selectors.paymentMethodSelector );
782
+ var type_checkout =
783
+ cardSelector[cardSelector.options.selectedIndex].getAttribute( "type_checkout" );
784
+ var amount = MPv1.getAmount();
785
+
786
+ if ( MPv1.customer_and_card.default ) {
787
+
788
+ if ( cardSelector &&
789
+ cardSelector[cardSelector.options.selectedIndex].value != "-1" &&
790
+ type_checkout == "customer_and_card" ) {
791
+
792
+ document.querySelector( MPv1.selectors.paymentMethodId )
793
+ .value = cardSelector[cardSelector.options.selectedIndex]
794
+ .getAttribute( "payment_method_id" );
795
+
796
+ MPv1.clearOptions();
797
+
798
+ MPv1.customer_and_card.status = true;
799
+
800
+ var _bin = cardSelector[cardSelector.options.selectedIndex]
801
+ .getAttribute( "first_six_digits" );
802
+
803
+ Mercadopago.getPaymentMethod(
804
+ { "bin": _bin },
805
+ MPv1.setPaymentMethodInfo
806
+ );
807
+
808
+ } else {
809
+
810
+ document.querySelector( MPv1.selectors.paymentMethodId )
811
+ .value = cardSelector.value != -1 ? cardSelector.value : "";
812
+ MPv1.customer_and_card.status = false;
813
+ MPv1.resetBackgroundCard();
814
+ MPv1.guessingPaymentMethod(
815
+ { type: "keyup" }
816
+ );
817
+
818
+ }
819
+
820
+ MPv1.setForm();
821
+
822
+ }
823
+
824
+ }
825
+
826
+ // === Payment Methods
827
+
828
+ MPv1.getPaymentMethods = function() {
829
+
830
+ var fragment = document.createDocumentFragment();
831
+ var paymentMethodsSelector =
832
+ document.querySelector( MPv1.selectors.paymentMethodSelector )
833
+ var mainPaymentMethodSelector =
834
+ document.querySelector( MPv1.selectors.paymentMethodSelector )
835
+
836
+ // Set loading.
837
+ mainPaymentMethodSelector.style.background =
838
+ "url(" + MPv1.paths.loading + ") 95% 50% no-repeat #fff";
839
+
840
+ // If customer and card.
841
+ if ( MPv1.customer_and_card.status ) {
842
+ paymentMethodsSelector = document.querySelector( MPv1.selectors.pmListOtherCards )
843
+ // Clean payment methods.
844
+ paymentMethodsSelector.innerHTML = "";
845
+ } else {
846
+ paymentMethodsSelector.innerHTML = "";
847
+ option = new Option( MPv1.text.choose + "...", "-1" );
848
+ fragment.appendChild( option );
849
+ }
850
+
851
+ Mercadopago.getAllPaymentMethods( function( code, payment_methods ) {
852
+
853
+ for ( var x=0; x < payment_methods.length; x++ ) {
854
+
855
+ var pm = payment_methods[x];
856
+
857
+ if ( ( pm.payment_type_id == "credit_card" || pm.payment_type_id == "debit_card" ||
858
+ pm.payment_type_id == "prepaid_card" ) && pm.status == "active" ) {
859
+
860
+ option = new Option( pm.name, pm.id );
861
+ option.setAttribute( "type_checkout", "custom" );
862
+ fragment.appendChild( option );
863
+
864
+ } // end if
865
+
866
+ } // end for
867
+
868
+ paymentMethodsSelector.appendChild( fragment );
869
+ mainPaymentMethodSelector.style.background = "#fff";
870
+
871
+ } );
872
+
873
+ }
874
+
875
+ // === Functions related to Create Tokens
876
+
877
+ MPv1.createTokenByEvent = function() {
878
+
879
+ var $inputs = MPv1.getForm().querySelectorAll( "[data-checkout]" );
880
+ var $inputs_to_create_token = MPv1.getInputsToCreateToken();
881
+
882
+ for (var x=0; x<$inputs.length; x++) {
883
+
884
+ var element = $inputs[x];
885
+
886
+ // Add events only in the required fields.
887
+ if ( $inputs_to_create_token
888
+ .indexOf( element.getAttribute( "data-checkout" ) ) > -1 ) {
889
+
890
+ var event = "focusout";
891
+
892
+ if ( element.nodeName == "SELECT" ) {
893
+ event = "change";
894
+ }
895
+
896
+ MPv1.addListenerEvent( element, event, MPv1.validateInputsCreateToken );
897
+
898
+ // For firefox.
899
+ MPv1.addListenerEvent( element, "blur", MPv1.validateInputsCreateToken );
900
+
901
+ if ( MPv1.create_token_on.keyup ) {
902
+ MPv1.addListenerEvent(element, "keyup", MPv1.validateInputsCreateToken );
903
+ }
904
+
905
+ if ( MPv1.create_token_on.paste ) {
906
+ MPv1.addListenerEvent(element, "paste", MPv1.validateInputsCreateToken );
907
+ }
908
+
909
+ }
910
+
911
+ }
912
+
913
+ }
914
+
915
+ MPv1.createTokenBySubmit = function() {
916
+ MPv1.addListenerEvent( document.querySelector( MPv1.selectors.form ), "submit", MPv1.doPay );
917
+ }
918
+
919
+ var doSubmit = false;
920
+
921
+ MPv1.doPay = function( event ) {
922
+ event.preventDefault();
923
+ if ( ! doSubmit ) {
924
+ MPv1.createToken();
925
+ return false;
926
+ }
927
+ }
928
+
929
+ MPv1.validateInputsCreateToken = function() {
930
+
931
+ var valid_to_create_token = true;
932
+ var $inputs = MPv1.getForm().querySelectorAll( "[data-checkout]" );
933
+ var $inputs_to_create_token = MPv1.getInputsToCreateToken();
934
+
935
+ for (var x=0; x<$inputs.length; x++) {
936
+
937
+ var element = $inputs[x];
938
+
939
+ // Check is a input to create token.
940
+ if ( $inputs_to_create_token
941
+ .indexOf( element.getAttribute( "data-checkout" ) ) > -1 ) {
942
+
943
+ if ( element.value == -1 || element.value == "" ) {
944
+ valid_to_create_token = false;
945
+ } // end if check values
946
+ } // end if check data-checkout
947
+ } // end for
948
+
949
+ if ( valid_to_create_token ) {
950
+ MPv1.createToken();
951
+ }
952
+
953
+ }
954
+
955
+ MPv1.createToken = function() {
956
+ MPv1.hideErrors();
957
+
958
+ // Show loading.
959
+ document.querySelector( MPv1.selectors.box_loading ).style.background =
960
+ "url(" + MPv1.paths.loading + ") 0 50% no-repeat #fff";
961
+
962
+ // Form.
963
+ var $form = MPv1.getForm();
964
+
965
+ Mercadopago.createToken( $form, MPv1.sdkResponseHandler );
966
+
967
+ return false;
968
+ }
969
+
970
+ MPv1.sdkResponseHandler = function( status, response ) {
971
+
972
+ // Hide loading.
973
+ document.querySelector( MPv1.selectors.box_loading ).style.background = "";
974
+
975
+ if ( status != 200 && status != 201 ) {
976
+ MPv1.showErrors( response );
977
+ } else {
978
+ var token = document.querySelector( MPv1.selectors.token );
979
+ token.value = response.id;
980
+
981
+ if ( MPv1.add_truncated_card ) {
982
+ var card = MPv1.truncateCard( response );
983
+ document.querySelector( MPv1.selectors.cardTruncated ).value = card;
984
+ }
985
+
986
+ if ( ! MPv1.create_token_on.event ) {
987
+ doSubmit = true;
988
+ btn = document.querySelector( MPv1.selectors.form );
989
+ btn.submit();
990
+ }
991
+ }
992
+
993
+ }
994
+
995
+ // === Useful functions
996
+
997
+ MPv1.resetBackgroundCard = function() {
998
+ document.querySelector( MPv1.selectors.paymentMethodSelector ).style.background =
999
+ "no-repeat #fff";
1000
+ document.querySelector( MPv1.selectors.cardNumber ).style.background =
1001
+ "no-repeat #fff";
1002
+ }
1003
+
1004
+ MPv1.setForm = function() {
1005
+ if ( MPv1.customer_and_card.status ) {
1006
+ document.querySelector( MPv1.selectors.formDiv ).style.display = "none";
1007
+ document.querySelector( MPv1.selectors.mpSecurityCodeCustomerAndCard ).removeAttribute( "style" );
1008
+ } else {
1009
+ document.querySelector( MPv1.selectors.mpSecurityCodeCustomerAndCard ).style.display = "none";
1010
+ document.querySelector( MPv1.selectors.formDiv ).removeAttribute( "style" );
1011
+ }
1012
+
1013
+ Mercadopago.clearSession();
1014
+
1015
+ if ( MPv1.create_token_on.event ) {
1016
+ MPv1.createTokenByEvent();
1017
+ MPv1.validateInputsCreateToken();
1018
+ }
1019
+
1020
+ document.querySelector( MPv1.selectors.CustomerAndCard ).value =
1021
+ MPv1.customer_and_card.status;
1022
+ }
1023
+
1024
+ MPv1.getForm = function() {
1025
+ if ( MPv1.customer_and_card.status ) {
1026
+ return document.querySelector( MPv1.selectors.formCustomerAndCard );
1027
+ } else {
1028
+ return document.querySelector( MPv1.selectors.form );
1029
+ }
1030
+ }
1031
+
1032
+ MPv1.getInputsToCreateToken = function() {
1033
+ if ( MPv1.customer_and_card.status ) {
1034
+ return MPv1.inputs_to_create_token_customer_and_card;
1035
+ } else {
1036
+ return MPv1.inputs_to_create_token;
1037
+ }
1038
+ }
1039
+
1040
+ MPv1.truncateCard = function( response_card_token ) {
1041
+
1042
+ var first_six_digits;
1043
+ var last_four_digits;
1044
+
1045
+ if ( MPv1.customer_and_card.status ) {
1046
+ var cardSelector = document.querySelector( MPv1.selectors.paymentMethodSelector );
1047
+ first_six_digits = cardSelector[cardSelector.options.selectedIndex]
1048
+ .getAttribute( "first_six_digits" ).match( /.{1,4}/g )
1049
+ last_four_digits = cardSelector[cardSelector.options.selectedIndex]
1050
+ .getAttribute( "last_four_digits" )
1051
+ } else {
1052
+ first_six_digits = response_card_token.first_six_digits.match( /.{1,4}/g )
1053
+ last_four_digits = response_card_token.last_four_digits
1054
+ }
1055
+
1056
+ var card = first_six_digits[0] + " " +
1057
+ first_six_digits[1] + "** **** " + last_four_digits;
1058
+
1059
+ return card;
1060
+
1061
+ }
1062
+
1063
+ MPv1.getAmount = function() {
1064
+ return document.querySelector( MPv1.selectors.amount ).value;
1065
+ }
1066
+
1067
+ // === Show errors
1068
+
1069
+ MPv1.showErrors = function( response ) {
1070
+ var $form = MPv1.getForm();
1071
+
1072
+ for ( var x=0; x<response.cause.length; x++ ) {
1073
+ var error = response.cause[x];
1074
+ var $span = $form.querySelector( "#mp-error-" + error.code );
1075
+ var $input = $form.querySelector( $span.getAttribute( "data-main" ) );
1076
+
1077
+ $span.style.display = "inline-block";
1078
+ $input.classList.add( "mp-error-input" );
1079
+ }
1080
+
1081
+ return;
1082
+ }
1083
+
1084
+ MPv1.hideErrors = function() {
1085
+
1086
+ for ( var x = 0; x < document.querySelectorAll( "[data-checkout]" ).length; x++ ) {
1087
+ var $field = document.querySelectorAll( "[data-checkout]" )[x];
1088
+ $field.classList.remove( "mp-error-input" );
1089
+ } // end for
1090
+
1091
+ for ( var x = 0; x < document.querySelectorAll( ".mp-error" ).length; x++ ) {
1092
+ var $span = document.querySelectorAll( ".mp-error" )[x];
1093
+ $span.style.display = "none";
1094
+ }
1095
+
1096
+ return;
1097
+
1098
+ }
1099
+
1100
+ // === Add events to guessing
1101
+
1102
+ MPv1.addListenerEvent = function( el, eventName, handler ) {
1103
+ if ( el.addEventListener ) {
1104
+ el.addEventListener( eventName, handler );
1105
+ } else {
1106
+ el.attachEvent( "on" + eventName, function() {
1107
+ handler.call( el );
1108
+ });
1109
+ }
1110
+ };
1111
+
1112
+ MPv1.addListenerEvent(
1113
+ document.querySelector( MPv1.selectors.cardNumber ),
1114
+ "keyup", MPv1.guessingPaymentMethod
1115
+ );
1116
+ MPv1.addListenerEvent(
1117
+ document.querySelector( MPv1.selectors.cardNumber ),
1118
+ "keyup", MPv1.clearOptions
1119
+ );
1120
+ MPv1.addListenerEvent(
1121
+ document.querySelector( MPv1.selectors.cardNumber),
1122
+ "change", MPv1.guessingPaymentMethod
1123
+ );
1124
+
1125
+ /*
1126
+ *
1127
+ * Utilities
1128
+ *
1129
+ */
1130
+
1131
+ MPv1.referer = (function () {
1132
+ var referer = window.location.protocol + "//" +
1133
+ window.location.hostname + ( window.location.port ? ":" + window.location.port: "" );
1134
+ return referer;
1135
+ })();
1136
+
1137
+ MPv1.AJAX = function( options ) {
1138
+ var useXDomain = !!window.XDomainRequest;
1139
+ var req = useXDomain ? new XDomainRequest() : new XMLHttpRequest()
1140
+ var data;
1141
+ options.url += ( options.url.indexOf( "?" ) >= 0 ? "&" : "?" ) + "referer=" + escape( MPv1.referer );
1142
+ options.requestedMethod = options.method;
1143
+ if ( useXDomain && options.method == "PUT" ) {
1144
+ options.method = "POST";
1145
+ options.url += "&_method=PUT";
1146
+ }
1147
+ req.open( options.method, options.url, true );
1148
+ req.timeout = options.timeout || 1000;
1149
+ if ( window.XDomainRequest ) {
1150
+ req.onload = function() {
1151
+ data = JSON.parse( req.responseText );
1152
+ if ( typeof options.success === "function" ) {
1153
+ options.success( options.requestedMethod === "POST" ? 201 : 200, data );
1154
+ }
1155
+ };
1156
+ req.onerror = req.ontimeout = function() {
1157
+ if ( typeof options.error === "function" ) {
1158
+ options.error( 400, {
1159
+ user_agent:window.navigator.userAgent, error : "bad_request", cause:[]
1160
+ });
1161
+ }
1162
+ };
1163
+ req.onprogress = function() {};
1164
+ } else {
1165
+ req.setRequestHeader( "Accept", "application/json" );
1166
+ if ( options.contentType ) {
1167
+ req.setRequestHeader( "Content-Type", options.contentType );
1168
+ } else {
1169
+ req.setRequestHeader( "Content-Type", "application/json" );
1170
+ }
1171
+ req.onreadystatechange = function() {
1172
+ if ( this.readyState === 4 ) {
1173
+ if ( this.status >= 200 && this.status < 400 ) {
1174
+ // Success!
1175
+ data = JSON.parse( this.responseText );
1176
+ if ( typeof options.success === "function" ) {
1177
+ options.success( this.status, data );
1178
+ }
1179
+ } else if ( this.status >= 400 ) {
1180
+ data = JSON.parse( this.responseText );
1181
+ if ( typeof options.error === "function" ) {
1182
+ options.error( this.status, data );
1183
+ }
1184
+ } else if ( typeof options.error === "function" ) {
1185
+ options.error( 503, {} );
1186
+ }
1187
+ }
1188
+ };
1189
+ }
1190
+ if ( options.method === "GET" || options.data == null || options.data == undefined ) {
1191
+ req.send();
1192
+ } else {
1193
+ req.send( JSON.stringify( options.data ) );
1194
+ }
1195
+ }
1196
+
1197
+ // === Initialization function
1198
+
1199
+ MPv1.Initialize = function( site_id, public_key, coupon_mode, discount_action_url, payer_email ) {
1200
+
1201
+ // Sets
1202
+ MPv1.site_id = site_id;
1203
+ MPv1.public_key = public_key;
1204
+ MPv1.coupon_of_discounts.default = coupon_mode;
1205
+ MPv1.coupon_of_discounts.discount_action_url = discount_action_url;
1206
+ MPv1.coupon_of_discounts.payer_email = payer_email;
1207
+
1208
+ Mercadopago.setPublishableKey( MPv1.public_key );
1209
+
1210
+ // flow coupon of discounts
1211
+ if ( MPv1.coupon_of_discounts.default ) {
1212
+ MPv1.addListenerEvent(
1213
+ document.querySelector( MPv1.selectors.applyCoupon ),
1214
+ "click", MPv1.checkCouponEligibility
1215
+ );
1216
+ } else {
1217
+ document.querySelector( MPv1.selectors.formCoupon ).style.display = "none";
1218
+ }
1219
+
1220
+ // Flow: customer & cards.
1221
+ var selectorPmCustomerAndCards = document.querySelector( MPv1.selectors.pmCustomerAndCards );
1222
+ if ( MPv1.customer_and_card.default && selectorPmCustomerAndCards.childElementCount > 0 ) {
1223
+ MPv1.addListenerEvent(
1224
+ document.querySelector( MPv1.selectors.paymentMethodSelector ),
1225
+ "change", MPv1.cardsHandler
1226
+ );
1227
+ MPv1.cardsHandler();
1228
+ } else {
1229
+ // If customer & cards is disabled or customer does not have cards.
1230
+ MPv1.customer_and_card.status = false;
1231
+ document.querySelector( MPv1.selectors.formCustomerAndCard ).style.display = "none";
1232
+ }
1233
+
1234
+ if ( MPv1.create_token_on.event ) {
1235
+ MPv1.createTokenByEvent();
1236
+ } else {
1237
+ MPv1.createTokenBySubmit()
1238
+ }
1239
+
1240
+ // flow: MLM
1241
+ if ( MPv1.site_id != "MLM" ) {
1242
+ Mercadopago.getIdentificationTypes();
1243
+ }
1244
+
1245
+ if ( MPv1.site_id == "MLM" ) {
1246
+
1247
+ // Hide documento for mex.
1248
+ document.querySelector( MPv1.selectors.mpDoc ).style.display = "none";
1249
+
1250
+ document.querySelector( MPv1.selectors.formCustomerAndCard ).removeAttribute( 'style' );
1251
+ document.querySelector( MPv1.selectors.formCustomerAndCard ).style.padding = "36px 36px 16px 36px";
1252
+ document.querySelector( MPv1.selectors.mpSecurityCodeCustomerAndCard ).style.display = "none";
1253
+
1254
+ // Removing not used fields for this country.
1255
+ MPv1.inputs_to_create_token.splice(
1256
+ MPv1.inputs_to_create_token.indexOf( "docType" ),
1257
+ 1 );
1258
+ MPv1.inputs_to_create_token.splice(
1259
+ MPv1.inputs_to_create_token.indexOf( "docNumber" ),
1260
+ 1 );
1261
+
1262
+ MPv1.addListenerEvent(
1263
+ document.querySelector( MPv1.selectors.paymentMethodSelector ),
1264
+ "change",
1265
+ MPv1.changePaymetMethodSelector
1266
+ );
1267
+
1268
+ // Get payment methods and populate selector.
1269
+ MPv1.getPaymentMethods();
1270
+
1271
+ }
1272
+
1273
+ // flow: MLB AND MCO
1274
+ if ( MPv1.site_id == "MLB" ) {
1275
+
1276
+ document.querySelector( MPv1.selectors.mpDocType ).style.display = "none";
1277
+ document.querySelector( MPv1.selectors.mpIssuer ).style.display = "none";
1278
+ // Adjust css.
1279
+ document.querySelector( MPv1.selectors.docNumber ).classList.remove( "mp-col-75" );
1280
+ document.querySelector( MPv1.selectors.docNumber ).classList.add( "mp-col-100" );
1281
+
1282
+ } else if ( MPv1.site_id == "MCO" ) {
1283
+ document.querySelector( MPv1.selectors.mpIssuer ).style.display = "none";
1284
+ } else if ( MPv1.site_id == "MLA" ) {
1285
+ document.querySelector( MPv1.selectors.boxInstallmentsSelector ).classList.remove( "mp-col-100" );
1286
+ document.querySelector( MPv1.selectors.boxInstallmentsSelector ).classList.add( "mp-col-70" );
1287
+ document.querySelector( MPv1.selectors.taxCFT ).style.display = "block";
1288
+ document.querySelector( MPv1.selectors.taxTEA ).style.display = "block";
1289
+ MPv1.addListenerEvent( document.querySelector( MPv1.selectors.installments ), "change", MPv1.showTaxes );
1290
+ } else if ( MPv1.site_id == "MLC" ) {
1291
+ document.querySelector( MPv1.selectors.mpIssuer ).style.display = "none";
1292
+ }
1293
+
1294
+ if ( MPv1.debug ) {
1295
+ document.querySelector( MPv1.selectors.utilities_fields ).style.display = "inline-block";
1296
+ }
1297
+
1298
+ document.querySelector( MPv1.selectors.site_id ).value = MPv1.site_id;
1299
+
1300
+ return;
1301
+
1302
+ }
1303
+
1304
+ this.MPv1 = MPv1;
1305
+
1306
+ } ).call();
1307
+
1308
+ // === Instantiation
1309
+
1310
+ var mercadopago_site_id = "<?php echo $site_id; ?>";
1311
+ var mercadopago_public_key = "<?php echo $public_key; ?>";
1312
+ var mercadopago_payer_email = "<?php echo $payer_email; ?>";
1313
+ var mercadopago_coupon_mode = "<?php echo $coupon_mode; ?>";
1314
+ var mercadopago_discount_action_url = "<?php echo $discount_action_url; ?>";
1315
+
1316
+ MPv1.text.choose = "<?php echo $form_labels['form']['label_choose']; ?>";
1317
+ MPv1.text.other_bank = "<?php echo $form_labels['form']['label_other_bank']; ?>";
1318
+ MPv1.text.discount_info1 = "<?php echo $form_labels['form']['discount_info1']; ?>";
1319
+ MPv1.text.discount_info2 = "<?php echo $form_labels['form']['discount_info2']; ?>";
1320
+ MPv1.text.discount_info3 = "<?php echo $form_labels['form']['discount_info3']; ?>";
1321
+ MPv1.text.discount_info4 = "<?php echo $form_labels['form']['discount_info4']; ?>";
1322
+ MPv1.text.discount_info5 = "<?php echo $form_labels['form']['discount_info5']; ?>";
1323
+ MPv1.text.discount_info6 = "<?php echo $form_labels['form']['discount_info6']; ?>";
1324
+ MPv1.text.apply = "<?php echo $form_labels['form']['apply']; ?>";
1325
+ MPv1.text.remove = "<?php echo $form_labels['form']['remove']; ?>";
1326
+ MPv1.text.coupon_empty = "<?php echo $form_labels['form']['coupon_empty']; ?>";
1327
+ MPv1.paths.loading = "<?php echo ( $images_path . 'loading.gif' ); ?>";
1328
+ MPv1.paths.check = "<?php echo ( $images_path . 'check.png' ); ?>";
1329
+ MPv1.paths.error = "<?php echo ( $images_path . 'error.png' ); ?>";
1330
+
1331
+ // Overriding this function to give form padding attribute.
1332
+ MPv1.setForm = function() {
1333
+ if ( MPv1.customer_and_card.status ) {
1334
+ document.querySelector( MPv1.selectors.form ).style.display = "none";
1335
+ document.querySelector( MPv1.selectors.mpSecurityCodeCustomerAndCard ).removeAttribute( "style" );
1336
+ } else {
1337
+ document.querySelector( MPv1.selectors.mpSecurityCodeCustomerAndCard ).style.display = "none";
1338
+ document.querySelector( MPv1.selectors.form ).removeAttribute( "style" );
1339
+ document.querySelector( MPv1.selectors.form ).style.padding = "0px 12px 0px 12px";
1340
+ }
1341
+ Mercadopago.clearSession();
1342
+ if ( MPv1.create_token_on.event ) {
1343
+ MPv1.createTokenByEvent();
1344
+ MPv1.validateInputsCreateToken();
1345
+ }
1346
+ document.querySelector( MPv1.selectors.CustomerAndCard ).value =
1347
+ MPv1.customer_and_card.status;
1348
+ }
1349
+
1350
+ MPv1.getAmount = function() {
1351
+ return document.querySelector( MPv1.selectors.amount )
1352
+ .value - document.querySelector( MPv1.selectors.discount ).value;
1353
+ }
1354
+
1355
+ MPv1.getAmountWithoutDiscount = function() {
1356
+ return document.querySelector( MPv1.selectors.amount ).value;
1357
+ }
1358
+
1359
+ MPv1.showErrors = function( response ) {
1360
+ var $form = MPv1.getForm();
1361
+ for ( var x=0; x<response.cause.length; x++ ) {
1362
+ var error = response.cause[x];
1363
+ var $span = $form.querySelector( "#mp-error-" + error.code );
1364
+ var $input = $form.querySelector( $span.getAttribute( "data-main" ) );
1365
+ $span.style.display = "inline-block";
1366
+ $input.classList.add( "mp-error-input" );
1367
+ }
1368
+ return;
1369
+ }
1370
+ MPv1.Initialize(
1371
+ mercadopago_site_id,
1372
+ mercadopago_public_key,
1373
+ mercadopago_coupon_mode == "yes",
1374
+ mercadopago_discount_action_url,
1375
+ mercadopago_payer_email
1376
+ );
1377
+
1378
+ </script>
templates/ticket/ticket-form.php ADDED
@@ -0,0 +1,845 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Part of Woo Mercado Pago Module
5
+ * Author - Mercado Pago
6
+ * Developer - Marcelo Tomio Hama / marcelo.hama@mercadolivre.com
7
+ * Copyright - Copyright(c) MercadoPago [https://www.mercadopago.com]
8
+ * License - https://www.gnu.org/licenses/gpl.html GPL version 2 or higher
9
+ */
10
+
11
+ if ( ! defined( 'ABSPATH' ) ) {
12
+ exit;
13
+ }
14
+
15
+ ?>
16
+
17
+ <div width="100%" style="margin:1px; padding:36px 36px 16px 36px; background:white;">
18
+ <img class="logo" src="<?php echo ($images_path . 'mplogo.png'); ?>" width="156" height="40" />
19
+ <?php if ( count( $payment_methods ) > 1 ) : ?>
20
+ <img class="logo" src="<?php echo ($images_path . 'boleto.png'); ?>"
21
+ width="90" height="40" style="float:right;"/>
22
+ <?php else : ?>
23
+ <?php foreach ( $payment_methods as $payment ) : ?>
24
+ <img class="logo" src="<?php echo $payment['secure_thumbnail']; ?>" width="90" height="40"
25
+ style="float:right;"/>
26
+ <?php endforeach; ?>
27
+ <?php endif; ?>
28
+ </div>
29
+
30
+ <fieldset id="mercadopago-form" style="background:white;">
31
+
32
+ <!-- coupom -->
33
+ <div class="mp-box-inputs mp-line form-row" id="mercadopago-form-coupon-ticket" style="margin-bottom: 16px;" >
34
+ <div class="form-col-8">
35
+ <label for="couponCodeLabel"><?php echo $form_labels['form']['coupon_of_discounts']; ?></label>
36
+ <input type="text" id="couponCodeTicket" name="mercadopago_ticket[coupon_code]"
37
+ autocomplete="off" maxlength="24" style="margin-bottom: 8px;"/>
38
+ <span class="mp-discount" id="mpCouponApplyedTicket" ></span>
39
+ <span class="mp-error" id="mpCouponErrorTicket" ></span>
40
+ </div>
41
+ <div class="form-col-4">
42
+ <label >&nbsp;</label>
43
+ <input type="button" class="button" id="applyCouponTicket" value="<?php echo $form_labels['form']['apply']; ?>">
44
+ </div>
45
+ </div>
46
+
47
+ <!-- payment method -->
48
+ <div id="mercadopago-form-ticket" class="mp-box-inputs mp-line">
49
+ <div id="form-ticket">
50
+ <div class="form-row" style="margin-bottom:16px;">
51
+ <div class="form-col-1"> </div>
52
+ <div class="form-col-4">
53
+ <input type="radio" name="mercadopago_ticket[docType]" class="MPv1Ticket-docType"
54
+ id="MPv1Ticket-docType-fisica" value="CPF" style="width:24px; height:24px;" checked="checked">
55
+ <?php echo $form_labels["form"]["fisicalPerson"]; ?>
56
+ </input>
57
+ </div>
58
+ <div class="form-col-2"> </div>
59
+ <div class="form-col-4">
60
+ <input type="radio" name="mercadopago_ticket[docType]" class="MPv1Ticket-docType"
61
+ id="MPv1Ticket-docType-juridica" value="CNPJ" style="width:24px; height:24px;">
62
+ <?php echo $form_labels["form"]["legalPerson"]; ?>
63
+ </input>
64
+ </div>
65
+ <div class="form-col-1"> </div>
66
+ </div>
67
+ <div class="form-row">
68
+ <div class="form-col-4" id="box-firstname">
69
+ <label for="firstname" class="title-name"><?php echo $form_labels['form']['name']; ?><em class="obrigatorio"> *</em></label>
70
+ <label for="firstname" class="title-razao-social"><?php echo $form_labels['form']['socialName']; ?><em class="obrigatorio"> *</em></label>
71
+ <input type="text" value="<?php echo $form_labels['febraban']['firstname']; ?>"
72
+ id="firstname" class="form-control-mine" name="mercadopago_ticket[firstname]">
73
+ <span class="erro_febraban" data-main="#firstname" id="error_firstname"><?php echo $form_labels["error"]["FEB001"]; ?></span>
74
+ </div>
75
+ <div class="form-col-4" id="box-lastname">
76
+ <label for="lastname"><?php echo $form_labels["form"]["surname"]; ?><em class="obrigatorio"> *</em></label>
77
+ <input type="text" value="<?php echo $form_labels['febraban']['lastname']; ?>"
78
+ id="lastname" class="form-control-mine" name="mercadopago_ticket[lastname]">
79
+ <span class="erro_febraban" data-main="#lastname" id="error_lastname"><?php echo $form_labels["error"]["FEB002"]; ?></span>
80
+ </div>
81
+ <div class="form-col-4" id="box-docnumber">
82
+ <label for="cpfcnpj" class="title-cpf"><?php echo $form_labels['form']['docNumber']; ?><em class="obrigatorio"> *</em></label>
83
+ <label for="cpfcnpj" class="title-cnpj"><?php echo $form_labels['form']['docNumberLegal']; ?><em class="obrigatorio"> *</em></label>
84
+ <input type="text" value="<?php echo $form_labels['febraban']['docNumber']; ?>"
85
+ id="cpfcnpj" class="form-control-mine" name="mercadopago_ticket[docNumber]">
86
+ <span class="erro_febraban" data-main="#cpfcnpj" id="error_docNumber"><?php echo $form_labels["error"]["FEB003"]; ?></span>
87
+ </div>
88
+ </div>
89
+ <div class="form-row">
90
+ <div class="form-col-8">
91
+ <label for="address"><?php echo $form_labels["form"]["address"]; ?><em class="obrigatorio"> *</em></label>
92
+ <input type="text" value="<?php echo $form_labels['febraban']['address']; ?>"
93
+ id="address" class="form-control-mine" name="mercadopago_ticket[address]">
94
+ <span class="erro_febraban" data-main="#address" id="error_address"><?php echo $form_labels["error"]["FEB004"]; ?></span>
95
+ </div>
96
+ <div class="form-col-4">
97
+ <label for="number"><?php echo $form_labels["form"]["number"]; ?><em class="obrigatorio"> *</em></label>
98
+ <input type="text" value="<?php echo $form_labels['febraban']['number']; ?>"
99
+ id="number" class="form-control-mine" name="mercadopago_ticket[number]">
100
+ <span class="erro_febraban" data-main="#number" id="error_number"><?php echo $form_labels["error"]["FEB005"]; ?></span>
101
+ </div>
102
+ </div>
103
+ <div class="form-row">
104
+ <div class="form-col-4">
105
+ <label for="city"><?php echo $form_labels["form"]["city"]; ?><em class="obrigatorio"> *</em></label>
106
+ <input type="text" value="<?php echo $form_labels['febraban']['city']; ?>"
107
+ id="city" class="form-control-mine" name="mercadopago_ticket[city]">
108
+ <span class="erro_febraban" data-main="#city" id="error_city"><?php echo $form_labels["error"]["FEB006"]; ?></span>
109
+ </div>
110
+ <div class="form-col-4">
111
+ <label for="state"><?php echo $form_labels["form"]["state"]; ?><em class="obrigatorio"> *</em></label>
112
+ <select name="mercadopago_ticket[state]" id="state" class="form-control-mine" style="width: 100%;">
113
+ <option value="" <?php if ($form_labels["febraban"]["state"] == "") {echo 'selected="selected"';} ?>><?php echo $form_labels["form"]["label_choose"]; ?></option>
114
+ <option value="AC" <?php if ($form_labels["febraban"]['state'] == "AC") {echo 'selected="selected"';} ?>>Acre</option>
115
+ <option value="AL" <?php if ($form_labels["febraban"]["state"] == "AL") {echo 'selected="selected"';} ?>>Alagoas</option>
116
+ <option value="AP" <?php if ($form_labels["febraban"]["state"] == "AP") {echo 'selected="selected"';} ?>>Amapá</option>
117
+ <option value="AM" <?php if ($form_labels["febraban"]["state"] == "AM") {echo 'selected="selected"';} ?>>Amazonas</option>
118
+ <option value="BA" <?php if ($form_labels["febraban"]["state"] == "BA") {echo 'selected="selected"';} ?>>Bahia</option>
119
+ <option value="CE" <?php if ($form_labels["febraban"]["state"] == "CE") {echo 'selected="selected"';} ?>>Ceará</option>
120
+ <option value="DF" <?php if ($form_labels["febraban"]["state"] == "DF") {echo 'selected="selected"';} ?>>Distrito Federal</option>
121
+ <option value="ES" <?php if ($form_labels["febraban"]["state"] == "ES") {echo 'selected="selected"';} ?>>Espírito Santo</option>
122
+ <option value="GO" <?php if ($form_labels["febraban"]["state"] == "GO") {echo 'selected="selected"';} ?>>Goiás</option>
123
+ <option value="MA" <?php if ($form_labels["febraban"]["state"] == "MA") {echo 'selected="selected"';} ?>>Maranhão</option>
124
+ <option value="MT" <?php if ($form_labels["febraban"]["state"] == "MT") {echo 'selected="selected"';} ?>>Mato Grosso</option>
125
+ <option value="MS" <?php if ($form_labels["febraban"]["state"] == "MS") {echo 'selected="selected"';} ?>>Mato Grosso do Sul</option>
126
+ <option value="MG" <?php if ($form_labels["febraban"]["state"] == "MG") {echo 'selected="selected"';} ?>>Minas Gerais</option>
127
+ <option value="PA" <?php if ($form_labels["febraban"]["state"] == "PA") {echo 'selected="selected"';} ?>>Pará</option>
128
+ <option value="PB" <?php if ($form_labels["febraban"]["state"] == "PB") {echo 'selected="selected"';} ?>>Paraíba</option>
129
+ <option value="PR" <?php if ($form_labels["febraban"]["state"] == "PR") {echo 'selected="selected"';} ?>>Paraná</option>
130
+ <option value="PE" <?php if ($form_labels["febraban"]["state"] == "PE") {echo 'selected="selected"';} ?>>Pernambuco</option>
131
+ <option value="PI" <?php if ($form_labels["febraban"]["state"] == "PI") {echo 'selected="selected"';} ?>>Piauí</option>
132
+ <option value="RJ" <?php if ($form_labels["febraban"]["state"] == "RJ") {echo 'selected="selected"';} ?>>Rio de Janeiro</option>
133
+ <option value="RN" <?php if ($form_labels["febraban"]["state"] == "RN") {echo 'selected="selected"';} ?>>Rio Grande do Norte</option>
134
+ <option value="RS" <?php if ($form_labels["febraban"]["state"] == "RS") {echo 'selected="selected"';} ?>>Rio Grande do Sul</option>
135
+ <option value="RO" <?php if ($form_labels["febraban"]["state"] == "RO") {echo 'selected="selected"';} ?>>Rondônia</option>
136
+ <option value="RA" <?php if ($form_labels["febraban"]["state"] == "RA") {echo 'selected="selected"';} ?>>Roraima</option>
137
+ <option value="SC" <?php if ($form_labels["febraban"]["state"] == "SC") {echo 'selected="selected"';} ?>>Santa Catarina</option>
138
+ <option value="SP" <?php if ($form_labels["febraban"]["state"] == "SP") {echo 'selected="selected"';} ?>>São Paulo</option>
139
+ <option value="SE" <?php if ($form_labels["febraban"]["state"] == "SE") {echo 'selected="selected"';} ?>>Sergipe</option>
140
+ <option value="TO" <?php if ($form_labels["febraban"]["state"] == "TO") {echo 'selected="selected"';} ?>>Tocantins</option>
141
+ </select>
142
+ <span class="erro_febraban" data-main="#state" id="error_state"><?php echo $form_labels["error"]["FEB007"]; ?></span>
143
+ </div>
144
+ <div class="form-col-4">
145
+ <label for="zipcode"><?php echo $form_labels["form"]["zipcode"]; ?><em class="obrigatorio"> *</em></label>
146
+ <input type="text" value="<?php echo $form_labels['febraban']['zipcode']; ?>"
147
+ id="zipcode" class="form-control-mine" name="mercadopago_ticket[zipcode]"
148
+ onkeydown="return (event.which >= 48 && event.which <= 57) || event.which == 8 || event.which == 46">
149
+ <span class="erro_febraban" data-main="#zipcode" id="error_zipcode"><?php echo $form_labels["error"]["FEB008"]; ?></span>
150
+ </div>
151
+ </div>
152
+ <div class="form-col-12">
153
+ <label>
154
+ <span class="mensagem-febraban"><em class="obrigatorio">* </em><?php echo $form_labels["form"]["febraban_rules"]; ?></span>
155
+ </label>
156
+ </div>
157
+ </div>
158
+
159
+ <div style="padding:0px 36px 0px 36px; margin-left: -32px; margin-right: -32px;">
160
+ <p>
161
+ <?php
162
+ if ( count( $payment_methods ) > 1 ) :
163
+ echo $form_labels['form']['issuer_selection'];
164
+ endif;
165
+ echo $form_labels['form']['payment_instructions'];
166
+ ?>&nbsp;<?php
167
+ echo $form_labels['form']['ticket_note'];
168
+ if ( $is_currency_conversion > 0 ) :
169
+ echo " (" . $form_labels['form']['payment_converted'] . " " .
170
+ $woocommerce_currency . " " . $form_labels['form']['to'] . " " .
171
+ $account_currency . ")";
172
+ endif;
173
+ ?>
174
+ </p>
175
+ <?php if ( count( $payment_methods ) > 1 ) : ?>
176
+ <div class="mp-box-inputs mp-col-100" >
177
+ <?php $atFirst = true; ?>
178
+ <?php foreach ( $payment_methods as $payment ) : ?>
179
+ <div class="mp-box-inputs mp-line">
180
+ <div id="paymentMethodId" class="mp-box-inputs mp-col-5">
181
+ <input type="radio" class="input-radio" name="mercadopago_ticket[paymentMethodId]"
182
+ style="display: block; height:16px; width:16px;" value="<?php echo $payment['id']; ?>"
183
+ <?php if ( $atFirst ) : ?> checked="checked" <?php endif; ?> />
184
+ </div>
185
+ <div class="mp-box-inputs mp-col-75">
186
+ <label>
187
+ &nbsp;
188
+ <img src="<?php echo $payment['secure_thumbnail']; ?>"
189
+ alt="<?php echo $payment['name']; ?>" />
190
+ &nbsp;
191
+ <?php echo $payment['name']; ?>
192
+ </label>
193
+ </div>
194
+ </div>
195
+ <?php $atFirst = false; ?>
196
+ <?php endforeach; ?>
197
+ </div>
198
+ <?php else : ?>
199
+ <div class="mp-box-inputs mp-col-100" style="display:none;">
200
+ <select id="paymentMethodId" name="mercadopago_ticket[paymentMethodId]">
201
+ <?php foreach ( $payment_methods as $payment ) : ?>
202
+ <option value="<?php echo $payment['id']; ?>" style="padding: 8px;
203
+ background: url('https://img.mlstatic.com/org-img/MP3/API/logos/bapropagos.gif')
204
+ 98% 50% no-repeat;"> <?php echo $payment['name']; ?>
205
+ </option>
206
+ <?php endforeach; ?>
207
+ </select>
208
+ </div>
209
+ <?php endif; ?>
210
+
211
+ <div class="mp-box-inputs mp-line">
212
+ <div class="mp-box-inputs mp-col-25">
213
+ <div id="mp-box-loading">
214
+ </div>
215
+ </div>
216
+ </div>
217
+
218
+ <!-- utilities -->
219
+ <div class="mp-box-inputs mp-col-100" id="mercadopago-utilities">
220
+ <input type="hidden" id="site_id" value="<?php echo $site_id; ?>" name="mercadopago_ticket[site_id]"/>
221
+ <input type="hidden" id="amountTicket" value="<?php echo $amount; ?>" name="mercadopago_ticket[amount]"/>
222
+ <input type="hidden" id="campaign_idTicket" name="mercadopago_ticket[campaign_id]"/>
223
+ <input type="hidden" id="campaignTicket" name="mercadopago_ticket[campaign]"/>
224
+ <input type="hidden" id="discountTicket" name="mercadopago_ticket[discount]"/>
225
+ </div>
226
+
227
+ </div>
228
+ </div>
229
+ </fieldset>
230
+
231
+ <script type="text/javascript">
232
+
233
+ ( function() {
234
+
235
+ var MPv1Ticket = {
236
+ site_id: "",
237
+ coupon_of_discounts: {
238
+ discount_action_url: "",
239
+ payer_email: "",
240
+ default: true,
241
+ status: false
242
+ },
243
+ inputs_to_create_discount: [
244
+ "couponCodeTicket",
245
+ "applyCouponTicket"
246
+ ],
247
+ inputs_to_validate_ticket: [
248
+ "firstname",
249
+ "lastname",
250
+ "docNumber",
251
+ "address",
252
+ "number",
253
+ "city",
254
+ "state",
255
+ "zipcode"
256
+ ],
257
+ selectors: {
258
+ // coupom
259
+ couponCode: "#couponCodeTicket",
260
+ applyCoupon: "#applyCouponTicket",
261
+ mpCouponApplyed: "#mpCouponApplyedTicket",
262
+ mpCouponError: "#mpCouponErrorTicket",
263
+ campaign_id: "#campaign_idTicket",
264
+ campaign: "#campaignTicket",
265
+ discount: "#discountTicket",
266
+ // payment method and checkout
267
+ paymentMethodId: "#paymentMethodId",
268
+ amount: "#amountTicket",
269
+ // other rules
270
+ boxFirstName: "#box-firstname",
271
+ boxLastName: "#box-lastname",
272
+ boxDocNumber: "#box-docnumber",
273
+ titleFirstName: ".title-name",
274
+ titleFirstNameRazaoSocial: ".title-razao-social",
275
+ titleDocNumber: ".title-cpf",
276
+ titleDocNumberCNPJ: ".title-cnpj",
277
+ radioTypeFisica: '#MPv1Ticket-docType-fisica',
278
+ radioTypeJuridica: '#MPv1Ticket-docType-juridica',
279
+ // febraban
280
+ firstname: "#febrabanFirstname",
281
+ lastname: "#febrabanLastname",
282
+ cpfcnpj: "#cpfcnpj",
283
+ address: "#febrabanAddress",
284
+ number: "#febrabanNumber",
285
+ city: "#febrabanCity",
286
+ state: "#febrabanState",
287
+ zipcode: "#febrabanZipcode",
288
+ // form
289
+ formCoupon: '#mercadopago-form-coupon-ticket',
290
+ formTicket: '#form-ticket',
291
+ box_loading: "#mp-box-loading",
292
+ submit: "#btnSubmit",
293
+ form: "#mercadopago-form-ticket"
294
+ },
295
+ text: {
296
+ discount_info1: "You will save",
297
+ discount_info2: "with discount from",
298
+ discount_info3: "Total of your purchase:",
299
+ discount_info4: "Total of your purchase with discount:",
300
+ discount_info5: "*Uppon payment approval",
301
+ discount_info6: "Terms and Conditions of Use",
302
+ coupon_empty: "Please, inform your coupon code",
303
+ apply: "Apply",
304
+ remove: "Remove"
305
+ },
306
+ paths: {
307
+ loading: "images/loading.gif",
308
+ check: "images/check.png",
309
+ error: "images/error.png"
310
+ }
311
+ }
312
+
313
+ // === Coupon of Discounts
314
+
315
+ MPv1Ticket.currencyIdToCurrency = function ( currency_id ) {
316
+ if ( currency_id == "ARS" ) {
317
+ return "$";
318
+ } else if ( currency_id == "BRL" ) {
319
+ return "R$";
320
+ } else if ( currency_id == "COP" ) {
321
+ return "$";
322
+ } else if ( currency_id == "CLP" ) {
323
+ return "$";
324
+ } else if ( currency_id == "MXN" ) {
325
+ return "$";
326
+ } else if ( currency_id == "VEF" ) {
327
+ return "Bs";
328
+ } else if ( currency_id == "PEN" ) {
329
+ return "S/";
330
+ } else if ( currency_id == "UYU" ) {
331
+ return "$U";
332
+ } else {
333
+ return "$";
334
+ }
335
+ }
336
+
337
+ MPv1Ticket.checkCouponEligibility = function () {
338
+ if ( document.querySelector( MPv1Ticket.selectors.couponCode ).value == "" ) {
339
+ // Coupon code is empty.
340
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).style.display = "none";
341
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).style.display = "block";
342
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).innerHTML = MPv1Ticket.text.coupon_empty;
343
+ MPv1Ticket.coupon_of_discounts.status = false;
344
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background = null;
345
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).value = MPv1Ticket.text.apply;
346
+ document.querySelector( MPv1Ticket.selectors.discount ).value = 0;
347
+ // --- No cards handler ---
348
+ } else if ( MPv1Ticket.coupon_of_discounts.status ) {
349
+ // We already have a coupon set, so we remove it.
350
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).style.display = "none";
351
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).style.display = "none";
352
+ MPv1Ticket.coupon_of_discounts.status = false;
353
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).style.background = null;
354
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).value = MPv1Ticket.text.apply;
355
+ document.querySelector( MPv1Ticket.selectors.couponCode ).value = "";
356
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background = null;
357
+ document.querySelector( MPv1Ticket.selectors.discount ).value = 0;
358
+ // --- No cards handler ---
359
+ } else {
360
+ // Set loading.
361
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).style.display = "none";
362
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).style.display = "none";
363
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background = "url(" + MPv1Ticket.paths.loading + ") 98% 50% no-repeat #fff";
364
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).disabled = true;
365
+
366
+ // Check if there are params in the url.
367
+ var url = MPv1Ticket.coupon_of_discounts.discount_action_url;
368
+ var sp = "?";
369
+ if ( url.indexOf( "?" ) >= 0 ) {
370
+ sp = "&";
371
+ }
372
+ url += sp + "site_id=" + MPv1Ticket.site_id;
373
+ url += "&coupon_id=" + document.querySelector( MPv1Ticket.selectors.couponCode ).value;
374
+ url += "&amount=" + document.querySelector( MPv1Ticket.selectors.amount ).value;
375
+ url += "&payer=" + MPv1Ticket.coupon_of_discounts.payer_email;
376
+ //url += "&payer=" + document.getElementById( "billing_email" ).value;
377
+
378
+ MPv1Ticket.AJAX({
379
+ url: url,
380
+ method : "GET",
381
+ timeout : 5000,
382
+ error: function() {
383
+ // Request failed.
384
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).style.display = "none";
385
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).style.display = "none";
386
+ MPv1Ticket.coupon_of_discounts.status = false;
387
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).style.background = null;
388
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).value = MPv1Ticket.text.apply;
389
+ document.querySelector( MPv1Ticket.selectors.couponCode ).value = "";
390
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background = null;
391
+ document.querySelector( MPv1Ticket.selectors.discount ).value = 0;
392
+ // --- No cards handler ---
393
+ },
394
+ success : function ( status, response ) {
395
+ if ( response.status == 200 ) {
396
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).style.display =
397
+ "block";
398
+ document.querySelector( MPv1Ticket.selectors.discount ).value =
399
+ response.response.coupon_amount;
400
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).innerHTML =
401
+ //"<div style='border-style: solid; border-width:thin; " +
402
+ //"border-color: #009EE3; padding: 8px 8px 8px 8px; margin-top: 4px;'>" +
403
+ MPv1Ticket.text.discount_info1 + " <strong>" +
404
+ MPv1Ticket.currencyIdToCurrency( response.response.currency_id ) + " " +
405
+ Math.round( response.response.coupon_amount * 100 ) / 100 +
406
+ "</strong> " + MPv1Ticket.text.discount_info2 + " " +
407
+ response.response.name + ".<br>" + MPv1Ticket.text.discount_info3 + " <strong>" +
408
+ MPv1Ticket.currencyIdToCurrency( response.response.currency_id ) + " " +
409
+ Math.round( MPv1Ticket.getAmountWithoutDiscount() * 100 ) / 100 +
410
+ "</strong><br>" + MPv1Ticket.text.discount_info4 + " <strong>" +
411
+ MPv1Ticket.currencyIdToCurrency( response.response.currency_id ) + " " +
412
+ Math.round( MPv1Ticket.getAmount() * 100 ) / 100 + "*</strong><br>" +
413
+ "<i>" + MPv1Ticket.text.discount_info5 + "</i><br>" +
414
+ "<a href='https://api.mercadolibre.com/campaigns/" +
415
+ response.response.id +
416
+ "/terms_and_conditions?format_type=html' target='_blank'>" +
417
+ MPv1Ticket.text.discount_info6 + "</a>";
418
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).style.display =
419
+ "none";
420
+ MPv1Ticket.coupon_of_discounts.status = true;
421
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background =
422
+ null;
423
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background =
424
+ "url(" + MPv1Ticket.paths.check + ") 98% 50% no-repeat #fff";
425
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).value =
426
+ MPv1Ticket.text.remove;
427
+ // --- No cards handler ---
428
+ document.querySelector( MPv1Ticket.selectors.campaign_id ).value =
429
+ response.response.id;
430
+ document.querySelector( MPv1Ticket.selectors.campaign ).value =
431
+ response.response.name;
432
+ } else if ( response.status == 400 || response.status == 404 ) {
433
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).style.display = "none";
434
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).style.display = "block";
435
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).innerHTML = response.response.message;
436
+ MPv1Ticket.coupon_of_discounts.status = false;
437
+ document.querySelector(MPv1Ticket.selectors.couponCode).style.background = null;
438
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background = "url(" + MPv1Ticket.paths.error + ") 98% 50% no-repeat #fff";
439
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).value = MPv1Ticket.text.apply;
440
+ document.querySelector( MPv1Ticket.selectors.discount ).value = 0;
441
+ // --- No cards handler ---
442
+ }
443
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).disabled = false;
444
+ }
445
+ });
446
+ }
447
+ }
448
+
449
+ // === Initialization function
450
+
451
+ MPv1Ticket.addListenerEvent = function( el, eventName, handler ) {
452
+ if ( el.addEventListener ) {
453
+ el.addEventListener( eventName, handler );
454
+ } else {
455
+ el.attachEvent( "on" + eventName, function() {
456
+ handler.call( el );
457
+ } );
458
+ }
459
+ };
460
+
461
+ /*
462
+ *
463
+ * Utilities
464
+ *
465
+ */
466
+
467
+ MPv1Ticket.referer = (function () {
468
+ var referer = window.location.protocol + "//" +
469
+ window.location.hostname + ( window.location.port ? ":" + window.location.port: "" );
470
+ return referer;
471
+ })();
472
+
473
+ MPv1Ticket.AJAX = function( options ) {
474
+ var useXDomain = !!window.XDomainRequest;
475
+ var req = useXDomain ? new XDomainRequest() : new XMLHttpRequest()
476
+ var data;
477
+ options.url += ( options.url.indexOf( "?" ) >= 0 ? "&" : "?" ) + "referer=" + escape( MPv1Ticket.referer );
478
+ options.requestedMethod = options.method;
479
+ if ( useXDomain && options.method == "PUT" ) {
480
+ options.method = "POST";
481
+ options.url += "&_method=PUT";
482
+ }
483
+ req.open( options.method, options.url, true );
484
+ req.timeout = options.timeout || 1000;
485
+ if ( window.XDomainRequest ) {
486
+ req.onload = function() {
487
+ data = JSON.parse( req.responseText );
488
+ if ( typeof options.success === "function" ) {
489
+ options.success( options.requestedMethod === "POST" ? 201 : 200, data );
490
+ }
491
+ };
492
+ req.onerror = req.ontimeout = function() {
493
+ if ( typeof options.error === "function" ) {
494
+ options.error( 400, {
495
+ user_agent:window.navigator.userAgent, error : "bad_request", cause:[]
496
+ });
497
+ }
498
+ };
499
+ req.onprogress = function() {};
500
+ } else {
501
+ req.setRequestHeader( "Accept", "application/json" );
502
+ if ( options.contentType ) {
503
+ req.setRequestHeader( "Content-Type", options.contentType );
504
+ } else {
505
+ req.setRequestHeader( "Content-Type", "application/json" );
506
+ }
507
+ req.onreadystatechange = function() {
508
+ if ( this.readyState === 4 ) {
509
+ if ( this.status >= 200 && this.status < 400 ) {
510
+ // Success!
511
+ data = JSON.parse( this.responseText );
512
+ if ( typeof options.success === "function" ) {
513
+ options.success( this.status, data );
514
+ }
515
+ } else if ( this.status >= 400 ) {
516
+ data = JSON.parse( this.responseText );
517
+ if ( typeof options.error === "function" ) {
518
+ options.error( this.status, data );
519
+ }
520
+ } else if ( typeof options.error === "function" ) {
521
+ options.error( 503, {} );
522
+ }
523
+ }
524
+ };
525
+ }
526
+ if ( options.method === "GET" || options.data == null || options.data == undefined ) {
527
+ req.send();
528
+ } else {
529
+ req.send( JSON.stringify( options.data ) );
530
+ }
531
+ }
532
+
533
+ // Form validation
534
+
535
+ var doSubmitTicket = false;
536
+
537
+ MPv1Ticket.doPay = function(febraban) {
538
+ if(!doSubmitTicket){
539
+ doSubmitTicket=true;
540
+ document.querySelector(MPv1Ticket.selectors.box_loading).style.background = "url("+MPv1Ticket.paths.loading+") 0 50% no-repeat #fff";
541
+ btn = document.querySelector(MPv1Ticket.selectors.form);
542
+ btn.submit();
543
+ }
544
+ }
545
+
546
+ MPv1Ticket.validateInputsTicket = function(event) {
547
+ event.preventDefault();
548
+ MPv1Ticket.hideErrors();
549
+ var valid_to_ticket = true;
550
+ var $inputs = MPv1Ticket.getForm().querySelectorAll("[data-checkout]");
551
+ var $inputs_to_validate_ticket = MPv1Ticket.inputs_to_validate_ticket;
552
+ var febraban = [];
553
+ var arr = [];
554
+ for (var x = 0; x < $inputs.length; x++) {
555
+ var element = $inputs[x];
556
+ if($inputs_to_validate_ticket.indexOf(element.getAttribute("data-checkout")) > -1){
557
+ if (element.value == -1 || element.value == "") {
558
+ arr.push(element.id);
559
+ valid_to_ticket = false;
560
+ } else {
561
+ febraban[element.id] = element.value;
562
+ }
563
+ }
564
+ }
565
+ if (!valid_to_ticket) {
566
+ MPv1Ticket.showErrors(arr);
567
+ } else {
568
+ MPv1Ticket.doPay(febraban);
569
+ }
570
+ }
571
+
572
+ MPv1Ticket.getForm = function(){
573
+ return document.querySelector(MPv1Ticket.selectors.form);
574
+ }
575
+
576
+ MPv1Ticket.addListenerEvent = function(el, eventName, handler){
577
+ if (el.addEventListener) {
578
+ el.addEventListener(eventName, handler);
579
+ } else {
580
+ el.attachEvent("on" + eventName, function(){
581
+ handler.call(el);
582
+ });
583
+ }
584
+ };
585
+
586
+ // Show/hide errors.
587
+
588
+ MPv1Ticket.showErrors = function(fields){
589
+ var $form = MPv1Ticket.getForm();
590
+ for(var x = 0; x < fields.length; x++){
591
+ var f = fields[x];
592
+ var $span = $form.querySelector("#error_" + f);
593
+ var $input = $form.querySelector($span.getAttribute("data-main"));
594
+ $span.style.display = "inline-block";
595
+ $input.classList.add("mp-error-input");
596
+ }
597
+ return;
598
+ }
599
+
600
+ MPv1Ticket.hideErrors = function(){
601
+ for(var x = 0; x < document.querySelectorAll("[data-checkout]").length; x++){
602
+ var $field = document.querySelectorAll("[data-checkout]")[x];
603
+ $field.classList.remove("mp-error-input");
604
+ } //end for
605
+ for(var x = 0; x < document.querySelectorAll(".erro_febraban").length; x++){
606
+ var $span = document.querySelectorAll(".erro_febraban")[x];
607
+ $span.style.display = "none";
608
+ }
609
+ return;
610
+ }
611
+
612
+ MPv1Ticket.actionsMLB = function() {
613
+ MPv1Ticket.initializeDocumentPessoaFisica();
614
+ MPv1Ticket.addListenerEvent(document.querySelector(MPv1Ticket.selectors.cpfcnpj), 'keyup', MPv1Ticket.execFormatDocument);
615
+ MPv1Ticket.addListenerEvent(document.querySelector(MPv1Ticket.selectors.radioTypeFisica), "change", MPv1Ticket.initializeDocumentPessoaFisica);
616
+ MPv1Ticket.addListenerEvent(document.querySelector(MPv1Ticket.selectors.radioTypeJuridica), "change", MPv1Ticket.initializeDocumentPessoaJuridica);
617
+ return;
618
+ }
619
+
620
+ MPv1Ticket.initializeDocumentPessoaFisica = function() {
621
+ // show elements
622
+ document.querySelector(MPv1Ticket.selectors.boxLastName).style.display = "block";
623
+ document.querySelector(MPv1Ticket.selectors.titleFirstName).style.display = "block";
624
+ document.querySelector(MPv1Ticket.selectors.titleDocNumber).style.display = "block";
625
+ // adjustment css
626
+ document.querySelector(MPv1Ticket.selectors.boxFirstName).classList.remove("form-col-8");
627
+ document.querySelector(MPv1Ticket.selectors.boxFirstName).classList.add("form-col-4");
628
+ // hide elements
629
+ document.querySelector(MPv1Ticket.selectors.titleFirstNameRazaoSocial).style.display = "none";
630
+ document.querySelector(MPv1Ticket.selectors.titleDocNumberCNPJ).style.display = "none";
631
+ // force max length CPF
632
+ document.querySelector(MPv1Ticket.selectors.cpfcnpj).maxLength = 14;
633
+ }
634
+
635
+ MPv1Ticket.initializeDocumentPessoaJuridica = function() {
636
+ // show elements
637
+ document.querySelector(MPv1Ticket.selectors.titleFirstNameRazaoSocial).style.display = "block";
638
+ document.querySelector(MPv1Ticket.selectors.titleDocNumberCNPJ).style.display = "block";
639
+ // adjustment css
640
+ document.querySelector(MPv1Ticket.selectors.boxFirstName).classList.remove("form-col-4");
641
+ document.querySelector(MPv1Ticket.selectors.boxFirstName).classList.add("form-col-8");
642
+ // Hide Elements
643
+ document.querySelector(MPv1Ticket.selectors.boxLastName).style.display = "none";
644
+ document.querySelector(MPv1Ticket.selectors.titleFirstName).style.display = "none";
645
+ document.querySelector(MPv1Ticket.selectors.titleDocNumber).style.display = "none";
646
+ // force max length CNPJ
647
+ document.querySelector(MPv1Ticket.selectors.cpfcnpj).maxLength = 18;
648
+ }
649
+
650
+ MPv1Ticket.validaCPF = function(strCPF) {
651
+ var Soma;
652
+ var Resto;
653
+ strCPF = strCPF.replace(/[.-\s]/g, "")
654
+ Soma = 0;
655
+ if (strCPF == "00000000000") {
656
+ return false;
657
+ }
658
+ for (i=1; i<=9; i++) {
659
+ Soma = Soma + parseInt(strCPF.substring(i-1, i)) * (11 - i);
660
+ }
661
+ Resto = (Soma * 10) % 11;
662
+ if ((Resto == 10) || (Resto == 11)) {
663
+ Resto = 0;
664
+ }
665
+ if (Resto != parseInt(strCPF.substring(9, 10)) ) {
666
+ return false;
667
+ }
668
+ Soma = 0;
669
+ for (i = 1; i <= 10; i++){
670
+ Soma = Soma + parseInt(strCPF.substring(i-1, i)) * (12 - i);
671
+ }
672
+ Resto = (Soma * 10) % 11;
673
+ if ((Resto == 10) || (Resto == 11)) {
674
+ Resto = 0;
675
+ }
676
+ if (Resto != parseInt(strCPF.substring(10, 11) ) ) {
677
+ return false;
678
+ }
679
+ return true;
680
+ }
681
+
682
+ MPv1Ticket.validaCNPJ = function(strCNPJ) {
683
+ strCNPJ = strCNPJ.replace(".","");
684
+ strCNPJ = strCNPJ.replace(".","");
685
+ strCNPJ = strCNPJ.replace(".","");
686
+ strCNPJ = strCNPJ.replace("-","");
687
+ strCNPJ = strCNPJ.replace("/","");
688
+ var numeros, digitos, soma, i, resultado, pos, tamanho, digitos_iguais;
689
+ digitos_iguais = 1;
690
+ if (strCNPJ.length < 14 && strCNPJ.length < 15) {
691
+ return false;
692
+ }
693
+ for (i = 0; i < strCNPJ.length - 1; i++) {
694
+ if (strCNPJ.charAt(i) != strCNPJ.charAt(i + 1)) {
695
+ digitos_iguais = 0;
696
+ break;
697
+ }
698
+ }
699
+ if (!digitos_iguais) {
700
+ tamanho = strCNPJ.length - 2
701
+ numeros = strCNPJ.substring(0,tamanho);
702
+ digitos = strCNPJ.substring(tamanho);
703
+ soma = 0;
704
+ pos = tamanho - 7;
705
+ for (i = tamanho; i >= 1; i--) {
706
+ soma += numeros.charAt(tamanho - i) * pos--;
707
+ if (pos < 2) {
708
+ pos = 9;
709
+ }
710
+ }
711
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
712
+ if (resultado != digitos.charAt(0)) {
713
+ return false;
714
+ }
715
+ tamanho = tamanho + 1;
716
+ numeros = strCNPJ.substring(0,tamanho);
717
+ soma = 0;
718
+ pos = tamanho - 7;
719
+ for (i = tamanho; i >= 1; i--) {
720
+ soma += numeros.charAt(tamanho - i) * pos--;
721
+ if (pos < 2) {
722
+ pos = 9;
723
+ }
724
+ }
725
+ resultado = soma % 11 < 2 ? 0 : 11 - soma % 11;
726
+ if (resultado != digitos.charAt(1)) {
727
+ return false;
728
+ }
729
+ return true;
730
+ } else {
731
+ return false;
732
+ }
733
+ }
734
+
735
+ MPv1Ticket.execFormatDocument = function() {
736
+ v_obj= this;
737
+ setTimeout(function() {
738
+ v_obj.value = MPv1Ticket.formatDocument(v_obj.value)
739
+ }, 1)
740
+ }
741
+
742
+ MPv1Ticket.formatDocument = function(v) {
743
+ //Remove tudo o que não é dígito
744
+ v=v.replace(/\D/g,"")
745
+ if (document.querySelector(MPv1Ticket.selectors.radioTypeFisica).checked) { //CPF
746
+ //Coloca um ponto entre o terceiro e o quarto dígitos
747
+ v=v.replace(/(\d{3})(\d)/,"$1.$2")
748
+ //Coloca um ponto entre o terceiro e o quarto dígitos
749
+ //de novo (para o segundo bloco de números)
750
+ v=v.replace(/(\d{3})(\d)/,"$1.$2")
751
+ //Coloca um hífen entre o terceiro e o quarto dígitos
752
+ v=v.replace(/(\d{3})(\d{1,2})$/,"$1-$2")
753
+ } else { //CNPJ
754
+ //Coloca ponto entre o segundo e o terceiro dígitos
755
+ v=v.replace(/^(\d{2})(\d)/, "$1.$2")
756
+ //Coloca ponto entre o quinto e o sexto dígitos
757
+ v=v.replace(/^(\d{2})\.(\d{3})(\d)/, "$1.$2.$3")
758
+ //Coloca uma barra entre o oitavo e o nono dígitos
759
+ v=v.replace(/\.(\d{3})(\d)/, ".$1/$2")
760
+ //Coloca um hífen depois do bloco de quatro dígitos
761
+ v=v.replace(/(\d{4})(\d)/, "$1-$2")
762
+ }
763
+ return v
764
+ }
765
+
766
+ // ===
767
+
768
+ MPv1Ticket.Initialize = function( site_id, coupon_mode, discount_action_url, payer_email ) {
769
+
770
+ // Sets.
771
+ MPv1Ticket.site_id = site_id;
772
+ MPv1Ticket.coupon_of_discounts.default = coupon_mode;
773
+ MPv1Ticket.coupon_of_discounts.discount_action_url = discount_action_url;
774
+ MPv1Ticket.coupon_of_discounts.payer_email = payer_email;
775
+
776
+ // Flow coupon of discounts.
777
+ if ( MPv1Ticket.coupon_of_discounts.default ) {
778
+ MPv1Ticket.addListenerEvent(
779
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ),
780
+ "click",
781
+ MPv1Ticket.checkCouponEligibility
782
+ );
783
+ } else {
784
+ document.querySelector( MPv1Ticket.selectors.formCoupon ).style.display = "none";
785
+ }
786
+
787
+ // flow: MLB
788
+ if (MPv1Ticket.site_id == "MLB") {
789
+ MPv1Ticket.actionsMLB();
790
+ }
791
+ /*if (MPv1Ticket.site_id != "MLB") {
792
+ document.querySelector(MPv1Ticket.selectors.formTicket).style.display = "none";
793
+ } else {
794
+ MPv1Ticket.addListenerEvent(
795
+ document.querySelector(MPv1Ticket.selectors.form),
796
+ "submit",
797
+ MPv1Ticket.validateInputsTicket
798
+ );
799
+ }*/
800
+
801
+ return;
802
+
803
+ }
804
+
805
+ this.MPv1Ticket = MPv1Ticket;
806
+
807
+ } ).call();
808
+
809
+ // === Instantiation
810
+
811
+ var mercadopago_site_id = "<?php echo $site_id; ?>";
812
+ var mercadopago_payer_email = "<?php echo $payer_email; ?>";
813
+ var mercadopago_coupon_mode = "<?php echo $coupon_mode; ?>";
814
+ var mercadopago_discount_action_url = "<?php echo $discount_action_url; ?>";
815
+
816
+ MPv1Ticket.text.discount_info1 = "<?php echo $form_labels['form']['discount_info1']; ?>";
817
+ MPv1Ticket.text.discount_info2 = "<?php echo $form_labels['form']['discount_info2']; ?>";
818
+ MPv1Ticket.text.discount_info3 = "<?php echo $form_labels['form']['discount_info3']; ?>";
819
+ MPv1Ticket.text.discount_info4 = "<?php echo $form_labels['form']['discount_info4']; ?>";
820
+ MPv1Ticket.text.discount_info5 = "<?php echo $form_labels['form']['discount_info5']; ?>";
821
+ MPv1Ticket.text.discount_info6 = "<?php echo $form_labels['form']['discount_info6']; ?>";
822
+ MPv1Ticket.text.apply = "<?php echo $form_labels['form']['apply']; ?>";
823
+ MPv1Ticket.text.remove = "<?php echo $form_labels['form']['remove']; ?>";
824
+ MPv1Ticket.text.coupon_empty = "<?php echo $form_labels['form']['coupon_empty']; ?>";
825
+ MPv1Ticket.paths.loading = "<?php echo ( $images_path . 'loading.gif' ); ?>";
826
+ MPv1Ticket.paths.check = "<?php echo ( $images_path . 'check.png' ); ?>";
827
+ MPv1Ticket.paths.error = "<?php echo ( $images_path . 'error.png' ); ?>";
828
+
829
+ MPv1Ticket.getAmount = function() {
830
+ return document.querySelector( MPv1Ticket.selectors.amount )
831
+ .value - document.querySelector( MPv1Ticket.selectors.discount ).value;
832
+ }
833
+
834
+ MPv1Ticket.getAmountWithoutDiscount = function() {
835
+ return document.querySelector( MPv1Ticket.selectors.amount ).value;
836
+ }
837
+
838
+ MPv1Ticket.Initialize(
839
+ mercadopago_site_id,
840
+ mercadopago_coupon_mode == "yes",
841
+ mercadopago_discount_action_url,
842
+ mercadopago_payer_email
843
+ );
844
+
845
+ </script>