WooCommerce MercadoPago - Version old.2.2.1

Version Description

Download this release

Release Info

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

Code changes from version old.1.0.3 to old.2.2.1

Files changed (102) hide show
  1. README.txt +233 -61
  2. admin/class-wc-mercadoenvios-admin-orders.php +86 -0
  3. assets/css/custom_checkout_mercadopago.css +223 -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/check.png +0 -0
  62. images/credit_card.png +0 -0
  63. images/cvv.png +0 -0
  64. images/error.png +0 -0
  65. images/loading.gif +0 -0
  66. images/mercadopago.png +0 -0
  67. images/mplogo.png +0 -0
  68. images/warning.png +0 -0
  69. languages/woocommerce-mercadopago-module-es_AR.mo +0 -0
  70. languages/woocommerce-mercadopago-module-es_AR.po +823 -180
  71. languages/woocommerce-mercadopago-module-es_CL.mo +0 -0
  72. languages/woocommerce-mercadopago-module-es_CL.po +824 -181
  73. languages/woocommerce-mercadopago-module-es_CO.mo +0 -0
  74. languages/woocommerce-mercadopago-module-es_CO.po +824 -188
  75. languages/woocommerce-mercadopago-module-es_ES.mo +0 -0
  76. languages/woocommerce-mercadopago-module-es_ES.po +991 -0
  77. languages/woocommerce-mercadopago-module-es_MX.mo +0 -0
  78. languages/woocommerce-mercadopago-module-es_MX.po +824 -181
  79. languages/woocommerce-mercadopago-module-es_PE.mo +0 -0
  80. languages/woocommerce-mercadopago-module-es_PE.po +991 -0
  81. languages/woocommerce-mercadopago-module-es_UY.mo +0 -0
  82. languages/woocommerce-mercadopago-module-es_UY.po +991 -0
  83. languages/woocommerce-mercadopago-module-es_VE.mo +0 -0
  84. languages/woocommerce-mercadopago-module-es_VE.po +824 -181
  85. languages/woocommerce-mercadopago-module-pt_BR.mo +0 -0
  86. languages/woocommerce-mercadopago-module-pt_BR.po +891 -247
  87. languages/woocommerce-mercadopago-module.pot +791 -337
  88. mercadopago-module.php +511 -84
  89. mercadopago/class-wc-product-mp_recurrent.php +450 -0
  90. mercadopago/css/woo-mercadopago-module.css +0 -14
  91. mercadopago/mercadopago-custom-gateway.php +1868 -0
  92. mercadopago/mercadopago-gateway.php +1655 -618
  93. mercadopago/mercadopago-subscription-gateway.php +1421 -0
  94. mercadopago/mercadopago-ticket-gateway.php +1674 -0
  95. mercadopago/sdk/lib/cacert.pem +0 -0
  96. mercadopago/sdk/lib/mercadopago.php +1077 -561
  97. shipment/abstract-wc-mercadoenvios-shipping.php +352 -0
  98. shipment/class-wc-mercadoenvios-package.php +257 -0
  99. shipment/class-wc-mercadoenvios-shipping-express.php +35 -0
  100. shipment/class-wc-mercadoenvios-shipping-normal.php +35 -0
  101. templates/credit-card/payment-form.php +1376 -0
  102. templates/ticket/ticket-form.php +455 -0
README.txt CHANGED
@@ -1,12 +1,12 @@
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
 
@@ -14,79 +14,251 @@ This is the oficial module of Mercado Pago for WooCommerce plugin.
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.1
8
  License: GPLv2 or later
9
+ License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
11
  This is the oficial module of Mercado Pago for WooCommerce plugin.
12
 
14
 
15
  This module enables WooCommerce to use Mercado Pago as a payment Gateway for purchases made in your e-commerce store.
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 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
+ * Seller's Protection Program.
31
+
32
  == Installation ==
33
 
34
+ You have two ways to install this module: from your WordPress Store, or by downloading and manually copying the module directory.
35
 
36
+ = Install from WordPress =
37
+ 1. On your store administration, go to **Plugins** option in sidebar;
38
+ 2. Click in **Add New** button and type "Woo Mercado Pago Module" in the **Search Plugins** text field. Press Enter;
39
+ 3. You should find the module read to be installed. Click install.
40
 
41
+ = Manual Download =
42
+ 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.1.zip">WordPress Plugin Directory</a>);
43
+ 2. Unzip the folder and find "woo-mercado-pago-module" directory;
44
+ 3. Copy "woo-mercado-pago-module" directory to **[WordPressRootDirectory]/wp-content/plugins/** directory.
45
 
46
+ 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.
47
 
48
+ = Configuration =
49
+ 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**.
50
+ * To get your **Client_id** and **Client_secret** for your country, you can go to:
51
+ * Argentina: https://www.mercadopago.com/mla/account/credentials?type=basic
52
+ * Brazil: https://www.mercadopago.com/mlb/account/credentials?type=basic
53
+ * Chile: https://www.mercadopago.com/mlc/account/credentials?type=basic
54
+ * Colombia: https://www.mercadopago.com/mco/account/credentials?type=basic
55
+ * Mexico: https://www.mercadopago.com/mlm/account/credentials?type=basic
56
+ * Peru: https://www.mercadopago.com/mpe/account/credentials?type=basic
57
+ * Uruguay: https://www.mercadopago.com/mlu/account/credentials?type=basic
58
+ * Venezuela: https://www.mercadopago.com/mlv/account/credentials?type=basic
59
+ * And to get your **Public Key**/**Access Token** you can go to:
60
+ * Argentina: https://www.mercadopago.com/mla/account/credentials?type=custom
61
+ * Brazil: https://www.mercadopago.com/mlb/account/credentials?type=custom
62
+ * Chile: https://www.mercadopago.com/mlc/account/credentials?type=custom
63
+ * Colombia: https://www.mercadopago.com/mco/account/credentials?type=custom
64
+ * Mexico: https://www.mercadopago.com/mlm/account/credentials?type=custom
65
+ * Peru: https://www.mercadopago.com/mpe/account/credentials?type=custom
66
+ * Uruguay: https://www.mercadopago.com/mlu/account/credentials?type=custom
67
+ * Venezuela: https://www.mercadopago.com/mlv/account/credentials?type=custom
68
+ 2. For the solutions **Mercado Pago - Basic Checkout**, **Mercado Pago - Custom Checkout**, and **Mercado Pago - Ticket**, you can:
69
+ * Enable/Disable you plugin (for all solutions);
70
+ * Set up your credentials (Client_id/Client_secret for Basic, Public Key/Access Token for Custom and Ticket);
71
+ * Check your IPN URL, where you will get notified about payment updates (for all solutions);
72
+ * Set the title of the payment option that will be shown to your customers (for all solutions);
73
+ * Set the description of the payment option that will be shown to your customers (for all solutions);
74
+ * Set the description that will be shown in your customer's invoice (for Custom and Ticket);
75
+ * Enable coupon of campaigns for discounts (for Custom and Ticket);
76
+ * Set binary mode that when charging a credit card, only [approved] or [reject] status will be taken (only for Custom);
77
+ * Set the category of your store (for all solutions);
78
+ * Set a prefix to identify your store, when you have multiple stores for only one Mercado Pago account (for all solutions);
79
+ * Define how your customers will interact with Mercado Pago to pay their orders (only for Basic);
80
+ * Configure the after-pay return behavior (only for Basic);
81
+ * Configure the maximum installments allowed for your customers (only for Basic);
82
+ * Configure the payment methods that you want to not work with Mercado Pago (only for Basic);
83
+ * Enable currency conversion (for all solutions);
84
+ * Enable/disable sandbox mode, where you can test your payments in Mercado Pago sandbox environment (for Basic and Custom);
85
+ * Enables/disable system logs (for all solutions).
86
 
87
+ = In this video, we show how you can install and configure from your WordPress store =
88
+
89
+ [youtube https://www.youtube.com/watch?v=CgV9aVlx5SE]
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  == Frequently Asked Questions ==
92
 
93
+ = What is Mercado Pago? =
94
+ Please, take a look: https://vimeo.com/125253122
95
 
96
+ = Any questions? =
97
  Please, check our FAQ at: https://www.mercadopago.com.br/ajuda/
98
 
99
  == Screenshots ==
100
 
101
+ 1. `Custom Checkout`
102
+
103
+ 2. `One Click Payment`
104
+
105
+ 3. `Tickets`
106
+
107
+ 4. `Discount Coupon`
108
+
109
+ 5. `Configuration of Basic Checkout`
110
 
111
  == Changelog ==
112
 
113
+ = v2.2.1 (13/04/2017) =
114
+ * Features
115
+ - Discount by payment method. Merchants can give a discount to their customers if the payment is made with a given gateway.
116
+ * Improvements
117
+ - Support for WooCommerce 3.0.0.
 
118
 
119
+ = v2.2.0 (03/04/2017) =
120
+ * Features
121
+ - Recurrent Payments. This feature allow merchants to create subscriptions and charge their customers periodically. For now, available only to Argentina, Brazil and Mexico.
 
 
122
 
123
+ = v2.1.9 (23/03/2017) =
124
+ * Features
125
+ - 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.
126
+
127
+ = v2.1.8 (13/02/2017) =
128
+ * Features
129
+ - Rollout to Uruguay. This plugin is now supporting Uruguay for Basic Checkout and its local language translations.
130
+ * Improvements
131
+ - Conformity with Argentina's E 51/2017 resolution to show up CFT/TEA amounts;
132
+ - Removed decimals from Chile and Colombia currencies, as they aren't used.
133
+ * Bug fixes
134
+ - Fixed and improved the coupon algorithm.
135
+
136
+ = v2.1.7 (12/12/2016) =
137
+ * Bug fixes
138
+ - When ticket payment method was enabled, the button for print ticket was appearing for other methods.
139
+
140
+ = v2.1.6 (09/12/2016) =
141
+ * Features
142
+ - Cancel/Refund API integration. Now, merchants can cancel and refund orders through store back-office. Options available in order details, order actions;
143
+ - Back url (checkout callback) configurable in back-office for basic checkout solution.
144
+ * Improvements
145
+ - Added option to select when (payment approval or order generation) to reduce stocks for tickets solution;
146
+ - Payment with ticket with order description at finish.
147
+
148
+ = v2.1.5 (16/11/2016) =
149
+ * Improvements
150
+ - Analytics of module settings.
151
+ * Bug fixes
152
+ - Fixed issue in ticket solution that was printing [null] in ticket description.
153
+
154
+ = v2.1.4 (20/10/2016) =
155
+ * Features
156
+ - Two Card Payment Configuration. Merchants can configure this feature in back-office through settings page.
157
+ * Improvements
158
+ - Removed some redundant notice messages;
159
+ - Improved algorithm to process settings page flow and checkout;
160
+ - Refactored code to meet WordPress coding standards.
161
+ * Bug fixes
162
+ - Fixed a SSL issue related to ticket solution (the open locker) in gateway selection.
163
+
164
+ = v2.1.3 (15/09/2016) =
165
+ * Improvements
166
+ - A few improvements in performance;
167
+ - Improved translations;
168
+ - Improved security with URL access via SSL in all module flow.
169
+
170
+ = v2.1.2 (18/08/2016) =
171
+ * Improvements
172
+ - Improved performance for both client and server sides.
173
+ * Bug fixes
174
+ - Fixed the product list for multiple items in Basic Checkout form.
175
+
176
+ = v2.1.1 (02/08/2016) =
177
+ * Improvements
178
+ - Improved log messages when applying discounts;
179
+ - Added a link to reprint ticket in customer account order page.
180
+ * Bug fixes
181
+ - Fixed tax fee for shipments.
182
+
183
+ = v2.1.0 (25/07/2016) =
184
+ * Features
185
+ - 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>;
186
+ - Currency Conversion. Added an option to try to use Mercado Pago currency ratio, to automatically convert any currencies to supported/used currency.
187
+ * Improvements
188
+ - Improved credentials validation algorithm;
189
+ - Improved checkout data, with more clean and sanitized info for product image and description.
190
+
191
+ = v2.0.5 (07/07/2016) =
192
+ * Improvements
193
+ - Improved IPN behavior to handle consistent messages with absent IDs.
194
+ * Bug fixes
195
+ - Fixed the informative URL of ticket IPN in admin page.
196
+
197
+ = v2.0.4 (29/06/2016) =
198
+ * Improvements
199
+ - Added a message in admin view when currency is different from used locally (used in credential's country).
200
+ * Bug fixes
201
+ - We have wrote a snippet to handle the absent shipment cost problem;
202
+ - Fixed some URLs of the credentials link for Basic Checkout.
203
+
204
+ = v2.0.3 (21/06/2016) =
205
+ * Bug fixes
206
+ - 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.
207
+
208
+ = v2.0.2 (13/06/2016) =
209
+ * Features
210
+ - Rollout to Peru. This plugin is now supporting Peru, which includes Basic Checkout, Custom Checkout, Tickets, and local language translations.
211
+ * Bug fixes
212
+ - 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;
213
+ - Fix a tax issue. It wasn't been correctly added to the total value in Mercado Pago gateway.
214
+
215
+ = v2.0.1 (09/06/2016) =
216
+ * Features
217
+ - 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>.
218
+ * Improvements
219
+ - 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;
220
+ - 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.
221
+
222
+ = v2.0.0 (01/06/2016) =
223
+ * Features
224
+ - 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>;
225
+ - 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>.
226
+ * Improvements
227
+ - 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).
228
+
229
+ = v1.0.5 (29/04/2016) =
230
+ * Improvements
231
+ - Removal of extra shipment setup in checkout view. We have made a workaround to prevent an extra shipment screen to appear;
232
+ - Translation to es_ES. Users can select Spain as module country, and translation should be ok.
233
+ * Bug fixes
234
+ - Some bug fixes to stabilize the module.
235
+
236
+ = v1.0.4 (15/04/2016) =
237
+ * Improvements
238
+ - 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!
239
+ - 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.
240
 
241
  = v1.0.3 (23/03/2016) =
242
+ * Improving algorithm when processing IPN
243
+ Async calls and processment were refined.
244
+
245
+ = v1.0.2 (23/03/2016) =
246
+ * Bug fixes
247
+ - IPN URL wasn’t triggered when topic=payment. Fixed a bug for some specific IPN messages of Mercado Pago.
248
+
249
+ = v1.0.1 (23/03/2016) =
250
+ * Improvements
251
+ - Added payment ID in order custom fields information. Added some good informations about the payment in the order view;
252
+ - Removed some unused files/code. We've made some code cleaning;
253
+ - 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;
254
+ - Proper information of shipment cost. Previously, the shipment cost was passed together with the cart total order amount.
255
+
256
+ = v1.0.0 (16/03/2016) =
257
+ * Features
258
+ - 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>;
259
+ - 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;
260
+ - Sandbox and debug options. Basicer can test orders by enabling debug mode or using sandbox environment.
261
+
262
+ == Upgrade Notice ==
263
+
264
+ 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,86 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+ /**
3
+ * Admin orders actions.
4
+ *
5
+ * @package WooCommerce_MercadoEnvios/Admin/Orders
6
+ * @version 2.2.1
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
+
77
+ echo '<label for="mercadoenvios_tracking_number">' . esc_html__( 'Tag:', 'woocommerce-mercadopago-module' ) . '</label><br />';
78
+ 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>';
79
+ }
80
+ } else {
81
+ echo '<label for="mercadoenvios_tracking_number">' . esc_html__( 'Shipping is pending', 'woocommerce-mercadopago-module' ) . '</label><br />';
82
+ }
83
+ }
84
+ }
85
+
86
+ new WC_MercadoEnvios_Admin_Orders();
assets/css/custom_checkout_mercadopago.css ADDED
@@ -0,0 +1,223 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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: 14px;
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
+ /*
187
+ *
188
+ *
189
+ * Error
190
+ *
191
+ *
192
+ */
193
+
194
+ .mp-error{
195
+ text-transform: uppercase;
196
+ font-size: 10px;
197
+ color: red;
198
+ font-weight: bold;
199
+ display: none;
200
+ font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
201
+ clear: both;
202
+ float: left;
203
+ }
204
+
205
+ #mp-box-input-tax-tea{
206
+ font-weight: 300;
207
+ color: #666;
208
+ font-size: 12px;
209
+ display: none;
210
+ }
211
+
212
+ #mp-box-input-tax-cft{
213
+ font-weight: 300;
214
+ color: #666;
215
+ font-size: 21px;
216
+ display: none;
217
+ }
218
+
219
+ #mp-box-input-tax-cft #mp-tax-cft-text{
220
+ padding: 7px 0 0 25px;
221
+ float: left;
222
+ }
223
+
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/check.png CHANGED
File without changes
images/credit_card.png ADDED
Binary file
images/cvv.png ADDED
Binary file
images/error.png CHANGED
File without changes
images/loading.gif ADDED
Binary file
images/mercadopago.png CHANGED
File without changes
images/mplogo.png CHANGED
File without changes
images/warning.png CHANGED
File without changes
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,968 @@ 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 "PLACE ORDER". 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."
862
+ msgstr "La cantidad para cobrar el pagador en cada período."
863
+
864
+ msgid "Uruguay"
865
+ msgstr "Uruguay"
866
+
867
+ msgid "Frequency type"
868
+ msgstr "Tipo de frecuencia"
869
+
870
+ msgid "Transaction amount"
871
+ msgstr "Valor de la transacción"
872
+
873
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
874
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
875
+
876
+ msgid "Subscription"
877
+ msgstr "Suscripción"
878
+
879
+ msgid "Enable Subscription"
880
+ msgstr "Habilitar Suscripción"
881
+
882
+ msgid "Subscription is Inactive"
883
+ msgstr "La Suscripción está Inactiva"
884
+
885
+ msgid "Subscribe with Mercado Pago"
886
+ msgstr "Suscribirse con Mercado Pago"
887
+
888
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
889
+ 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:"
890
+
891
+ msgid "Discount by Gateway"
892
+ msgstr "Descuento por Gateway"
893
+
894
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
895
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
896
+
897
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
898
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
899
+
900
+ msgid "Discount Of"
901
+ msgstr "Descuento de"
902
+
903
+ msgid "Mercado Pago Subscription"
904
+ msgstr "Suscripción Mercado Pago"
905
+
906
+ msgid "Payment ID:"
907
+ msgstr "ID de Pago:"
908
+
909
+ msgid "Amount:"
910
+ msgstr "Cantidad:"
911
+
912
+ msgid "This operation could not be completed."
913
+ msgstr "Esta operación no se puede completar."
914
+
915
+ msgid "Operation successfully completed."
916
+ msgstr "La operación se realizó con éxito."
917
+
918
+ msgid "Refund Payment"
919
+ msgstr "Reembolso de Pago"
920
+
921
+ msgid "Cancel Payment"
922
+ msgstr "Cancelar Pago"
923
+
924
+ msgid "Mercado Pago - Subscription"
925
+ msgstr "Mercado Pago - Suscripcións"
926
+
927
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
928
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
929
+
930
+ msgid "Free Shipping"
931
+ msgstr "Envío Gratuito"
932
+
933
+ msgid "Day"
934
+ msgstr "Día"
935
+
936
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
937
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
938
+
939
+ msgid "Mercado Envios"
940
+ msgstr "Mercado Envios"
941
+
942
+ msgid "This controls the title which the user sees during checkout."
943
+ msgstr "Controla el título que se muestra al cliente durante el pago."
944
+
945
+ msgid "Enable free shipping for this shipping method"
946
+ msgstr "Habilitar el envío gratuito para este método de envío"
947
+
948
+ msgid "Delivery Time"
949
+ msgstr "Tiempo de Entrega"
950
+
951
+ msgid "Show estimated delivery time"
952
+ msgstr "Mostrar el tiempo estimado de entrega"
953
+
954
+ msgid "Display the estimated delivery time in working days."
955
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
956
+
957
+ msgid "Buyer initiates complaint and requested a refund."
958
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
959
+
960
+ msgid "In return to sender"
961
+ msgstr "Volviendo al remitente"
962
+
963
+ msgid "Missing recipient for delivery"
964
+ msgstr "Destinatario ausente para envío"
965
+
966
+ msgid "Delayed shipping"
967
+ msgstr "Envío retrasado"
968
+
969
+ msgid "Unsuccessful"
970
+ msgstr "Fracasado"
971
+
972
+ msgid "Tag printed"
973
+ msgstr "Etiqueta impresa"
974
+
975
+ msgid "Tag ready to print"
976
+ msgstr "Etiquetar lista para imprimir"
977
+
978
+ msgid "Tracking code:"
979
+ msgstr "Código de rastreamiento:"
980
+
981
+ msgid "Tag:"
982
+ msgstr "Etiqueta:"
983
+
984
+ msgid "Shipping is pending"
985
+ msgstr "Envío pendiente"
986
+
987
+ msgid "Tutorial"
988
+ msgstr "Tutorial"
989
+
990
+ msgid "Discount Of "
991
+ msgstr "Descuento De "
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,978 @@ 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 "PLACE ORDER". 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."
862
+ msgstr "La cantidad para cobrar el pagador en cada período."
863
+
864
+ msgid "Uruguay"
865
+ msgstr "Uruguay"
866
+
867
+ msgid "Frequency type"
868
+ msgstr "Tipo de frecuencia"
869
+
870
+ msgid "Transaction amount"
871
+ msgstr "Valor de la transacción"
872
+
873
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
874
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
875
+
876
+ msgid "Subscription"
877
+ msgstr "Suscripción"
878
+
879
+ msgid "Enable Subscription"
880
+ msgstr "Habilitar Suscripción"
881
+
882
+ msgid "Subscription is Inactive"
883
+ msgstr "La Suscripción está Inactiva"
884
+
885
+ msgid "Subscribe with Mercado Pago"
886
+ msgstr "Suscribirse con Mercado Pago"
887
+
888
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
889
+ 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:"
890
+
891
+ msgid "Discount by Gateway"
892
+ msgstr "Descuento por Gateway"
893
+
894
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
895
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
896
+
897
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
898
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
899
+
900
+ msgid "Discount Of"
901
+ msgstr "Descuento de"
902
+
903
+ msgid "Mercado Pago Subscription"
904
+ msgstr "Suscripción Mercado Pago"
905
+
906
+ msgid "Payment ID:"
907
+ msgstr "ID de Pago:"
908
+
909
+ msgid "Amount:"
910
+ msgstr "Cantidad:"
911
+
912
+ msgid "This operation could not be completed."
913
+ msgstr "Esta operación no se puede completar."
914
+
915
+ msgid "Operation successfully completed."
916
+ msgstr "La operación se realizó con éxito."
917
+
918
+ msgid "Refund Payment"
919
+ msgstr "Reembolso de Pago"
920
+
921
+ msgid "Cancel Payment"
922
+ msgstr "Cancelar Pago"
923
+
924
+ msgid "Mercado Pago - Subscription"
925
+ msgstr "Mercado Pago - Suscripcións"
926
+
927
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
928
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
929
+
930
+ msgid "Free Shipping"
931
+ msgstr "Envío Gratuito"
932
+
933
+ msgid "Day"
934
+ msgstr "Día"
935
+
936
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
937
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
938
+
939
+ msgid "Mercado Envios"
940
+ msgstr "Mercado Envios"
941
+
942
+ msgid "This controls the title which the user sees during checkout."
943
+ msgstr "Controla el título que se muestra al cliente durante el pago."
944
+
945
+ msgid "Enable free shipping for this shipping method"
946
+ msgstr "Habilitar el envío gratuito para este método de envío"
947
+
948
+ msgid "Delivery Time"
949
+ msgstr "Tiempo de Entrega"
950
+
951
+ msgid "Show estimated delivery time"
952
+ msgstr "Mostrar el tiempo estimado de entrega"
953
+
954
+ msgid "Display the estimated delivery time in working days."
955
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
956
+
957
+ msgid "Buyer initiates complaint and requested a refund."
958
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
959
+
960
+ msgid "In return to sender"
961
+ msgstr "Volviendo al remitente"
962
+
963
+ msgid "Missing recipient for delivery"
964
+ msgstr "Destinatario ausente para envío"
965
+
966
+ msgid "Delayed shipping"
967
+ msgstr "Envío retrasado"
968
+
969
+ msgid "Unsuccessful"
970
+ msgstr "Fracasado"
971
+
972
+ msgid "Tag printed"
973
+ msgstr "Etiqueta impresa"
974
+
975
+ msgid "Tag ready to print"
976
+ msgstr "Etiquetar lista para imprimir"
977
+
978
+ msgid "Tracking code:"
979
+ msgstr "Código de rastreamiento:"
980
+
981
+ msgid "Tag:"
982
+ msgstr "Etiqueta:"
983
+
984
+ msgid "Shipping is pending"
985
+ msgstr "Envío pendiente"
986
+
987
+ msgid "Tutorial"
988
+ msgstr "Tutorial"
989
+
990
+ msgid "Discount Of "
991
+ msgstr "Descuento De "
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,978 @@ 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 "PLACE ORDER". 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."
862
+ msgstr "La cantidad para cobrar el pagador en cada período."
863
+
864
+ msgid "Uruguay"
865
+ msgstr "Uruguay"
866
+
867
+ msgid "Frequency type"
868
+ msgstr "Tipo de frecuencia"
869
+
870
+ msgid "Transaction amount"
871
+ msgstr "Valor de la transacción"
872
+
873
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
874
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
875
+
876
+ msgid "Subscription"
877
+ msgstr "Suscripción"
878
+
879
+ msgid "Enable Subscription"
880
+ msgstr "Habilitar Suscripción"
881
+
882
+ msgid "Subscription is Inactive"
883
+ msgstr "La Suscripción está Inactiva"
884
+
885
+ msgid "Subscribe with Mercado Pago"
886
+ msgstr "Suscribirse con Mercado Pago"
887
+
888
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
889
+ 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:"
890
+
891
+ msgid "Discount by Gateway"
892
+ msgstr "Descuento por Gateway"
893
+
894
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
895
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
896
+
897
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
898
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
899
+
900
+ msgid "Discount Of"
901
+ msgstr "Descuento de"
902
+
903
+ msgid "Mercado Pago Subscription"
904
+ msgstr "Suscripción Mercado Pago"
905
+
906
+ msgid "Payment ID:"
907
+ msgstr "ID de Pago:"
908
+
909
+ msgid "Amount:"
910
+ msgstr "Cantidad:"
911
+
912
+ msgid "This operation could not be completed."
913
+ msgstr "Esta operación no se puede completar."
914
+
915
+ msgid "Operation successfully completed."
916
+ msgstr "La operación se realizó con éxito."
917
+
918
+ msgid "Refund Payment"
919
+ msgstr "Reembolso de Pago"
920
+
921
+ msgid "Cancel Payment"
922
+ msgstr "Cancelar Pago"
923
+
924
+ msgid "Mercado Pago - Subscription"
925
+ msgstr "Mercado Pago - Suscripcións"
926
+
927
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
928
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
929
+
930
+ msgid "Free Shipping"
931
+ msgstr "Envío Gratuito"
932
+
933
+ msgid "Day"
934
+ msgstr "Día"
935
+
936
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
937
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
938
+
939
+ msgid "Mercado Envios"
940
+ msgstr "Mercado Envios"
941
+
942
+ msgid "This controls the title which the user sees during checkout."
943
+ msgstr "Controla el título que se muestra al cliente durante el pago."
944
+
945
+ msgid "Enable free shipping for this shipping method"
946
+ msgstr "Habilitar el envío gratuito para este método de envío"
947
+
948
+ msgid "Delivery Time"
949
+ msgstr "Tiempo de Entrega"
950
+
951
+ msgid "Show estimated delivery time"
952
+ msgstr "Mostrar el tiempo estimado de entrega"
953
+
954
+ msgid "Display the estimated delivery time in working days."
955
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
956
+
957
+ msgid "Buyer initiates complaint and requested a refund."
958
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
959
+
960
+ msgid "In return to sender"
961
+ msgstr "Volviendo al remitente"
962
+
963
+ msgid "Missing recipient for delivery"
964
+ msgstr "Destinatario ausente para envío"
965
+
966
+ msgid "Delayed shipping"
967
+ msgstr "Envío retrasado"
968
+
969
+ msgid "Unsuccessful"
970
+ msgstr "Fracasado"
971
+
972
+ msgid "Tag printed"
973
+ msgstr "Etiqueta impresa"
974
+
975
+ msgid "Tag ready to print"
976
+ msgstr "Etiquetar lista para imprimir"
977
+
978
+ msgid "Tracking code:"
979
+ msgstr "Código de rastreamiento:"
980
+
981
+ msgid "Tag:"
982
+ msgstr "Etiqueta:"
983
+
984
+ msgid "Shipping is pending"
985
+ msgstr "Envío pendiente"
986
+
987
+ msgid "Tutorial"
988
+ msgstr "Tutorial"
989
+
990
+ msgid "Discount Of "
991
+ msgstr "Descuento De "
languages/woocommerce-mercadopago-module-es_ES.mo ADDED
Binary file
languages/woocommerce-mercadopago-module-es_ES.po ADDED
@@ -0,0 +1,991 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 "PLACE ORDER". 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."
862
+ msgstr "La cantidad para cobrar el pagador en cada período."
863
+
864
+ msgid "Uruguay"
865
+ msgstr "Uruguay"
866
+
867
+ msgid "Frequency type"
868
+ msgstr "Tipo de frecuencia"
869
+
870
+ msgid "Transaction amount"
871
+ msgstr "Valor de la transacción"
872
+
873
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
874
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
875
+
876
+ msgid "Subscription"
877
+ msgstr "Suscripción"
878
+
879
+ msgid "Enable Subscription"
880
+ msgstr "Habilitar Suscripción"
881
+
882
+ msgid "Subscription is Inactive"
883
+ msgstr "La Suscripción está Inactiva"
884
+
885
+ msgid "Subscribe with Mercado Pago"
886
+ msgstr "Suscribirse con Mercado Pago"
887
+
888
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
889
+ 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:"
890
+
891
+ msgid "Discount by Gateway"
892
+ msgstr "Descuento por Gateway"
893
+
894
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
895
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
896
+
897
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
898
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
899
+
900
+ msgid "Discount Of"
901
+ msgstr "Descuento de"
902
+
903
+ msgid "Mercado Pago Subscription"
904
+ msgstr "Suscripción Mercado Pago"
905
+
906
+ msgid "Payment ID:"
907
+ msgstr "ID de Pago:"
908
+
909
+ msgid "Amount:"
910
+ msgstr "Cantidad:"
911
+
912
+ msgid "This operation could not be completed."
913
+ msgstr "Esta operación no se puede completar."
914
+
915
+ msgid "Operation successfully completed."
916
+ msgstr "La operación se realizó con éxito."
917
+
918
+ msgid "Refund Payment"
919
+ msgstr "Reembolso de Pago"
920
+
921
+ msgid "Cancel Payment"
922
+ msgstr "Cancelar Pago"
923
+
924
+ msgid "Mercado Pago - Subscription"
925
+ msgstr "Mercado Pago - Suscripcións"
926
+
927
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
928
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
929
+
930
+ msgid "Free Shipping"
931
+ msgstr "Envío Gratuito"
932
+
933
+ msgid "Day"
934
+ msgstr "Día"
935
+
936
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
937
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
938
+
939
+ msgid "Mercado Envios"
940
+ msgstr "Mercado Envios"
941
+
942
+ msgid "This controls the title which the user sees during checkout."
943
+ msgstr "Controla el título que se muestra al cliente durante el pago."
944
+
945
+ msgid "Enable free shipping for this shipping method"
946
+ msgstr "Habilitar el envío gratuito para este método de envío"
947
+
948
+ msgid "Delivery Time"
949
+ msgstr "Tiempo de Entrega"
950
+
951
+ msgid "Show estimated delivery time"
952
+ msgstr "Mostrar el tiempo estimado de entrega"
953
+
954
+ msgid "Display the estimated delivery time in working days."
955
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
956
+
957
+ msgid "Buyer initiates complaint and requested a refund."
958
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
959
+
960
+ msgid "In return to sender"
961
+ msgstr "Volviendo al remitente"
962
+
963
+ msgid "Missing recipient for delivery"
964
+ msgstr "Destinatario ausente para envío"
965
+
966
+ msgid "Delayed shipping"
967
+ msgstr "Envío retrasado"
968
+
969
+ msgid "Unsuccessful"
970
+ msgstr "Fracasado"
971
+
972
+ msgid "Tag printed"
973
+ msgstr "Etiqueta impresa"
974
+
975
+ msgid "Tag ready to print"
976
+ msgstr "Etiquetar lista para imprimir"
977
+
978
+ msgid "Tracking code:"
979
+ msgstr "Código de rastreamiento:"
980
+
981
+ msgid "Tag:"
982
+ msgstr "Etiqueta:"
983
+
984
+ msgid "Shipping is pending"
985
+ msgstr "Envío pendiente"
986
+
987
+ msgid "Tutorial"
988
+ msgstr "Tutorial"
989
+
990
+ msgid "Discount Of "
991
+ msgstr "Descuento De "
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,978 @@ 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 "PLACE ORDER". 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."
862
+ msgstr "La cantidad para cobrar el pagador en cada período."
863
+
864
+ msgid "Uruguay"
865
+ msgstr "Uruguay"
866
+
867
+ msgid "Frequency type"
868
+ msgstr "Tipo de frecuencia"
869
+
870
+ msgid "Transaction amount"
871
+ msgstr "Valor de la transacción"
872
+
873
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
874
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
875
+
876
+ msgid "Subscription"
877
+ msgstr "Suscripción"
878
+
879
+ msgid "Enable Subscription"
880
+ msgstr "Habilitar Suscripción"
881
+
882
+ msgid "Subscription is Inactive"
883
+ msgstr "La Suscripción está Inactiva"
884
+
885
+ msgid "Subscribe with Mercado Pago"
886
+ msgstr "Suscribirse con Mercado Pago"
887
+
888
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
889
+ 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:"
890
+
891
+ msgid "Discount by Gateway"
892
+ msgstr "Descuento por Gateway"
893
+
894
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
895
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
896
+
897
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
898
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
899
+
900
+ msgid "Discount Of"
901
+ msgstr "Descuento de"
902
+
903
+ msgid "Mercado Pago Subscription"
904
+ msgstr "Suscripción Mercado Pago"
905
+
906
+ msgid "Payment ID:"
907
+ msgstr "ID de Pago:"
908
+
909
+ msgid "Amount:"
910
+ msgstr "Cantidad:"
911
+
912
+ msgid "This operation could not be completed."
913
+ msgstr "Esta operación no se puede completar."
914
+
915
+ msgid "Operation successfully completed."
916
+ msgstr "La operación se realizó con éxito."
917
+
918
+ msgid "Refund Payment"
919
+ msgstr "Reembolso de Pago"
920
+
921
+ msgid "Cancel Payment"
922
+ msgstr "Cancelar Pago"
923
+
924
+ msgid "Mercado Pago - Subscription"
925
+ msgstr "Mercado Pago - Suscripcións"
926
+
927
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
928
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
929
+
930
+ msgid "Free Shipping"
931
+ msgstr "Envío Gratuito"
932
+
933
+ msgid "Day"
934
+ msgstr "Día"
935
+
936
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
937
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
938
+
939
+ msgid "Mercado Envios"
940
+ msgstr "Mercado Envios"
941
+
942
+ msgid "This controls the title which the user sees during checkout."
943
+ msgstr "Controla el título que se muestra al cliente durante el pago."
944
+
945
+ msgid "Enable free shipping for this shipping method"
946
+ msgstr "Habilitar el envío gratuito para este método de envío"
947
+
948
+ msgid "Delivery Time"
949
+ msgstr "Tiempo de Entrega"
950
+
951
+ msgid "Show estimated delivery time"
952
+ msgstr "Mostrar el tiempo estimado de entrega"
953
+
954
+ msgid "Display the estimated delivery time in working days."
955
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
956
+
957
+ msgid "Buyer initiates complaint and requested a refund."
958
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
959
+
960
+ msgid "In return to sender"
961
+ msgstr "Volviendo al remitente"
962
+
963
+ msgid "Missing recipient for delivery"
964
+ msgstr "Destinatario ausente para envío"
965
+
966
+ msgid "Delayed shipping"
967
+ msgstr "Envío retrasado"
968
+
969
+ msgid "Unsuccessful"
970
+ msgstr "Fracasado"
971
+
972
+ msgid "Tag printed"
973
+ msgstr "Etiqueta impresa"
974
+
975
+ msgid "Tag ready to print"
976
+ msgstr "Etiquetar lista para imprimir"
977
+
978
+ msgid "Tracking code:"
979
+ msgstr "Código de rastreamiento:"
980
+
981
+ msgid "Tag:"
982
+ msgstr "Etiqueta:"
983
+
984
+ msgid "Shipping is pending"
985
+ msgstr "Envío pendiente"
986
+
987
+ msgid "Tutorial"
988
+ msgstr "Tutorial"
989
+
990
+ msgid "Discount Of "
991
+ msgstr "Descuento De "
languages/woocommerce-mercadopago-module-es_PE.mo ADDED
Binary file
languages/woocommerce-mercadopago-module-es_PE.po ADDED
@@ -0,0 +1,991 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 "PLACE ORDER". 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."
862
+ msgstr "La cantidad para cobrar el pagador en cada período."
863
+
864
+ msgid "Uruguay"
865
+ msgstr "Uruguay"
866
+
867
+ msgid "Frequency type"
868
+ msgstr "Tipo de frecuencia"
869
+
870
+ msgid "Transaction amount"
871
+ msgstr "Valor de la transacción"
872
+
873
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
874
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
875
+
876
+ msgid "Subscription"
877
+ msgstr "Suscripción"
878
+
879
+ msgid "Enable Subscription"
880
+ msgstr "Habilitar Suscripción"
881
+
882
+ msgid "Subscription is Inactive"
883
+ msgstr "La Suscripción está Inactiva"
884
+
885
+ msgid "Subscribe with Mercado Pago"
886
+ msgstr "Suscribirse con Mercado Pago"
887
+
888
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
889
+ 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:"
890
+
891
+ msgid "Discount by Gateway"
892
+ msgstr "Descuento por Gateway"
893
+
894
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
895
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
896
+
897
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
898
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
899
+
900
+ msgid "Discount Of"
901
+ msgstr "Descuento de"
902
+
903
+ msgid "Mercado Pago Subscription"
904
+ msgstr "Suscripción Mercado Pago"
905
+
906
+ msgid "Payment ID:"
907
+ msgstr "ID de Pago:"
908
+
909
+ msgid "Amount:"
910
+ msgstr "Cantidad:"
911
+
912
+ msgid "This operation could not be completed."
913
+ msgstr "Esta operación no se puede completar."
914
+
915
+ msgid "Operation successfully completed."
916
+ msgstr "La operación se realizó con éxito."
917
+
918
+ msgid "Refund Payment"
919
+ msgstr "Reembolso de Pago"
920
+
921
+ msgid "Cancel Payment"
922
+ msgstr "Cancelar Pago"
923
+
924
+ msgid "Mercado Pago - Subscription"
925
+ msgstr "Mercado Pago - Suscripcións"
926
+
927
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
928
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
929
+
930
+ msgid "Free Shipping"
931
+ msgstr "Envío Gratuito"
932
+
933
+ msgid "Day"
934
+ msgstr "Día"
935
+
936
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
937
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
938
+
939
+ msgid "Mercado Envios"
940
+ msgstr "Mercado Envios"
941
+
942
+ msgid "This controls the title which the user sees during checkout."
943
+ msgstr "Controla el título que se muestra al cliente durante el pago."
944
+
945
+ msgid "Enable free shipping for this shipping method"
946
+ msgstr "Habilitar el envío gratuito para este método de envío"
947
+
948
+ msgid "Delivery Time"
949
+ msgstr "Tiempo de Entrega"
950
+
951
+ msgid "Show estimated delivery time"
952
+ msgstr "Mostrar el tiempo estimado de entrega"
953
+
954
+ msgid "Display the estimated delivery time in working days."
955
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
956
+
957
+ msgid "Buyer initiates complaint and requested a refund."
958
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
959
+
960
+ msgid "In return to sender"
961
+ msgstr "Volviendo al remitente"
962
+
963
+ msgid "Missing recipient for delivery"
964
+ msgstr "Destinatario ausente para envío"
965
+
966
+ msgid "Delayed shipping"
967
+ msgstr "Envío retrasado"
968
+
969
+ msgid "Unsuccessful"
970
+ msgstr "Fracasado"
971
+
972
+ msgid "Tag printed"
973
+ msgstr "Etiqueta impresa"
974
+
975
+ msgid "Tag ready to print"
976
+ msgstr "Etiquetar lista para imprimir"
977
+
978
+ msgid "Tracking code:"
979
+ msgstr "Código de rastreamiento:"
980
+
981
+ msgid "Tag:"
982
+ msgstr "Etiqueta:"
983
+
984
+ msgid "Shipping is pending"
985
+ msgstr "Envío pendiente"
986
+
987
+ msgid "Tutorial"
988
+ msgstr "Tutorial"
989
+
990
+ msgid "Discount Of "
991
+ msgstr "Descuento De "
languages/woocommerce-mercadopago-module-es_UY.mo ADDED
Binary file
languages/woocommerce-mercadopago-module-es_UY.po ADDED
@@ -0,0 +1,991 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 "PLACE ORDER". 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."
862
+ msgstr "La cantidad para cobrar el pagador en cada período."
863
+
864
+ msgid "Uruguay"
865
+ msgstr "Uruguay"
866
+
867
+ msgid "Frequency type"
868
+ msgstr "Tipo de frecuencia"
869
+
870
+ msgid "Transaction amount"
871
+ msgstr "Valor de la transacción"
872
+
873
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
874
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
875
+
876
+ msgid "Subscription"
877
+ msgstr "Suscripción"
878
+
879
+ msgid "Enable Subscription"
880
+ msgstr "Habilitar Suscripción"
881
+
882
+ msgid "Subscription is Inactive"
883
+ msgstr "La Suscripción está Inactiva"
884
+
885
+ msgid "Subscribe with Mercado Pago"
886
+ msgstr "Suscribirse con Mercado Pago"
887
+
888
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
889
+ 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:"
890
+
891
+ msgid "Discount by Gateway"
892
+ msgstr "Descuento por Gateway"
893
+
894
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
895
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
896
+
897
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
898
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
899
+
900
+ msgid "Discount Of"
901
+ msgstr "Descuento de"
902
+
903
+ msgid "Mercado Pago Subscription"
904
+ msgstr "Suscripción Mercado Pago"
905
+
906
+ msgid "Payment ID:"
907
+ msgstr "ID de Pago:"
908
+
909
+ msgid "Amount:"
910
+ msgstr "Cantidad:"
911
+
912
+ msgid "This operation could not be completed."
913
+ msgstr "Esta operación no se puede completar."
914
+
915
+ msgid "Operation successfully completed."
916
+ msgstr "La operación se realizó con éxito."
917
+
918
+ msgid "Refund Payment"
919
+ msgstr "Reembolso de Pago"
920
+
921
+ msgid "Cancel Payment"
922
+ msgstr "Cancelar Pago"
923
+
924
+ msgid "Mercado Pago - Subscription"
925
+ msgstr "Mercado Pago - Suscripcións"
926
+
927
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
928
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
929
+
930
+ msgid "Free Shipping"
931
+ msgstr "Envío Gratuito"
932
+
933
+ msgid "Day"
934
+ msgstr "Día"
935
+
936
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
937
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
938
+
939
+ msgid "Mercado Envios"
940
+ msgstr "Mercado Envios"
941
+
942
+ msgid "This controls the title which the user sees during checkout."
943
+ msgstr "Controla el título que se muestra al cliente durante el pago."
944
+
945
+ msgid "Enable free shipping for this shipping method"
946
+ msgstr "Habilitar el envío gratuito para este método de envío"
947
+
948
+ msgid "Delivery Time"
949
+ msgstr "Tiempo de Entrega"
950
+
951
+ msgid "Show estimated delivery time"
952
+ msgstr "Mostrar el tiempo estimado de entrega"
953
+
954
+ msgid "Display the estimated delivery time in working days."
955
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
956
+
957
+ msgid "Buyer initiates complaint and requested a refund."
958
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
959
+
960
+ msgid "In return to sender"
961
+ msgstr "Volviendo al remitente"
962
+
963
+ msgid "Missing recipient for delivery"
964
+ msgstr "Destinatario ausente para envío"
965
+
966
+ msgid "Delayed shipping"
967
+ msgstr "Envío retrasado"
968
+
969
+ msgid "Unsuccessful"
970
+ msgstr "Fracasado"
971
+
972
+ msgid "Tag printed"
973
+ msgstr "Etiqueta impresa"
974
+
975
+ msgid "Tag ready to print"
976
+ msgstr "Etiquetar lista para imprimir"
977
+
978
+ msgid "Tracking code:"
979
+ msgstr "Código de rastreamiento:"
980
+
981
+ msgid "Tag:"
982
+ msgstr "Etiqueta:"
983
+
984
+ msgid "Shipping is pending"
985
+ msgstr "Envío pendiente"
986
+
987
+ msgid "Tutorial"
988
+ msgstr "Tutorial"
989
+
990
+ msgid "Discount Of "
991
+ msgstr "Descuento De "
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,978 @@ 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 "PLACE ORDER". 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."
862
+ msgstr "La cantidad para cobrar el pagador en cada período."
863
+
864
+ msgid "Uruguay"
865
+ msgstr "Uruguay"
866
+
867
+ msgid "Frequency type"
868
+ msgstr "Tipo de frecuencia"
869
+
870
+ msgid "Transaction amount"
871
+ msgstr "Valor de la transacción"
872
+
873
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
874
+ msgstr "Un producto recurrente es una suscripción que debe adquirirse por separado en su carrito. Por favor, hace los pedidos por separado."
875
+
876
+ msgid "Subscription"
877
+ msgstr "Suscripción"
878
+
879
+ msgid "Enable Subscription"
880
+ msgstr "Habilitar Suscripción"
881
+
882
+ msgid "Subscription is Inactive"
883
+ msgstr "La Suscripción está Inactiva"
884
+
885
+ msgid "Subscribe with Mercado Pago"
886
+ msgstr "Suscribirse con Mercado Pago"
887
+
888
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
889
+ 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:"
890
+
891
+ msgid "Discount by Gateway"
892
+ msgstr "Descuento por Gateway"
893
+
894
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
895
+ msgstr "Dé un descuento porcentual para sus clientes si utilizan este medio de pago."
896
+
897
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
898
+ msgstr "Este campo debe ser un número entero mayor o igual 0 y menor que 100."
899
+
900
+ msgid "Discount Of"
901
+ msgstr "Descuento de"
902
+
903
+ msgid "Mercado Pago Subscription"
904
+ msgstr "Suscripción Mercado Pago"
905
+
906
+ msgid "Payment ID:"
907
+ msgstr "ID de Pago:"
908
+
909
+ msgid "Amount:"
910
+ msgstr "Cantidad:"
911
+
912
+ msgid "This operation could not be completed."
913
+ msgstr "Esta operación no se puede completar."
914
+
915
+ msgid "Operation successfully completed."
916
+ msgstr "La operación se realizó con éxito."
917
+
918
+ msgid "Refund Payment"
919
+ msgstr "Reembolso de Pago"
920
+
921
+ msgid "Cancel Payment"
922
+ msgstr "Cancelar Pago"
923
+
924
+ msgid "Mercado Pago - Subscription"
925
+ msgstr "Mercado Pago - Suscripcións"
926
+
927
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
928
+ msgstr "Mercado Envios es un método de envío disponible sólo para los pagos con Mercado Pago."
929
+
930
+ msgid "Free Shipping"
931
+ msgstr "Envío Gratuito"
932
+
933
+ msgid "Day"
934
+ msgstr "Día"
935
+
936
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
937
+ msgstr "Habilitar los dos métodos de envío de Mercado Envios (Express y Normal) para el correcto funcionamiento del módulo."
938
+
939
+ msgid "Mercado Envios"
940
+ msgstr "Mercado Envios"
941
+
942
+ msgid "This controls the title which the user sees during checkout."
943
+ msgstr "Controla el título que se muestra al cliente durante el pago."
944
+
945
+ msgid "Enable free shipping for this shipping method"
946
+ msgstr "Habilitar el envío gratuito para este método de envío"
947
+
948
+ msgid "Delivery Time"
949
+ msgstr "Tiempo de Entrega"
950
+
951
+ msgid "Show estimated delivery time"
952
+ msgstr "Mostrar el tiempo estimado de entrega"
953
+
954
+ msgid "Display the estimated delivery time in working days."
955
+ msgstr "Mostrar el tiempo estimado de entrega en días laborables."
956
+
957
+ msgid "Buyer initiates complaint and requested a refund."
958
+ msgstr "El comprador ha iniciado una discusión y pide un extorno."
959
+
960
+ msgid "In return to sender"
961
+ msgstr "Volviendo al remitente"
962
+
963
+ msgid "Missing recipient for delivery"
964
+ msgstr "Destinatario ausente para envío"
965
+
966
+ msgid "Delayed shipping"
967
+ msgstr "Envío retrasado"
968
+
969
+ msgid "Unsuccessful"
970
+ msgstr "Fracasado"
971
+
972
+ msgid "Tag printed"
973
+ msgstr "Etiqueta impresa"
974
+
975
+ msgid "Tag ready to print"
976
+ msgstr "Etiquetar lista para imprimir"
977
+
978
+ msgid "Tracking code:"
979
+ msgstr "Código de rastreamiento:"
980
+
981
+ msgid "Tag:"
982
+ msgstr "Etiqueta:"
983
+
984
+ msgid "Shipping is pending"
985
+ msgstr "Envío pendiente"
986
+
987
+ msgid "Tutorial"
988
+ msgstr "Tutorial"
989
+
990
+ msgid "Discount Of "
991
+ msgstr "Descuento De "
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,1032 @@ 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."
927
+ msgstr "A quantia a cobrar o pagador em cada período."
928
+
929
+ msgid "Uruguay"
930
+ msgstr "Uruguai"
931
+
932
+ msgid "Frequency type"
933
+ msgstr "Tipo de frequência"
934
+
935
+ msgid "Transaction amount"
936
+ msgstr "Quantia transacionada"
937
+
938
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
939
+ msgstr "Um produto recorrente é uma assinatura que deve ser comprada isoladamente em seu carrinho. Por favor, crie pedidos separadamente."
940
+
941
+ msgid "Subscription"
942
+ msgstr "Assinaturas"
943
+
944
+ msgid "Enable Subscription"
945
+ msgstr "Habilitar Assinaturas"
946
+
947
+ msgid "Subscription is Inactive"
948
+ msgstr "Assinaturas está Desabilitada"
949
+
950
+ msgid "Subscribe with Mercado Pago"
951
+ msgstr "Assine com Mercado Pago"
952
+
953
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
954
+ 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:"
955
+
956
+ msgid "Discount by Gateway"
957
+ msgstr "Desconto por Gateway"
958
+
959
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
960
+ msgstr "Dê um desconto porcentual para seus clientes caso eles usem este método de pagamento."
961
+
962
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
963
+ msgstr "Este campo deve ser um inteiro maior ou igual a 0 e menor que 100."
964
+
965
+ msgid "Discount Of"
966
+ msgstr "Desconto de"
967
+
968
+ msgid "Mercado Pago Subscription"
969
+ msgstr "Assinaturas Mercado Pago"
970
+
971
+ msgid "Payment ID:"
972
+ msgstr "ID de pagamento:"
973
+
974
+ msgid "Amount:"
975
+ msgstr "Quantidade:"
976
+
977
+ msgid "This operation could not be completed."
978
+ msgstr "Esta operação não pode ser completada."
979
+
980
+ msgid "Operation successfully completed."
981
+ msgstr "A operação foi realizada com sucesso."
982
+
983
+ msgid "Refund Payment"
984
+ msgstr "Extornar Pgto"
985
+
986
+ msgid "Cancel Payment"
987
+ msgstr "Cancelar Pgto"
988
+
989
+ msgid "Mercado Pago - Subscription"
990
+ msgstr "Mercado Pago - Assinaturas"
991
+
992
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
993
+ msgstr "Mercado Envios é um método de envio disponível apenas para pagamentos com Mercado Pago."
994
+
995
+ msgid "Free Shipping"
996
+ msgstr "Envio Grátis"
997
+
998
+ msgid "Day"
999
+ msgstr "Dia"
1000
+
1001
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
1002
+ msgstr "Habilitar os dois métodos de envio do Mercado Envios (Expresso e Normal) para o devido funcionamento do módulo."
1003
+
1004
+ msgid "Mercado Envios"
1005
+ msgstr "Mercado Envios"
1006
+
1007
+ msgid "This controls the title which the user sees during checkout."
1008
+ msgstr "Controla o título que é mostrado ao cliente vê durante o checkout."
1009
+
1010
+ msgid "Enable free shipping for this shipping method"
1011
+ msgstr "Habilitar envio gratuito para este método de envio"
1012
+
1013
+ msgid "Delivery Time"
1014
+ msgstr "Tempo de Envio"
1015
+
1016
+ msgid "Show estimated delivery time"
1017
+ msgstr "Mostrar tempo estimado de entrega"
1018
+
1019
+ msgid "Display the estimated delivery time in working days."
1020
+ msgstr "Mostrar o tempo estimado de entrega em dias úteis."
1021
+
1022
+ msgid "Buyer initiates complaint and requested a refund."
1023
+ msgstr "O comprador iniciou uma discussão e requisita um extorno."
1024
+
1025
+ msgid "In return to sender"
1026
+ msgstr "Retornando ao remetente"
1027
+
1028
+ msgid "Missing recipient for delivery"
1029
+ msgstr "Destinatário ausente" para envio
1030
+
1031
+ msgid "Delayed shipping"
1032
+ msgstr "Envio atrasado"
1033
+
1034
+ msgid "Unsuccessful"
1035
+ msgstr "Mal sucedido"
1036
+
1037
+ msgid "Tag printed"
1038
+ msgstr "Etiqueta imprimida"
1039
+
1040
+ msgid "Tag ready to print"
1041
+ msgstr "Etiqueta pronta para impressão"
1042
+
1043
+ msgid "Tracking code:"
1044
+ msgstr "Código de rastreamento:"
1045
+
1046
+ msgid "Tag:"
1047
+ msgstr "Etiqueta:"
1048
+
1049
+ msgid "Shipping is pending"
1050
+ msgstr "Envio pendente"
1051
+
1052
+ msgid "Tutorial"
1053
+ msgstr "Tutorial"
1054
+
1055
+ msgid "Discount Of "
1056
+ msgstr "Desconto De "
languages/woocommerce-mercadopago-module.pot CHANGED
@@ -1,527 +1,981 @@
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."
852
+ msgstr ""
853
+
854
+ msgid "Uruguay"
855
+ msgstr ""
856
+
857
+ msgid "Frequency type"
858
+ msgstr ""
859
+
860
+ msgid "Transaction amount"
861
+ msgstr ""
862
+
863
+ msgid "A recurrent product is a signature that should be bought isolated in your cart. Please, create separated orders."
864
+ msgstr ""
865
+
866
+ msgid "Subscription"
867
+ msgstr ""
868
+
869
+ msgid "Enable Subscription"
870
+ msgstr ""
871
+
872
+ msgid "Subscription is Inactive"
873
+ msgstr ""
874
+
875
+ msgid "Subscribe with Mercado Pago"
876
+ msgstr ""
877
+
878
+ msgid "For this solution, you need to configure your IPN URL. You can access it in your account for your specific country in:"
879
+ msgstr ""
880
+
881
+ msgid "Discount by Gateway"
882
+ msgstr ""
883
+
884
+ msgid "Give a percentual discount for your customers if they use this payment gateway."
885
+ msgstr ""
886
+
887
+ msgid "This field should be an integer greater or equal 0 and smaller than 100."
888
+ msgstr ""
889
+
890
+ msgid "Discount Of"
891
+ msgstr ""
892
+
893
+ msgid "Mercado Pago Subscription"
894
+ msgstr ""
895
+
896
+ msgid "Payment ID:"
897
+ msgstr ""
898
+
899
+ msgid "Amount:"
900
+ msgstr ""
901
+
902
+ msgid "This operation could not be completed."
903
+ msgstr ""
904
+
905
+ msgid "Operation successfully completed."
906
+ msgstr ""
907
+
908
+ msgid "Refund Payment"
909
+ msgstr ""
910
+
911
+ msgid "Cancel Payment"
912
+ msgstr ""
913
+
914
+ msgid "Mercado Pago - Subscription"
915
+ msgstr ""
916
+
917
+ msgid "Mercado Envios is a shipping method available only for payments with Mercado Pago."
918
+ msgstr ""
919
+
920
+ msgid "Free Shipping"
921
+ msgstr ""
922
+
923
+ msgid "Day"
924
+ msgstr ""
925
+
926
+ msgid "Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module."
927
+ msgstr ""
928
+
929
+ msgid "Mercado Envios"
930
+ msgstr ""
931
+
932
+ msgid "This controls the title which the user sees during checkout."
933
+ msgstr ""
934
+
935
+ msgid "Enable free shipping for this shipping method"
936
+ msgstr ""
937
+
938
+ msgid "Delivery Time"
939
+ msgstr ""
940
+
941
+ msgid "Show estimated delivery time"
942
+ msgstr ""
943
+
944
+ msgid "Display the estimated delivery time in working days."
945
+ msgstr ""
946
+
947
+ msgid "Buyer initiates complaint and requested a refund."
948
+ msgstr ""
949
+
950
+ msgid "In return to sender"
951
+ msgstr ""
952
+
953
+ msgid "Missing recipient for delivery"
954
+ msgstr ""
955
+
956
+ msgid "Sending the delayed path"
957
+ msgstr ""
958
+
959
+ msgid "Unsuccessful"
960
+ msgstr ""
961
+
962
+ msgid "Tag printed"
963
+ msgstr ""
964
+
965
+ msgid "Tag ready to print"
966
+ msgstr ""
967
+
968
+ msgid "Tracking code:"
969
+ msgstr ""
970
+
971
+ msgid "Ticket:"
972
+ msgstr ""
973
+
974
+ msgid "Shipping is pending"
975
+ msgstr ""
976
+
977
+ msgid "Tutorial"
978
+ msgstr ""
979
+
980
+ msgid "Discount Of "
981
  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,531 @@
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.1
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.1';
35
 
36
+ // Singleton design pattern
37
+ protected static $instance = null;
38
+ public static function init_mercado_pago_gateway_class() {
39
+ if ( null == self::$instance ) {
40
+ self::$instance = new self;
41
+ }
42
+ return self::$instance;
43
  }
 
 
44
 
45
+ // Class constructor.
46
+ private function __construct() {
47
+
48
+ add_action( 'init', array( $this, 'load_plugin_textdomain' ) );
49
+
50
+ // Verify if WooCommerce is already installed.
51
+ if ( class_exists( 'WC_Payment_Gateway' ) ) {
52
+
53
+ // Gateways
54
+ include_once dirname( __FILE__ ) . '/mercadopago/mercadopago-gateway.php';
55
+ include_once dirname( __FILE__ ) . '/mercadopago/mercadopago-custom-gateway.php';
56
+ include_once dirname( __FILE__ ) . '/mercadopago/mercadopago-ticket-gateway.php';
57
+ include_once dirname( __FILE__ ) . '/mercadopago/mercadopago-subscription-gateway.php';
58
+
59
+ include_once dirname( __FILE__ ) . '/mercadopago/class-wc-product-mp_recurrent.php';
60
+
61
+ // Shipping.
62
+ include_once dirname( __FILE__ ) . '/shipment/abstract-wc-mercadoenvios-shipping.php';
63
+ include_once dirname( __FILE__ ) . '/shipment/class-wc-mercadoenvios-shipping-normal.php';
64
+ include_once dirname( __FILE__ ) . '/shipment/class-wc-mercadoenvios-shipping-express.php';
65
+ include_once dirname( __FILE__ ) . '/shipment/class-wc-mercadoenvios-package.php';
66
+
67
+ add_filter( 'woocommerce_payment_gateways', array( $this, 'add_gateway' ) );
68
+ add_filter(
69
+ 'woomercadopago_settings_link_' . plugin_basename( __FILE__ ),
70
+ array( $this, 'woomercadopago_settings_link' ) );
71
+
72
+ add_filter( 'woocommerce_shipping_methods', array( $this, 'add_shipping' ) );
73
+ add_filter( 'woocommerce_available_payment_gateways', array( $this, 'filter_payment_method_by_shipping' ) );
74
+
75
+ } else {
76
+ add_action( 'admin_notices', array( $this, 'notify_woocommerce_miss' ) );
77
+ }
78
+
79
+ if ( is_admin() ) {
80
+ $this->admin_includes();
81
+ }
82
+
83
  }
84
+
85
+ /**
86
+ * Admin includes.
87
+ */
88
+ private function admin_includes() {
89
+ include_once dirname( __FILE__ ) . '/admin/class-wc-mercadoenvios-admin-orders.php';
90
+ }
91
+
92
+ // As well as defining your class, you need to also tell WooCommerce (WC) that
93
+ // it exists. Do this by filtering woocommerce_payment_gateways.
94
+ public function add_gateway( $methods ) {
95
+ $methods[] = 'WC_WooMercadoPago_Gateway';
96
+ $methods[] = 'WC_WooMercadoPagoCustom_Gateway';
97
+ $methods[] = 'WC_WooMercadoPagoTicket_Gateway';
98
+ $methods[] = 'WC_WooMercadoPagoSubscription_Gateway';
99
+ return $methods;
100
+ }
101
+
102
+ // woocommerce_shipping_methods
103
+ public function add_shipping( $methods ) {
104
+ $methods['mercadoenvios-normal'] = 'WC_MercadoEnvios_Shipping_Normal';
105
+ $methods['mercadoenvios-express'] = 'WC_MercadoEnvios_Shipping_Express';
106
+ return $methods;
107
+ }
108
+
109
+ // When selected Mercado Envios the payment can be made only with Mercado Pago Basic (Standard)
110
+ public function filter_payment_method_by_shipping( $methods ) {
111
+
112
+ $chosen_methods = WC()->session->get( 'chosen_shipping_methods' );
113
+ $chosen_shipping = $chosen_methods[0];
114
+
115
+ // Check shipping methods is a Mercado Envios.
116
+ if ( strpos( $chosen_shipping, 'mercadoenvios-normal' ) !== false || strpos( $chosen_shipping, 'mercadoenvios-express' ) !== false ) {
117
+ $new_array = array();
118
+ foreach ( $methods as $payment_method => $payment_method_object ) {
119
+ if ( $payment_method == 'woocommerce-mercadopago-module' ) {
120
+ $new_array['woocommerce-mercadopago-module'] = $payment_method_object;
121
+ }
122
+ }
123
+ // Return new array shipping methods (only Mercado Pago Basic).
124
+ return $new_array;
125
+ }
126
+ // Return all shipping methods.
127
+ return $methods;
128
+ }
129
+
130
+ /**
131
+ * Summary: Places a warning error to notify user that WooCommerce is missing.
132
+ * Description: Places a warning error to notify user that WooCommerce is missing.
133
+ */
134
+ public function notify_woocommerce_miss() {
135
+ echo
136
+ '<div class="error"><p>' .
137
+ sprintf(
138
+ __( 'Woo Mercado Pago Module depends on the last version of %s to execute!', 'woocommerce-mercadopago-module' ),
139
+ '<a href="https://wordpress.org/extend/plugins/woocommerce/">WooCommerce</a>'
140
+ ) .
141
+ '</p></div>';
142
+ }
143
+
144
+ // Multi-language plugin.
145
+ public function load_plugin_textdomain() {
146
+ $locale = apply_filters( 'plugin_locale', get_locale(), 'woocommerce-mercadopago-module' );
147
+ $module_root = 'woocommerce-mercadopago-module/woocommerce-mercadopago-module-';
148
+ load_textdomain(
149
+ 'woocommerce-mercadopago-module',
150
+ trailingslashit( WP_LANG_DIR ) . $module_root . $locale . '.mo'
151
+ );
152
+ load_plugin_textdomain(
153
+ 'woocommerce-mercadopago-module',
154
+ false,
155
+ dirname( plugin_basename( __FILE__ ) ) . '/languages/'
156
+ );
157
+ }
158
+
159
+ /**
160
+ * Summary: Get store categories from Mercado Pago.
161
+ * Description: Trigger API to get available categories and proper description.
162
+ * @return an array with found categories and a description for its selector title.
163
+ */
164
+ public static function get_categories() {
165
+
166
+ $store_categories_id = array();
167
+ $store_categories_description = array();
168
+
169
+ // Get Mercado Pago store categories.
170
+ $categories = MPRestClient::get(
171
+ array( 'uri' => '/item_categories' ),
172
+ WC_WooMercadoPago_Module::get_module_version()
173
+ );
174
+ foreach ( $categories['response'] as $category ) {
175
+ array_push(
176
+ $store_categories_id, str_replace( '_', ' ', $category['id'] )
177
+ );
178
+ array_push(
179
+ $store_categories_description, str_replace( '_', ' ', $category['description'] )
180
+ );
181
+ }
182
+
183
+ return array(
184
+ 'store_categories_id' => $store_categories_id,
185
+ 'store_categories_description' => $store_categories_description
186
+ );
187
+
188
+ }
189
+
190
+ /**
191
+ * Summary: Get the rate of conversion between two currencies.
192
+ * Description: The currencies are the one used in WooCommerce and the one used in $site_id.
193
+ * @return a float that is the rate of conversion.
194
+ */
195
+ public static function get_conversion_rate( $used_currency ) {
196
+ $currency_obj = MPRestClient::get(
197
+ array( 'uri' => '/currency_conversions/search?' .
198
+ 'from=' . get_woocommerce_currency() .
199
+ '&to=' . $used_currency
200
+ ),
201
+ WC_WooMercadoPago_Module::get_module_version()
202
+ );
203
+ if ( isset( $currency_obj['response'] ) ) {
204
+ $currency_obj = $currency_obj['response'];
205
+ if ( isset( $currency_obj['ratio'] ) ) {
206
+ return ( (float) $currency_obj['ratio'] );
207
+ }
208
+ }
209
+ return -1;
210
  }
211
+
212
+ // Get WooCommerce instance
213
+ public static function woocommerce_instance() {
214
+ if ( function_exists( 'WC' ) ) {
215
+ return WC();
216
+ } else {
217
+ global $woocommerce;
218
+ return $woocommerce;
219
+ }
220
+ }
221
+
222
+ /**
223
+ * Summary: Find template's folder.
224
+ * Description: Find template's folder.
225
+ * @return a string that identifies the path.
226
+ */
227
+ public static function get_templates_path() {
228
+ return plugin_dir_path( __FILE__ ) . 'templates/';
229
+ }
230
+
231
+ /**
232
+ * Summary: Get module's version.
233
+ * Description: Get module's version.
234
+ * @return a string with the given version.
235
+ */
236
+ public static function get_module_version() {
237
+ return WC_WooMercadoPago_Module::VERSION;
238
+ }
239
+
240
+ /**
241
+ * Summary: Get client id from access token.
242
+ * Description: Get client id from access token.
243
+ * @return the client id.
244
+ */
245
+ public static function get_client_id( $at ) {
246
+ $t = explode ( '-', $at );
247
+ if ( count( $t ) > 0 ) {
248
+ return $t[1];
249
+ }
250
+ return '';
251
+ }
252
+
253
+ /**
254
+ * Summary: Builds up the array for the mp_install table, with info related with checkout.
255
+ * Description: Builds up the array for the mp_install table, with info related with checkout.
256
+ * @return an array with the module informations.
257
+ */
258
+ public static function get_common_settings() {
259
+
260
+ $w = WC_WooMercadoPago_Module::woocommerce_instance();
261
+
262
+ $infra_data = array(
263
+ 'module_version' => WC_WooMercadoPago_Module::VERSION,
264
+ 'platform' => 'WooCommerce',
265
+ 'platform_version' => $w->version,
266
+ 'code_version' => phpversion(),
267
+ 'so_server' => PHP_OS
268
+ );
269
+
270
+ return $infra_data;
271
+
272
+ }
273
+
274
+ /**
275
+ * Summary: Get preference data for a specific country.
276
+ * Description: Get preference data for a specific country.
277
+ * @return an array with sponsor id, country name, banner image for checkout, and currency.
278
+ */
279
+ public static function get_country_config( $site_id ) {
280
+ switch ( $site_id ) {
281
+ case 'MLA':
282
+ return array(
283
+ 'sponsor_id' => 208682286,
284
+ 'country_name' => __( 'Argentine', 'woocommerce-mercadopago-module' ),
285
+ 'checkout_banner' => plugins_url(
286
+ 'woo-mercado-pago-module/images/MLA/standard_mla.jpg',
287
+ plugin_dir_path( __FILE__ )
288
+ ),
289
+ 'checkout_banner_custom' => plugins_url(
290
+ 'woo-mercado-pago-module/images/MLA/credit_card.png',
291
+ plugin_dir_path( __FILE__ )
292
+ ),
293
+ 'currency' => 'ARS'
294
+ );
295
+ case 'MLB':
296
+ return array(
297
+ 'sponsor_id' => 208686191,
298
+ 'country_name' => __( 'Brazil', 'woocommerce-mercadopago-module' ),
299
+ 'checkout_banner' => plugins_url(
300
+ 'woo-mercado-pago-module/images/MLB/standard_mlb.jpg',
301
+ plugin_dir_path( __FILE__ )
302
+ ),
303
+ 'checkout_banner_custom' => plugins_url(
304
+ 'woo-mercado-pago-module/images/MLB/credit_card.png',
305
+ plugin_dir_path( __FILE__ )
306
+ ),
307
+ 'currency' => 'BRL'
308
+ );
309
+ case 'MCO':
310
+ return array(
311
+ 'sponsor_id' => 208687643,
312
+ 'country_name' => __( 'Colombia', 'woocommerce-mercadopago-module' ),
313
+ 'checkout_banner' => plugins_url(
314
+ 'woo-mercado-pago-module/images/MCO/standard_mco.jpg',
315
+ plugin_dir_path( __FILE__ )
316
+ ),
317
+ 'checkout_banner_custom' => plugins_url(
318
+ 'woo-mercado-pago-module/images/MCO/credit_card.png',
319
+ plugin_dir_path( __FILE__ )
320
+ ),
321
+ 'currency' => 'COP'
322
+ );
323
+ case 'MLC':
324
+ return array(
325
+ 'sponsor_id' => 208690789,
326
+ 'country_name' => __( 'Chile', 'woocommerce-mercadopago-module' ),
327
+ 'checkout_banner' => plugins_url(
328
+ 'woo-mercado-pago-module/images/MLC/standard_mlc.gif',
329
+ plugin_dir_path( __FILE__ )
330
+ ),
331
+ 'checkout_banner_custom' => plugins_url(
332
+ 'woo-mercado-pago-module/images/MLC/credit_card.png',
333
+ plugin_dir_path( __FILE__ )
334
+ ),
335
+ 'currency' => 'CLP'
336
+ );
337
+ case 'MLM':
338
+ return array(
339
+ 'sponsor_id' => 208692380,
340
+ 'country_name' => __( 'Mexico', 'woocommerce-mercadopago-module' ),
341
+ 'checkout_banner' => plugins_url(
342
+ 'woo-mercado-pago-module/images/MLM/standard_mlm.jpg',
343
+ plugin_dir_path( __FILE__ )
344
+ ),
345
+ 'checkout_banner_custom' => plugins_url(
346
+ 'woo-mercado-pago-module/images/MLM/credit_card.png',
347
+ plugin_dir_path( __FILE__ )
348
+ ),
349
+ 'currency' => 'MXN'
350
+ );
351
+ case 'MLV':
352
+ return array(
353
+ 'sponsor_id' => 208692735,
354
+ 'country_name' => __( 'Venezuela', 'woocommerce-mercadopago-module' ),
355
+ 'checkout_banner' => plugins_url(
356
+ 'woo-mercado-pago-module/images/MLV/standard_mlv.jpg',
357
+ plugin_dir_path( __FILE__ )
358
+ ),
359
+ 'checkout_banner_custom' => plugins_url(
360
+ 'woo-mercado-pago-module/images/MLV/credit_card.png',
361
+ plugin_dir_path( __FILE__ )
362
+ ),
363
+ 'currency' => 'VEF'
364
+ );
365
+ case 'MPE':
366
+ return array(
367
+ 'sponsor_id' => 216998692,
368
+ 'country_name' => __( 'Peru', 'woocommerce-mercadopago-module' ),
369
+ 'checkout_banner' => plugins_url(
370
+ 'woo-mercado-pago-module/images/MPE/standard_mpe.png',
371
+ plugin_dir_path( __FILE__ )
372
+ ),
373
+ 'checkout_banner_custom' => plugins_url(
374
+ 'woo-mercado-pago-module/images/MPE/credit_card.png',
375
+ plugin_dir_path( __FILE__ )
376
+ ),
377
+ 'currency' => 'PEN'
378
+ );
379
+ case 'MLU':
380
+ return array(
381
+ 'sponsor_id' => 243692679,
382
+ 'country_name' => __( 'Uruguay', 'woocommerce-mercadopago-module' ),
383
+ 'checkout_banner' => plugins_url(
384
+ 'woo-mercado-pago-module/images/MLU/standard_mlu.png',
385
+ plugin_dir_path( __FILE__ )
386
+ ),
387
+ 'checkout_banner_custom' => plugins_url(
388
+ 'woo-mercado-pago-module/images/MLU/credit_card.png',
389
+ plugin_dir_path( __FILE__ )
390
+ ),
391
+ 'currency' => 'UYU'
392
+ );
393
+ default: // set Argentina as default country
394
+ return array(
395
+ 'sponsor_id' => 208682286,
396
+ 'country_name' => __( 'Argentine', 'woocommerce-mercadopago-module' ),
397
+ 'checkout_banner' => plugins_url(
398
+ 'woo-mercado-pago-module/images/MLA/standard_mla.jpg',
399
+ plugin_dir_path( __FILE__ )
400
+ ),
401
+ 'checkout_banner_custom' => plugins_url(
402
+ 'woo-mercado-pago-module/images/MLA/credit_card.png',
403
+ plugin_dir_path( __FILE__ )
404
+ ),
405
+ 'currency' => 'ARS'
406
+ );
407
+ }
408
+ }
409
+
410
+ public static function build_currency_conversion_err_msg( $currency ) {
411
+ return '<img width="12" height="12" src="' .
412
+ plugins_url( 'woo-mercado-pago-module/images/error.png', plugin_dir_path( __FILE__ ) ) .
413
+ '"> ' .
414
+ __( 'ERROR: It was not possible to convert the unsupported currency', 'woocommerce-mercadopago-module' ) .
415
+ ' ' . get_woocommerce_currency() . ' ' .
416
+ __( 'to', 'woocommerce-mercadopago-module' ) . ' ' . $currency . '. ' .
417
+ __( 'Currency conversions should be made outside this module.', 'woocommerce-mercadopago-module' );
418
+ }
419
+
420
+ public static function build_currency_not_converted_msg( $currency, $country_name ) {
421
+ return '<img width="12" height="12" src="' .
422
+ plugins_url( 'woo-mercado-pago-module/images/warning.png', plugin_dir_path( __FILE__ ) ) .
423
+ '"> ' .
424
+ __( 'ATTENTION: The currency', 'woocommerce-mercadopago-module' ) .
425
+ ' ' . get_woocommerce_currency() . ' ' .
426
+ __( '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' ) .
427
+ ' ' . $currency . ' (' . $country_name . '). ' .
428
+ __( 'Currency conversions should be made outside this module.', 'woocommerce-mercadopago-module' );
429
+ }
430
+
431
+ public static function build_currency_converted_msg( $currency, $currency_ratio ) {
432
+ return '<img width="12" height="12" src="' .
433
+ plugins_url( 'woo-mercado-pago-module/images/check.png', plugin_dir_path( __FILE__ ) ) .
434
+ '"> ' .
435
+ __( 'CURRENCY CONVERTED: The currency conversion ratio from', 'woocommerce-mercadopago-module' ) .
436
+ ' ' . get_woocommerce_currency() . ' ' .
437
+ __( 'to', 'woocommerce-mercadopago-module' ) . ' ' . $currency .
438
+ __( ' is: ', 'woocommerce-mercadopago-module' ) . $currency_ratio . ".";
439
+ }
440
+
441
+ public static function build_valid_credentials_msg( $country_name, $site_id ) {
442
+ return '<img width="12" height="12" src="' .
443
+ plugins_url( 'woo-mercado-pago-module/images/check.png', plugin_dir_path( __FILE__ ) ) .
444
+ '"> ' .
445
+ __( 'Your credentials are <strong>valid</strong> for', 'woocommerce-mercadopago-module' ) .
446
+ ': ' . $country_name . ' <img width="18.6" height="12" src="' . plugins_url(
447
+ 'woo-mercado-pago-module/images/' . $site_id . '/' . $site_id . '.png',
448
+ plugin_dir_path( __FILE__ )
449
+ ) . '"> ';
450
+ }
451
+
452
+ // Check if an order is recurrent.
453
+ public static function is_subscription( $items ) {
454
+ $is_subscription = false;
455
+ if ( sizeof( $items ) == 1 ) {
456
+ foreach ( $items as $cart_item_key => $cart_item ) {
457
+ $terms = get_the_terms( $cart_item['product_id'], 'product_type' );
458
+ $product_type = ( ! empty( $terms ) ) ? sanitize_title( current( $terms )->name ) : 'simple';
459
+ if ( $product_type == 'mp_recurrent_product' ) {
460
+ $is_subscription = true;
461
+ }
462
+ }
463
+ }
464
+ return $is_subscription;
465
+ }
466
+
467
+ public static function build_invalid_credentials_msg() {
468
+ return '<img width="12" height="12" src="' .
469
+ plugins_url( 'woo-mercado-pago-module/images/error.png', plugin_dir_path( __FILE__ ) ) .
470
+ '"> ' .
471
+ __( 'Your credentials are <strong>not valid</strong>!', 'woocommerce-mercadopago-module' );
472
+ }
473
+
474
+ // Fix to URL Problem : #038; replaces & and breaks the navigation.
475
+ public static function workaround_ampersand_bug( $link ) {
476
+ return str_replace( '\/', '/', str_replace( '&#038;', '&', $link) );
477
+ }
478
+
479
+ // Converts HTML entities to readable UTF8
480
+ public static function utf8_ansi( $str = '' ) {
481
+ $str = str_replace( '\u', 'u', $str );
482
+ $str = preg_replace( '/u([\da-fA-F]{4})/', '&#x\1;', $str );
483
+ return html_entity_decode( $str );
484
+ }
485
+
486
  }
487
+
488
+ // ==========================================================================================
489
+
490
+ // add our own item to the order actions meta box
491
+ add_action( 'woocommerce_order_actions', 'add_mp_order_meta_box_actions' );
492
+ // define the item in the meta box by adding an item to the $actions array
493
+ function add_mp_order_meta_box_actions( $actions ) {
494
+ $actions['cancel_order'] = __( 'Cancel Order', 'woocommerce-mercadopago-module' );
495
+ return $actions;
496
  }
497
+
498
+ // Payment gateways should be created as additional plugins that hook into WooCommerce.
499
+ // Inside the plugin, you need to create a class after plugins are loaded.
500
+ add_action(
501
+ 'plugins_loaded',
502
+ array( 'WC_WooMercadoPago_Module', 'init_mercado_pago_gateway_class' ), 0
503
+ );
504
+
505
+ // Add settings link on plugin page
506
+ function woomercadopago_settings_link( $links ) {
507
+ $plugin_links = array();
508
+ $plugin_links[] = '<a href="' . esc_url( admin_url(
509
+ 'admin.php?page=wc-settings&tab=checkout&section=WC_WooMercadoPago_Gateway' ) ) .
510
+ '">' . __( 'Basic Checkout', 'woocommerce-mercadopago-module' ) . '</a>';
511
+ $plugin_links[] = '<a href="' . esc_url( admin_url(
512
+ 'admin.php?page=wc-settings&tab=checkout&section=WC_WooMercadoPagoCustom_Gateway' ) ) .
513
+ '">' . __( 'Custom Checkout', 'woocommerce-mercadopago-module' ) . '</a>';
514
+ $plugin_links[] = '<a href="' . esc_url( admin_url(
515
+ 'admin.php?page=wc-settings&tab=checkout&section=WC_WooMercadoPagoTicket_Gateway' ) ) .
516
+ '">' . __( 'Ticket', 'woocommerce-mercadopago-module' ) . '</a>';
517
+ $plugin_links[] = '<a href="' . esc_url( admin_url(
518
+ 'admin.php?page=wc-settings&tab=checkout&section=WC_WooMercadoPagoSubscription_Gateway' ) ) .
519
+ '">' . __( 'Subscription', 'woocommerce-mercadopago-module' ) . '</a>';
520
+ $plugin_links[] = '<br><a target="_blank" href="' .
521
+ 'https://github.com/mercadopago/cart-woocommerce#installation' .
522
+ '">' . __( 'Tutorial', 'woocommerce-mercadopago-module' ) . '</a>';
523
+ $plugin_links[] = '<a target="_blank" href="' .
524
+ 'https://wordpress.org/support/view/plugin-reviews/woo-mercado-pago-module?filter=5#postform' .
525
+ '">' . sprintf(
526
+ __( 'Rate Us', 'woocommerce-mercadopago-module' ) . ' %s',
527
+ '&#9733;&#9733;&#9733;&#9733;&#9733;'
528
+ ) . '</a>';
529
+ $plugin_links[] = '<a target="_blank" href="' .
530
+ 'https://wordpress.org/support/plugin/woo-mercado-pago-module#postform' .
531
+ '">' . __( 'Report Issue', 'woocommerce-mercadopago-module' ) . '</a>';
532
+ return array_merge($plugin_links, $links);
533
  }
534
+ $plugin = plugin_basename( __FILE__ );
535
+ add_filter("plugin_action_links_$plugin", 'woomercadopago_settings_link' );
536
 
537
  endif;
 
 
mercadopago/class-wc-product-mp_recurrent.php ADDED
@@ -0,0 +1,450 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // Adds the Recurring Product as an option in product type selector.
210
+ add_filter( 'product_type_selector', 'mp_add_recurrent_product_type' );
211
+ function mp_add_recurrent_product_type( $types ) {
212
+ $types[ 'mp_recurrent_product' ] = __( 'Recurrent Product', 'woocommerce-mercadopago-module' );
213
+ return $types;
214
+ }
215
+
216
+ // Makes the recurrent product individually sold
217
+ add_filter( 'woocommerce_is_sold_individually', 'default_no_quantities', 10, 2 );
218
+ function default_no_quantities( $individually, $product ) {
219
+ $terms = get_the_terms( $product->id , 'product_type' );
220
+ $product_type = ( ! empty( $terms ) ) ? sanitize_title( current( $terms )->name ) : 'simple';
221
+ if ( $product_type == 'mp_recurrent_product' ) {
222
+ $individually = true;
223
+ }
224
+ return $individually;
225
+ }
226
+
227
+ // Prevent selling recurrent products together with other products
228
+ add_action( 'woocommerce_check_cart_items', 'check_recurrent_product_singularity' );
229
+ function check_recurrent_product_singularity() {
230
+ global $woocommerce;
231
+ $items = $woocommerce->cart->get_cart();
232
+ if ( sizeof( $items ) > 1 ) {
233
+ foreach ( $items as $cart_item_key => $cart_item ) {
234
+ $terms = get_the_terms( $cart_item['product_id'], 'product_type' );
235
+ $product_type = ( ! empty( $terms ) ) ? sanitize_title( current( $terms )->name ) : 'simple';
236
+ if ( $product_type == 'mp_recurrent_product' ) {
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
+ $terms = get_the_terms( $product_id, 'product_type' );
256
+ $product_type = ( ! empty( $terms ) ) ? sanitize_title( current( $terms )->name ) : 'simple';
257
+ if ( $product_type != 'mp_recurrent_product' ) {
258
+ return $purchasable;
259
+ }
260
+ $today_date = date( 'Y-m-d' );
261
+ $end_date = get_post_meta( $product_id, 'mp_recurring_end_date', true );
262
+ // If there is no date, we should just return the original value.
263
+ if ( ! isset( $end_date ) ) {
264
+ return $purchasable;
265
+ }
266
+ // If end date had passed, this product is no longer available.
267
+ $days_diff = ( strtotime( $today_date ) - strtotime( $end_date ) ) / 86400;
268
+ if ( $days_diff >= 0 ) {
269
+ return false;
270
+ }
271
+ return $purchasable;
272
+ }
273
+
274
+ // Creates the Mercado Pago Recurrent Product.
275
+ add_action( 'plugins_loaded', 'mp_create_recurrent_product_type' );
276
+ function mp_create_recurrent_product_type() {
277
+ class WC_Product_Recurrent_MP extends WC_Product {
278
+ public function __construct( $product ) {
279
+ $this->product_type = 'mp_recurrent_product';
280
+ parent::__construct( $product );
281
+ }
282
+ }
283
+ }
284
+
285
+ // Add the settings under 'general' sub-menu.
286
+ add_action( 'woocommerce_product_options_general_product_data', 'mp_add_recurrent_settings' );
287
+ function mp_add_recurrent_settings() {
288
+
289
+ global $woocommerce, $post, $thepostid;
290
+ wp_nonce_field( 'woocommerce_save_data', 'woocommerce_meta_nonce' );
291
+ $thepostid = $post->ID;
292
+
293
+ echo '<div class="options_group show_if_mp_recurrent_product">';
294
+
295
+ woocommerce_wp_text_input(
296
+ array(
297
+ 'id' => 'mp_recurring_frequency',
298
+ 'label' => __( 'Frequency', 'woocommerce-mercadopago-module' ),
299
+ 'placeholder' => '1',
300
+ 'desc_tip' => 'true',
301
+ 'description' => __( 'Amount of time (in days or months) for the execution of the next payment.', 'woocommerce-mercadopago-module' ),
302
+ 'type' => 'number'
303
+ )
304
+ );
305
+
306
+ woocommerce_wp_select(
307
+ array(
308
+ 'id' => 'mp_recurring_frequency_type',
309
+ 'label' => __( 'Frequency type', 'woocommerce-mercadopago-module' ),
310
+ 'desc_tip' => 'true',
311
+ 'description' => __( 'Indicates the period of time.', 'woocommerce-mercadopago-module' ),
312
+ 'options' => array(
313
+ 'days' => __( 'Days', 'woocommerce-mercadopago-module' ),
314
+ 'months' => __( 'Months', 'woocommerce-mercadopago-module' )
315
+ )
316
+ )
317
+ );
318
+
319
+ woocommerce_wp_text_input(
320
+ array(
321
+ 'id' => '_regular_price',
322
+ 'label' => __( 'Regular price', 'woocommerce' ) .
323
+ ' (' . get_woocommerce_currency_symbol() . ')',
324
+ 'placeholder' => wc_format_localized_price( 0 ),
325
+ 'desc_tip' => 'true',
326
+ 'description' => __( 'The amount to charge the payer each period.', 'woocommerce-mercadopago-module' ),
327
+ 'data_type' => 'price'
328
+ )
329
+ );
330
+
331
+ // --- The business rule for an order is that it should always begin in the moment of its purchase, so this field can be ignored...
332
+ //woocommerce_wp_text_input(
333
+ // array(
334
+ // 'id' => 'mp_recurring_start_date',
335
+ // 'label' => __( 'Start date', 'woocommerce-mercadopago-module' ),
336
+ // 'placeholder' => _x( 'YYYY-MM-DD', 'placeholder', 'woocommerce-mercadopago-module' ),
337
+ // 'desc_tip' => 'true',
338
+ // 'description' => __( 'First payment date (effective debit). Defaults to now if blank.', 'woocommerce-mercadopago-module' ),
339
+ // 'class' => 'date-picker',
340
+ // 'custom_attributes' => array( 'pattern' => "[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])" )
341
+ // )
342
+ //);
343
+
344
+ woocommerce_wp_text_input(
345
+ array(
346
+ 'id' => 'mp_recurring_end_date',
347
+ 'label' => __( 'End date', 'woocommerce-mercadopago-module' ),
348
+ 'placeholder' => _x( 'YYYY-MM-DD', 'placeholder', 'woocommerce-mercadopago-module' ),
349
+ 'desc_tip' => 'true',
350
+ 'description' => __( 'Deadline to generate new charges. Defaults to never if blank.', 'woocommerce-mercadopago-module' ),
351
+ 'class' => 'date-picker',
352
+ 'custom_attributes' => array( 'pattern' => "[0-9]{4}-(0[1-9]|1[012])-(0[1-9]|1[0-9]|2[0-9]|3[01])" )
353
+ )
354
+ );
355
+
356
+ if ( wc_tax_enabled() ) {
357
+
358
+ echo '<div class="options_group show_if_mp_recurrent_product">';
359
+
360
+ woocommerce_wp_select(
361
+ array(
362
+ 'id' => '_tax_status',
363
+ 'label' => __( 'Tax status', 'woocommerce' ),
364
+ 'options' => array(
365
+ 'taxable' => __( 'Taxable', 'woocommerce' ),
366
+ 'shipping' => __( 'Shipping only', 'woocommerce' ),
367
+ 'none' => _x( 'None', 'Tax status', 'woocommerce' )
368
+ ),
369
+ 'desc_tip' => 'true',
370
+ 'description' => __( 'Define whether or not the entire product is taxable, or just the cost of shipping it.', 'woocommerce' )
371
+ )
372
+ );
373
+
374
+ $tax_classes = WC_Tax::get_tax_classes();
375
+ $classes_options = array();
376
+ $classes_options[''] = __( 'Standard', 'woocommerce' );
377
+
378
+ if ( ! empty( $tax_classes ) ) {
379
+ foreach ( $tax_classes as $class ) {
380
+ $classes_options[ sanitize_title( $class ) ] = esc_html( $class );
381
+ }
382
+ }
383
+
384
+ woocommerce_wp_select(
385
+ array(
386
+ 'id' => '_tax_class',
387
+ 'label' => __( 'Tax class', 'woocommerce' ),
388
+ 'options' => $classes_options,
389
+ 'desc_tip' => 'true',
390
+ 'description' => __( 'Choose a tax class for this product. Tax classes are used to apply different tax rates specific to certain types of product.', 'woocommerce' )
391
+ )
392
+ );
393
+
394
+ do_action( 'woocommerce_product_options_tax' );
395
+
396
+ echo '</div>';
397
+
398
+ }
399
+
400
+ echo '</div>';
401
+ }
402
+
403
+ // Persists the options saved in product metadata.
404
+ add_action( 'woocommerce_process_product_meta', 'mp_save_recurrent_settings' );
405
+ function mp_save_recurrent_settings( $post_id ) {
406
+
407
+ $mp_recurring_frequency = $_POST['mp_recurring_frequency'];
408
+ if ( ! empty( $mp_recurring_frequency ) )
409
+ update_post_meta( $post_id, 'mp_recurring_frequency', esc_attr( $mp_recurring_frequency ) );
410
+ else
411
+ update_post_meta( $post_id, 'mp_recurring_frequency', esc_attr( 1 ) );
412
+
413
+ $mp_recurring_frequency_type = $_POST['mp_recurring_frequency_type'];
414
+ if ( ! empty( $mp_recurring_frequency_type ) )
415
+ update_post_meta( $post_id, 'mp_recurring_frequency_type', esc_attr( $mp_recurring_frequency_type ) );
416
+ else
417
+ update_post_meta( $post_id, 'mp_recurring_frequency_type', esc_attr( 'days' ) );
418
+
419
+ $mp_recurring_transaction_amount = $_POST['mp_recurring_transaction_amount'];
420
+ if ( ! empty( $mp_recurring_transaction_amount ) )
421
+ update_post_meta( $post_id, 'mp_recurring_transaction_amount', esc_attr( $mp_recurring_transaction_amount ) );
422
+ else
423
+ update_post_meta( $post_id, 'mp_recurring_transaction_amount', esc_attr( 0 ) );
424
+
425
+ $mp_recurring_start_date = $_POST['mp_recurring_start_date'];
426
+ if ( ! empty( $mp_recurring_start_date ) )
427
+ update_post_meta( $post_id, 'mp_recurring_start_date', esc_attr( $mp_recurring_start_date ) );
428
+ else
429
+ update_post_meta( $post_id, 'mp_recurring_start_date', esc_attr( null ) );
430
+
431
+ $mp_recurring_end_date = $_POST['mp_recurring_end_date'];
432
+ if ( ! empty( $mp_recurring_end_date ) )
433
+ update_post_meta( $post_id, 'mp_recurring_end_date', esc_attr( $mp_recurring_end_date ) );
434
+ else
435
+ update_post_meta( $post_id, 'mp_recurring_end_date', esc_attr( null ) );
436
+
437
+ }
438
+
439
+ // This shows the Virtual and Downloadable checkboxes as options for this product.
440
+ add_action( 'product_type_options', 'wc_recurrent_product_type_options' );
441
+ function wc_recurrent_product_type_options( $options ) {
442
+ $options['downloadable']['wrapper_class'] = 'show_if_simple show_if_mp_recurrent_product';
443
+ $options['virtual']['wrapper_class'] = 'show_if_simple show_if_mp_recurrent_product';
444
+ return $options;
445
+ }
446
+ add_action( 'woocommerce_product_data_tabs', 'woocommerce_product_data_tabs_recurrent_product' );
447
+ function woocommerce_product_data_tabs_recurrent_product( $tabs ) {
448
+ $tabs['inventory']['class'] = array( 'show_if_simple', 'show_if_variable', 'show_if_grouped', 'show_if_external', 'show_if_mp_recurrent_product' );
449
+ return $tabs;
450
+ }
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,1868 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // Mercado Pago fields.
24
+ $this->mp = null;
25
+ $this->site_id = null;
26
+ $this->collector_id = null;
27
+ $this->currency_ratio = -1;
28
+ $this->is_test_user = false;
29
+
30
+ // Auxiliary fields.
31
+ $this->currency_message = '';
32
+ $this->country_configs = array();
33
+ $this->store_categories_id = array();
34
+ $this->store_categories_description = array();
35
+
36
+ // WooCommerce fields.
37
+ $this->supports = array( 'products', 'refunds' );
38
+ $this->id = 'woocommerce-mercadopago-custom-module';
39
+ $this->domain = get_site_url() . '/index.php';
40
+ $this->method_title = __( 'Mercado Pago - Credit Card', 'woocommerce-mercadopago-module' );
41
+ $this->method_description = '<img width="200" height="52" src="' .
42
+ plugins_url(
43
+ 'images/mplogo.png',
44
+ plugin_dir_path( __FILE__ )
45
+ ) . '"><br><br>' . '<strong>' .
46
+ __( 'This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store.', 'woocommerce-mercadopago-module' ) .
47
+ '</strong>';
48
+
49
+ // Fields used in Mercado Pago Module configuration page.
50
+ $this->public_key = $this->get_option( 'public_key' );
51
+ $this->access_token = $this->get_option( 'access_token' );
52
+ $this->title = $this->get_option( 'title' );
53
+ $this->description = $this->get_option( 'description' );
54
+ $this->statement_descriptor = $this->get_option( 'statement_descriptor' );
55
+ $this->coupon_mode = $this->get_option( 'coupon_mode' );
56
+ $this->binary_mode = $this->get_option( 'binary_mode' );
57
+ $this->category_id = $this->get_option( 'category_id' );
58
+ $this->invoice_prefix = $this->get_option( 'invoice_prefix', 'WC-' );
59
+ $this->currency_conversion = $this->get_option( 'currency_conversion', false );
60
+ $this->gateway_discount = $this->get_option( 'gateway_discount', 0 );
61
+ $this->sandbox = $this->get_option( 'sandbox', false );
62
+ $this->debug = $this->get_option( 'debug', false );
63
+
64
+ // Logging and debug.
65
+ if ( 'yes' == $this->debug) {
66
+ if ( class_exists( 'WC_Logger' ) ) {
67
+ $this->log = new WC_Logger();
68
+ } else {
69
+ $this->log = WC_MercadoPago_Module::woocommerce_instance()->logger();
70
+ }
71
+ }
72
+
73
+ // Render our configuration page and init/load fields.
74
+ $this->init_form_fields();
75
+ $this->init_settings();
76
+
77
+ // Used by IPN to receive IPN incomings.
78
+ add_action(
79
+ 'woocommerce_api_wc_woomercadopagocustom_gateway',
80
+ array( $this, 'process_http_request' )
81
+ );
82
+ // Used by IPN to process valid incomings.
83
+ add_action(
84
+ 'valid_mercadopagocustom_ipn_request',
85
+ array( $this, 'successful_request' )
86
+ );
87
+ // process the cancel order meta box order action
88
+ add_action(
89
+ 'woocommerce_order_action_cancel_order',
90
+ array( $this, 'process_cancel_order_meta_box_actions' )
91
+ );
92
+ // Used in settings page to hook "save settings" action.
93
+ add_action(
94
+ 'woocommerce_update_options_payment_gateways_' . $this->id,
95
+ array( $this, 'process_admin_options' )
96
+ );
97
+ // Scripts for custom checkout.
98
+ add_action(
99
+ 'wp_enqueue_scripts',
100
+ array( $this, 'custom_checkout_scripts' )
101
+ );
102
+ // Apply the discounts.
103
+ add_action(
104
+ 'woocommerce_cart_calculate_fees',
105
+ array( $this, 'add_discount_custom' ), 10
106
+ );
107
+ // Display discount in payment method title.
108
+ add_filter(
109
+ 'woocommerce_gateway_title',
110
+ array( $this, 'get_payment_method_title_custom' ), 10, 2
111
+ );
112
+ // Used in settings page to hook "save settings" action.
113
+ add_action(
114
+ 'woocommerce_update_options_payment_gateways_' . $this->id,
115
+ array( $this, 'custom_process_admin_options' )
116
+ );
117
+
118
+ if ( ! empty( $this->settings['enabled'] ) && $this->settings['enabled'] == 'yes' ) {
119
+ if ( $is_instance ) {
120
+ if ( empty( $this->public_key) || empty( $this->access_token ) ) {
121
+ // Verify if public_key or access_token is empty.
122
+ add_action( 'admin_notices', array( $this, 'credentials_missing_message' ) );
123
+ } else {
124
+ if ( empty( $this->sandbox) && $this->sandbox == 'no' ) {
125
+ // Verify if SSL is supported.
126
+ add_action( 'admin_notices', array( $this, 'check_ssl_absence' ) );
127
+ }
128
+ }
129
+ } else {
130
+ // Scripts for order configuration.
131
+ add_action(
132
+ 'woocommerce_after_checkout_form',
133
+ array( $this, 'add_checkout_script' )
134
+ );
135
+ // Checkout updates.
136
+ add_action(
137
+ 'woocommerce_thankyou',
138
+ array( $this, 'update_checkout_status' )
139
+ );
140
+ }
141
+ }
142
+
143
+ }
144
+
145
+ /**
146
+ * Summary: Initialise Gateway Settings Form Fields.
147
+ * Description: Initialise Gateway settings form fields with a customized page.
148
+ */
149
+ public function init_form_fields() {
150
+
151
+ // If module is disabled, we do not need to load and process the settings page.
152
+ if ( empty( $this->settings['enabled'] ) || 'no' == $this->settings['enabled'] ) {
153
+ $this->form_fields = array(
154
+ 'enabled' => array(
155
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
156
+ 'type' => 'checkbox',
157
+ 'label' => __( 'Enable Custom Checkout', 'woocommerce-mercadopago-module' ),
158
+ 'default' => 'no'
159
+ )
160
+ );
161
+ return;
162
+ }
163
+
164
+ $api_secret_locale = sprintf(
165
+ '<a href="https://www.mercadopago.com/mla/account/credentials?type=custom" target="_blank">%s</a>, ' .
166
+ '<a href="https://www.mercadopago.com/mlb/account/credentials?type=custom" target="_blank">%s</a>, ' .
167
+ '<a href="https://www.mercadopago.com/mlc/account/credentials?type=custom" target="_blank">%s</a>, ' .
168
+ '<a href="https://www.mercadopago.com/mco/account/credentials?type=custom" target="_blank">%s</a>, ' .
169
+ '<a href="https://www.mercadopago.com/mlm/account/credentials?type=custom" target="_blank">%s</a>, ' .
170
+ '<a href="https://www.mercadopago.com/mpe/account/credentials?type=custom" target="_blank">%s</a> %s ' .
171
+ '<a href="https://www.mercadopago.com/mlv/account/credentials?type=custom" target="_blank">%s</a>',
172
+ __( 'Argentine', 'woocommerce-mercadopago-module' ),
173
+ __( 'Brazil', 'woocommerce-mercadopago-module' ),
174
+ __( 'Chile', 'woocommerce-mercadopago-module' ),
175
+ __( 'Colombia', 'woocommerce-mercadopago-module' ),
176
+ __( 'Mexico', 'woocommerce-mercadopago-module' ),
177
+ __( 'Peru', 'woocommerce-mercadopago-module' ),
178
+ __( 'or', 'woocommerce-mercadopago-module' ),
179
+ __( 'Venezuela', 'woocommerce-mercadopago-module' )
180
+ );
181
+
182
+ // Trigger API to get payment methods and site_id, also validates public_key/access_token.
183
+ if ( $this->validate_credentials() ) {
184
+ // checking the currency.
185
+ $this->currency_message = '';
186
+ if ( ! $this->is_supported_currency() && 'yes' == $this->settings['enabled'] ) {
187
+ if ( $this->currency_conversion == 'no' ) {
188
+ $this->currency_ratio = -1;
189
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_not_converted_msg(
190
+ $this->country_configs['currency'],
191
+ $this->country_configs['country_name']
192
+ );
193
+ } elseif ( $this->currency_conversion == 'yes' && $this->currency_ratio != -1 ) {
194
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_converted_msg(
195
+ $this->country_configs['currency'],
196
+ $this->currency_ratio
197
+ );
198
+ } else {
199
+ $this->currency_ratio = -1;
200
+ $this->currency_message .=
201
+ WC_WooMercadoPago_Module::build_currency_conversion_err_msg(
202
+ $this->country_configs['currency']
203
+ );
204
+ }
205
+ } else {
206
+ $this->currency_ratio = -1;
207
+ }
208
+ $this->credentials_message = WC_WooMercadoPago_Module::build_valid_credentials_msg(
209
+ $this->country_configs['country_name'],
210
+ $this->site_id
211
+ );
212
+ } else {
213
+ $this->credentials_message = WC_WooMercadoPago_Module::build_invalid_credentials_msg();
214
+ }
215
+
216
+ // fill categories (can be handled without credentials).
217
+ $categories = WC_WooMercadoPago_Module::get_categories();
218
+ $this->store_categories_id = $categories['store_categories_id'];
219
+ $this->store_categories_description = $categories['store_categories_description'];
220
+
221
+ // Validate discount field.
222
+ if ( ! is_numeric( $this->gateway_discount ) ) {
223
+ $this->gateway_discount_desc = '<img width="12" height="12" src="' .
224
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
225
+ __( 'This field should be an integer greater or equal 0 and smaller than 100.', 'woocommerce-mercadopago-module' );
226
+ } elseif ( $this->gateway_discount < 0 || $this->gateway_discount >= 100 ) {
227
+ $this->gateway_discount_desc = '<img width="12" height="12" src="' .
228
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
229
+ __( 'This field should be an integer greater or equal 0 and smaller than 100.', 'woocommerce-mercadopago-module' );
230
+ } else {
231
+ $this->gateway_discount_desc =
232
+ __( 'Give a percentual discount for your customers if they use this payment gateway.', '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 Custom Checkout', 'woocommerce-mercadopago-module' ),
241
+ 'default' => 'no'
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(
247
+ __( 'You can obtain your credentials for', 'woocommerce-mercadopago-module' ) .
248
+ ' %s.', $api_secret_locale
249
+ )
250
+ ),
251
+ 'public_key' => array(
252
+ 'title' => 'Public key',
253
+ 'type' => 'text',
254
+ 'description' =>
255
+ __( 'Insert your Mercado Pago Public key.', 'woocommerce-mercadopago-module' ),
256
+ 'default' => '',
257
+ 'required' => true
258
+ ),
259
+ 'access_token' => array(
260
+ 'title' => 'Access token',
261
+ 'type' => 'text',
262
+ 'description' =>
263
+ __( 'Insert your Mercado Pago Access token.', 'woocommerce-mercadopago-module' ),
264
+ 'default' => '',
265
+ 'required' => true
266
+ ),
267
+ 'ipn_url' => array(
268
+ 'title' =>
269
+ __( 'Instant Payment Notification (IPN) URL', 'woocommerce-mercadopago-module' ),
270
+ 'type' => 'title',
271
+ 'description' => sprintf(
272
+ __( 'Your IPN URL to receive instant payment notifications is', 'woocommerce-mercadopago-module' ) .
273
+ '<br>%s', '<code>' . WC()->api_request_url( 'WC_WooMercadoPagoCustom_Gateway' ) . '</code>.'
274
+ )
275
+ ),
276
+ 'checkout_options_title' => array(
277
+ 'title' => __( 'Checkout Options', 'woocommerce-mercadopago-module' ),
278
+ 'type' => 'title',
279
+ 'description' => ''
280
+ ),
281
+ 'title' => array(
282
+ 'title' => __( 'Title', 'woocommerce-mercadopago-module' ),
283
+ 'type' => 'text',
284
+ 'description' =>
285
+ __( 'Title shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
286
+ 'default' => __( 'Mercado Pago - Credit Card', 'woocommerce-mercadopago-module' )
287
+ ),
288
+ 'description' => array(
289
+ 'title' => __( 'Description', 'woocommerce-mercadopago-module' ),
290
+ 'type' => 'textarea',
291
+ 'description' =>
292
+ __( 'Description shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
293
+ 'default' => __( 'Pay with Mercado Pago', 'woocommerce-mercadopago-module' )
294
+ ),
295
+ 'statement_descriptor' => array(
296
+ 'title' => __( 'Statement Descriptor', 'woocommerce-mercadopago-module' ),
297
+ 'type' => 'text',
298
+ 'description' => __( 'The description that will be shown in your customer\'s invoice.', 'woocommerce-mercadopago-module' ),
299
+ 'default' => __( 'Mercado Pago', 'woocommerce-mercadopago-module' )
300
+ ),
301
+ 'coupon_mode' => array(
302
+ 'title' => __( 'Coupons', 'woocommerce-mercadopago-module' ),
303
+ 'type' => 'checkbox',
304
+ 'label' => __( 'Enable coupons of discounts', 'woocommerce-mercadopago-module' ),
305
+ 'default' => 'no',
306
+ 'description' =>
307
+ __( 'If there is a Mercado Pago campaign, allow your store to give discounts to customers.', 'woocommerce-mercadopago-module' )
308
+ ),
309
+ 'binary_mode' => array(
310
+ 'title' => __( 'Binary Mode', 'woocommerce-mercadopago-module' ),
311
+ 'type' => 'checkbox',
312
+ 'label' => __( 'Enable binary mode for checkout status', 'woocommerce-mercadopago-module' ),
313
+ 'default' => 'no',
314
+ 'description' =>
315
+ __( 'When charging a credit card, only [approved] or [reject] status will be taken.', 'woocommerce-mercadopago-module' )
316
+ ),
317
+ 'category_id' => array(
318
+ 'title' => __( 'Store Category', 'woocommerce-mercadopago-module' ),
319
+ 'type' => 'select',
320
+ 'description' =>
321
+ __( 'Define which type of products your store sells.', 'woocommerce-mercadopago-module' ),
322
+ 'options' => $this->store_categories_id
323
+ ),
324
+ 'invoice_prefix' => array(
325
+ 'title' => __( 'Store Identificator', 'woocommerce-mercadopago-module' ),
326
+ 'type' => 'text',
327
+ 'description' =>
328
+ __( 'Please, inform a prefix to your store.', 'woocommerce-mercadopago-module' )
329
+ . ' ' .
330
+ __( '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' ),
331
+ 'default' => 'WC-'
332
+ ),
333
+ 'currency_conversion' => array(
334
+ 'title' => __( 'Currency Conversion', 'woocommerce-mercadopago-module' ),
335
+ 'type' => 'checkbox',
336
+ 'label' =>
337
+ __( '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' ),
338
+ 'default' => 'no',
339
+ 'description' => sprintf( '%s', $this->currency_message )
340
+ ),
341
+ 'gateway_discount' => array(
342
+ 'title' => __( 'Discount by Gateway', 'woocommerce-mercadopago-module' ),
343
+ 'type' => 'number',
344
+ 'description' => $this->gateway_discount_desc,
345
+ 'default' => '0'
346
+ ),
347
+ 'testing' => array(
348
+ 'title' => __( 'Test and Debug Options', 'woocommerce-mercadopago-module' ),
349
+ 'type' => 'title',
350
+ 'description' => ''
351
+ ),
352
+ 'sandbox' => array(
353
+ 'title' => __( 'Mercado Pago Sandbox', 'woocommerce-mercadopago-module' ),
354
+ 'type' => 'checkbox',
355
+ 'label' => __( 'Enable Mercado Pago Sandbox', 'woocommerce-mercadopago-module' ),
356
+ 'default' => 'no',
357
+ 'description' =>
358
+ __( 'This option allows you to test payments inside a sandbox environment.', 'woocommerce-mercadopago-module' ),
359
+ ),
360
+ 'debug' => array(
361
+ 'title' => __( 'Debug and Log', 'woocommerce-mercadopago-module' ),
362
+ 'type' => 'checkbox',
363
+ 'label' => __( 'Enable log', 'woocommerce-mercadopago-module' ),
364
+ 'default' => 'no',
365
+ 'description' => sprintf(
366
+ __( 'Register event logs of Mercado Pago, such as API requests, in the file', 'woocommerce-mercadopago-module' ) .
367
+ ' %s.', $this->build_log_path_string() . '.<br>' .
368
+ __( 'File location: ', 'woocommerce-mercadopago-module' ) .
369
+ '<code>wordpress/wp-content/uploads/wc-logs/' . $this->id . '-' .
370
+ sanitize_file_name( wp_hash( $this->id ) ) . '.log</code>' )
371
+ )
372
+ );
373
+
374
+ }
375
+
376
+ /**
377
+ * Processes and saves options.
378
+ * If there is an error thrown, will continue to save and validate fields, but will leave the
379
+ * erroring field out.
380
+ * @return bool was anything saved?
381
+ */
382
+ public function custom_process_admin_options() {
383
+ $this->init_settings();
384
+
385
+ $post_data = $this->get_post_data();
386
+
387
+ foreach ( $this->get_form_fields() as $key => $field ) {
388
+ if ( 'title' !== $this->get_field_type( $field ) ) {
389
+ try {
390
+ $this->settings[$key] = $this->get_field_value( $key, $field, $post_data );
391
+ } catch ( Exception $e ) {
392
+ $this->add_error( $e->getMessage() );
393
+ }
394
+ }
395
+ }
396
+
397
+ if ( ! empty( $this->settings['public_key'] ) && ! empty( $this->settings['access_token'] ) ) {
398
+ $this->mp = new MP(
399
+ WC_WooMercadoPago_Module::get_module_version(),
400
+ $this->settings['access_token']
401
+ );
402
+ } else {
403
+ $this->mp = null;
404
+ }
405
+
406
+ // analytics
407
+ $infra_data = WC_WooMercadoPago_Module::get_common_settings();
408
+ $infra_data['checkout_custom_credit_card'] = ( $this->settings['enabled'] == 'yes' ? 'true' : 'false' );
409
+ $infra_data['checkout_custom_credit_card_coupon'] = ( $this->settings['coupon_mode'] == 'yes' ? 'true' : 'false' );
410
+ if ( $this->mp != null ) {
411
+ $response = $this->mp->analytics_save_settings( $infra_data );
412
+ if ( 'yes' == $this->debug) {
413
+ $this->log->add(
414
+ $this->id,
415
+ '[custom_process_admin_options] - analytics info response: ' .
416
+ json_encode( $response, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
417
+ );
418
+ }
419
+ }
420
+
421
+ return update_option(
422
+ $this->get_option_key(),
423
+ apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->settings )
424
+ );
425
+ }
426
+
427
+ /**
428
+ * Handles the manual order refunding in server-side.
429
+ */
430
+ public function process_refund( $order_id, $amount = null, $reason = '' ) {
431
+
432
+ $payments = get_post_meta(
433
+ $order_id,
434
+ '_Mercado_Pago_Payment_IDs',
435
+ true
436
+ );
437
+
438
+ // Validate.
439
+ if ( $this->mp == null || empty( $payments ) ) {
440
+ if ( 'yes' == $this->debug ) {
441
+ $this->log->add(
442
+ $this->id,
443
+ '[process_refund] - no payments or credentials invalid'
444
+ );
445
+ }
446
+ return false;
447
+ }
448
+
449
+ $total_available = 0;
450
+ $payment_structs = array();
451
+ $payment_ids = explode( ', ', $payments );
452
+ foreach ( $payment_ids as $p_id ) {
453
+ $p = get_post_meta(
454
+ $order_id,
455
+ 'Mercado Pago - Payment ' . $p_id,
456
+ true
457
+ );
458
+ $p = explode( '/', $p );
459
+ $paid = ((float) explode( ' ', substr( $p[2], 1, -1 ) )[1]);
460
+ $refund = ((float) explode( ' ', substr( $p[3], 1, -1 ) )[1]);
461
+ $p_struct = array(
462
+ 'id' => $p_id,
463
+ 'available_to_refund' => $paid - $refund
464
+ );
465
+ $total_available += $paid - $refund;
466
+ $payment_structs[] = $p_struct;
467
+ }
468
+
469
+ if ( 'yes' == $this->debug ) {
470
+ $this->log->add(
471
+ $this->id,
472
+ '[process_refund] - refunding ' . $amount . ' because of ' . $reason . ' and payments ' .
473
+ json_encode( $payment_structs, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
474
+ );
475
+ }
476
+
477
+ // Do not allow refund more than available or invalid amounts.
478
+ if ( $amount > $total_available || $amount <= 0 ) {
479
+ return false;
480
+ }
481
+
482
+ $remaining_to_refund = $amount;
483
+ foreach ( $payment_structs as $to_refund ) {
484
+ if ( $remaining_to_refund <= $to_refund['available_to_refund'] ) {
485
+ // We want to refund an amount that is less than the available for this payment, so we
486
+ // can just refund and return.
487
+ $response = $this->mp->partial_refund_payment(
488
+ $to_refund['id'],
489
+ $remaining_to_refund,
490
+ $reason,
491
+ $this->invoice_prefix . $order_id
492
+ );
493
+ $message = $response['response']['message'];
494
+ $status = $response['status'];
495
+ if ( 'yes' == $this->debug ) {
496
+ $this->log->add(
497
+ $this->id,
498
+ '[process_refund] - refund payment of id ' . $p_id .
499
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
500
+ );
501
+ }
502
+ if ( $status >= 200 && $status < 300 ) {
503
+ return true;
504
+ } else {
505
+ return false;
506
+ }
507
+ } elseif ( $to_refund['available_to_refund'] > 0 ) {
508
+ // We want to refund an amount that exceeds the available for this payment, so we
509
+ // totally refund this payment, and try to complete refund in other/next payments.
510
+ $response = $this->mp->partial_refund_payment(
511
+ $to_refund['id'],
512
+ $to_refund['available_to_refund'],
513
+ $reason,
514
+ $this->invoice_prefix . $order_id
515
+ );
516
+ $message = $response['response']['message'];
517
+ $status = $response['status'];
518
+ if ( 'yes' == $this->debug ) {
519
+ $this->log->add(
520
+ $this->id,
521
+ '[process_refund] - refund payment of id ' . $p_id .
522
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
523
+ );
524
+ }
525
+ if ( $status < 200 || $status >= 300 ) {
526
+ return false;
527
+ }
528
+ $remaining_to_refund -= $to_refund['available_to_refund'];
529
+ }
530
+ if ( $remaining_to_refund == 0 )
531
+ return true;
532
+ }
533
+
534
+ // Reaching here means that there we run out of payments, and there is an amount
535
+ // remaining to be refund, which is impossible as it implies refunding more than
536
+ // available on paid amounts.
537
+ return false;
538
+
539
+ }
540
+
541
+ /**
542
+ * Handles the manual order cancellation in server-side.
543
+ */
544
+ public function process_cancel_order_meta_box_actions( $order ) {
545
+
546
+ // WooCommerce 3.0 or later.
547
+ if ( method_exists( $order, 'get_meta' ) ) {
548
+ $used_gateway = $order->get_meta( '_used_gateway' );
549
+ $payments = $order->get_meta( '_Mercado_Pago_Payment_IDs' );
550
+ } else {
551
+ $used_gateway = get_post_meta( $order->id, '_used_gateway', true );
552
+ $payments = get_post_meta( $order->id, '_Mercado_Pago_Payment_IDs', true );
553
+ }
554
+
555
+ if ( $used_gateway != 'WC_WooMercadoPagoCustom_Gateway' ) {
556
+ return;
557
+ }
558
+
559
+ if ( 'yes' == $this->debug ) {
560
+ $this->log->add(
561
+ $this->id,
562
+ '[process_cancel_order_meta_box_actions] - cancelling payments for ' . $payments
563
+ );
564
+ }
565
+
566
+ if ( $this->mp != null && ! empty( $payments ) ) {
567
+ $payment_ids = explode( ', ', $payments );
568
+ foreach ( $payment_ids as $p_id ) {
569
+ $response = $this->mp->cancel_payment( $p_id );
570
+ $message = $response['response']['message'];
571
+ $status = $response['status'];
572
+ if ( 'yes' == $this->debug ) {
573
+ $this->log->add(
574
+ $this->id,
575
+ '[process_cancel_order_meta_box_actions] - cancel payment of id ' . $p_id .
576
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
577
+ );
578
+ }
579
+ }
580
+ } else {
581
+ if ( 'yes' == $this->debug ) {
582
+ $this->log->add(
583
+ $this->id,
584
+ '[process_cancel_order_meta_box_actions] - no payments or credentials invalid'
585
+ );
586
+ }
587
+ }
588
+
589
+ }
590
+
591
+ /*
592
+ * ========================================================================
593
+ * CHECKOUT BUSINESS RULES (CLIENT SIDE)
594
+ * ========================================================================
595
+ */
596
+
597
+ public function add_checkout_script() {
598
+
599
+ $w = WC_WooMercadoPago_Module::woocommerce_instance();
600
+ $logged_user_email = null;
601
+ $payments = array();
602
+ $gateways = WC()->payment_gateways->get_available_payment_gateways();
603
+ foreach ( $gateways as $g ) {
604
+ $payments[] = $g->id;
605
+ }
606
+ $payments = str_replace( '-', '_', implode( ', ', $payments ) );
607
+
608
+ if ( wp_get_current_user()->ID != 0 ) {
609
+ $logged_user_email = wp_get_current_user()->user_email;
610
+ }
611
+
612
+ ?>
613
+ <script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
614
+ <script type="text/javascript">
615
+ var MA = ModuleAnalytics;
616
+ MA.setPublicKey( '<?php echo $this->get_option( 'public_key' ); ?>' );
617
+ MA.setPlatform( 'WooCommerce' );
618
+ MA.setPlatformVersion( '<?php echo $w->version; ?>' );
619
+ MA.setModuleVersion( '<?php echo WC_WooMercadoPago_Module::VERSION; ?>' );
620
+ MA.setPayerEmail( '<?php echo ( $logged_user_email != null ? $logged_user_email : "" ); ?>' );
621
+ MA.setUserLogged( <?php echo ( empty( $logged_user_email ) ? 0 : 1 ); ?> );
622
+ MA.setInstalledModules( '<?php echo $payments; ?>' );
623
+ MA.post();
624
+ </script>
625
+ <?php
626
+
627
+ }
628
+
629
+ public function update_checkout_status( $order_id ) {
630
+
631
+ if ( get_post_meta( $order_id, '_used_gateway', true ) != 'WC_WooMercadoPagoCustom_Gateway' )
632
+ return;
633
+
634
+ if ( 'yes' == $this->debug ) {
635
+ $this->log->add(
636
+ $this->id,
637
+ '[update_checkout_status] - updating checkout statuses ' . $order_id
638
+ );
639
+ }
640
+
641
+ echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
642
+ <script type="text/javascript">
643
+ var MA = ModuleAnalytics;
644
+ MA.setPublicKey( "' . $this->get_option( 'public_key' ) . '" );
645
+ MA.setPaymentType("credit_card");
646
+ MA.setCheckoutType("custom");
647
+ MA.put();
648
+ </script>';
649
+
650
+ }
651
+
652
+ public function custom_checkout_scripts() {
653
+ if ( is_checkout() && $this->is_available() ) {
654
+ if ( ! get_query_var( 'order-received' ) ) {
655
+ wp_enqueue_style(
656
+ 'woocommerce-mercadopago-style', plugins_url(
657
+ 'assets/css/custom_checkout_mercadopago.css',
658
+ plugin_dir_path( __FILE__ ) ) );
659
+ wp_enqueue_script(
660
+ 'woocommerce-mercadopago-v1',
661
+ 'https://secure.mlstatic.com/sdk/javascript/v1/mercadopago.js' );
662
+ }
663
+ }
664
+ }
665
+
666
+ public function payment_fields() {
667
+ $amount = $this->get_order_total();
668
+
669
+ $parameters = array(
670
+ 'public_key' => $this->public_key,
671
+ 'site_id' => $this->site_id,
672
+ 'images_path' => plugins_url( 'images/', plugin_dir_path( __FILE__ ) ),
673
+ 'banner_path' => $this->country_configs['checkout_banner_custom'],
674
+ 'amount' => $amount *
675
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 ),
676
+ 'coupon_mode' => $this->coupon_mode,
677
+ 'is_currency_conversion' => $this->currency_ratio,
678
+ 'woocommerce_currency' => get_woocommerce_currency(),
679
+ 'account_currency' => $this->country_configs['currency'],
680
+ 'discount_action_url' => $this->domain .
681
+ '/woocommerce-mercadopago-module/?wc-api=WC_WooMercadoPagoCustom_Gateway',
682
+ 'form_labels' => array(
683
+ 'form' => array(
684
+ 'payment_converted' =>
685
+ __( 'Payment converted from', 'woocommerce-mercadopago-module' ),
686
+ 'to' => __( 'to', 'woocommerce-mercadopago-module' ),
687
+ 'coupon_empty' =>
688
+ __( 'Please, inform your coupon code', 'woocommerce-mercadopago-module' ),
689
+ 'apply' => __( 'Apply', 'woocommerce-mercadopago-module' ),
690
+ 'remove' => __( 'Remove', 'woocommerce-mercadopago-module' ),
691
+ 'discount_info1' => __( 'You will save', 'woocommerce-mercadopago-module' ),
692
+ 'discount_info2' => __( 'with discount from', 'woocommerce-mercadopago-module' ),
693
+ 'discount_info3' => __( 'Total of your purchase:', 'woocommerce-mercadopago-module' ),
694
+ 'discount_info4' =>
695
+ __( 'Total of your purchase with discount:', 'woocommerce-mercadopago-module' ),
696
+ 'discount_info5' => __( '*Uppon payment approval', 'woocommerce-mercadopago-module' ),
697
+ 'discount_info6' =>
698
+ __( 'Terms and Conditions of Use', 'woocommerce-mercadopago-module' ),
699
+ 'coupon_of_discounts' => __( 'Discount Coupon', 'woocommerce-mercadopago-module' ),
700
+ 'label_other_bank' => __( 'Other Bank', 'woocommerce-mercadopago-module' ),
701
+ 'label_choose' => __( 'Choose', 'woocommerce-mercadopago-module' ),
702
+ 'your_card' => __( 'Your Card', 'woocommerce-mercadopago-module' ),
703
+ 'other_cards' => __( 'Other Cards', 'woocommerce-mercadopago-module' ),
704
+ 'other_card' => __( 'Other Card', 'woocommerce-mercadopago-module' ),
705
+ 'ended_in' => __( 'ended in', 'woocommerce-mercadopago-module' ),
706
+ 'card_holder_placeholder' =>
707
+ __( ' as it appears in your card ...', 'woocommerce-mercadopago-module' ),
708
+ 'payment_method' => __( 'Payment Method', 'woocommerce-mercadopago-module' ),
709
+ 'credit_card_number' => __( 'Credit card number', 'woocommerce-mercadopago-module' ),
710
+ 'expiration_month' => __( 'Expiration month', 'woocommerce-mercadopago-module' ),
711
+ 'expiration_year' => __( 'Expiration year', 'woocommerce-mercadopago-module' ),
712
+ 'year' => __( 'Year', 'woocommerce-mercadopago-module' ),
713
+ 'month' => __( 'Month', 'woocommerce-mercadopago-module' ),
714
+ 'card_holder_name' => __( 'Card holder name', 'woocommerce-mercadopago-module' ),
715
+ 'security_code' => __( 'Security code', 'woocommerce-mercadopago-module' ),
716
+ 'document_type' => __( 'Document Type', 'woocommerce-mercadopago-module' ),
717
+ 'document_number' => __( 'Document number', 'woocommerce-mercadopago-module' ),
718
+ 'issuer' => __( 'Issuer', 'woocommerce-mercadopago-module' ),
719
+ 'installments' => __( 'Installments', 'woocommerce-mercadopago-module' )
720
+ ),
721
+ 'error' => array(
722
+ // Card number.
723
+ '205' =>
724
+ __( 'Parameter cardNumber can not be null/empty', 'woocommerce-mercadopago-module' ),
725
+ 'E301' => __( 'Invalid Card Number', 'woocommerce-mercadopago-module' ),
726
+ // Expiration date.
727
+ '208' => __( 'Invalid Expiration Date', 'woocommerce-mercadopago-module' ),
728
+ '209' => __( 'Invalid Expiration Date', 'woocommerce-mercadopago-module' ),
729
+ '325' => __( 'Invalid Expiration Date', 'woocommerce-mercadopago-module' ),
730
+ '326' => __( 'Invalid Expiration Date', 'woocommerce-mercadopago-module' ),
731
+ // Card holder name.
732
+ '221' =>
733
+ __( 'Parameter cardholderName can not be null/empty', 'woocommerce-mercadopago-module' ),
734
+ '316' => __( 'Invalid Card Holder Name', 'woocommerce-mercadopago-module' ),
735
+ // Security code.
736
+ '224' =>
737
+ __( 'Parameter securityCode can not be null/empty', 'woocommerce-mercadopago-module' ),
738
+ 'E302' => __( 'Invalid Security Code', 'woocommerce-mercadopago-module' ),
739
+ // Doc type.
740
+ '212' =>
741
+ __( 'Parameter docType can not be null/empty', 'woocommerce-mercadopago-module' ),
742
+ '322' => __( 'Invalid Document Type', 'woocommerce-mercadopago-module' ),
743
+ // Doc number.
744
+ '214' =>
745
+ __( 'Parameter docNumber can not be null/empty', 'woocommerce-mercadopago-module' ),
746
+ '324' => __( 'Invalid Document Number', 'woocommerce-mercadopago-module' ),
747
+ // Doc sub type.
748
+ '213' => __( 'The parameter cardholder.document.subtype can not be null or empty', 'woocommerce-mercadopago-module' ),
749
+ '323' => __( 'Invalid Document Sub Type', 'woocommerce-mercadopago-module' ),
750
+ // Issuer.
751
+ '220' =>
752
+ __( 'Parameter cardIssuerId can not be null/empty', 'woocommerce-mercadopago-module' )
753
+ )
754
+ )
755
+ );
756
+
757
+ // Find logged user.
758
+ try {
759
+ $logged_user_email = null;
760
+ $parameters['customerId'] = null;
761
+ $parameters['payer_email'] = null;
762
+ if ( wp_get_current_user()->ID != 0 ) {
763
+ $logged_user_email = wp_get_current_user()->user_email;
764
+ }
765
+ if ( isset( $logged_user_email ) ) {
766
+ $customer = $this->mp->get_or_create_customer( $logged_user_email);
767
+ if ( isset( $logged_user_email ) ) {
768
+ $parameters['payer_email'] = $logged_user_email;
769
+ }
770
+ if ( isset( $customer['id'] ) ) {
771
+ $parameters['customerId'] = $customer['id'];
772
+ }
773
+ if ( isset( $customer['cards'] ) ) {
774
+ $customer_cards = $customer['cards'];
775
+ $parameters['customer_cards'] = $customer_cards;
776
+ }
777
+ } else {
778
+ $parameters['coupon_mode'] = 'no';
779
+ }
780
+ } catch ( Exception $e ) {
781
+ $parameters['coupon_mode'] = 'no';
782
+ if ( 'yes' == $this->debug ) {
783
+ $this->log->add(
784
+ $this->id,
785
+ '[process_fields] - there is a problem when retrieving information for cards: ' .
786
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
787
+ );
788
+ }
789
+ }
790
+
791
+ wc_get_template(
792
+ 'credit-card/payment-form.php',
793
+ $parameters,
794
+ 'woocommerce/mercadopago/',
795
+ WC_WooMercadoPago_Module::get_templates_path()
796
+ );
797
+ }
798
+
799
+ /**
800
+ * Summary: Handle the payment and processing the order.
801
+ * Description: This function is called after we click on [place_order] button, and each field is
802
+ * passed to this function through $_POST variable.
803
+ * @return an array containing the result of the processment and the URL to redirect.
804
+ */
805
+ public function process_payment( $order_id ) {
806
+
807
+ if ( ! isset( $_POST['mercadopago_custom'] ) ) {
808
+ return;
809
+ }
810
+
811
+ $order = wc_get_order( $order_id );
812
+ $custom_checkout = $_POST['mercadopago_custom'];
813
+
814
+ // WooCommerce 3.0 or later.
815
+ if ( method_exists( $order, 'update_meta_data' ) ) {
816
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPagoCustom_Gateway' );
817
+ $order->save();
818
+ } else {
819
+ update_post_meta( $order_id, '_used_gateway', 'WC_WooMercadoPagoCustom_Gateway' );
820
+ }
821
+
822
+ // We have got parameters from checkout page, now its time to charge the card.
823
+ if ( 'yes' == $this->debug ) {
824
+ $this->log->add(
825
+ $this->id,
826
+ '[process_payment] - Received [$_POST] from customer front-end page: ' .
827
+ json_encode( $_POST, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
828
+ );
829
+ }
830
+
831
+ // Mexico country case.
832
+ if ( $custom_checkout['paymentMethodId'] == '' || empty( $custom_checkout['paymentMethodId'] ) ) {
833
+ $custom_checkout['paymentMethodId'] = $custom_checkout['paymentMethodSelector'];
834
+ }
835
+
836
+ if ( isset( $custom_checkout['amount'] ) && ! empty( $custom_checkout['amount'] ) &&
837
+ isset( $custom_checkout['token'] ) && ! empty( $custom_checkout['token'] ) &&
838
+ isset( $custom_checkout['paymentMethodId'] ) && ! empty( $custom_checkout['paymentMethodId'] ) &&
839
+ isset( $custom_checkout['installments'] ) && ! empty( $custom_checkout['installments'] ) &&
840
+ $custom_checkout['installments'] != -1 ) {
841
+
842
+ $response = self::create_url( $order, $custom_checkout );
843
+
844
+ if (array_key_exists( 'status', $response ) ) {
845
+ switch ( $response['status'] ) {
846
+ case 'approved':
847
+ WC()->cart->empty_cart();
848
+ wc_add_notice(
849
+ '<p>' .
850
+ __( $this->get_order_status( 'accredited' ), 'woocommerce-mercadopago-module' ) .
851
+ '</p>',
852
+ 'notice'
853
+ );
854
+ $order->add_order_note(
855
+ 'Mercado Pago: ' .
856
+ __( 'Payment approved.', 'woocommerce-mercadopago-module' )
857
+ );
858
+ return array(
859
+ 'result' => 'success',
860
+ 'redirect' => $order->get_checkout_order_received_url()
861
+ );
862
+ break;
863
+ case 'pending':
864
+ // Order approved/pending, we just redirect to the thankyou page.
865
+ return array(
866
+ 'result' => 'success',
867
+ 'redirect' => $order->get_checkout_order_received_url()
868
+ );
869
+ break;
870
+ case 'in_process':
871
+ // For pending, we don't know if the purchase will be made, so we must inform this status.
872
+ WC()->cart->empty_cart();
873
+ wc_add_notice(
874
+ '<p>' .
875
+ __( $this->get_order_status( $response['status_detail'] ), 'woocommerce-mercadopago-module' ) .
876
+ '</p>' .
877
+ '<p><a class="button" href="' .
878
+ esc_url( $order->get_checkout_order_received_url() ) .
879
+ '">' .
880
+ __( 'Check your order resume', 'woocommerce-mercadopago-module' ) .
881
+ '</a></p>',
882
+ 'notice'
883
+ );
884
+ return array(
885
+ 'result' => 'success',
886
+ 'redirect' => $order->get_checkout_payment_url( true )
887
+ );
888
+ break;
889
+ case 'rejected':
890
+ // If rejected is received, the order will not proceed until another payment try,
891
+ // so we must inform this status.
892
+ wc_add_notice(
893
+ '<p>' .
894
+ __( 'Your payment was refused. You can try again.', 'woocommerce-mercadopago-module' ) .
895
+ '<br>' .
896
+ __( $this->get_order_status( $response['status_detail'] ), 'woocommerce-mercadopago-module' ) .
897
+ '</p>' .
898
+ '<p><a class="button" href="' . esc_url( $order->get_checkout_payment_url() ) . '">' .
899
+ __( 'Click to try again', 'woocommerce-mercadopago-module' ) .
900
+ '</a></p>',
901
+ 'error'
902
+ );
903
+ return array(
904
+ 'result' => 'success',
905
+ 'redirect' => $order->get_checkout_payment_url( true )
906
+ );
907
+ break;
908
+ case 'cancelled':
909
+ case 'in_mediation':
910
+ case 'charged-back':
911
+ break;
912
+ default:
913
+ break;
914
+ }
915
+ }
916
+ } else {
917
+ // Process when fields are imcomplete.
918
+ wc_add_notice(
919
+ '<p>' .
920
+ __( 'A problem was occurred when processing your payment. Are you sure you have correctly filled all information in the checkout form?', 'woocommerce-mercadopago-module' ) .
921
+ '</p>',
922
+ 'error'
923
+ );
924
+ return array(
925
+ 'result' => 'fail',
926
+ 'redirect' => '',
927
+ );
928
+ }
929
+ }
930
+
931
+ /**
932
+ * Summary: Build Mercado Pago preference.
933
+ * Description: Create Mercado Pago preference and get init_point URL based in the order options
934
+ * from the cart.
935
+ * @return the preference object.
936
+ */
937
+ private function build_payment_preference( $order, $custom_checkout ) {
938
+
939
+ // A string to register items (workaround to deal with API problem that shows only first item).
940
+ $list_of_items = array();
941
+ $amount_of_items = 0;
942
+
943
+ // Here we build the array that contains ordered items, from customer cart.
944
+ $items = array();
945
+ if ( sizeof( $order->get_items() ) > 0 ) {
946
+ foreach ( $order->get_items() as $item ) {
947
+ if ( $item['qty'] ) {
948
+ $product = new WC_product( $item['product_id'] );
949
+
950
+ // WooCommerce 3.0 or later.
951
+ if ( method_exists( $product, 'get_description' ) ) {
952
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
953
+ $product->get_name()
954
+ );
955
+ $product_content = WC_WooMercadoPago_Module::utf8_ansi(
956
+ $product->get_description()
957
+ );
958
+ } else {
959
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
960
+ $product->post->post_title
961
+ );
962
+ $product_content = WC_WooMercadoPago_Module::utf8_ansi(
963
+ $product->post->post_content
964
+ );
965
+ }
966
+
967
+ // Remove decimals if MCO/MLC
968
+ $unit_price = floor( ( (float) $item['line_total'] + (float) $item['line_tax'] ) *
969
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 ) * 100 ) / 100;
970
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
971
+ $unit_price = floor( $unit_price );
972
+ }
973
+
974
+ // Calculate discount for payment method.
975
+ if ( is_numeric( $this->gateway_discount ) ) {
976
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
977
+ $price_percent = $this->gateway_discount / 100;
978
+ $discount = $unit_price * $price_percent;
979
+ if ( $discount > 0 ) {
980
+ $amount_of_items += $discount;
981
+ }
982
+ }
983
+ }
984
+
985
+ array_push( $list_of_items, $product_title . ' x ' . $item['qty'] );
986
+ array_push( $items, array(
987
+ 'id' => $item['product_id'],
988
+ 'title' => ( $product_title . ' x ' . $item['qty'] ),
989
+ 'description' => sanitize_file_name(
990
+ // This handles description width limit of Mercado Pago.
991
+ ( strlen( $product_content ) > 230 ?
992
+ substr( $product_content, 0, 230 ) . '...' :
993
+ $product_content )
994
+ ),
995
+ 'picture_url' => wp_get_attachment_url( $product->get_image_id() ),
996
+ 'category_id' => $this->store_categories_id[$this->category_id],
997
+ 'quantity' => 1,
998
+ 'unit_price' => $unit_price
999
+ ) );
1000
+ }
1001
+ }
1002
+ }
1003
+
1004
+ // Creates the shipment cost structure.
1005
+ $ship_cost = ( (float) $order->get_total_shipping() + (float) $order->get_shipping_tax() ) *
1006
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 );
1007
+ // Remove decimals if MCO/MLC
1008
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
1009
+ $ship_cost = floor( $ship_cost );
1010
+ }
1011
+ if ( $ship_cost > 0 ) {
1012
+ $item = array(
1013
+ 'title' => sanitize_file_name( $order->get_shipping_to_display() ),
1014
+ 'description' => __( 'Shipping service used by store', 'woocommerce-mercadopago-module' ),
1015
+ 'quantity' => 1,
1016
+ 'category_id' => $this->store_categories_id[$this->category_id],
1017
+ 'unit_price' => floor( $ship_cost * 100 ) / 100
1018
+ );
1019
+ $items[] = $item;
1020
+ }
1021
+
1022
+ // Discounts features.
1023
+ if ( isset( $custom_checkout['discount'] ) && $custom_checkout['discount'] != '' &&
1024
+ $custom_checkout['discount'] > 0 && isset( $custom_checkout['coupon_code'] ) &&
1025
+ $custom_checkout['coupon_code'] != '' &&
1026
+ WC()->session->chosen_payment_method == 'woocommerce-mercadopago-custom-module' ) {
1027
+
1028
+ // Remove decimals if MCO/MLC
1029
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
1030
+ $custom_checkout['discount'] = floor( $custom_checkout['discount'] );
1031
+ }
1032
+
1033
+ $item = array(
1034
+ 'title' => __( 'Discount', 'woocommerce-mercadopago-module' ),
1035
+ 'description' => __( 'Discount provided by store', 'woocommerce-mercadopago-module' ),
1036
+ 'quantity' => 1,
1037
+ 'category_id' => $this->store_categories_id[$this->category_id],
1038
+ 'unit_price' => -( (float) $custom_checkout['discount'] )
1039
+ );
1040
+ $items[] = $item;
1041
+ }
1042
+
1043
+ // Build additional information from the customer data.
1044
+ if ( method_exists( $order, 'get_id' ) ) {
1045
+ // Build additional information from the customer data.
1046
+ $payer_additional_info = array(
1047
+ 'first_name' => $order->get_billing_first_name(),
1048
+ 'last_name' => $order->get_billing_last_name(),
1049
+ //'registration_date' =>
1050
+ 'phone' => array(
1051
+ //'area_code' =>
1052
+ 'number' => $order->get_billing_phone(),
1053
+ ),
1054
+ 'address' => array(
1055
+ 'zip_code' => $order->get_billing_postcode(),
1056
+ //'street_number' =>
1057
+ 'street_name' => $order->get_billing_address_1() . ' / ' .
1058
+ $order->get_billing_city() . ' ' .
1059
+ $order->get_billing_state() . ' ' .
1060
+ $order->get_billing_country()
1061
+ )
1062
+ );
1063
+ // Create the shipment address information set.
1064
+ $shipments = array(
1065
+ 'receiver_address' => array(
1066
+ 'zip_code' => $order->get_shipping_postcode(),
1067
+ //'street_number' =>
1068
+ 'street_name' => $order->get_shipping_address_1() . ' ' .
1069
+ $order->get_shipping_address_2() . ' ' .
1070
+ $order->get_shipping_city() . ' ' .
1071
+ $order->get_shipping_state() . ' ' .
1072
+ $order->get_shipping_country(),
1073
+ //'floor' =>
1074
+ 'apartment' => $order->get_shipping_address_2()
1075
+ )
1076
+ );
1077
+ // The payment preference.
1078
+ $preferences = array(
1079
+ 'transaction_amount' => floor( ( (float) $custom_checkout['amount'] ) * 100 ) / 100 - $amount_of_items,
1080
+ 'token' => $custom_checkout['token'],
1081
+ 'description' => implode( ', ', $list_of_items ),
1082
+ 'installments' => (int) $custom_checkout['installments'],
1083
+ 'payment_method_id' => $custom_checkout['paymentMethodId'],
1084
+ 'payer' => array(
1085
+ 'email' => $order->get_billing_email()
1086
+ ),
1087
+ 'external_reference' => $this->invoice_prefix . $order->get_id(),
1088
+ 'statement_descriptor' => $this->statement_descriptor,
1089
+ 'binary_mode' => ( $this->binary_mode == 'yes' ),
1090
+ 'additional_info' => array(
1091
+ 'items' => $items,
1092
+ 'payer' => $payer_additional_info,
1093
+ 'shipments' => $shipments
1094
+ )
1095
+ );
1096
+ } else {
1097
+ // Build additional information from the customer data.
1098
+ $payer_additional_info = array(
1099
+ 'first_name' => $order->billing_first_name,
1100
+ 'last_name' => $order->billing_last_name,
1101
+ //'registration_date' =>
1102
+ 'phone' => array(
1103
+ //'area_code' =>
1104
+ 'number' => $order->billing_phone
1105
+ ),
1106
+ 'address' => array(
1107
+ 'zip_code' => $order->billing_postcode,
1108
+ //'street_number' =>
1109
+ 'street_name' => $order->billing_address_1 . ' / ' .
1110
+ $order->billing_city . ' ' .
1111
+ $order->billing_state . ' ' .
1112
+ $order->billing_country
1113
+ )
1114
+ );
1115
+ // Create the shipment address information set.
1116
+ $shipments = array(
1117
+ 'receiver_address' => array(
1118
+ 'zip_code' => $order->shipping_postcode,
1119
+ //'street_number' =>
1120
+ 'street_name' => $order->shipping_address_1 . ' ' .
1121
+ $order->shipping_address_2 . ' ' .
1122
+ $order->shipping_city . ' ' .
1123
+ $order->shipping_state . ' ' .
1124
+ $order->shipping_country,
1125
+ //'floor' =>
1126
+ 'apartment' => $order->shipping_address_2
1127
+ )
1128
+ );
1129
+ // The payment preference.
1130
+ $preferences = array(
1131
+ 'transaction_amount' => floor( ( (float) $custom_checkout['amount'] ) * 100 ) / 100 - $amount_of_items,
1132
+ 'token' => $custom_checkout['token'],
1133
+ 'description' => implode( ', ', $list_of_items ),
1134
+ 'installments' => (int) $custom_checkout['installments'],
1135
+ 'payment_method_id' => $custom_checkout['paymentMethodId'],
1136
+ 'payer' => array(
1137
+ 'email' => $order->billing_email
1138
+ ),
1139
+ 'external_reference' => $this->invoice_prefix . $order->id,
1140
+ 'statement_descriptor' => $this->statement_descriptor,
1141
+ 'binary_mode' => ( $this->binary_mode == 'yes' ),
1142
+ 'additional_info' => array(
1143
+ 'items' => $items,
1144
+ 'payer' => $payer_additional_info,
1145
+ 'shipments' => $shipments
1146
+ )
1147
+ );
1148
+ }
1149
+
1150
+ // Customer's Card Feature, add only if it has issuer id.
1151
+ if ( array_key_exists( 'token', $custom_checkout ) ) {
1152
+ $preferences['metadata']['token'] = $custom_checkout['token'];
1153
+ if ( array_key_exists( 'issuer', $custom_checkout ) ) {
1154
+ if ( ! empty( $custom_checkout['issuer'] ) ) {
1155
+ $preferences['issuer_id'] = (integer) $custom_checkout['issuer'];
1156
+ }
1157
+ }
1158
+ if ( ! empty( $custom_checkout['CustomerId'] ) ) {
1159
+ $preferences['payer']['id'] = $custom_checkout['CustomerId'];
1160
+ }
1161
+ }
1162
+
1163
+ // Do not set IPN url if it is a localhost.
1164
+ if ( ! strrpos( $this->domain, 'localhost' ) ) {
1165
+ $preferences['notification_url'] = WC_WooMercadoPago_Module::workaround_ampersand_bug(
1166
+ WC()->api_request_url( 'WC_WooMercadoPagoCustom_Gateway' )
1167
+ );
1168
+ }
1169
+
1170
+ // Discounts features.
1171
+ if ( isset( $custom_checkout['discount'] ) && $custom_checkout['discount'] != '' &&
1172
+ $custom_checkout['discount'] > 0 && isset( $custom_checkout['coupon_code'] ) &&
1173
+ $custom_checkout['coupon_code'] != '' &&
1174
+ WC()->session->chosen_payment_method == 'woocommerce-mercadopago-custom-module' ) {
1175
+
1176
+ $preferences['campaign_id'] = (int) $custom_checkout['campaign_id'];
1177
+ $preferences['coupon_amount'] = ( (float) $custom_checkout['discount'] );
1178
+ $preferences['coupon_code'] = strtoupper( $custom_checkout['coupon_code'] );
1179
+ }
1180
+
1181
+ // Set sponsor ID.
1182
+ if ( ! $this->is_test_user ) {
1183
+ $preferences['sponsor_id'] = $this->country_configs['sponsor_id'];
1184
+ }
1185
+
1186
+ if ( 'yes' == $this->debug ) {
1187
+ $this->log->add(
1188
+ $this->id,
1189
+ '[build_payment_preference] - returning just created [$preferences] structure: ' .
1190
+ json_encode( $preferences, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1191
+ );
1192
+ }
1193
+
1194
+ $preferences = apply_filters(
1195
+ 'woocommerce_mercadopago_module_custom_preferences',
1196
+ $preferences, $order
1197
+ );
1198
+ return $preferences;
1199
+ }
1200
+
1201
+ // --------------------------------------------------
1202
+
1203
+ protected function create_url( $order, $custom_checkout ) {
1204
+
1205
+ // Creates the order parameters by checking the cart configuration.
1206
+ $preferences = $this->build_payment_preference( $order, $custom_checkout );
1207
+
1208
+ // Checks for sandbox mode.
1209
+ if ( 'yes' == $this->sandbox ) {
1210
+ $this->mp->sandbox_mode( true );
1211
+ if ( 'yes' == $this->debug) {
1212
+ $this->log->add(
1213
+ $this->id,
1214
+ '[create_url] - sandbox mode is enabled'
1215
+ );
1216
+ }
1217
+ } else {
1218
+ $this->mp->sandbox_mode( false );
1219
+ }
1220
+
1221
+ // Create order preferences with Mercado Pago API request.
1222
+ try {
1223
+ $checkout_info = $this->mp->post( '/v1/payments', json_encode( $preferences) );
1224
+ if ( $checkout_info['status'] < 200 || $checkout_info['status'] >= 300 ) {
1225
+ // Mercado Pago trowed an error.
1226
+ if ( 'yes' == $this->debug ) {
1227
+ $this->log->add(
1228
+ $this->id,
1229
+ '[create_url] - mercado pago gave error, payment creation failed with error: ' .
1230
+ $checkout_info['response']['message'] );
1231
+ }
1232
+ return false;
1233
+ } elseif ( is_wp_error( $checkout_info ) ) {
1234
+ // WordPress throwed an error.
1235
+ if ( 'yes' == $this->debug ) {
1236
+ $this->log->add(
1237
+ $this->id,
1238
+ '[create_url] - wordpress gave error, payment creation failed with error: ' .
1239
+ $checkout_info['response']['message'] );
1240
+ }
1241
+ return false;
1242
+ } else {
1243
+ // Obtain the URL.
1244
+ if ( 'yes' == $this->debug ) {
1245
+ $this->log->add(
1246
+ $this->id,
1247
+ '[create_url] - payment link generated with success from mercado pago, with structure as follow: ' .
1248
+ json_encode( $checkout_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE ) );
1249
+ }
1250
+ return $checkout_info['response'];
1251
+ }
1252
+ } catch ( MercadoPagoException $e ) {
1253
+ // Something went wrong with the payment creation.
1254
+ if ( 'yes' == $this->debug ) {
1255
+ $this->log->add(
1256
+ $this->id,
1257
+ '[create_url] - payment creation failed with exception: ' .
1258
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1259
+ );
1260
+ }
1261
+ return false;
1262
+ }
1263
+ }
1264
+
1265
+ /**
1266
+ * Summary: Check if we have existing customer card, if not we create and save it.
1267
+ * Description: Check if we have existing customer card, if not we create and save it.
1268
+ * @return boolean true/false depending on the validation result.
1269
+ */
1270
+ public function check_and_save_customer_card( $checkout_info ) {
1271
+
1272
+ if ( 'yes' == $this->debug ) {
1273
+ $this->log->add(
1274
+ $this->id,
1275
+ ': @[check_and_save_customer_card] - checking info to create card: ' .
1276
+ json_encode( $checkout_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1277
+ );
1278
+ }
1279
+
1280
+ $custId = null;
1281
+ $token = null;
1282
+ $issuer_id = null;
1283
+ $payment_method_id = null;
1284
+
1285
+ if ( isset( $checkout_info['payer']['id'] ) && ! empty( $checkout_info['payer']['id'] ) ) {
1286
+ $custId = $checkout_info['payer']['id'];
1287
+ } else {
1288
+ return;
1289
+ }
1290
+
1291
+ if ( isset( $checkout_info['metadata']['token'] ) && ! empty( $checkout_info['metadata']['token'] ) ) {
1292
+ $token = $checkout_info['metadata']['token'];
1293
+ } else {
1294
+ return;
1295
+ }
1296
+
1297
+ if ( isset( $checkout_info['issuer_id'] ) && ! empty( $checkout_info['issuer_id'] ) ) {
1298
+ $issuer_id = (integer) ( $checkout_info['issuer_id'] );
1299
+ }
1300
+ if ( isset( $checkout_info['payment_method_id'] ) && ! empty( $checkout_info['payment_method_id'] ) ) {
1301
+ $payment_method_id = $checkout_info['payment_method_id'];
1302
+ }
1303
+
1304
+ try {
1305
+ $this->mp->create_card_in_customer( $custId, $token, $payment_method_id, $issuer_id );
1306
+ } catch ( MercadoPagoException $e ) {
1307
+ if ( 'yes' == $this->debug ) {
1308
+ $this->log->add(
1309
+ $this->id,
1310
+ '[check_and_save_customer_card] - card creation failed: ' .
1311
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1312
+ );
1313
+ }
1314
+ }
1315
+
1316
+ }
1317
+
1318
+ /**
1319
+ * Summary: Receive post data and applies a discount based in the received values.
1320
+ * Description: Receive post data and applies a discount based in the received values.
1321
+ */
1322
+ public function add_discount_custom() {
1323
+
1324
+ if ( ! isset( $_POST['mercadopago_custom'] ) )
1325
+ return;
1326
+
1327
+ if ( is_admin() && ! defined( 'DOING_AJAX' ) || is_cart() ) {
1328
+ return;
1329
+ }
1330
+
1331
+ $mercadopago_custom = $_POST['mercadopago_custom'];
1332
+ if ( isset( $mercadopago_custom['discount'] ) && $mercadopago_custom['discount'] != '' &&
1333
+ $mercadopago_custom['discount'] > 0 && isset( $mercadopago_custom['coupon_code'] ) &&
1334
+ $mercadopago_custom['coupon_code'] != '' &&
1335
+ WC()->session->chosen_payment_method == 'woocommerce-mercadopago-custom-module' ) {
1336
+
1337
+ if ( 'yes' == $this->debug ) {
1338
+ $this->log->add(
1339
+ $this->id,
1340
+ '[add_discount_custom] - custom checkout trying to apply discount...'
1341
+ );
1342
+ }
1343
+
1344
+ $value = ( $mercadopago_custom['discount'] ) /
1345
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 );
1346
+ global $woocommerce;
1347
+ if ( apply_filters(
1348
+ 'wc_mercadopagocustom_module_apply_discount',
1349
+ 0 < $value, $woocommerce->cart )
1350
+ ) {
1351
+ $woocommerce->cart->add_fee( sprintf(
1352
+ __( 'Discount for %s coupon', 'woocommerce-mercadopago-module' ),
1353
+ esc_attr( $mercadopago_custom['campaign']
1354
+ ) ), ( $value * -1 ), true
1355
+ );
1356
+ }
1357
+ }
1358
+
1359
+ }
1360
+
1361
+ // Display the discount in payment method title.
1362
+ public function get_payment_method_title_custom( $title, $id ) {
1363
+
1364
+ if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
1365
+ return $title;
1366
+ }
1367
+
1368
+ if ( $title != $this->title || $this->gateway_discount == 0 ) {
1369
+ return $title;
1370
+ }
1371
+
1372
+ $total = (float) WC()->cart->subtotal;
1373
+ if ( is_numeric( $this->gateway_discount ) ) {
1374
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
1375
+ $price_percent = $this->gateway_discount / 100;
1376
+ if ( $price_percent > 0 ) {
1377
+ $title .= ' (' . __( 'Discount Of ', 'woocommerce-mercadopago-module' ) .
1378
+ strip_tags( wc_price( $total * $price_percent ) ) . ' )';
1379
+ }
1380
+ }
1381
+ }
1382
+
1383
+ return $title;
1384
+ }
1385
+
1386
+ /*
1387
+ * ========================================================================
1388
+ * AUXILIARY AND FEEDBACK METHODS (SERVER SIDE)
1389
+ * ========================================================================
1390
+ */
1391
+
1392
+ /**
1393
+ * Summary: Check if we have valid credentials.
1394
+ * Description: Check if we have valid credentials.
1395
+ * @return boolean true/false depending on the validation result.
1396
+ */
1397
+ public function validate_credentials() {
1398
+
1399
+ if ( empty( $this->public_key ) || empty( $this->access_token ) )
1400
+ return false;
1401
+
1402
+ try {
1403
+
1404
+ $this->mp = new MP(
1405
+ WC_WooMercadoPago_Module::get_module_version(),
1406
+ $this->access_token
1407
+ );
1408
+ $get_request = $this->mp->get(
1409
+ '/users/me?access_token=' . $this->access_token
1410
+ );
1411
+
1412
+ if ( isset( $get_request['response']['site_id'] ) ) {
1413
+
1414
+ // TODO: revalidate MLU
1415
+ if ( $get_request['response']['site_id'] == 'MLU' ) {
1416
+ $this->mp = null;
1417
+ return false;
1418
+ }
1419
+
1420
+ $this->is_test_user = in_array( 'test_user', $get_request['response']['tags'] );
1421
+ $this->site_id = $get_request['response']['site_id'];
1422
+ $this->collector_id = $get_request['response']['id'];
1423
+ $this->country_configs = WC_WooMercadoPago_Module::get_country_config( $this->site_id );
1424
+
1425
+ // Check for auto converstion of currency (only if it is enabled).
1426
+ $this->currency_ratio = -1;
1427
+ if ( $this->currency_conversion == 'yes' ) {
1428
+ $this->currency_ratio = WC_WooMercadoPago_Module::get_conversion_rate(
1429
+ $this->country_configs['currency']
1430
+ );
1431
+ }
1432
+
1433
+ return true;
1434
+
1435
+ } else {
1436
+ $this->mp = null;
1437
+ return false;
1438
+ }
1439
+
1440
+ } catch ( MercadoPagoException $e ) {
1441
+ if ( 'yes' == $this->debug ) {
1442
+ $this->log->add(
1443
+ $this->id,
1444
+ '[validate_credentials] - while validating credentials, got exception: ' .
1445
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1446
+ );
1447
+ }
1448
+ $this->mp = null;
1449
+ return false;
1450
+ }
1451
+
1452
+ return false;
1453
+
1454
+ }
1455
+
1456
+ // Build the string representing the path to the log file.
1457
+ protected function build_log_path_string() {
1458
+ return '<a href="' . esc_url(admin_url( 'admin.php?page=wc-status&tab=logs&log_file=' .
1459
+ esc_attr( $this->id ) . '-' . sanitize_file_name( wp_hash( $this->id ) ) . '.log' ) ) . '">' .
1460
+ __( 'WooCommerce &gt; System Status &gt; Logs', 'woocommerce-mercadopago-module' ) . '</a>';
1461
+ }
1462
+
1463
+ // Return boolean indicating if currency is supported.
1464
+ protected function is_supported_currency() {
1465
+ return get_woocommerce_currency() == $this->country_configs['currency'];
1466
+ }
1467
+
1468
+ // Called automatically by WooCommerce, verify if Module is available to use.
1469
+ public function is_available() {
1470
+ global $woocommerce;
1471
+ // Check if we have SSL.
1472
+ if ( empty( $_SERVER['HTTPS'] ) || $_SERVER['HTTPS'] == 'off' ) {
1473
+ if ( empty( $this->sandbox ) && $this->sandbox == 'no' ) {
1474
+ return false;
1475
+ }
1476
+ }
1477
+ // Check for recurrent product checkout.
1478
+ if ( WC_WooMercadoPago_Module::is_subscription( $woocommerce->cart->get_cart() ) ) {
1479
+ return false;
1480
+ }
1481
+ // Check if this gateway is enabled and well configured.
1482
+ $available = ( 'yes' == $this->settings['enabled'] ) &&
1483
+ ! empty( $this->public_key ) &&
1484
+ ! empty( $this->access_token) ;
1485
+ return $available;
1486
+ }
1487
+
1488
+ public function check_ssl_absence() {
1489
+ if ( empty( $_SERVER['HTTPS'] ) || $_SERVER['HTTPS'] == 'off' ) {
1490
+ if ( 'yes' == $this->settings['enabled'] ) {
1491
+ echo '<div class="error"><p><strong>' .
1492
+ __( 'Custom Checkout is Inactive', 'woocommerce-mercadopago-module' ) .
1493
+ '</strong>: ' .
1494
+ sprintf(
1495
+ __( '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' )
1496
+ ) . '</p></div>';
1497
+ }
1498
+ }
1499
+ }
1500
+
1501
+ // Get the URL to admin page.
1502
+ protected function admin_url() {
1503
+ if (defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.1', '>=' ) ) {
1504
+ return admin_url(
1505
+ 'admin.php?page=wc-settings&tab=checkout&section=wc_woomercadopagocustom_gateway'
1506
+ );
1507
+ }
1508
+ return admin_url(
1509
+ 'admin.php?page=woocommerce_settings&tab=payment_gateways&section=WC_WooMercadoPagoCustom_Gateway'
1510
+ );
1511
+ }
1512
+
1513
+ // Notify that public_key and/or access_token are not valid.
1514
+ public function credentials_missing_message() {
1515
+ echo '<div class="error"><p><strong>' .
1516
+ __( 'Custom Checkout is Inactive', 'woocommerce-mercadopago-module' ) .
1517
+ '</strong>: ' .
1518
+ __( 'Your Mercado Pago credentials Public Key/Access Token appears to be misconfigured.', 'woocommerce-mercadopago-module' ) .
1519
+ '</p></div>';
1520
+ }
1521
+
1522
+ public function get_order_status( $status_detail ) {
1523
+ switch ( $status_detail ) {
1524
+ case 'accredited':
1525
+ return __( 'Done, your payment was accredited!', 'woocommerce-mercadopago-module' );
1526
+ case 'pending_contingency':
1527
+ return __( 'We are processing the payment. In less than an hour we will e-mail you the results.', 'woocommerce-mercadopago-module' );
1528
+ case 'pending_review_manual':
1529
+ 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' );
1530
+ case 'cc_rejected_bad_filled_card_number':
1531
+ return __( 'Check the card number.', 'woocommerce-mercadopago-module' );
1532
+ case 'cc_rejected_bad_filled_date':
1533
+ return __( 'Check the expiration date.', 'woocommerce-mercadopago-module' );
1534
+ case 'cc_rejected_bad_filled_other':
1535
+ return __( 'Check the information.', 'woocommerce-mercadopago-module' );
1536
+ case 'cc_rejected_bad_filled_security_code':
1537
+ return __( 'Check the security code.', 'woocommerce-mercadopago-module' );
1538
+ case 'cc_rejected_blacklist':
1539
+ return __( 'We could not process your payment.', 'woocommerce-mercadopago-module' );
1540
+ case 'cc_rejected_call_for_authorize':
1541
+ return __( 'You must authorize the payment of your orders.', 'woocommerce-mercadopago-module' );
1542
+ case 'cc_rejected_card_disabled':
1543
+ return __( 'Call your card issuer to activate your card. The phone is on the back of your card.', 'woocommerce-mercadopago-module' );
1544
+ case 'cc_rejected_card_error':
1545
+ return __( 'We could not process your payment.', 'woocommerce-mercadopago-module' );
1546
+ case 'cc_rejected_duplicated_payment':
1547
+ return __( 'You already made a payment for that amount. If you need to repay, use another card or other payment method.', 'woocommerce-mercadopago-module' );
1548
+ case 'cc_rejected_high_risk':
1549
+ return __( 'Your payment was rejected. Choose another payment method. We recommend cash.', 'woocommerce-mercadopago-module' );
1550
+ case 'cc_rejected_insufficient_amount':
1551
+ return __( 'Your payment do not have sufficient funds.', 'woocommerce-mercadopago-module' );
1552
+ case 'cc_rejected_invalid_installments':
1553
+ return __( 'Your payment does not process payments with selected installments.', 'woocommerce-mercadopago-module' );
1554
+ case 'cc_rejected_max_attempts':
1555
+ return __( 'You have reached the limit of allowed attempts. Choose another card or another payment method.', 'woocommerce-mercadopago-module' );
1556
+ case 'cc_rejected_other_reason':
1557
+ return __( 'This payment method did not process the payment.', 'woocommerce-mercadopago-module' );
1558
+ default:
1559
+ return __( 'This payment method did not process the payment.', 'woocommerce-mercadopago-module' );
1560
+ }
1561
+ }
1562
+
1563
+ /*
1564
+ * ========================================================================
1565
+ * IPN MECHANICS (SERVER SIDE)
1566
+ * ========================================================================
1567
+ */
1568
+
1569
+ /**
1570
+ * Summary: This call checks any incoming notifications from Mercado Pago server.
1571
+ * Description: This call checks any incoming notifications from Mercado Pago server.
1572
+ */
1573
+ public function process_http_request() {
1574
+ @ob_clean();
1575
+ if ( 'yes' == $this->debug ) {
1576
+ $this->log->add(
1577
+ $this->id,
1578
+ '[process_http_request] - Received _get content: ' .
1579
+ json_encode( $_GET, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1580
+ );
1581
+ }
1582
+ if ( isset( $_GET['coupon_id'] ) && $_GET['coupon_id'] != '' ) {
1583
+ // Process coupon evaluations.
1584
+ if ( isset( $_GET['payer'] ) && $_GET['payer'] != '' ) {
1585
+ $logged_user_email = $_GET['payer'];
1586
+ $coupon_id = $_GET['coupon_id'];
1587
+ if ( 'yes' == $this->sandbox )
1588
+ $this->mp->sandbox_mode( true );
1589
+ else
1590
+ $this->mp->sandbox_mode( false );
1591
+ $response = $this->mp->check_discount_campaigns(
1592
+ $_GET['amount'],
1593
+ $logged_user_email,
1594
+ $coupon_id
1595
+ );
1596
+ header( 'HTTP/1.1 200 OK' );
1597
+ header( 'Content-Type: application/json' );
1598
+ echo json_encode( $response );
1599
+ } else {
1600
+ $obj = new stdClass();
1601
+ $obj->status = 404;
1602
+ $obj->response = array(
1603
+ 'message' =>
1604
+ __( 'Please, inform your email in billing address to use this feature', 'woocommerce-mercadopago-module' ),
1605
+ 'error' => 'payer_not_found',
1606
+ 'status' => 404,
1607
+ 'cause' => array()
1608
+ );
1609
+ header( 'HTTP/1.1 200 OK' );
1610
+ header( 'Content-Type: application/json' );
1611
+ echo json_encode( $obj );
1612
+ }
1613
+ exit( 0 );
1614
+ } else {
1615
+ // Process IPN messages.
1616
+ $data = $this->check_ipn_request_is_valid( $_GET );
1617
+ if ( $data ) {
1618
+ header( 'HTTP/1.1 200 OK' );
1619
+ do_action( 'valid_mercadopagocustom_ipn_request', $data );
1620
+ }
1621
+ }
1622
+ }
1623
+
1624
+ /**
1625
+ * Summary: Get received data from IPN and checks if its a merchant_order or a payment.
1626
+ * Description: If we have these information, we return data to be processed by
1627
+ * successful_request function.
1628
+ * @return boolean indicating if it was successfuly processed.
1629
+ */
1630
+ public function check_ipn_request_is_valid( $data ) {
1631
+
1632
+ if ( ! isset( $data['data_id'] ) || ! isset( $data['type'] ) ) {
1633
+ if ( 'yes' == $this->debug ) {
1634
+ $this->log->add(
1635
+ $this->id,
1636
+ '[check_ipn_request_is_valid] - data_id or type not set: ' .
1637
+ json_encode( $data, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1638
+ );
1639
+ }
1640
+ // At least, check if its a v0 ipn.
1641
+ if ( ! isset( $data['id'] ) || ! isset( $data['topic'] ) ) {
1642
+ if ( 'yes' == $this->debug ) {
1643
+ $this->log->add(
1644
+ $this->id,
1645
+ '[check_ipn_request_is_valid] - Mercado Pago Request failure: ' .
1646
+ json_encode( $_GET, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1647
+ );
1648
+ }
1649
+ wp_die( __( 'Mercado Pago Request Failure', 'woocommerce-mercadopago-module' ) );
1650
+ } else {
1651
+ header( 'HTTP/1.1 200 OK' );
1652
+ }
1653
+ // No ID? No process!
1654
+ return false;
1655
+ }
1656
+
1657
+ if ( 'yes' == $this->sandbox ) {
1658
+ $this->mp->sandbox_mode( true );
1659
+ } else {
1660
+ $this->mp->sandbox_mode( false );
1661
+ }
1662
+
1663
+ try {
1664
+ // Get the payment reported by the IPN.
1665
+ if ( $data['type'] == 'payment' ) {
1666
+ $access_token = array( 'access_token' => $this->mp->get_access_token() );
1667
+ $payment_info = $this->mp->get(
1668
+ '/v1/payments/' . $data['data_id'], $access_token, false
1669
+ );
1670
+ if ( ! is_wp_error( $payment_info ) &&
1671
+ ( $payment_info['status'] == 200 || $payment_info['status'] == 201 ) ) {
1672
+ return $payment_info['response'];
1673
+ } else {
1674
+ if ( 'yes' == $this->debug) {
1675
+ $this->log->add(
1676
+ $this->id,
1677
+ '[check_ipn_request_is_valid] - error when processing received data: ' .
1678
+ json_encode( $payment_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1679
+ );
1680
+ }
1681
+ return false;
1682
+ }
1683
+ }
1684
+ } catch ( MercadoPagoException $e ) {
1685
+ if ( 'yes' == $this->debug ) {
1686
+ $this->log->add(
1687
+ $this->id,
1688
+ '[check_ipn_request_is_valid] - MercadoPagoException: ' .
1689
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1690
+ );
1691
+ }
1692
+ return false;
1693
+ }
1694
+ return true;
1695
+ }
1696
+
1697
+ /**
1698
+ * Summary: Properly handles each case of notification, based in payment status.
1699
+ * Description: Properly handles each case of notification, based in payment status.
1700
+ */
1701
+ public function successful_request( $data ) {
1702
+
1703
+ if ( 'yes' == $this->debug ) {
1704
+ $this->log->add(
1705
+ $this->id,
1706
+ '[successful_request] - starting to process ipn update...'
1707
+ );
1708
+ }
1709
+
1710
+ // Get the order and check its presence.
1711
+ $order_key = $data['external_reference'];
1712
+ if ( empty( $order_key ) ) {
1713
+ return;
1714
+ }
1715
+ $id = (int) str_replace( $this->invoice_prefix, '', $order_key );
1716
+ $order = wc_get_order( $id );
1717
+
1718
+ // Check if order exists.
1719
+ if ( ! $order ) {
1720
+ return;
1721
+ }
1722
+
1723
+ // WooCommerce 3.0 or later.
1724
+ if ( method_exists( $order, 'get_id' ) ) {
1725
+ $order_id = $order->get_id();
1726
+ } else {
1727
+ $order_id = $order->id;
1728
+ }
1729
+
1730
+ // Check if we have the correct order.
1731
+ if ( $order_id !== $id ) {
1732
+ return;
1733
+ }
1734
+
1735
+ if ( 'yes' == $this->debug ) {
1736
+ $this->log->add(
1737
+ $this->id,
1738
+ '[successful_request] - updating metadata and status with data: ' .
1739
+ json_encode( $data, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1740
+ );
1741
+ }
1742
+
1743
+ // Here, we process the status... this is the business rules!
1744
+ // Reference: https://www.mercadopago.com.br/developers/en/api-docs/basic-checkout/ipn/payment-status/
1745
+ $status = isset( $data['status'] ) ? $data['status'] : 'pending';
1746
+ $total_paid = isset( $data['transaction_details']['total_paid_amount'] ) ? $data['transaction_details']['total_paid_amount'] : 0.00;
1747
+ $total_refund = isset( $data['transaction_amount_refunded'] ) ? $data['transaction_amount_refunded'] : 0.00;
1748
+ $total = $data['transaction_amount'];
1749
+
1750
+ if ( method_exists( $order, 'update_meta_data' ) ) {
1751
+ // Updates the type of gateway.
1752
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPagoCustom_Gateway' );
1753
+
1754
+ if ( ! empty( $data['payer']['email'] ) ) {
1755
+ $order->update_meta_data( __( 'Payer email', 'woocommerce-mercadopago-module' ), $data['payer']['email'] );
1756
+ }
1757
+
1758
+ if ( ! empty( $data['payment_type_id'] ) ) {
1759
+ $order->update_meta_data( __( 'Payment type', 'woocommerce-mercadopago-module' ), $data['payment_type_id'] );
1760
+ }
1761
+
1762
+ $payment_id = $data['id'];
1763
+
1764
+ $order->update_meta_data( 'Mercado Pago - Payment ' . $payment_id,
1765
+ 'Mercado Pago - Payment ' . $payment_id,
1766
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1767
+ ']/[Amount ' . $total .
1768
+ ']/[Paid ' . $total_paid .
1769
+ ']/[Refund ' . $total_refund . ']'
1770
+ );
1771
+
1772
+ $order->update_meta_data( '_Mercado_Pago_Payment_IDs', $payment_id );
1773
+ $order->save();
1774
+
1775
+ } else {
1776
+ // Updates the type of gateway.
1777
+ update_post_meta( $order_id, '_used_gateway', 'WC_WooMercadoPagoCustom_Gateway' );
1778
+ if ( ! empty( $data['payer']['email'] ) ) {
1779
+ update_post_meta(
1780
+ $order_id,
1781
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1782
+ $data['payer']['email']
1783
+ );
1784
+ }
1785
+ if ( ! empty( $data['payment_type_id'] ) ) {
1786
+ update_post_meta(
1787
+ $order_id,
1788
+ __( 'Payment type', 'woocommerce-mercadopago-module' ),
1789
+ $data['payment_type_id']
1790
+ );
1791
+ }
1792
+ $payment_id = $data['id'];
1793
+ update_post_meta(
1794
+ $order_id,
1795
+ 'Mercado Pago - Payment ' . $payment_id,
1796
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1797
+ ']/[Amount ' . $total .
1798
+ ']/[Paid ' . $total_paid .
1799
+ ']/[Refund ' . $total_refund . ']'
1800
+ );
1801
+ update_post_meta(
1802
+ $order_id,
1803
+ '_Mercado_Pago_Payment_IDs',
1804
+ $payment_id
1805
+ );
1806
+ }
1807
+
1808
+ // Switch the status and update in WooCommerce
1809
+ switch ( $status ) {
1810
+ case 'approved':
1811
+ $order->add_order_note(
1812
+ 'Mercado Pago: ' . __( 'Payment approved.', 'woocommerce-mercadopago-module' )
1813
+ );
1814
+ $this->check_and_save_customer_card( $data );
1815
+ $order->payment_complete();
1816
+ break;
1817
+ case 'pending':
1818
+ $order->add_order_note(
1819
+ 'Mercado Pago: ' . __( 'Customer haven\'t paid yet.', 'woocommerce-mercadopago-module' )
1820
+ );
1821
+ break;
1822
+ case 'in_process':
1823
+ $order->update_status(
1824
+ 'on-hold',
1825
+ 'Mercado Pago: ' . __( 'Payment under review.', 'woocommerce-mercadopago-module' )
1826
+ );
1827
+ break;
1828
+ case 'rejected':
1829
+ $order->update_status(
1830
+ 'failed',
1831
+ 'Mercado Pago: ' .
1832
+ __( 'The payment was refused. The customer can try again.', 'woocommerce-mercadopago-module' )
1833
+ );
1834
+ break;
1835
+ case 'refunded':
1836
+ $order->update_status(
1837
+ 'refunded',
1838
+ 'Mercado Pago: ' .
1839
+ __( 'The payment was refunded to the customer.', 'woocommerce-mercadopago-module' )
1840
+ );
1841
+ break;
1842
+ case 'cancelled':
1843
+ $order->update_status(
1844
+ 'cancelled',
1845
+ 'Mercado Pago: ' .
1846
+ __( 'The payment was cancelled.', 'woocommerce-mercadopago-module' )
1847
+ );
1848
+ break;
1849
+ case 'in_mediation':
1850
+ $order->add_order_note(
1851
+ 'Mercado Pago: ' .
1852
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1853
+ );
1854
+ break;
1855
+ case 'charged-back':
1856
+ $order->add_order_note(
1857
+ 'Mercado Pago: ' .
1858
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1859
+ );
1860
+ break;
1861
+ default:
1862
+ break;
1863
+ }
1864
+ }
1865
+
1866
+ }
1867
+
1868
+ new WC_WooMercadoPagoCustom_Gateway( true );
mercadopago/mercadopago-gateway.php CHANGED
@@ -1,680 +1,1395 @@
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 +1400,540 @@ 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
+ // Mercado Pago fields.
24
+ $this->mp = null;
25
  $this->site_id = null;
26
+ $this->collector_id = null;
27
+ $this->currency_ratio = -1;
28
+ $this->is_test_user = false;
29
+
30
+ // Auxiliary fields.
31
+ $this->currency_message = '';
32
  $this->payment_methods = array();
33
+ $this->country_configs = array();
34
  $this->store_categories_id = array();
35
+ $this->store_categories_description = array();
36
+
37
+ // WooCommerce fields.
38
+ $this->supports = array( 'products', 'refunds' );
39
  $this->id = 'woocommerce-mercadopago-module';
40
+ $this->domain = get_site_url() . '/index.php';
41
  $this->icon = apply_filters(
42
  'woocommerce_mercadopago_icon',
43
+ plugins_url( 'images/mercadopago.png', plugin_dir_path( __FILE__ ) )
44
  );
45
+ $this->method_title = __( 'Mercado Pago - Basic Checkout', 'woocommerce-mercadopago-module' );
46
  $this->method_description = '<img width="200" height="52" src="' .
47
+ plugins_url(
48
+ 'images/mplogo.png',
49
+ plugin_dir_path( __FILE__ )
50
+ ) . '"><br><br>' . '<strong>' .
51
+ __( 'This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store.', 'woocommerce-mercadopago-module' ) .
52
  '</strong>';
53
+
54
+ // Fields used in Mercado Pago Module configuration page.
55
+ $this->client_id = $this->get_option( 'client_id' );
56
+ $this->client_secret = $this->get_option( 'client_secret' );
57
+ $this->title = $this->get_option( 'title' );
58
+ $this->description = $this->get_option( 'description' );
59
+ $this->category_id = $this->get_option( 'category_id' );
60
+ $this->invoice_prefix = $this->get_option( 'invoice_prefix', 'WC-' );
61
+ $this->method = $this->get_option( 'method', 'iframe' );
62
+ $this->iframe_width = $this->get_option( 'iframe_width', 640 );
63
+ $this->iframe_height = $this->get_option( 'iframe_height', 800 );
64
+ $this->auto_return = $this->get_option( 'auto_return', true );
65
+ $this->success_url = $this->get_option( 'success_url', '' );
66
+ $this->failure_url = $this->get_option( 'failure_url', '' );
67
+ $this->pending_url = $this->get_option( 'pending_url', '' );
68
+ $this->currency_conversion = $this->get_option( 'currency_conversion', false );
69
+ $this->installments = $this->get_option( 'installments', '24' );
70
+ $this->ex_payments = $this->get_option( 'ex_payments', 'n/d' );
71
+ $this->gateway_discount = $this->get_option( 'gateway_discount', 0 );
72
+ $this->payment_split_mode = 'inactive';
73
+ //$this->sandbox = $this->get_option( 'sandbox', false );
74
+ $this->sandbox = 'no';
75
+ $this->debug = $this->get_option( 'debug' );
76
+
77
+ // Logging and debug.
78
+ if ( 'yes' == $this->debug ) {
79
+ if ( class_exists( 'WC_Logger' ) ) {
80
+ $this->log = new WC_Logger();
81
+ } else {
82
+ $this->log = WC_MercadoPago_Module::woocommerce_instance()->logger();
83
+ }
84
+ }
85
+
86
  // Render our configuration page and init/load fields.
87
  $this->init_form_fields();
88
  $this->init_settings();
89
+
90
+ // Used by IPN to receive IPN incomings.
91
+ add_action(
92
  'woocommerce_api_wc_woomercadopago_gateway',
93
+ array( $this, 'check_ipn_response' )
94
  );
95
+ // Used by IPN to process valid incomings.
96
+ add_action(
97
  'valid_mercadopago_ipn_request',
98
+ array( $this, 'successful_request' )
99
  );
100
+ // Process the cancel order meta box order action.
101
+ add_action(
102
+ 'woocommerce_order_action_cancel_order',
103
+ array( $this, 'process_cancel_order_meta_box_actions' )
104
+ );
105
+ // Used by WordPress to render the custom checkout page.
106
+ add_action(
107
  'woocommerce_receipt_' . $this->id,
108
+ array( $this, 'receipt_page' )
109
  );
110
+ // Used to fix CSS in some older WordPress/WooCommerce versions.
111
+ add_action(
112
+ 'wp_head',
113
+ array( $this, 'css' )
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, 'custom_process_admin_options' )
119
+ );
120
+ // Scripts for order configuration.
121
+ add_action(
122
+ 'woocommerce_after_checkout_form',
123
+ array( $this, 'add_checkout_script' )
124
+ );
125
+ // Display discount in payment method title.
126
+ add_filter(
127
+ 'woocommerce_gateway_title',
128
+ array( $this, 'get_payment_method_title_basic' ), 10, 2
129
+ );
130
+ // Checkout updates.
131
+ add_action(
132
+ 'woocommerce_thankyou',
133
+ array( $this, 'update_checkout_status' )
134
  );
 
 
 
 
 
 
 
 
 
 
135
 
136
+ // Verify if client_id or client_secret is empty.
137
+ if ( empty( $this->client_id ) || empty( $this->client_secret ) ) {
138
+ if ( ! empty( $this->settings['enabled'] ) && 'yes' == $this->settings['enabled'] ) {
139
+ add_action( 'admin_notices', array( $this, 'client_id_or_secret_missing_message' ) );
 
 
140
  }
141
  }
142
+
143
  }
144
+
145
+ /**
146
+ * Summary: Initialise Gateway Settings Form Fields.
147
+ * Description: Initialise Gateway settings form fields with a customized page.
148
+ */
149
  public function init_form_fields() {
150
+
151
+ // If module is disabled, we do not need to load and process the settings page.
152
+ if ( empty( $this->settings['enabled'] ) || 'no' == $this->settings['enabled'] ) {
153
+ $this->form_fields = array(
154
+ 'enabled' => array(
155
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
156
+ 'type' => 'checkbox',
157
+ 'label' => __( 'Enable Basic Checkout', 'woocommerce-mercadopago-module' ),
158
+ 'default' => 'no'
159
+ )
160
+ );
161
+ return;
162
+ }
163
+
164
  $api_secret_locale = sprintf(
165
+ '<a href="https://www.mercadopago.com/mla/account/credentials?type=basic" target="_blank">%s</a>, ' .
166
+ '<a href="https://www.mercadopago.com/mlb/account/credentials?type=basic" target="_blank">%s</a>, ' .
167
+ '<a href="https://www.mercadopago.com/mlc/account/credentials?type=basic" target="_blank">%s</a>, ' .
168
+ '<a href="https://www.mercadopago.com/mco/account/credentials?type=basic" target="_blank">%s</a>, ' .
169
+ '<a href="https://www.mercadopago.com/mlm/account/credentials?type=basic" target="_blank">%s</a>, ' .
170
+ '<a href="https://www.mercadopago.com/mpe/account/credentials?type=basic" target="_blank">%s</a>, ' .
171
+ '<a href="https://www.mercadopago.com/mlu/account/credentials?type=basic" target="_blank">%s</a> %s ' .
172
+ '<a href="https://www.mercadopago.com/mlv/account/credentials?type=basic" target="_blank">%s</a>',
173
+ __( 'Argentine', 'woocommerce-mercadopago-module' ),
174
+ __( 'Brazil', 'woocommerce-mercadopago-module' ),
175
+ __( 'Chile', 'woocommerce-mercadopago-module' ),
176
+ __( 'Colombia', 'woocommerce-mercadopago-module' ),
177
+ __( 'Mexico', 'woocommerce-mercadopago-module' ),
178
+ __( 'Peru', 'woocommerce-mercadopago-module' ),
179
+ __( 'Uruguay', 'woocommerce-mercadopago-module' ),
180
+ __( 'or', 'woocommerce-mercadopago-module' ),
181
+ __( 'Venezuela', 'woocommerce-mercadopago-module' )
182
  );
183
+
184
  // Trigger API to get payment methods and site_id, also validates Client_id/Client_secret.
185
+ if ( $this->validate_credentials() ) {
186
+ // Checking the currency.
187
+ $this->currency_message = '';
188
+ if ( ! $this->is_supported_currency() && 'yes' == $this->settings['enabled'] ) {
189
+ if ( $this->currency_conversion == 'no' ) {
190
+ $this->currency_ratio = -1;
191
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_not_converted_msg(
192
+ $this->country_configs['currency'],
193
+ $this->country_configs['country_name']
194
+ );
195
+ } elseif ( $this->currency_conversion == 'yes' && $this->currency_ratio != -1) {
196
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_converted_msg(
197
+ $this->country_configs['currency'],
198
+ $this->currency_ratio
199
+ );
200
+ } else {
201
+ $this->currency_ratio = -1;
202
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_conversion_err_msg(
203
+ $this->country_configs['currency']
204
+ );
205
  }
206
+ } else {
207
+ $this->currency_ratio = -1;
 
 
 
 
 
 
 
 
 
 
 
 
 
208
  }
209
+ $this->credentials_message = WC_WooMercadoPago_Module::build_valid_credentials_msg(
210
+ $this->country_configs['country_name'],
211
+ $this->site_id
212
+ );
213
+ $this->payment_desc =
214
+ __( 'Select the payment methods that you <strong>don\'t</strong> want to receive with Mercado Pago.', 'woocommerce-mercadopago-module' );
215
  } else {
216
+ array_push( $this->payment_methods, 'n/d' );
217
+ $this->credentials_message = WC_WooMercadoPago_Module::build_invalid_credentials_msg();
218
  $this->payment_desc = '<img width="12" height="12" src="' .
219
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
220
+ __( 'Configure your Client_id and Client_secret to have access to more options.', 'woocommerce-mercadopago-module' );
221
+ }
222
+
223
+ // fill categories (can be handled without credentials).
224
+ $categories = WC_WooMercadoPago_Module::get_categories();
225
+ $this->store_categories_id = $categories['store_categories_id'];
226
+ $this->store_categories_description = $categories['store_categories_description'];
227
+
 
 
 
 
 
228
  // Checks validity of iFrame width/height fields.
229
+ if ( ! is_numeric( $this->iframe_width) ) {
230
  $this->iframe_width_desc = '<img width="12" height="12" src="' .
231
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
232
+ __( 'This field should be an integer.', 'woocommerce-mercadopago-module' );
233
  } else {
234
  $this->iframe_width_desc =
235
+ __( 'If your integration method is iFrame, please inform the payment iFrame width.', 'woocommerce-mercadopago-module' );
236
  }
237
+ if ( ! is_numeric( $this->iframe_height) ) {
238
  $this->iframe_height_desc = '<img width="12" height="12" src="' .
239
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
240
+ __( 'This field should be an integer.', 'woocommerce-mercadopago-module' );
241
  } else {
242
  $this->iframe_height_desc =
243
+ __( 'If your integration method is iFrame, please inform the payment iFrame height.', 'woocommerce-mercadopago-module' );
244
  }
245
+
246
  // Checks if max installments is a number.
247
+ if ( ! is_numeric( $this->installments ) ) {
248
  $this->installments_desc = '<img width="12" height="12" src="' .
249
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
250
+ __( 'This field should be an integer.', 'woocommerce-mercadopago-module' );
251
  } else {
252
  $this->installments_desc =
253
+ __( 'Select the max number of installments for your customers.', 'woocommerce-mercadopago-module' );
254
  }
255
+
256
+ // Validate discount field.
257
+ if ( ! is_numeric( $this->gateway_discount ) ) {
258
+ $this->gateway_discount_desc = '<img width="12" height="12" src="' .
259
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
260
+ __( 'This field should be an integer greater or equal 0 and smaller than 100.', 'woocommerce-mercadopago-module' );
261
+ } elseif ( $this->gateway_discount < 0 || $this->gateway_discount >= 100 ) {
262
+ $this->gateway_discount_desc = '<img width="12" height="12" src="' .
263
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
264
+ __( 'This field should be an integer greater or equal 0 and smaller than 100.', 'woocommerce-mercadopago-module' );
265
+ } else {
266
+ $this->gateway_discount_desc =
267
+ __( 'Give a percentual discount for your customers if they use this payment gateway.', 'woocommerce-mercadopago-module' );
268
+ }
269
+
270
  // This array draws each UI (text, selector, checkbox, label, etc).
271
  $this->form_fields = array(
272
  'enabled' => array(
273
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
274
  'type' => 'checkbox',
275
+ 'label' => __( 'Enable Basic Checkout', 'woocommerce-mercadopago-module' ),
276
+ 'default' => 'no'
277
  ),
278
  'credentials_title' => array(
279
+ 'title' => __( 'Mercado Pago Credentials', 'woocommerce-mercadopago-module' ),
280
  'type' => 'title',
281
+ 'description' => sprintf( '%s', $this->credentials_message ) . '<br>' . sprintf(
282
+ __( 'You can obtain your credentials for', 'woocommerce-mercadopago-module' ) .
283
+ ' %s.', $api_secret_locale
284
+ )
285
  ),
286
  'client_id' => array(
287
  'title' => 'Client_id',
288
  'type' => 'text',
289
+ 'description' =>
290
+ __( 'Insert your Mercado Pago Client_id.', 'woocommerce-mercadopago-module' ),
291
  'default' => '',
292
  'required' => true
293
  ),
294
  'client_secret' => array(
295
  'title' => 'Client_secret',
296
  'type' => 'text',
297
+ 'description' =>
298
+ __( 'Insert your Mercado Pago Client_secret.', 'woocommerce-mercadopago-module' ),
299
  'default' => '',
300
  'required' => true
301
  ),
302
  'ipn_url' => array(
303
+ 'title' =>
304
+ __( 'Instant Payment Notification (IPN) URL', 'woocommerce-mercadopago-module' ),
305
  'type' => 'title',
306
+ 'description' => sprintf(
307
+ __( 'Your IPN URL to receive instant payment notifications is', 'woocommerce-mercadopago-module' ) .
308
+ '<br>%s', '<code>' . WC()->api_request_url( 'WC_WooMercadoPago_Gateway' ) . '</code>.'
309
+ )
310
  ),
311
  'checkout_options_title' => array(
312
+ 'title' => __( 'Checkout Options', 'woocommerce-mercadopago-module' ),
313
  'type' => 'title',
314
  'description' => ''
315
  ),
316
  'title' => array(
317
+ 'title' => __( 'Title', 'woocommerce-mercadopago-module' ),
318
  'type' => 'text',
319
+ 'description' =>
320
+ __( 'Title shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
321
+ 'default' => __( 'Mercado Pago', 'woocommerce-mercadopago-module' )
322
  ),
323
  'description' => array(
324
+ 'title' => __( 'Description', 'woocommerce-mercadopago-module' ),
325
  'type' => 'textarea',
326
+ 'description' =>
327
+ __( 'Description shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
328
+ 'default' => __( 'Pay with Mercado Pago', 'woocommerce-mercadopago-module' )
329
  ),
330
  'category_id' => array(
331
+ 'title' => __( 'Store Category', 'woocommerce-mercadopago-module' ),
332
  'type' => 'select',
333
+ 'description' =>
334
+ __( 'Define which type of products your store sells.', 'woocommerce-mercadopago-module' ),
335
  'options' => $this->store_categories_id
336
  ),
337
  'invoice_prefix' => array(
338
+ 'title' => __( 'Store Identificator', 'woocommerce-mercadopago-module' ),
339
  'type' => 'text',
340
+ 'description' =>
341
+ __( 'Please, inform a prefix to your store.', 'woocommerce-mercadopago-module' )
342
+ . ' ' .
343
+ __( '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' ),
344
  'default' => 'WC-'
345
  ),
346
  'method' => array(
347
+ 'title' => __( 'Integration Method', 'woocommerce-mercadopago-module' ),
348
  'type' => 'select',
349
+ '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' ),
350
  'default' => 'iframe',
351
  'options' => array(
352
+ 'iframe' => __( 'iFrame', 'woocommerce-mercadopago-module' ),
353
+ 'modal' => __( 'Modal Window', 'woocommerce-mercadopago-module' ),
354
+ 'redirect' => __( 'Redirect', 'woocommerce-mercadopago-module' )
355
  )
356
  ),
357
  'iframe_width' => array(
358
+ 'title' => __( 'iFrame Width', 'woocommerce-mercadopago-module' ),
359
  'type' => 'text',
360
  'description' => $this->iframe_width_desc,
361
  'default' => '640'
362
  ),
363
  'iframe_height' => array(
364
+ 'title' => __( 'iFrame Height', 'woocommerce-mercadopago-module' ),
365
  'type' => 'text',
366
  'description' => $this->iframe_height_desc,
367
  'default' => '800'
368
  ),
369
  'auto_return' => array(
370
+ 'title' => __( 'Auto Return', 'woocommerce-mercadopago-module' ),
371
  'type' => 'checkbox',
372
+ 'label' => __( 'Automatic Return After Payment', 'woocommerce-mercadopago-module' ),
373
  'default' => 'yes',
374
+ 'description' =>
375
+ __( 'After the payment, client is automatically redirected.', 'woocommerce-mercadopago-module' ),
376
+ ),
377
+ 'back_url_title' => array(
378
+ 'title' => __( 'Back URL Options', 'woocommerce-mercadopago-module' ),
379
+ 'type' => 'title',
380
+ 'description' => ''
381
+ ),
382
+ 'success_url' => array(
383
+ 'title' => __( 'Sucess URL', 'woocommerce-mercadopago-module' ),
384
+ 'type' => 'text',
385
+ 'description' => __( 'Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page.', 'woocommerce-mercadopago-module' ),
386
+ 'default' => ''
387
  ),
388
+ 'failure_url' => array(
389
+ 'title' => __( 'Failure URL', 'woocommerce-mercadopago-module' ),
390
+ 'type' => 'text',
391
+ 'description' => __( 'Where customers should be redirected after a failed purchase. Let blank to redirect to the default store order resume page.', 'woocommerce-mercadopago-module' ),
392
+ 'default' => ''
393
+ ),
394
+ 'pending_url' => array(
395
+ 'title' => __( 'Pending URL', 'woocommerce-mercadopago-module' ),
396
+ 'type' => 'text',
397
+ 'description' => __( 'Where customers should be redirected after a pending purchase. Let blank to redirect to the default store order resume page.', 'woocommerce-mercadopago-module' ),
398
+ 'default' => ''
399
+ ),
400
+ 'payment_title' => array(
401
+ 'title' => __( 'Payment Options', 'woocommerce-mercadopago-module' ),
402
  'type' => 'title',
403
  'description' => ''
404
  ),
405
+ 'currency_conversion' => array(
406
+ 'title' => __( 'Currency Conversion', 'woocommerce-mercadopago-module' ),
407
+ 'type' => 'checkbox',
408
+ 'label' =>
409
+ __( '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' ),
410
+ 'default' => 'no',
411
+ 'description' => sprintf( '%s', $this->currency_message )
412
+ ),
413
  'installments' => array(
414
+ 'title' => __( 'Max installments', 'woocommerce-mercadopago-module' ),
415
  'type' => 'text',
416
  'description' => $this->installments_desc,
417
  'default' => '24'
418
  ),
419
  'ex_payments' => array(
420
+ 'title' => __( 'Exclude Payment Methods', 'woocommerce-mercadopago-module' ),
421
+ 'description' => $this->payment_desc,
422
+ 'type' => 'multiselect',
423
+ 'options' => $this->payment_methods,
424
+ 'default' => ''
425
+ ),
426
+ 'gateway_discount' => array(
427
+ 'title' => __( 'Discount by Gateway', 'woocommerce-mercadopago-module' ),
428
+ 'type' => 'number',
429
+ 'description' => $this->gateway_discount_desc,
430
+ 'default' => '0'
431
+ ),
432
+ 'payment_split_mode' => array(
433
+ 'title' => __( 'Two Cards Mode', 'woocommerce-mercadopago-module' ),
434
+ 'type' => 'checkbox',
435
+ 'label' => __( 'Payments with Two Cards', 'woocommerce-mercadopago-module' ),
436
+ 'default' => ( $this->payment_split_mode == 'active' ? 'yes' : 'no' ),
437
+ 'description' =>
438
+ __( 'Your customer will be able to use two different cards to pay the order.', 'woocommerce-mercadopago-module' ),
439
+ ),
440
  'testing' => array(
441
+ 'title' => __( 'Test and Debug Options', 'woocommerce-mercadopago-module' ),
442
  'type' => 'title',
443
  'description' => ''
444
  ),
445
+ //'sandbox' => array(
446
+ // 'title' => __( 'Mercado Pago Sandbox', 'woocommerce-mercadopago-module' ),
447
+ // 'type' => 'checkbox',
448
+ // 'label' => __( 'Enable Mercado Pago Sandbox', 'woocommerce-mercadopago-module' ),
449
+ // 'default' => 'no',
450
+ // 'description' =>
451
+ // __( 'This option allows you to test payments inside a sandbox environment.', 'woocommerce-mercadopago-module' ),
452
+ //),
453
  'debug' => array(
454
+ 'title' => __( 'Debug and Log', 'woocommerce-mercadopago-module' ),
455
  'type' => 'checkbox',
456
+ 'label' => __( 'Enable log', 'woocommerce-mercadopago-module' ),
457
  'default' => 'no',
458
+ 'description' => sprintf(
459
+ __( 'Register event logs of Mercado Pago, such as API requests, in the file', 'woocommerce-mercadopago-module' ) .
460
+ ' %s.', $this->build_log_path_string() . '.<br>' .
461
+ __( 'File location: ', 'woocommerce-mercadopago-module' ) .
462
+ '<code>wordpress/wp-content/uploads/wc-logs/' . $this->id . '-' .
463
+ sanitize_file_name( wp_hash( $this->id) ) . '.log</code>' )
464
  )
465
  );
466
+
467
+ }
468
+
469
+ /**
470
+ * Processes and saves options.
471
+ * If there is an error thrown, will continue to save and validate fields, but will leave the
472
+ * erroring field out.
473
+ * @return bool was anything saved?
474
+ */
475
+ public function custom_process_admin_options() {
476
+ $this->init_settings();
477
+
478
+ $post_data = $this->get_post_data();
479
+
480
+ foreach ( $this->get_form_fields() as $key => $field ) {
481
+ if ( 'title' !== $this->get_field_type( $field ) ) {
482
+ try {
483
+ if ( $key == 'payment_split_mode' ) {
484
+ // We dont save split mode as it should come from api.
485
+ $value = $this->get_field_value( $key, $field, $post_data );
486
+ $this->payment_split_mode = ( $value == 'yes' ? 'active' : 'inactive' );
487
+ } else {
488
+ $this->settings[$key] = $this->get_field_value( $key, $field, $post_data );
489
+ }
490
+ } catch ( Exception $e ) {
491
+ $this->add_error( $e->getMessage() );
492
+ }
493
+ }
494
+ }
495
+
496
+ if ( ! empty( $this->settings['client_id'] ) && ! empty( $this->settings['client_secret'] ) ) {
497
+ $this->mp = new MP(
498
+ WC_WooMercadoPago_Module::get_module_version(),
499
+ $this->settings['client_id'],
500
+ $this->settings['client_secret']
501
+ );
502
+ } else {
503
+ $this->mp = null;
504
+ }
505
+
506
+ // analytics
507
+ if ( $this->mp != null ) {
508
+ $infra_data = WC_WooMercadoPago_Module::get_common_settings();
509
+ $infra_data['checkout_basic'] = ( $this->settings['enabled'] == 'yes' ? 'true' : 'false' );
510
+ //$infra_data['mercado_envios'] = 'false';
511
+ $infra_data['two_cards'] = ( $this->payment_split_mode == 'active' ? 'true' : 'false' );
512
+ $response = $this->mp->analytics_save_settings( $infra_data );
513
+ if ( 'yes' == $this->debug) {
514
+ $this->log->add(
515
+ $this->id,
516
+ '[custom_process_admin_options] - analytics response: ' .
517
+ json_encode( $response, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
518
+ );
519
+ }
520
+ }
521
+
522
+ // two cards mode
523
+ if ( $this->mp != null ) {
524
+ $response = $this->mp->set_two_cards_mode( $this->payment_split_mode );
525
+ }
526
+
527
+ return update_option(
528
+ $this->get_option_key(),
529
+ apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->settings )
530
+ );
531
  }
532
+
533
+ /**
534
+ * Handles the manual order refunding in server-side.
535
+ */
536
+ public function process_refund( $order_id, $amount = null, $reason = '' ) {
537
+
538
+ $payments = get_post_meta(
539
+ $order_id,
540
+ '_Mercado_Pago_Payment_IDs',
541
+ true
542
+ );
543
+
544
+ // Validate.
545
+ if ( $this->mp == null || empty( $payments ) ) {
546
+ if ( 'yes' == $this->debug ) {
547
+ $this->log->add(
548
+ $this->id,
549
+ '[process_refund] - no payments or credentials invalid'
550
+ );
551
+ }
552
+ return false;
553
+ }
554
+
555
+ $total_available = 0;
556
+ $payment_structs = array();
557
+ $payment_ids = explode( ', ', $payments );
558
+ foreach ( $payment_ids as $p_id ) {
559
+ $p = get_post_meta(
560
+ $order_id,
561
+ 'Mercado Pago - Payment ' . $p_id,
562
+ true
563
+ );
564
+ $p = explode( '/', $p );
565
+ $paid = ((float) explode( ' ', substr( $p[2], 1, -1 ) )[1]);
566
+ $refund = ((float) explode( ' ', substr( $p[3], 1, -1 ) )[1]);
567
+ $p_struct = array(
568
+ 'id' => $p_id,
569
+ 'available_to_refund' => $paid - $refund
570
+ );
571
+ $total_available += $paid - $refund;
572
+ $payment_structs[] = $p_struct;
573
+ }
574
+
575
+ if ( 'yes' == $this->debug ) {
576
+ $this->log->add(
577
+ $this->id,
578
+ '[process_refund] - refunding ' . $amount . ' because of ' . $reason . ' and payments ' .
579
+ json_encode( $payment_structs, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
580
+ );
581
+ }
582
+
583
+ // Do not allow refund more than available or invalid amounts.
584
+ if ( $amount > $total_available || $amount <= 0 ) {
585
+ return false;
586
+ }
587
+
588
+ $remaining_to_refund = $amount;
589
+ foreach ( $payment_structs as $to_refund ) {
590
+ if ( $remaining_to_refund <= $to_refund['available_to_refund'] ) {
591
+ // We want to refund an amount that is less than the available for this payment, so we
592
+ // can just refund and return.
593
+ $response = $this->mp->partial_refund_payment(
594
+ $to_refund['id'],
595
+ $remaining_to_refund,
596
+ $reason,
597
+ $this->invoice_prefix . $order_id
598
+ );
599
+ $message = $response['response']['message'];
600
+ $status = $response['status'];
601
+ if ( 'yes' == $this->debug ) {
602
+ $this->log->add(
603
+ $this->id,
604
+ '[process_refund] - refund payment of id ' . $p_id .
605
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
606
+ );
607
+ }
608
+ if ( $status >= 200 && $status < 300 ) {
609
+ return true;
610
+ } else {
611
+ return false;
612
+ }
613
+ } elseif ( $to_refund['available_to_refund'] > 0 ) {
614
+ // We want to refund an amount that exceeds the available for this payment, so we
615
+ // totally refund this payment, and try to complete refund in other/next payments.
616
+ $response = $this->mp->partial_refund_payment(
617
+ $to_refund['id'],
618
+ $to_refund['available_to_refund'],
619
+ $reason,
620
+ $this->invoice_prefix . $order_id
621
+ );
622
+ $message = $response['response']['message'];
623
+ $status = $response['status'];
624
+ if ( 'yes' == $this->debug ) {
625
+ $this->log->add(
626
+ $this->id,
627
+ '[process_refund] - refund payment of id ' . $p_id .
628
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
629
+ );
630
+ }
631
+ if ( $status < 200 || $status >= 300 ) {
632
+ return false;
633
+ }
634
+ $remaining_to_refund -= $to_refund['available_to_refund'];
635
+ }
636
+ if ( $remaining_to_refund == 0 )
637
+ return true;
638
+ }
639
+
640
+ // Reaching here means that there we run out of payments, and there is an amount
641
+ // remaining to be refund, which is impossible as it implies refunding more than
642
+ // available on paid amounts.
643
+ return false;
644
+
645
+ }
646
+
647
+ /**
648
+ * Handles the manual order cancellation in server-side.
649
+ */
650
+ public function process_cancel_order_meta_box_actions( $order ) {
651
+
652
+ // WooCommerce 3.0 or later.
653
+ if ( method_exists( $order, 'get_meta' ) ) {
654
+ $used_gateway = $order->get_meta( '_used_gateway' );
655
+ $payments = $order->get_meta( '_Mercado_Pago_Payment_IDs' );
656
+ } else {
657
+ $used_gateway = get_post_meta( $order->id, '_used_gateway', true );
658
+ $payments = get_post_meta( $order->id, '_Mercado_Pago_Payment_IDs', true );
659
+ }
660
+
661
+ if ( $used_gateway != 'WC_WooMercadoPago_Gateway' ) {
662
+ return;
663
+ }
664
+
665
+ if ( 'yes' == $this->debug ) {
666
+ $this->log->add(
667
+ $this->id,
668
+ '[process_cancel_order_meta_box_actions] - cancelling payments for ' . $payments
669
+ );
670
+ }
671
+
672
+ if ( $this->mp != null && ! empty( $payments ) ) {
673
+ $payment_ids = explode( ', ', $payments );
674
+ foreach ( $payment_ids as $p_id ) {
675
+ $response = $this->mp->cancel_payment( $p_id );
676
+ $message = $response['response']['message'];
677
+ $status = $response['status'];
678
+ if ( 'yes' == $this->debug ) {
679
+ $this->log->add(
680
+ $this->id,
681
+ '[process_cancel_order_meta_box_actions] - cancel payment of id ' . $p_id .
682
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
683
+ );
684
+ }
685
+ }
686
+ } else {
687
+ if ( 'yes' == $this->debug ) {
688
+ $this->log->add(
689
+ $this->id,
690
+ '[process_cancel_order_meta_box_actions] - no payments or credentials invalid'
691
+ );
692
+ }
693
+ }
694
+
695
+ }
696
+
697
  /*
698
  * ========================================================================
699
+ * CHECKOUT BUSINESS RULES (CLIENT SIDE)
700
  * ========================================================================
701
  */
702
+
703
+ public function payment_fields() {
704
+ // basic checkout
705
+ if ( $description = $this->get_description() ) {
706
+ echo wpautop(wptexturize( $description ) );
707
+ }
708
+ if ( $this->supports( 'default_credit_card_form' ) ) {
709
+ $this->credit_card_form();
710
+ }
711
+ }
712
+
713
+ public function add_checkout_script() {
714
+
715
+ $w = WC_WooMercadoPago_Module::woocommerce_instance();
716
+ $logged_user_email = null;
717
+ $payments = array();
718
+ $gateways = WC()->payment_gateways->get_available_payment_gateways();
719
+ foreach ( $gateways as $g ) {
720
+ $payments[] = $g->id;
721
+ }
722
+ $payments = str_replace( '-', '_', implode( ', ', $payments ) );
723
+
724
+ if ( wp_get_current_user()->ID != 0 ) {
725
+ $logged_user_email = wp_get_current_user()->user_email;
726
+ }
727
+
728
+ ?>
729
+ <script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
730
+ <script type="text/javascript">
731
+ var MA = ModuleAnalytics;
732
+ MA.setToken( '<?php echo $this->get_option( 'client_id' ); ?>' );
733
+ MA.setPlatform( 'WooCommerce' );
734
+ MA.setPlatformVersion( '<?php echo $w->version; ?>' );
735
+ MA.setModuleVersion( '<?php echo WC_WooMercadoPago_Module::VERSION; ?>' );
736
+ MA.setPayerEmail( '<?php echo ( $logged_user_email != null ? $logged_user_email : "" ); ?>' );
737
+ MA.setUserLogged( <?php echo ( empty( $logged_user_email ) ? 0 : 1 ); ?> );
738
+ MA.setInstalledModules( '<?php echo $payments; ?>' );
739
+ MA.post();
740
+ </script>
741
+ <?php
742
+
743
+ }
744
+
745
+ public function update_checkout_status( $order_id ) {
746
+
747
+ if ( get_post_meta( $order_id, '_used_gateway', true ) != 'WC_WooMercadoPago_Gateway' )
748
+ return;
749
+
750
+ if ( 'yes' == $this->debug ) {
751
+ $this->log->add(
752
+ $this->id,
753
+ '[update_checkout_status] - updating checkout statuses ' . $order_id
754
+ );
755
+ }
756
+
757
+ echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
758
+ <script type="text/javascript">
759
+ var MA = ModuleAnalytics;
760
+ MA.setToken( ' . $this->get_option( 'client_id' ) . ' );
761
+ MA.setPaymentType("basic");
762
+ MA.setCheckoutType("basic");
763
+ MA.put();
764
+ </script>';
765
+
766
+ }
767
+
768
+ /**
769
+ * Summary: Handle the payment and processing the order.
770
+ * Description: First step occurs when the customer selects Mercado Pago and proceed to checkout.
771
+ * This method verify which integration method was selected and makes the build for the checkout
772
+ * URL.
773
+ * @return an array containing the result of the processment and the URL to redirect.
774
+ */
775
+ public function process_payment( $order_id ) {
776
+ $order = wc_get_order( $order_id );
777
+
778
+ if ( method_exists( $order, 'update_meta_data' ) ) {
779
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPagoSubscription_Gateway' );
780
+ $order->save();
781
+ } else {
782
+ update_post_meta( $order_id, '_used_gateway', 'WC_WooMercadoPagoSubscription_Gateway' );
783
+ }
784
+
785
+ if ( 'redirect' == $this->method ) {
786
+ // The checkout is made by redirecting customer to Mercado Pago.
787
+ if ( 'yes' == $this->debug) {
788
+ $this->log->add(
789
+ $this->id,
790
+ '[process_payment] - customer being redirected to Mercado Pago.'
791
+ );
792
  }
793
  return array(
794
  'result' => 'success',
795
+ 'redirect' => $this->create_url( $order )
796
  );
797
+ } elseif ( 'modal' == $this->method || 'iframe' == $this->method ) {
798
+ // The checkout is made by customizing the view, either by iframe or showing a modal.
799
+ if ( 'yes' == $this->debug ) {
800
+ $this->log->add(
801
+ $this->id,
802
+ '[process_payment] - preparing to render Mercado Pago checkout view.'
 
 
 
 
 
 
 
803
  );
804
  }
805
+ return array(
806
+ 'result' => 'success',
807
+ 'redirect' => $order->get_checkout_payment_url( true )
808
+ );
809
  }
810
  }
811
 
812
+ /**
813
+ * Summary: Show the custom renderization for the checkout.
814
+ * Description: Order page and this generates the form that shows the pay button. This step
815
+ * generates the form to proceed to checkout.
816
+ * @return the html to be rendered.
817
+ */
818
+ public function receipt_page( $order ) {
819
+ echo $this->render_order_form( $order );
820
  }
821
+
822
  // --------------------------------------------------
823
+
824
+ public function render_order_form( $order_id ) {
825
+
826
+ $order = wc_get_order( $order_id );
827
+ $url = $this->create_url( $order );
828
+
829
+ if ( $url ) {
830
  $html =
831
+ '<img width="468" height="60" src="' . $this->country_configs['checkout_banner'] . '">';
832
+ if ( 'modal' == $this->method ) {
833
+ // The checkout is made by displaying a modal to the customer.
834
+ if ( 'yes' == $this->debug ) {
835
+ $this->log->add(
836
+ $this->id,
837
+ '[render_order_form] - rendering Mercado Pago lightbox (modal window).'
838
+ );
839
  }
840
  $html .= '<p></p><p>' . wordwrap(
841
+ __( 'Thank you for your order. Please, proceed with your payment clicking in the bellow button.', 'woocommerce-mercadopago-module' ),
842
+ 60, '<br>'
843
+ ) . '</p>';
844
  $html .=
845
+ '<a id="submit-payment" href="' . $url .
846
+ '" name="MP-Checkout" class="button alt" mp-mode="modal">' .
847
+ __( 'Pay with Mercado Pago', 'woocommerce-mercadopago-module' ) .
848
  '</a> ';
849
  $html .=
850
+ '<a class="button cancel" href="' . esc_url( $order->get_cancel_order_url() ) . '">' .
851
+ __( 'Cancel order &amp; Clear cart', 'woocommerce-mercadopago-module' ) .
852
  '</a><style type="text/css">#MP-Checkout-dialog #MP-Checkout-IFrame { bottom: -28px !important; height: 590px !important; }</style>';
853
+ // Includes the javascript of lightbox.
854
  $html .=
855
+ '<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>';
856
  } else {
857
+ // The checkout is made by rendering Mercado Pago form within a iframe.
858
+ if ( 'yes' == $this->debug ) {
859
+ $this->log->add(
860
+ $this->id,
861
+ '[render_order_form] - embedding Mercado Pago iframe.'
862
+ );
863
  }
864
  $html .= '<p></p><p>' . wordwrap(
865
+ __( 'Thank you for your order. Proceed with your payment completing the following information.', 'woocommerce-mercadopago-module' ),
866
+ 60, '<br>'
867
+ ) . '</p>';
868
+ $html .= '<iframe src="' . $url . '" name="MP-Checkout" ' .
869
+ 'width="' . ( is_numeric( (int) $this->iframe_width ) ? $this->iframe_width : 640 ) .
870
+ '" ' .
871
+ 'height="' . ( is_numeric( (int) $this->iframe_height ) ? $this->iframe_height : 800 ) .
872
+ '" ' .
873
  'frameborder="0" scrolling="no" id="checkout_mercadopago"></iframe>';
874
  }
875
  return $html;
876
  } else {
877
+ // Reaching at this point means that the URL could not be build by some reason.
878
+ if ( 'yes' == $this->debug ) {
879
+ $this->log->add(
880
+ $this->id,
881
+ '[render_order_form] - unable to build Mercado Pago checkout URL.'
882
+ );
883
+ }
884
+ $html = '<p>' .
885
+ __( 'An error occurred when proccessing your payment. Please try again or contact us for assistence.', 'woocommerce-mercadopago-module' ) .
886
+ '</p>';
887
+ $html .= '<a class="button" href="' . esc_url( $order->get_checkout_payment_url() ) . '">' .
888
+ __( 'Click to try again', 'woocommerce-mercadopago-module' ) .
889
  '</a>';
890
  return $html;
891
  }
892
  }
893
+
894
+ /**
895
+ * Summary: Build Mercado Pago preference.
896
+ * Description: Create Mercado Pago preference and get init_point URL based in the order options
897
+ * from the cart.
898
+ * @return the preference object.
899
+ */
900
+ public function build_payment_preference( $order ) {
901
+
902
+ // A string to register items (workaround to deal with API problem that shows only first item)
903
+ $list_of_items = array();
904
+
905
+ // Selected shipping
906
+ $selected_shipping = $order->get_shipping_method();
907
+
908
+ // Here we build the array that contains ordered items, from customer cart
909
  $items = array();
910
+ if ( sizeof( $order->get_items() ) > 0 ) {
911
+ foreach ( $order->get_items() as $item ) {
912
+ if ( $item['qty'] ) {
913
+ $product = new WC_product( $item['product_id'] );
914
+
915
+ // WooCommerce 3.0 or later.
916
+ if ( method_exists( $product, 'get_description' ) ) {
917
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
918
+ $product->get_name()
919
+ );
920
+ $product_content = WC_WooMercadoPago_Module::utf8_ansi(
921
+ $product->get_description()
922
+ );
923
+ } else {
924
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
925
+ $product->post->post_title
926
+ );
927
+ $product_content = WC_WooMercadoPago_Module::utf8_ansi(
928
+ $product->post->post_content
929
+ );
930
+ }
931
+
932
+ // Remove decimals if MCO/MLC
933
+ $unit_price = floor( ( (float) $item['line_total'] + (float) $item['line_tax'] ) *
934
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 ) * 100 ) / 100;
935
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
936
+ $unit_price = floor( $unit_price );
937
+ }
938
+
939
+ // Calculate discount for payment method.
940
+ if ( is_numeric( $this->gateway_discount ) ) {
941
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
942
+ $price_percent = $this->gateway_discount / 100;
943
+ $discount = $unit_price * $price_percent;
944
+ if ( $discount > 0 ) {
945
+ $unit_price -= $discount;
946
+ }
947
+ }
948
+ }
949
+
950
+ array_push( $list_of_items, $product_title . ' x ' . $item['qty'] );
951
+ array_push( $items, array(
952
  'id' => $item['product_id'],
953
+ 'title' => ( $product_title . ' x ' . $item['qty'] ),
954
+ 'description' => sanitize_file_name(
955
  // This handles description width limit of Mercado Pago.
956
+ ( strlen( $product_content ) > 230 ?
957
+ substr( $product_content, 0, 230 ) . '...' :
958
+ $product_content )
959
+ ),
960
+ 'picture_url' => ( sizeof( $order->get_items() ) > 1 ?
961
+ plugins_url( 'images/cart.png', plugin_dir_path( __FILE__ ) ) :
962
+ wp_get_attachment_url( $product->get_image_id() )
963
  ),
 
964
  'category_id' => $this->store_categories_id[$this->category_id],
965
  'quantity' => 1,
966
+ 'unit_price' => $unit_price,
967
+ 'currency_id' => $this->country_configs['currency']
968
+ ) );
969
  }
970
  }
971
+
972
+ // Check if is NOT Mercado Envios.
973
+ if ( strpos( $selected_shipping, 'Mercado Envios' ) !== 0 ) {
974
+ // Shipment cost as an item (workaround to prevent API showing shipment setup again).
975
+ $ship_cost = ( (float) $order->get_total_shipping() + (float) $order->get_shipping_tax() ) *
976
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 );
977
+ // Remove decimals if MCO/MLC
978
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
979
+ $ship_cost = floor( $ship_cost );
980
+ }
981
+ if ( $ship_cost > 0 ) {
982
+ array_push(
983
+ $list_of_items,
984
+ __( 'Shipping service used by store', 'woocommerce-mercadopago-module' )
985
+ );
986
+ array_push( $items, array(
987
+ 'id' => 2147483647,
988
+ 'title' => implode( ', ', $list_of_items ),
989
+ 'description' => implode( ', ', $list_of_items ),
990
+ 'category_id' => $this->store_categories_id[$this->category_id],
991
+ 'quantity' => 1,
992
+ 'unit_price' => $ship_cost,
993
+ 'currency_id' => $this->country_configs['currency']
994
+ ) );
995
+ }
996
+ }
997
+
998
+ // String of item names (workaround to deal with API problem that shows only first item).
999
+ $items[0]['title'] = implode( ', ', $list_of_items );
1000
+ }
1001
+
1002
+ // Find excluded methods. If 'n/d' is in array, we should disconsider the remaining values.
1003
+ $excluded_payment_methods = array();
1004
+ if ( is_array( $this->ex_payments ) || is_object( $this->ex_payments ) ) {
1005
+ foreach ( $this->ex_payments as $excluded ) {
1006
+ // if 'n/d' is selected, we just not add any items to the array.
1007
+ if ( $excluded == 0 )
1008
+ break;
1009
+ array_push( $excluded_payment_methods, array(
1010
+ 'id' => $this->payment_methods[$excluded]
1011
+ ) );
1012
+ }
1013
+ }
1014
+ $payment_methods = array(
1015
+ 'installments' => ( is_numeric( (int) $this->installments) ? (int) $this->installments : 24 ),
1016
+ 'default_installments' => 1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1017
  );
1018
+ // Set excluded payment methods.
1019
+ if ( count( $excluded_payment_methods ) > 0 ) {
1020
+ $payment_methods['excluded_payment_methods'] = $excluded_payment_methods;
1021
+ }
1022
+
1023
+ // WooCommerce 3.0 or later.
1024
+ if ( method_exists( $order, 'get_id' ) ) {
1025
+ // Create Mercado Pago preference.
1026
+ $preferences = array(
1027
+ 'items' => $items,
1028
+ // Payer should be filled with billing info as orders can be made with non-logged users.
1029
+ 'payer' => array(
1030
+ 'name' => $order->get_billing_first_name(),
1031
+ 'surname' => $order->get_billing_last_name(),
1032
+ 'email' => $order->get_billing_email(),
1033
+ 'phone' => array(
1034
+ 'number' => $order->get_billing_phone()
1035
+ ),
1036
+ 'address' => array(
1037
+ 'street_name' => $order->get_billing_address_1() . ' / ' .
1038
+ $order->get_billing_city() . ' ' .
1039
+ $order->get_billing_state() . ' ' .
1040
+ $order->get_billing_country(),
1041
+ 'zip_code' => $order->get_billing_postcode()
1042
+ )
1043
+ ),
1044
+ 'back_urls' => array(
1045
+ 'success' => ( empty( $this->success_url ) ?
1046
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
1047
+ esc_url( $this->get_return_url( $order ) )
1048
+ ) : $this->success_url
1049
+ ),
1050
+ 'failure' => ( empty( $this->failure_url ) ?
1051
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
1052
+ str_replace( '&amp;', '&', $order->get_cancel_order_url() )
1053
+ ) : $this->failure_url
1054
+ ),
1055
+ 'pending' => ( empty( $this->pending_url ) ?
1056
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
1057
+ esc_url( $this->get_return_url( $order) )
1058
+ ) : $this->pending_url
1059
+ )
1060
+ ),
1061
+ //'marketplace' =>
1062
+ //'marketplace_fee' =>
1063
+ 'shipments' => array(
1064
+ //'cost' =>
1065
+ //'mode' =>
1066
+ 'receiver_address' => array(
1067
+ 'zip_code' => $order->get_shipping_postcode(),
1068
+ //'street_number' =>
1069
+ 'street_name' => $order->get_shipping_address_1() . ' ' .
1070
+ $order->get_shipping_city() . ' ' .
1071
+ $order->get_shipping_state() . ' ' .
1072
+ $order->get_shipping_country(),
1073
+ //'floor' =>
1074
+ 'apartment' => $order->get_shipping_address_2()
1075
+ )
1076
+ ),
1077
+ 'payment_methods' => $payment_methods,
1078
+ //'notification_url' =>
1079
+ 'external_reference' => $this->invoice_prefix . $order->get_id()
1080
+ //'additional_info' =>
1081
+ //'expires' =>
1082
+ //'expiration_date_from' =>
1083
+ //'expiration_date_to' =>
1084
+ );
1085
+ } else {
1086
+ // Create Mercado Pago preference.
1087
+ $preferences = array(
1088
+ 'items' => $items,
1089
+ // Payer should be filled with billing info as orders can be made with non-logged users.
1090
+ 'payer' => array(
1091
+ 'name' => $order->billing_first_name,
1092
+ 'surname' => $order->billing_last_name,
1093
+ 'email' => $order->billing_email,
1094
+ 'phone' => array(
1095
+ 'number' => $order->billing_phone
1096
+ ),
1097
+ 'address' => array(
1098
+ 'street_name' => $order->billing_address_1 . ' / ' .
1099
+ $order->billing_city . ' ' .
1100
+ $order->billing_state . ' ' .
1101
+ $order->billing_country,
1102
+ 'zip_code' => $order->billing_postcode
1103
+ )
1104
+ ),
1105
+ 'back_urls' => array(
1106
+ 'success' => ( empty( $this->success_url ) ?
1107
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
1108
+ esc_url( $this->get_return_url( $order) )
1109
+ ) : $this->success_url
1110
+ ),
1111
+ 'failure' => ( empty( $this->failure_url ) ?
1112
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
1113
+ str_replace( '&amp;', '&', $order->get_cancel_order_url() )
1114
+ ) : $this->failure_url
1115
+ ),
1116
+ 'pending' => ( empty( $this->pending_url ) ?
1117
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
1118
+ esc_url( $this->get_return_url( $order) )
1119
+ ) : $this->pending_url
1120
+ )
1121
+ ),
1122
+ //'marketplace' =>
1123
+ //'marketplace_fee' =>
1124
+ 'shipments' => array(
1125
+ //'cost' =>
1126
+ //'mode' =>
1127
+ 'receiver_address' => array(
1128
+ 'zip_code' => $order->shipping_postcode,
1129
+ //'street_number' =>
1130
+ 'street_name' => $order->shipping_address_1 . ' ' .
1131
+ $order->shipping_city . ' ' .
1132
+ $order->shipping_state . ' ' .
1133
+ $order->shipping_country,
1134
+ //'floor' =>
1135
+ 'apartment' => $order->shipping_address_2
1136
+ )
1137
+ ),
1138
+ 'payment_methods' => $payment_methods,
1139
+ //'notification_url' =>
1140
+ 'external_reference' => $this->invoice_prefix . $order->id
1141
+ //'additional_info' =>
1142
+ //'expires' =>
1143
+ //'expiration_date_from' =>
1144
+ //'expiration_date_to' =>
1145
+ );
1146
+ }
1147
+
1148
+ // Set Mercado Envios
1149
+ if ( strpos($selected_shipping, 'Mercado Envios' ) === 0 ) {
1150
+ $preferences['shipments']['mode'] = 'me2';
1151
+
1152
+ foreach ( $order->get_shipping_methods() as $shipping ) {
1153
+
1154
+ $preferences['shipments']['dimensions'] = $shipping['dimensions'];
1155
+ $preferences['shipments']['default_shipping_method'] = (int) $shipping['shipping_method_id'];
1156
+ $preferences['shipments']['free_methods'] = array();
1157
+
1158
+ // Get shipping method id
1159
+ $prepare_method_id = explode( ':', $shipping['method_id'] );
1160
+
1161
+ // Get instance_id
1162
+ $shipping_id = $prepare_method_id[count( $prepare_method_id ) - 1];
1163
+
1164
+ // TODO: REFACTOR
1165
+ // Get zone by instance_id
1166
+ $shipping_zone = WC_Shipping_Zones::get_zone_by( 'instance_id', $shipping_id );
1167
+
1168
+ // Get all shipping and filter by free_shipping (Mercado Envios)
1169
+ foreach ($shipping_zone->get_shipping_methods() as $key => $shipping_object) {
1170
+
1171
+ // Check is a free method
1172
+ if ($shipping_object->get_option( 'free_shipping' ) == 'yes' ) {
1173
+ // Get shipping method id (Mercado Envios)
1174
+ $shipping_method_id = $shipping_object->get_shipping_method_id( $this->site_id );
1175
+ $preferences['shipments']['free_methods'][] = array( 'id' => (int) $shipping_method_id );
1176
+ }
1177
+ }
1178
+ }
1179
+ }
1180
+
1181
+ // Do not set IPN url if it is a localhost.
1182
+ if ( ! strrpos( $this->domain, 'localhost' ) ) {
1183
+ $preferences['notification_url'] = WC_WooMercadoPago_Module::workaround_ampersand_bug(
1184
+ WC()->api_request_url( 'WC_WooMercadoPago_Gateway' )
1185
+ );
1186
+ }
1187
+
1188
+ // Set sponsor ID.
1189
+ if ( ! $this->is_test_user ) {
1190
+ $preferences['sponsor_id'] = $this->country_configs['sponsor_id'];
1191
  }
1192
+
1193
  // Auto return options.
1194
+ if ( 'yes' == $this->auto_return ) {
1195
+ $preferences['auto_return'] = 'approved';
1196
  }
1197
+
1198
+ if ( 'yes' == $this->debug ) {
1199
+ $this->log->add(
1200
+ $this->id,
1201
+ '[build_payment_preference] - preference created with following structure: ' .
1202
+ json_encode( $preferences, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE ) );
1203
  }
1204
+
1205
+ $preferences = apply_filters(
1206
+ 'woocommerce_mercadopago_module_preferences', $preferences, $order
1207
+ );
1208
+
1209
  return $preferences;
1210
  }
1211
+
1212
  // --------------------------------------------------
1213
+
1214
+ protected function create_url( $order ) {
1215
+
 
1216
  // Checks for sandbox mode.
1217
+ if ( 'yes' == $this->sandbox ) {
1218
+ $this->mp->sandbox_mode( true);
1219
+ if ( 'yes' == $this->debug ) {
1220
+ $this->log->add(
1221
+ $this->id,
1222
+ '[create_url] - sandbox mode is enabled'
1223
+ );
1224
  }
1225
  } else {
1226
+ $this->mp->sandbox_mode( false );
1227
  }
1228
+
1229
+ // Creates the order parameters by checking the cart configuration.
1230
+ $preferences = $this->build_payment_preference( $order );
1231
  // Create order preferences with Mercado Pago API request.
1232
  try {
1233
+ $checkout_info = $this->mp->create_preference( json_encode( $preferences ) );
1234
+ if ( $checkout_info['status'] < 200 || $checkout_info['status'] >= 300 ) {
1235
+ // Mercado Pago trowed an error.
1236
+ if ( 'yes' == $this->debug ) {
1237
+ $this->log->add(
1238
+ $this->id,
1239
+ '[create_url] - mercado pago gave error, payment creation failed with error: ' .
1240
+ $checkout_info['response']['message'] );
1241
+ }
1242
+ return false;
1243
+ } elseif ( is_wp_error( $checkout_info ) ) {
1244
+ // WordPress throwed an error.
1245
+ if ( 'yes' == $this->debug ) {
1246
+ $this->log->add(
1247
+ $this->id,
1248
+ '[create_url] - wordpress gave error, payment creation failed with error: ' .
1249
+ $checkout_info['response']['message'] );
1250
  }
1251
  return false;
1252
  } else {
1253
+ // Obtain the URL.
1254
+ if ( 'yes' == $this->debug ) {
1255
+ $this->log->add(
1256
+ $this->id,
1257
+ '[create_url] - payment link generated with success from mercado pago, with structure as follow: ' .
1258
+ json_encode( $checkout_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE ) );
1259
  }
1260
+ if ( 'yes' == $this->sandbox) {
1261
  return $checkout_info['response']['sandbox_init_point'];
1262
  } else {
1263
  return $checkout_info['response']['init_point'];
1264
  }
1265
  }
1266
+ } catch ( MercadoPagoException $e ) {
1267
+ // Something went wrong with the payment creation.
1268
+ if ( 'yes' == $this->debug ) {
1269
+ $this->log->add(
1270
+ $this->id,
1271
+ '[create_url] - payment creation failed with exception: ' .
1272
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1273
+ );
1274
  }
1275
  return false;
1276
  }
1277
+
1278
  }
1279
+
1280
  /*
1281
  * ========================================================================
1282
+ * AUXILIARY AND FEEDBACK METHODS (SERVER SIDE)
1283
  * ========================================================================
1284
  */
1285
 
1286
+ /**
1287
+ * Summary: Check if we have valid credentials.
1288
+ * Description: Check if we have valid credentials.
1289
+ * @return boolean true/false depending on the validation result.
1290
+ */
1291
+ public function validate_credentials() {
1292
+
1293
+ if ( empty( $this->client_id ) || empty( $this->client_secret ) )
1294
+ return false;
1295
+
1296
+ try {
1297
+
1298
+ $this->mp = new MP(
1299
+ WC_WooMercadoPago_Module::get_module_version(),
1300
+ $this->client_id,
1301
+ $this->client_secret
1302
+ );
1303
+ $access_token = $this->mp->get_access_token();
1304
+ $get_request = $this->mp->get( '/users/me?access_token=' . $access_token );
1305
+
1306
+ if ( isset( $get_request['response']['site_id'] ) ) {
1307
+
1308
+ $this->is_test_user = in_array( 'test_user', $get_request['response']['tags'] );
1309
+ $this->site_id = $get_request['response']['site_id'];
1310
+ $this->collector_id = $get_request['response']['id'];
1311
+ $this->country_configs = WC_WooMercadoPago_Module::get_country_config( $this->site_id );
1312
+ $this->payment_split_mode = $this->mp->check_two_cards();
1313
+
1314
+ $payments = $this->mp->get( '/v1/payment_methods/?access_token=' . $access_token );
1315
+ array_push( $this->payment_methods, 'n/d' );
1316
+ foreach ( $payments['response'] as $payment ) {
1317
+ array_push( $this->payment_methods, str_replace( '_', ' ', $payment['id'] ) );
1318
+ }
1319
+
1320
+ // Check for auto converstion of currency (only if it is enabled).
1321
+ $this->currency_ratio = -1;
1322
+ if ( $this->currency_conversion == 'yes' ) {
1323
+ $this->currency_ratio = WC_WooMercadoPago_Module::get_conversion_rate(
1324
+ $this->country_configs['currency']
1325
+ );
1326
+ }
1327
+
1328
  return true;
1329
+
1330
+ } else {
1331
+ $this->mp = null;
1332
  return false;
1333
  }
1334
+
1335
+ } catch ( MercadoPagoException $e ) {
1336
+ if ( 'yes' == $this->debug) {
1337
+ $this->log->add(
1338
+ $this->id,
1339
+ '[validate_credentials] - while validating credentials, got exception: ' .
1340
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1341
+ );
1342
+ }
1343
+ $this->mp = null;
1344
+ return false;
1345
  }
1346
+
1347
  return false;
1348
+
1349
+ }
1350
+
1351
+ // Build the string representing the path to the log file.
1352
+ protected function build_log_path_string() {
1353
+ return '<a href="' . esc_url( admin_url( 'admin.php?page=wc-status&tab=logs&log_file=' .
1354
+ esc_attr( $this->id ) . '-' . sanitize_file_name( wp_hash( $this->id ) ) . '.log' ) ) . '">' .
1355
+ __( 'WooCommerce &gt; System Status &gt; Logs', 'woocommerce-mercadopago-module' ) . '</a>';
1356
  }
1357
+
1358
  // Return boolean indicating if currency is supported.
1359
+ protected function is_supported_currency() {
1360
+ return get_woocommerce_currency() == $this->country_configs['currency'];
1361
  }
1362
 
1363
  // Called automatically by WooCommerce, verify if Module is available to use.
1364
  public function is_available() {
1365
+ global $woocommerce;
1366
+ // Check for recurrent product checkout.
1367
+ if ( WC_WooMercadoPago_Module::is_subscription( $woocommerce->cart->get_cart() ) ) {
1368
+ return false;
1369
+ }
1370
+ // Check if this gateway is enabled and well configured.
1371
+ $available = ( 'yes' == $this->settings['enabled'] ) &&
1372
+ ! empty( $this->client_id ) &&
1373
+ ! empty( $this->client_secret );
1374
  return $available;
1375
  }
1376
+
1377
  // Fix css for Mercado Pago in specific cases.
1378
  public function css() {
1379
+ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.1', '>=' ) ) {
1380
+ $page_id = wc_get_page_id( 'checkout' );
1381
  } else {
1382
+ $page_id = woocommerce_get_page_id( 'checkout' );
1383
  }
1384
+ if ( is_page( $page_id ) ) {
1385
+ echo '<style type="text/css">#MP-Checkout-dialog { z-index: 9999 !important; }</style>' .
1386
+ PHP_EOL;
1387
  }
1388
  }
1389
+
1390
  // Get the URL to admin page.
1391
  protected function admin_url() {
1392
+ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.1', '>=' ) ) {
1393
  return admin_url(
1394
  'admin.php?page=wc-settings&tab=checkout&section=wc_woomercadopago_gateway'
1395
  );
1400
  }
1401
 
1402
  // Notify that Client_id and/or Client_secret are not valid.
1403
+ public function client_id_or_secret_missing_message() {
 
 
 
 
 
 
 
 
 
 
 
1404
  echo '<div class="error"><p><strong>' .
1405
+ __( 'Basic Checkout is Inactive', 'woocommerce-mercadopago-module' ) .
1406
  '</strong>: ' .
1407
+ __( 'Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured.', 'woocommerce-mercadopago-module' ) .
 
 
1408
  '</p></div>';
1409
  }
1410
+
1411
+ // Display the discount in payment method title.
1412
+ public function get_payment_method_title_basic( $title, $id ) {
1413
+
1414
+ if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
1415
+ return $title;
1416
+ }
1417
+
1418
+ if ( $title != $this->title || $this->gateway_discount == 0 ) {
1419
+ return $title;
1420
+ }
1421
+
1422
+ if ( WC()->session->chosen_payment_method == 'woocommerce-mercadopago-subscription-module' ) {
1423
+ return $title;
1424
+ }
1425
+
1426
+ $total = (float) WC()->cart->subtotal;
1427
+ if ( is_numeric( $this->gateway_discount ) ) {
1428
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
1429
+ $price_percent = $this->gateway_discount / 100;
1430
+ if ( $price_percent > 0 ) {
1431
+ $title .= ' (' . __( 'Discount Of ', 'woocommerce-mercadopago-module' ) .
1432
+ strip_tags( wc_price( $total * $price_percent ) ) . ' )';
1433
+ }
1434
+ }
1435
  }
1436
+
1437
+ return $title;
1438
  }
1439
+
1440
  /*
1441
  * ========================================================================
1442
+ * IPN MECHANICS (SERVER SIDE)
1443
  * ========================================================================
1444
  */
1445
+
1446
+ /**
1447
+ * Summary: This call checks any incoming notifications from Mercado Pago server.
1448
+ * Description: This call checks any incoming notifications from Mercado Pago server.
1449
+ */
1450
  public function check_ipn_response() {
1451
+
 
 
1452
  @ob_clean();
1453
+
1454
+ if ( 'yes' == $this->debug ) {
1455
+ $this->log->add(
1456
+ $this->id,
1457
+ '[check_ipn_response] - received _get content: ' .
1458
+ json_encode( $_GET, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1459
+ );
 
 
 
 
 
1460
  }
1461
+
1462
+ // Setup sandbox mode.
1463
+ $this->mp->sandbox_mode( 'yes' == $this->sandbox );
1464
+
1465
+ // Over here, $_GET should come with this JSON structure:
1466
+ // {
1467
+ // "topic": <string>,
1468
+ // "id": <string>
1469
+ // }
1470
+ // If not, the IPN is corrupted in some way.
1471
+ $data = $_GET;
1472
+ if ( isset( $data['id'] ) && isset( $data['topic'] ) ) {
1473
+
1474
+ // We have received a normal IPN call for this gateway, start process by getting the access token...
1475
+ $access_token = array( 'access_token' => $this->mp->get_access_token() );
1476
+
1477
+ // Now, we should handle the topic type that has come...
1478
+ if ( $data['topic'] == 'merchant_order' ) {
1479
+
1480
+ // Get the merchant_order reported by the IPN.
1481
+ $merchant_order_info = $this->mp->get( '/merchant_orders/' . $data['id'], $access_token, false );
1482
+ if ( ! is_wp_error( $merchant_order_info ) && ( $merchant_order_info['status'] == 200 || $merchant_order_info['status'] == 201 ) ) {
1483
+ $payments = $merchant_order_info['response']['payments'];
1484
+ // If the payment's transaction amount is equal (or bigger) than the merchant order's amount we can release the items.
1485
+ if ( sizeof( $payments ) >= 1 ) {
1486
+ // We have payments...
1487
+ $merchant_order_info['response']['ipn_type'] = 'merchant_order';
1488
+ do_action( 'valid_mercadopago_ipn_request', $merchant_order_info['response'] );
1489
+ } else {
1490
+ // We have no payments?
1491
+ if ( 'yes' == $this->debug ) {
1492
+ $this->log->add(
1493
+ $this->id,
1494
+ '[check_ipn_response] - order received but has no payment'
1495
+ );
 
 
1496
  }
1497
+ }
1498
+ header( 'HTTP/1.1 200 OK' );
 
1499
  } else {
1500
+ if ( 'yes' == $this->debug ) {
1501
+ $this->log->add(
1502
+ $this->id,
1503
+ '[check_ipn_response] - got status not equal 200: ' .
1504
+ json_encode( $preapproval_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1505
+ );
1506
  }
 
1507
  }
1508
+
1509
+ } elseif ( $data['topic'] == 'payment' ) {
1510
+
1511
+ $payment_info = $this->mp->get( '/v1/payments/' . $data['id'], $access_token, false );
1512
+ if ( ! is_wp_error( $payment_info ) && ( $payment_info['status'] == 200 || $payment_info['status'] == 201 ) ) {
1513
+ $payments = $payment_info['response']['payments'];
1514
+ // If the payment's transaction amount is equal (or bigger) than the merchant order's amount we can release the items.
1515
+ if ( sizeof( $payments ) >= 1 ) {
1516
+ // We have payments...
1517
+ $payment_info['response']['ipn_type'] = 'payment';
1518
+ do_action( 'valid_mercadopago_ipn_request', $payment_info['response'] );
1519
+ } else {
1520
+ // We have no payments?
1521
+ if ( 'yes' == $this->debug ) {
1522
+ $this->log->add(
1523
+ $this->id,
1524
+ '[check_ipn_response] - order received but has no payment'
1525
+ );
1526
+ }
1527
+ }
1528
+ header( 'HTTP/1.1 200 OK' );
1529
+ } else {
1530
+ if ( 'yes' == $this->debug) {
1531
+ $this->log->add(
1532
+ $this->id,
1533
+ '[check_ipn_request_is_valid] - error when processing received data: ' .
1534
+ json_encode( $payment_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1535
+ );
1536
+ }
1537
+ }
1538
+
1539
+ } else {
1540
+
1541
+ // We have received an unhandled topic...
1542
+ $this->log->add(
1543
+ $this->id,
1544
+ '[check_ipn_response] - request failure, received an unhandled topic'
1545
+ );
1546
+
1547
  }
1548
+
1549
+ } elseif ( isset( $data['data_id'] ) && isset( $data['type'] ) ) {
1550
+
1551
+ // We have received a bad, however valid) IPN call for this gateway (data is set for API V1).
1552
+ // At least, we should respond 200 to notify server that we already received it.
1553
+ header( 'HTTP/1.1 200 OK' );
1554
+
1555
+ } else {
1556
+
1557
+ // Reaching here means that we received an IPN call but there are no data!
1558
+ // Just kills the processment. No IDs? No process!
1559
+ if ( 'yes' == $this->debug ) {
1560
+ $this->log->add(
1561
+ $this->id,
1562
+ '[check_ipn_response] - request failure, received ipn call with no data'
1563
+ );
1564
  }
1565
+ wp_die( __( 'Mercado Pago Request Failure', 'woocommerce-mercadopago-module' ) );
1566
+
1567
  }
1568
+
1569
  }
1570
+
1571
+ /**
1572
+ * Summary: Properly handles each case of notification, based in payment status.
1573
+ * Description: Properly handles each case of notification, based in payment status.
1574
+ */
1575
+ public function successful_request( $data ) {
1576
+
1577
+ if ( 'yes' == $this->debug ) {
1578
+ $this->log->add(
1579
+ $this->id,
1580
+ '[successful_request] - starting to process ipn update...'
1581
+ );
1582
  }
1583
+
1584
+ // Get the order and check its presence.
1585
  $order_key = $data['external_reference'];
1586
+ if ( empty( $order_key ) ) {
1587
+ return;
1588
+ }
1589
+ $id = (int) str_replace( $this->invoice_prefix, '', $order_key );
1590
+ $order = wc_get_order( $id );
1591
+
1592
+ // Check if order exists.
1593
+ if ( ! $order ) {
1594
+ return;
1595
+ }
1596
+
1597
+ // WooCommerce 3.0 or later.
1598
+ if ( method_exists( $order, 'get_id' ) ) {
1599
+ $order_id = $order->get_id();
1600
+ } else {
1601
+ $order_id = $order->id;
1602
+ }
1603
+
1604
+ // Check if we have the correct order.
1605
+ if ( $order_id !== $id ) {
1606
+ return;
1607
+ }
1608
+
1609
+ if ( 'yes' == $this->debug ) {
1610
+ $this->log->add(
1611
+ $this->id,
1612
+ '[successful_request] - updating metadata and status with data: ' .
1613
+ json_encode( $data, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1614
+ );
1615
+ }
1616
+
1617
+ // Here, we process the status... this is the business rules!
1618
+ // Reference: https://www.mercadopago.com.br/developers/en/api-docs/basic-checkout/ipn/payment-status/
1619
+ $status = 'pending';
1620
+ $statuses = array();
1621
+ $total_paid = 0.00;
1622
+ $total_refund = 0.00;
1623
+ $total = $data['shipping_cost'] + $data['total_amount'];
1624
+
1625
+ if ( sizeof( $data['payments'] ) >= 1 ) {
1626
+
1627
+ // Check each payment.
1628
+ foreach ( $data['payments'] as $payment ) {
1629
+ // Get the statuses of the payments.
1630
+ $statuses[] = $payment['status'];
1631
+ // Get the total paid amount.
1632
+ $total_paid += (float) $payment['total_paid_amount'];
1633
+ // Get the total refounded amount.
1634
+ $total_refund += (float) $payment['amount_refunded'];
1635
+ }
1636
+
1637
+ if ( in_array( 'refunded', $statuses ) && $total_paid >= $total && $total_refund > 0 ) {
1638
+ // For a payment to be refounded it is mandatory that it was totally paid in some moment.
1639
+ $status = 'refunded';
1640
+ } elseif ( in_array( 'charged_back', $statuses ) && $total_paid >= $total && $total_refund == 0 ) {
1641
+ // For a payment to be charged-back it is mandatory that it was totally paid in some moment.
1642
+ $status = 'charged_back';
1643
+ } elseif ( in_array( 'cancelled', $statuses ) && $total_refund == 0 ) {
1644
+ // For a payment to be cancelled it is mandatory that it wasn't totally paid yet.
1645
+ $status = 'cancelled';
1646
+
1647
+ // Check statuses by priority: Rejected -> In Mediation -> In Process.
1648
+ } elseif ( in_array( 'rejected', $statuses ) && $total_refund == 0 ) {
1649
+ // For a payment to be rejected it is mandatory that it wasn't totally paid yet.
1650
+ $status = 'rejected';
1651
+ } elseif ( in_array( 'in_mediation', $statuses ) && $total_paid >= $total && $total_refund == 0 ) {
1652
+ // For a payment to be in mediation it is mandatory that it was totally paid in some moment.
1653
+ $status = 'in_mediation';
1654
+ } elseif ( ! in_array( 'pending', $statuses ) && $total_paid >= $total && $total_refund == 0 ) {
1655
+ // For a payment to be approved it is mandatory that it was totally paid in some moment and there is no pendences.
1656
+ $status = 'approved';
1657
+ } else {
1658
+ // Any other cases means that the payment is still pending.
1659
+ $status = 'pending';
1660
+ }
1661
+
1662
+ }
1663
+
1664
+ // WooCommerce 3.0 or later.
1665
+ if ( method_exists( $order, 'update_meta_data' ) ) {
1666
+ // Updates the type of gateway.
1667
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPagoCustom_Gateway' );
1668
+
1669
+ if ( ! empty( $data['payer']['email'] ) ) {
1670
+ $order->update_meta_data( __( 'Payer email', 'woocommerce-mercadopago-module' ), $data['payer']['email'] );
1671
+ }
1672
+ if ( ! empty( $data['payment_type'] ) ) {
1673
+ $order->update_meta_data( __( 'Payment type', 'woocommerce-mercadopago-module' ), $data['payment_type'] );
1674
+ }
1675
+ if ( ! empty( $data['payments'] ) ) {
1676
+ $payment_ids = array();
1677
+ foreach ( $data['payments'] as $payment ) {
1678
+ $payment_ids[] = $payment['id'];
1679
+ $order->update_meta_data( 'Mercado Pago - Payment ' . $payment['id'],
1680
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $payment['date_created'] ) ) .
1681
+ ']/[Amount ' . $payment['transaction_amount'] .
1682
+ ']/[Paid ' . $payment['total_paid_amount'] .
1683
+ ']/[Refund ' . $payment['amount_refunded'] . ']'
1684
  );
1685
  }
1686
+ if ( sizeof( $payment_ids ) > 0 ) {
1687
+ $order->update_meta_data( '_Mercado_Pago_Payment_IDs', implode( ', ', $payment_ids ) );
1688
+ }
1689
+ }
1690
+
1691
+ $order->save();
1692
+ } else {
1693
+ // Updates the type of gateway.
1694
+ update_post_meta( $order->id, '_used_gateway', 'WC_WooMercadoPago_Gateway' );
1695
+
1696
+ if ( ! empty( $data['payer']['email'] ) ) {
1697
+ update_post_meta(
1698
+ $order_id,
1699
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1700
+ $data['payer']['email']
1701
+ );
1702
+ }
1703
+ if ( ! empty( $data['payment_type'] ) ) {
1704
+ update_post_meta(
1705
+ $order_id,
1706
+ __( 'Payment type', 'woocommerce-mercadopago-module' ),
1707
+ $data['payment_type']
1708
+ );
1709
+ }
1710
+ if ( ! empty( $data['payments'] ) ) {
1711
+ $payment_ids = array();
1712
+ foreach ( $data['payments'] as $payment ) {
1713
+ $payment_ids[] = $payment['id'];
1714
  update_post_meta(
1715
  $order_id,
1716
+ 'Mercado Pago - Payment ' . $payment['id'],
1717
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $payment['date_created'] ) ) .
1718
+ ']/[Amount ' . $payment['transaction_amount'] .
1719
+ ']/[Paid ' . $payment['total_paid_amount'] .
1720
+ ']/[Refund ' . $payment['amount_refunded'] . ']'
1721
  );
1722
  }
1723
+ if ( sizeof( $payment_ids ) > 0 ) {
1724
  update_post_meta(
1725
  $order_id,
1726
+ '_Mercado_Pago_Payment_IDs',
1727
+ implode( ', ', $payment_ids )
1728
  );
1729
  }
1730
+ }
1731
+ }
1732
+
1733
+ // Switch the status and update in WooCommerce.
1734
+ switch ( $status ) {
1735
+ case 'approved':
1736
+ $order->add_order_note(
1737
+ 'Mercado Pago: ' .
1738
+ __( 'Payment approved.', 'woocommerce-mercadopago-module' )
1739
+ );
1740
+ $order->payment_complete();
1741
+ break;
1742
+ case 'pending':
1743
+ $order->add_order_note(
1744
+ 'Mercado Pago: ' .
1745
+ __( 'Customer haven\'t paid yet.', 'woocommerce-mercadopago-module' )
1746
+ );
1747
+ break;
1748
+ case 'in_process':
1749
+ $order->update_status(
1750
+ 'on-hold',
1751
+ 'Mercado Pago: ' .
1752
+ __( 'Payment under review.', 'woocommerce-mercadopago-module' )
1753
+ );
1754
+ break;
1755
+ case 'rejected':
1756
+ $order->update_status(
1757
+ 'failed',
1758
+ 'Mercado Pago: ' .
1759
+ __( 'The payment was refused. The customer can try again.', 'woocommerce-mercadopago-module' )
1760
+ );
1761
+ break;
1762
+ case 'refunded':
1763
+ $order->update_status(
1764
+ 'refunded',
1765
+ 'Mercado Pago: ' .
1766
+ __( 'The payment was refunded to the customer.', 'woocommerce-mercadopago-module' )
1767
+ );
1768
+ break;
1769
+ case 'cancelled':
1770
+ $order->update_status(
1771
+ 'cancelled',
1772
+ 'Mercado Pago: ' .
1773
+ __( 'The payment was cancelled.', 'woocommerce-mercadopago-module' )
1774
+ );
1775
+ break;
1776
+ case 'in_mediation':
1777
+ $order->add_order_note(
1778
+ 'Mercado Pago: ' .
1779
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1780
+ );
1781
+ break;
1782
+ case 'charged-back':
1783
+ $order->add_order_note(
1784
+ 'Mercado Pago: ' .
1785
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1786
+ );
1787
+ break;
1788
+ default:
1789
+ break;
1790
+ }
1791
+
1792
+ $this->check_mercado_envios( $data );
1793
+
1794
+ }
1795
+
1796
+ /**
1797
+ * Summary: Check IPN data and updates Mercado Envios tag and informaitons.
1798
+ * Description: Check IPN data and updates Mercado Envios tag and informaitons.
1799
+ */
1800
+ public function check_mercado_envios( $merchant_order ) {
1801
+
1802
+ $order_key = $merchant_order['external_reference'];
1803
+
1804
+ if ( ! empty( $order_key ) ) {
1805
+ $order_id = (int) str_replace( $this->invoice_prefix, '', $order_key );
1806
+ $order = wc_get_order( $order_id );
1807
+
1808
+ if ( count( $merchant_order['shipments'] ) > 0 ){
1809
+ foreach ( $merchant_order['shipments'] as $shipment ) {
1810
+
1811
+ $shipment_id = $shipment['id'];
1812
+
1813
+ // Get shipping data on merchant_order.
1814
+ $shipment_name = $shipment['shipping_option']['name'];
1815
+ $shipment_cost = $shipment['shipping_option']['cost'];
1816
+ $shipping_method_id = $shipment['shipping_option']['shipping_method_id'];
1817
+
1818
+ // Get data shipping selected on checkout.
1819
+ $shipping_meta = $order->get_items( 'shipping' );
1820
+ $order_item_shipping_id = null;
1821
+ $method_id = null;
1822
+ foreach ( $shipping_meta as $key => $shipping ) {
1823
+ $order_item_shipping_id = $key;
1824
+ $method_id = $shipping['method_id'];
1825
  }
1826
+
1827
+ $free_shipping_text = '';
1828
+ $free_shipping_status = 'no';
1829
+ if ( $shipment_cost == 0 ) {
1830
+ $free_shipping_status = 'yes';
1831
+ $free_shipping_text = ' (' . __( 'Free Shipping', 'woocommerce' ) . ')';
1832
  }
1833
+
1834
+ // WooCommerce 3.0 or later.
1835
+ if ( method_exists( $order, 'get_id' ) ) {
1836
+ $shipping_item = $order->get_item( $order_item_shipping_id );
1837
+ $item->set_order_id( $order->get_id() );
1838
+
1839
+ // Update shipping cost and method title.
1840
+ $item->set_props( array(
1841
+ 'method_title' => 'Mercado Envios - ' . $shipment_name . $free_shipping_text,
1842
+ 'method_id' => $method_id,
1843
+ 'total' => wc_format_decimal( $shipment_cost ),
1844
+ ) );
1845
+ $item->save();
1846
+ $this->calculate_shipping();
1847
+ } else {
1848
+ // Update shipping cost and method title.
1849
+ $r = $order->update_shipping( $order_item_shipping_id, array(
1850
+ 'method_title' => 'Mercado Envios - ' . $shipment_name . $free_shipping_text,
1851
+ 'method_id' => $method_id,
1852
+ 'cost' => wc_format_decimal( $shipment_cost )
1853
+ ) );
1854
+ }
1855
+
1856
+ // WTF?
1857
+ // https://docs.woocommerce.com/wc-apidocs/source-class-WC_Abstract_Order.html#541
1858
+ // FORCE UPDATE SHIPPING
1859
+ $order->set_total( wc_format_decimal( $shipment_cost ) , 'shipping' );
1860
+
1861
+ // Update total order.
1862
+ $order->set_total(
1863
+ wc_format_decimal($order->get_subtotal())
1864
+ + wc_format_decimal($order->get_total_shipping())
1865
+ + wc_format_decimal($order->get_total_tax())
1866
+ - wc_format_decimal($order->get_total_discount())
1867
+ );
1868
+
1869
+ // Update additional info.
1870
+ wc_update_order_item_meta( $order_item_shipping_id, 'shipping_method_id', $shipping_method_id );
1871
+ wc_update_order_item_meta( $order_item_shipping_id, 'free_shipping', $free_shipping_status );
1872
+
1873
+ $access_token = $this->mp->get_access_token();
1874
+ $request = array(
1875
+ 'uri' => '/shipments/' . $shipment_id,
1876
+ 'params' => array(
1877
+ 'access_token' => $access_token
1878
+ )
1879
+ );
1880
+
1881
+ $shipments_data = MeliRestClient::get( $request, '' );
1882
+
1883
+ switch ( $shipments_data['response']['substatus'] ) {
1884
+
1885
+ case 'ready_to_print':
1886
+ $substatus_description = __( 'Tag ready to print', 'woocommerce-mercadopago-module' );
1887
+ break;
1888
+ case 'printed':
1889
+ $substatus_description = __( 'Tag printed', 'woocommerce-mercadopago-module' );
1890
+ break;
1891
+ case 'stale':
1892
+ $substatus_description = __( 'Unsuccessful', 'woocommerce-mercadopago-module' );
1893
+ break;
1894
+ case 'delayed':
1895
+ $substatus_description = __( 'Delayed shipping', 'woocommerce-mercadopago-module' );
1896
+ break;
1897
+ case 'receiver_absent':
1898
+ $substatus_description = __( 'Missing recipient for delivery', 'woocommerce-mercadopago-module' );
1899
+ break;
1900
+ case 'returning_to_sender':
1901
+ $substatus_description = __( 'In return to sender', 'woocommerce-mercadopago-module' );
1902
+ break;
1903
+ case 'claimed_me':
1904
+ $substatus_description = __( 'Buyer initiates complaint and requested a refund.', 'woocommerce-mercadopago-module' );
1905
+ break;
1906
+ default:
1907
+ $substatus_description = $shipments_data['response']['substatus'];
1908
+ break;
1909
+ }
1910
+
1911
+ if ( $substatus_description == '' ) {
1912
+ $substatus_description = $shipments_data['response']['status'];
1913
+ }
1914
+
1915
+ $order->add_order_note( 'Mercado Envios: ' . $substatus_description );
1916
+
1917
+ $this->log->add(
1918
+ $this->id,
1919
+ '[check_mercado_envios] - Mercado Envios - Status : ' .
1920
+ $shipments_data['response']['status'] . ' - substatus : ' . $substatus_description
1921
+ );
1922
+
1923
+ // Add tracking number in meta data to use in order page.
1924
+ update_post_meta( $order_id, '_mercadoenvios_tracking_number', $shipments_data['response']['tracking_number']);
1925
+ // Add shipiment_id in meta data to use in order page.
1926
+ update_post_meta( $order_id, '_mercadoenvios_shipment_id', $shipment_id);
1927
+ // Add status in meta data to use in order page.
1928
+ update_post_meta( $order_id, '_mercadoenvios_status', $shipments_data['response']['status']);
1929
+ // Add substatus in meta data to use in order page.
1930
+ update_post_meta( $order_id, '_mercadoenvios_substatus', $shipments_data['response']['substatus']);
1931
+
1932
  }
1933
+
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1934
  }
1935
  }
1936
+
1937
  }
1938
+
1939
  }
mercadopago/mercadopago-subscription-gateway.php ADDED
@@ -0,0 +1,1421 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // Mercado Pago fields.
24
+ $this->mp = null;
25
+ $this->site_id = null;
26
+ $this->currency_ratio = -1;
27
+ $this->is_test_user = false;
28
+
29
+ // Auxiliary fields.
30
+ $this->currency_message = '';
31
+ $this->payment_methods = array();
32
+ $this->country_configs = array();
33
+
34
+ // WooCommerce fields.
35
+ //$this->supports = array( 'products', 'refunds' );
36
+ $this->id = 'woocommerce-mercadopago-subscription-module';
37
+ $this->domain = get_site_url() . '/index.php';
38
+ $this->method_title = __( 'Mercado Pago - Subscription', 'woocommerce-mercadopago-module' );
39
+ $this->method_description = '<img width="200" height="52" src="' .
40
+ plugins_url(
41
+ 'images/mplogo.png',
42
+ plugin_dir_path( __FILE__ )
43
+ ) . '"><br><br>' . '<strong>' .
44
+ __( 'This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store.', 'woocommerce-mercadopago-module' ) .
45
+ '</strong>';
46
+
47
+ // Fields used in Mercado Pago Module configuration page.
48
+ $this->client_id = $this->get_option( 'client_id' );
49
+ $this->client_secret = $this->get_option( 'client_secret' );
50
+ $this->title = $this->get_option( 'title' );
51
+ $this->description = $this->get_option( 'description' );
52
+ $this->invoice_prefix = $this->get_option( 'invoice_prefix', 'WC-' );
53
+ $this->method = $this->get_option( 'method', 'iframe' );
54
+ $this->iframe_width = $this->get_option( 'iframe_width', 640 );
55
+ $this->iframe_height = $this->get_option( 'iframe_height', 800 );
56
+ $this->success_url = $this->get_option( 'success_url', '' );
57
+ $this->currency_conversion = $this->get_option( 'currency_conversion', false );
58
+ $this->gateway_discount = 0;
59
+ $this->debug = $this->get_option( 'debug' );
60
+
61
+ // Logging and debug.
62
+ if ( 'yes' == $this->debug ) {
63
+ if ( class_exists( 'WC_Logger' ) ) {
64
+ $this->log = new WC_Logger();
65
+ } else {
66
+ $this->log = WC_MercadoPago_Module::woocommerce_instance()->logger();
67
+ }
68
+ }
69
+
70
+ // Render our configuration page and init/load fields.
71
+ $this->init_form_fields();
72
+ $this->init_settings();
73
+
74
+ // Used by IPN to receive IPN incomings.
75
+ add_action(
76
+ 'woocommerce_api_wc_woomercadopagosubscription_gateway',
77
+ array( $this, 'check_ipn_response' )
78
+ );
79
+ // Used by IPN to process valid incomings.
80
+ add_action(
81
+ 'valid_mercadopagosubscription_ipn_request',
82
+ array( $this, 'successful_request' )
83
+ );
84
+ // process the cancel order meta box order action
85
+ add_action(
86
+ 'woocommerce_order_action_cancel_order',
87
+ array( $this, 'process_cancel_order_meta_box_actions' )
88
+ );
89
+ // Used by WordPress to render the custom checkout page.
90
+ add_action(
91
+ 'woocommerce_receipt_' . $this->id,
92
+ array( $this, 'receipt_page' )
93
+ );
94
+ // Used to fix CSS in some older WordPress/WooCommerce versions.
95
+ add_action(
96
+ 'wp_head',
97
+ array( $this, 'css' )
98
+ );
99
+ // Used in settings page to hook "save settings" action.
100
+ add_action(
101
+ 'woocommerce_update_options_payment_gateways_' . $this->id,
102
+ array( $this, 'process_admin_options' )
103
+ );
104
+ // Scripts for order configuration.
105
+ add_action(
106
+ 'woocommerce_after_checkout_form',
107
+ array( $this, 'add_checkout_script' )
108
+ );
109
+ // Display discount in payment method title.
110
+ add_filter(
111
+ 'woocommerce_gateway_title',
112
+ array( $this, 'get_payment_method_title_subscription' ), 10, 2
113
+ );
114
+ // Checkout updates.
115
+ add_action(
116
+ 'woocommerce_thankyou',
117
+ array( $this, 'update_checkout_status' )
118
+ );
119
+
120
+ // Verify if client_id or client_secret is empty.
121
+ if ( empty( $this->client_id ) || empty( $this->client_secret ) ) {
122
+ if ( ! empty( $this->settings['enabled'] ) && 'yes' == $this->settings['enabled'] ) {
123
+ add_action( 'admin_notices', array( $this, 'client_id_or_secret_missing_message' ) );
124
+ }
125
+ }
126
+
127
+ }
128
+
129
+ /**
130
+ * Summary: Initialise Gateway Settings Form Fields.
131
+ * Description: Initialise Gateway settings form fields with a customized page.
132
+ */
133
+ public function init_form_fields() {
134
+
135
+ // If module is disabled, we do not need to load and process the settings page.
136
+ if ( empty( $this->settings['enabled'] ) || 'no' == $this->settings['enabled'] ) {
137
+ $this->form_fields = array(
138
+ 'enabled' => array(
139
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
140
+ 'type' => 'checkbox',
141
+ 'label' => __( 'Enable Subscription', 'woocommerce-mercadopago-module' ),
142
+ 'default' => 'no'
143
+ )
144
+ );
145
+ return;
146
+ }
147
+
148
+ $api_secret_locale = sprintf(
149
+ '<a href="https://www.mercadopago.com/mla/account/credentials?type=basic" target="_blank">%s</a>, ' .
150
+ '<a href="https://www.mercadopago.com/mlb/account/credentials?type=basic" target="_blank">%s</a> %s ' .
151
+ '<a href="https://www.mercadopago.com/mlm/account/credentials?type=basic" target="_blank">%s</a>, ',
152
+ __( 'Argentine', 'woocommerce-mercadopago-module' ),
153
+ __( 'Brazil', 'woocommerce-mercadopago-module' ),
154
+ __( 'or', 'woocommerce-mercadopago-module' ),
155
+ __( 'Mexico', 'woocommerce-mercadopago-module' )
156
+ );
157
+
158
+ $ipn_locale = sprintf(
159
+ '<a href="https://www.mercadopago.com.ar/ipn-notifications" target="_blank">%s</a>, ' .
160
+ '<a href="https://www.mercadopago.com.br/ipn-notifications" target="_blank">%s</a> %s ' .
161
+ '<a href="https://www.mercadopago.com.mx/ipn-notifications" target="_blank">%s</a>, ',
162
+ __( 'Argentine', 'woocommerce-mercadopago-module' ),
163
+ __( 'Brazil', 'woocommerce-mercadopago-module' ),
164
+ __( 'or', 'woocommerce-mercadopago-module' ),
165
+ __( 'Mexico', 'woocommerce-mercadopago-module' )
166
+ );
167
+
168
+ // Trigger API to get payment methods and site_id, also validates Client_id/Client_secret.
169
+ if ( $this->validate_credentials() ) {
170
+ // Checking the currency.
171
+ $this->currency_message = '';
172
+ if ( ! $this->is_supported_currency() && 'yes' == $this->settings['enabled'] ) {
173
+ if ( $this->currency_conversion == 'no' ) {
174
+ $this->currency_ratio = -1;
175
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_not_converted_msg(
176
+ $this->country_configs['currency'],
177
+ $this->country_configs['country_name']
178
+ );
179
+ } elseif ( $this->currency_conversion == 'yes' && $this->currency_ratio != -1) {
180
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_converted_msg(
181
+ $this->country_configs['currency'],
182
+ $this->currency_ratio
183
+ );
184
+ } else {
185
+ $this->currency_ratio = -1;
186
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_conversion_err_msg(
187
+ $this->country_configs['currency']
188
+ );
189
+ }
190
+ } else {
191
+ $this->currency_ratio = -1;
192
+ }
193
+ $this->credentials_message = WC_WooMercadoPago_Module::build_valid_credentials_msg(
194
+ $this->country_configs['country_name'],
195
+ $this->site_id
196
+ );
197
+ } else {
198
+ array_push( $this->payment_methods, 'n/d' );
199
+ $this->credentials_message = WC_WooMercadoPago_Module::build_invalid_credentials_msg();
200
+ }
201
+
202
+ // Checks validity of iFrame width/height fields.
203
+ if ( ! is_numeric( $this->iframe_width ) ) {
204
+ $this->iframe_width_desc = '<img width="12" height="12" src="' .
205
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
206
+ __( 'This field should be an integer.', 'woocommerce-mercadopago-module' );
207
+ } else {
208
+ $this->iframe_width_desc =
209
+ __( 'If your integration method is iFrame, please inform the payment iFrame width.', 'woocommerce-mercadopago-module' );
210
+ }
211
+ if ( ! is_numeric( $this->iframe_height ) ) {
212
+ $this->iframe_height_desc = '<img width="12" height="12" src="' .
213
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
214
+ __( 'This field should be an integer.', 'woocommerce-mercadopago-module' );
215
+ } else {
216
+ $this->iframe_height_desc =
217
+ __( 'If your integration method is iFrame, please inform the payment iFrame height.', 'woocommerce-mercadopago-module' );
218
+ }
219
+
220
+ // This array draws each UI (text, selector, checkbox, label, etc).
221
+ $this->form_fields = array(
222
+ 'enabled' => array(
223
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
224
+ 'type' => 'checkbox',
225
+ 'label' => __( 'Enable Subscription', 'woocommerce-mercadopago-module' ),
226
+ 'default' => 'no'
227
+ ),
228
+ 'credentials_title' => array(
229
+ 'title' => __( 'Mercado Pago Credentials', 'woocommerce-mercadopago-module' ),
230
+ 'type' => 'title',
231
+ 'description' => sprintf( '%s', $this->credentials_message ) . '<br>' . sprintf(
232
+ __( 'You can obtain your credentials for', 'woocommerce-mercadopago-module' ) .
233
+ ' %s.', $api_secret_locale
234
+ )
235
+ ),
236
+ 'client_id' => array(
237
+ 'title' => 'Client_id',
238
+ 'type' => 'text',
239
+ 'description' =>
240
+ __( 'Insert your Mercado Pago Client_id.', 'woocommerce-mercadopago-module' ),
241
+ 'default' => '',
242
+ 'required' => true
243
+ ),
244
+ 'client_secret' => array(
245
+ 'title' => 'Client_secret',
246
+ 'type' => 'text',
247
+ 'description' =>
248
+ __( 'Insert your Mercado Pago Client_secret.', 'woocommerce-mercadopago-module' ),
249
+ 'default' => '',
250
+ 'required' => true
251
+ ),
252
+ 'ipn_url' => array(
253
+ 'title' =>
254
+ __( 'Instant Payment Notification (IPN) URL', 'woocommerce-mercadopago-module' ),
255
+ 'type' => 'title',
256
+ 'description' => sprintf(
257
+ __( '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' ) .
258
+ '<br>' . ' %s.', $ipn_locale . '. ' . sprintf(
259
+ __( 'Your IPN URL to receive instant payment notifications is', 'woocommerce-mercadopago-module' ) .
260
+ ':<br>%s', '<code>' . WC()->api_request_url( 'WC_WooMercadoPagoSubscription_Gateway' ) . '</code>' )
261
+ )
262
+ ),
263
+ 'checkout_options_title' => array(
264
+ 'title' => __( 'Checkout Options', 'woocommerce-mercadopago-module' ),
265
+ 'type' => 'title',
266
+ 'description' => ''
267
+ ),
268
+ 'title' => array(
269
+ 'title' => __( 'Title', 'woocommerce-mercadopago-module' ),
270
+ 'type' => 'text',
271
+ 'description' =>
272
+ __( 'Title shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
273
+ 'default' => __( 'Mercado Pago', 'woocommerce-mercadopago-module' )
274
+ ),
275
+ 'description' => array(
276
+ 'title' => __( 'Description', 'woocommerce-mercadopago-module' ),
277
+ 'type' => 'textarea',
278
+ 'description' =>
279
+ __( 'Description shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
280
+ 'default' => __( 'Subscribe with Mercado Pago', 'woocommerce-mercadopago-module' )
281
+ ),
282
+ 'invoice_prefix' => array(
283
+ 'title' => __( 'Store Identificator', 'woocommerce-mercadopago-module' ),
284
+ 'type' => 'text',
285
+ 'description' =>
286
+ __( 'Please, inform a prefix to your store.', 'woocommerce-mercadopago-module' )
287
+ . ' ' .
288
+ __( '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' ),
289
+ 'default' => 'WC-'
290
+ ),
291
+ 'method' => array(
292
+ 'title' => __( 'Integration Method', 'woocommerce-mercadopago-module' ),
293
+ 'type' => 'select',
294
+ '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' ),
295
+ 'default' => 'iframe',
296
+ 'options' => array(
297
+ 'iframe' => __( 'iFrame', 'woocommerce-mercadopago-module' ),
298
+ 'modal' => __( 'Modal Window', 'woocommerce-mercadopago-module' ),
299
+ 'redirect' => __( 'Redirect', 'woocommerce-mercadopago-module' )
300
+ )
301
+ ),
302
+ 'iframe_width' => array(
303
+ 'title' => __( 'iFrame Width', 'woocommerce-mercadopago-module' ),
304
+ 'type' => 'text',
305
+ 'description' => $this->iframe_width_desc,
306
+ 'default' => '640'
307
+ ),
308
+ 'iframe_height' => array(
309
+ 'title' => __( 'iFrame Height', 'woocommerce-mercadopago-module' ),
310
+ 'type' => 'text',
311
+ 'description' => $this->iframe_height_desc,
312
+ 'default' => '800'
313
+ ),
314
+ 'back_url_title' => array(
315
+ 'title' => __( 'Back URL Options', 'woocommerce-mercadopago-module' ),
316
+ 'type' => 'title',
317
+ 'description' => ''
318
+ ),
319
+ 'success_url' => array(
320
+ 'title' => __( 'Sucess URL', 'woocommerce-mercadopago-module' ),
321
+ 'type' => 'text',
322
+ 'description' => __( 'Where customers should be redirected after a successful purchase. Let blank to redirect to the default store order resume page.', 'woocommerce-mercadopago-module' ),
323
+ 'default' => ''
324
+ ),
325
+ 'payment_title' => array(
326
+ 'title' => __( 'Payment Options', 'woocommerce-mercadopago-module' ),
327
+ 'type' => 'title',
328
+ 'description' => ''
329
+ ),
330
+ 'currency_conversion' => array(
331
+ 'title' => __( 'Currency Conversion', 'woocommerce-mercadopago-module' ),
332
+ 'type' => 'checkbox',
333
+ 'label' =>
334
+ __( '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' ),
335
+ 'default' => 'no',
336
+ 'description' => sprintf( '%s', $this->currency_message )
337
+ ),
338
+ 'testing' => array(
339
+ 'title' => __( 'Test and Debug Options', 'woocommerce-mercadopago-module' ),
340
+ 'type' => 'title',
341
+ 'description' => ''
342
+ ),
343
+ 'debug' => array(
344
+ 'title' => __( 'Debug and Log', 'woocommerce-mercadopago-module' ),
345
+ 'type' => 'checkbox',
346
+ 'label' => __( 'Enable log', 'woocommerce-mercadopago-module' ),
347
+ 'default' => 'no',
348
+ 'description' => sprintf(
349
+ __( 'Register event logs of Mercado Pago, such as API requests, in the file', 'woocommerce-mercadopago-module' ) .
350
+ ' %s.', $this->build_log_path_string() . '.<br>' .
351
+ __( 'File location: ', 'woocommerce-mercadopago-module' ) .
352
+ '<code>wordpress/wp-content/uploads/wc-logs/' . $this->id . '-' .
353
+ sanitize_file_name( wp_hash( $this->id) ) . '.log</code>' )
354
+ )
355
+ );
356
+
357
+ }
358
+
359
+ /**
360
+ * Processes and saves options.
361
+ * If there is an error thrown, will continue to save and validate fields, but will leave the
362
+ * erroring field out.
363
+ * @return bool was anything saved?
364
+ */
365
+ public function custom_process_admin_options() {
366
+ $this->init_settings();
367
+
368
+ if ( ! empty( $this->settings['client_id'] ) && ! empty( $this->settings['client_secret'] ) ) {
369
+ $this->mp = new MP(
370
+ WC_WooMercadoPago_Module::get_module_version(),
371
+ $this->settings['client_id'],
372
+ $this->settings['client_secret']
373
+ );
374
+ } else {
375
+ $this->mp = null;
376
+ }
377
+
378
+ // analytics
379
+ if ( $this->mp != null ) {
380
+ $infra_data = WC_WooMercadoPago_Module::get_common_settings();
381
+ $infra_data['checkout_subscription'] = ( $this->settings['enabled'] == 'yes' ? 'true' : 'false' );
382
+ $response = $this->mp->analytics_save_settings( $infra_data );
383
+ if ( 'yes' == $this->debug) {
384
+ $this->log->add(
385
+ $this->id,
386
+ '[custom_process_admin_options] - analytics response: ' .
387
+ json_encode( $response, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
388
+ );
389
+ }
390
+ }
391
+
392
+ return update_option(
393
+ $this->get_option_key(),
394
+ apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->settings )
395
+ );
396
+ }
397
+
398
+ /**
399
+ * Handles the manual order cancellation in server-side.
400
+ */
401
+ public function process_cancel_order_meta_box_actions( $order ) {
402
+ // WooCommerce 3.0 or later.
403
+ if ( method_exists( $order, 'get_meta' ) ) {
404
+ $used_gateway = $order->get_meta( '_used_gateway' );
405
+ $preapproval = $order->get_meta( 'Mercado Pago Pre-Approval' );
406
+ } else {
407
+ $used_gateway = get_post_meta( $order->id, '_used_gateway', true );
408
+ $preapproval = get_post_meta( $order->id, 'Mercado Pago Pre-Approval', true );
409
+ }
410
+
411
+ if ( $used_gateway != 'WC_WooMercadoPagoSubscription_Gateway' ) {
412
+ return;
413
+ }
414
+
415
+ $preapproval = explode( '/', $preapproval );
416
+ $preapproval_id = explode( ' ', substr( $preapproval[0], 1, -1 ) )[1];
417
+
418
+ if ( 'yes' == $this->debug ) {
419
+ $this->log->add(
420
+ $this->id,
421
+ '[process_cancel_order_meta_box_actions] - cancelling preapproval for ' . $preapproval_id
422
+ );
423
+ }
424
+
425
+ if ( $this->mp != null && ! empty( $preapproval_id ) ) {
426
+ $response = $this->mp->cancel_preapproval_payment( $preapproval_id );
427
+ $message = $response['response']['message'];
428
+ $status = $response['status'];
429
+ if ( 'yes' == $this->debug ) {
430
+ $this->log->add(
431
+ $this->id,
432
+ '[process_cancel_order_meta_box_actions] - cancel preapproval of id ' . $preapproval_id .
433
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
434
+ );
435
+ }
436
+ } else {
437
+ if ( 'yes' == $this->debug ) {
438
+ $this->log->add(
439
+ $this->id,
440
+ '[process_cancel_order_meta_box_actions] - no preapproval or credentials invalid'
441
+ );
442
+ }
443
+ }
444
+
445
+ }
446
+
447
+ /*
448
+ * ========================================================================
449
+ * CHECKOUT BUSINESS RULES (CLIENT SIDE)
450
+ * ========================================================================
451
+ */
452
+
453
+ public function payment_fields() {
454
+ // subscription checkout
455
+ if ( $description = $this->get_description() ) {
456
+ echo wpautop(wptexturize( $description ) );
457
+ }
458
+ if ( $this->supports( 'default_credit_card_form' ) ) {
459
+ $this->credit_card_form();
460
+ }
461
+ }
462
+
463
+ public function add_checkout_script() {
464
+
465
+ $w = WC_WooMercadoPago_Module::woocommerce_instance();
466
+ $logged_user_email = null;
467
+ $payments = array();
468
+ $gateways = WC()->payment_gateways->get_available_payment_gateways();
469
+ foreach ( $gateways as $g ) {
470
+ $payments[] = $g->id;
471
+ }
472
+ $payments = str_replace( '-', '_', implode( ', ', $payments ) );
473
+
474
+ if ( wp_get_current_user()->ID != 0 ) {
475
+ $logged_user_email = wp_get_current_user()->user_email;
476
+ }
477
+
478
+ ?>
479
+ <script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
480
+ <script type="text/javascript">
481
+ var MA = ModuleAnalytics;
482
+ MA.setToken( '<?php echo $this->get_option( 'client_id' ); ?>' );
483
+ MA.setPlatform( 'WooCommerce' );
484
+ MA.setPlatformVersion( '<?php echo $w->version; ?>' );
485
+ MA.setModuleVersion( '<?php echo WC_WooMercadoPago_Module::VERSION; ?>' );
486
+ MA.setPayerEmail( '<?php echo ( $logged_user_email != null ? $logged_user_email : "" ); ?>' );
487
+ MA.setUserLogged( <?php echo ( empty( $logged_user_email ) ? 0 : 1 ); ?> );
488
+ MA.setInstalledModules( '<?php echo $payments; ?>' );
489
+ MA.post();
490
+ </script>
491
+ <?php
492
+
493
+ }
494
+
495
+ public function update_checkout_status( $order_id ) {
496
+
497
+ if ( get_post_meta( $order_id, '_used_gateway', true ) != 'WC_WooMercadoPagoSubscription_Gateway' )
498
+ return;
499
+
500
+ if ( 'yes' == $this->debug ) {
501
+ $this->log->add(
502
+ $this->id,
503
+ '[update_checkout_status] - updating checkout statuses ' . $order_id
504
+ );
505
+ }
506
+
507
+ echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
508
+ <script type="text/javascript">
509
+ var MA = ModuleAnalytics;
510
+ MA.setToken( ' . $this->get_option( 'client_id' ) . ' );
511
+ MA.setPaymentType("subscription");
512
+ MA.setCheckoutType("subscription");
513
+ MA.put();
514
+ </script>';
515
+
516
+ }
517
+
518
+ /**
519
+ * Summary: Handle the payment and processing the order.
520
+ * Description: First step occurs when the customer selects Mercado Pago and proceed to checkout.
521
+ * This method verify which integration method was selected and makes the build for the checkout
522
+ * URL.
523
+ * @return an array containing the result of the processment and the URL to redirect.
524
+ */
525
+ public function process_payment( $order_id ) {
526
+ $order = wc_get_order( $order_id );
527
+
528
+ // WooCommerce 3.0 or later.
529
+ if ( method_exists( $order, 'update_meta_data' ) ) {
530
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPagoSubscription_Gateway' );
531
+ $order->save();
532
+ } else {
533
+ update_post_meta( $order_id, '_used_gateway', 'WC_WooMercadoPagoSubscription_Gateway' );
534
+ }
535
+
536
+ if ( 'redirect' == $this->method ) {
537
+ // The checkout is made by redirecting customer to Mercado Pago.
538
+ if ( 'yes' == $this->debug) {
539
+ $this->log->add(
540
+ $this->id,
541
+ '[process_payment] - customer being redirected to Mercado Pago.'
542
+ );
543
+ }
544
+ return array(
545
+ 'result' => 'success',
546
+ 'redirect' => $this->create_url( $order )
547
+ );
548
+ } elseif ( 'modal' == $this->method || 'iframe' == $this->method ) {
549
+ // The checkout is made by customizing the view, either by iframe or showing a modal.
550
+ if ( 'yes' == $this->debug ) {
551
+ $this->log->add(
552
+ $this->id,
553
+ '[process_payment] - preparing to render Mercado Pago checkout view.'
554
+ );
555
+ }
556
+ return array(
557
+ 'result' => 'success',
558
+ 'redirect' => $order->get_checkout_payment_url( true )
559
+ );
560
+ }
561
+ }
562
+
563
+ /**
564
+ * Summary: Show the custom renderization for the checkout.
565
+ * Description: Order page and this generates the form that shows the pay button. This step
566
+ * generates the form to proceed to checkout.
567
+ * @return the html to be rendered.
568
+ */
569
+ public function receipt_page( $order ) {
570
+ echo $this->render_order_form( $order );
571
+ }
572
+
573
+ // --------------------------------------------------
574
+
575
+ public function render_order_form( $order_id ) {
576
+
577
+ $order = wc_get_order( $order_id );
578
+ $url = $this->create_url( $order );
579
+
580
+ if ( $url ) {
581
+ $html =
582
+ '<img width="468" height="60" src="' . $this->country_configs['checkout_banner'] . '">';
583
+ if ( 'modal' == $this->method ) {
584
+ // The checkout is made by displaying a modal to the customer.
585
+ if ( 'yes' == $this->debug ) {
586
+ $this->log->add(
587
+ $this->id,
588
+ '[render_order_form] - rendering Mercado Pago lightbox (modal window).'
589
+ );
590
+ }
591
+ $html .= '<p></p><p>' . wordwrap(
592
+ __( 'Thank you for your order. Please, proceed with your payment clicking in the bellow button.', 'woocommerce-mercadopago-module' ),
593
+ 60, '<br>'
594
+ ) . '</p>';
595
+ $html .=
596
+ '<a id="submit-payment" href="' . $url .
597
+ '" name="MP-Checkout" class="button alt" mp-mode="modal">' .
598
+ __( 'Pay with Mercado Pago', 'woocommerce-mercadopago-module' ) .
599
+ '</a> ';
600
+ $html .=
601
+ '<a class="button cancel" href="' . esc_url( $order->get_cancel_order_url() ) . '">' .
602
+ __( 'Cancel order &amp; Clear cart', 'woocommerce-mercadopago-module' ) .
603
+ '</a><style type="text/css">#MP-Checkout-dialog #MP-Checkout-IFrame { bottom: -28px !important; height: 590px !important; }</style>';
604
+ // Includes the javascript of lightbox.
605
+ $html .=
606
+ '<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>';
607
+ } else {
608
+ // The checkout is made by rendering Mercado Pago form within a iframe.
609
+ if ( 'yes' == $this->debug ) {
610
+ $this->log->add(
611
+ $this->id,
612
+ '[render_order_form] - embedding Mercado Pago iframe.'
613
+ );
614
+ }
615
+ $html .= '<p></p><p>' . wordwrap(
616
+ __( 'Thank you for your order. Proceed with your payment completing the following information.', 'woocommerce-mercadopago-module' ),
617
+ 60, '<br>'
618
+ ) . '</p>';
619
+ $html .= '<iframe src="' . $url . '" name="MP-Checkout" ' .
620
+ 'width="' . ( is_numeric( (int) $this->iframe_width ) ? $this->iframe_width : 640 ) .
621
+ '" ' .
622
+ 'height="' . ( is_numeric( (int) $this->iframe_height ) ? $this->iframe_height : 800 ) .
623
+ '" ' .
624
+ 'frameborder="0" scrolling="no" id="checkout_mercadopago"></iframe>';
625
+ }
626
+ return $html;
627
+ } else {
628
+ // Reaching at this point means that the URL could not be build by some reason.
629
+ if ( 'yes' == $this->debug ) {
630
+ $this->log->add(
631
+ $this->id,
632
+ '[render_order_form] - unable to build Mercado Pago checkout URL.'
633
+ );
634
+ }
635
+ $html = '<p>' .
636
+ __( 'An error occurred when proccessing your payment. Please try again or contact us for assistence.', 'woocommerce-mercadopago-module' ) .
637
+ '</p>';
638
+ $html .= '<a class="button" href="' . esc_url( $order->get_checkout_payment_url() ) . '">' .
639
+ __( 'Click to try again', 'woocommerce-mercadopago-module' ) .
640
+ '</a>';
641
+ return $html;
642
+ }
643
+ }
644
+
645
+ /**
646
+ * Summary: Build Mercado Pago preapproval.
647
+ * Description: Create Mercado Pago preapproval structure and get init_point URL based in the order options
648
+ * from the cart.
649
+ * @return the preapproval structure.
650
+ */
651
+ public function build_preapproval( $order ) {
652
+
653
+ // Here we build the array that contains ordered items, from customer cart
654
+ $preapproval = null;
655
+
656
+ $arr = $order->get_items();
657
+ foreach ( $order->get_items() as $item ) {
658
+ if ( $item['qty'] ) {
659
+ $product = new WC_product( $item['product_id'] );
660
+
661
+ // WooCommerce 3.0 or later.
662
+ if ( method_exists( $product, 'get_name' ) ) {
663
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
664
+ $product->get_name()
665
+ );
666
+ } else {
667
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
668
+ $product->post->post_title
669
+ );
670
+ }
671
+
672
+ // Remove decimals if MCO/MLC
673
+ $unit_price = floor( ( (float) $item['line_total'] + (float) $item['line_tax'] ) *
674
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 ) * 100 ) / 100;
675
+ // Add shipment cost
676
+ $unit_price += ( (float) $order->get_total_shipping() + (float) $order->get_shipping_tax() ) *
677
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 );
678
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
679
+ $unit_price = floor( $unit_price );
680
+ }
681
+ // Get the custom fields
682
+ $frequency = get_post_meta( $item['product_id'], 'mp_recurring_frequency', true );
683
+ $frequency_type = get_post_meta( $item['product_id'], 'mp_recurring_frequency_type', true );
684
+ $start_date = get_post_meta( $item['product_id'], 'mp_recurring_start_date', true );
685
+ $end_date = get_post_meta( $item['product_id'], 'mp_recurring_end_date', true );
686
+
687
+ // WooCommerce 3.0 or later.
688
+ if ( method_exists( $order, 'get_id' ) ) {
689
+ // Creates the pre-approval structure
690
+ $preapproval = array(
691
+ 'payer_email' => $order->get_billing_email(),
692
+ 'back_url' => ( empty( $this->success_url ) ?
693
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
694
+ esc_url( $this->get_return_url( $order ) )
695
+ ) : $this->success_url
696
+ ),
697
+ 'reason' => $product_title,
698
+ 'external_reference' => $this->invoice_prefix . $order->get_id(),
699
+ 'auto_recurring' => array(
700
+ 'frequency' => $frequency,
701
+ 'frequency_type' => $frequency_type,
702
+ 'transaction_amount' => $unit_price,
703
+ 'currency_id' => $this->country_configs['currency']
704
+ )
705
+ );
706
+ } else {
707
+ // Creates the pre-approval structure
708
+ $preapproval = array(
709
+ 'payer_email' => $order->billing_email,
710
+ 'back_url' => ( empty( $this->success_url ) ?
711
+ WC_WooMercadoPago_Module::workaround_ampersand_bug(
712
+ esc_url( $this->get_return_url( $order) )
713
+ ) : $this->success_url
714
+ ),
715
+ 'reason' => $product_title,
716
+ 'external_reference' => $this->invoice_prefix . $order->id,
717
+ 'auto_recurring' => array(
718
+ 'frequency' => $frequency,
719
+ 'frequency_type' => $frequency_type,
720
+ 'transaction_amount' => $unit_price,
721
+ 'currency_id' => $this->country_configs['currency']
722
+ )
723
+ );
724
+ }
725
+
726
+ if ( isset( $start_date ) && ! empty( $start_date ) )
727
+ $preapproval['auto_recurring']['start_date'] = $start_date . 'T16:00:00.000-03:00';
728
+ if ( isset( $end_date ) && ! empty( $end_date ) )
729
+ $preapproval['auto_recurring']['end_date'] = $end_date . 'T16:00:00.000-03:00';
730
+ // Do not set IPN url if it is a localhost.
731
+ if ( ! strrpos( $this->domain, 'localhost' ) ) {
732
+ $preapproval['notification_url'] = WC_WooMercadoPago_Module::workaround_ampersand_bug(
733
+ WC()->api_request_url( 'WC_WooMercadoPagoSubscription_Gateway' )
734
+ );
735
+ }
736
+ // Set sponsor ID.
737
+ if ( ! $this->is_test_user ) {
738
+ $preapproval['sponsor_id'] = $this->country_configs['sponsor_id'];
739
+ }
740
+ // Log debug message.
741
+ if ( 'yes' == $this->debug ) {
742
+ $this->log->add(
743
+ $this->id,
744
+ '[build_preapproval] - preapproval created with following structure: ' .
745
+ json_encode( $preapproval, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE ) );
746
+ }
747
+ }
748
+ }
749
+
750
+ return $preapproval;
751
+ }
752
+
753
+ // --------------------------------------------------
754
+
755
+ protected function create_url( $order ) {
756
+
757
+ $this->mp->sandbox_mode( false );
758
+
759
+ // Creates the order parameters by checking the cart configuration.
760
+ $preapproval_payment = $this->build_preapproval( $order );
761
+ // Create order preferences with Mercado Pago API request.
762
+ try {
763
+ $checkout_info = $this->mp->create_preapproval_payment( json_encode( $preapproval_payment ) );
764
+ if ( $checkout_info['status'] < 200 || $checkout_info['status'] >= 300 ) {
765
+ // Mercado Pago trowed an error.
766
+ if ( 'yes' == $this->debug ) {
767
+ $this->log->add(
768
+ $this->id,
769
+ '[create_url] - mercado pago gave error, payment creation failed with error: ' .
770
+ $checkout_info['response']['message']
771
+ );
772
+ }
773
+ return false;
774
+ } elseif ( is_wp_error( $checkout_info ) ) {
775
+ // WordPress throwed an error.
776
+ if ( 'yes' == $this->debug ) {
777
+ $this->log->add(
778
+ $this->id,
779
+ '[create_url] - wordpress gave error, payment creation failed with error: ' .
780
+ $checkout_info['response']['message']
781
+ );
782
+ }
783
+ return false;
784
+ } else {
785
+ // Obtain the URL.
786
+ if ( 'yes' == $this->debug ) {
787
+ $this->log->add(
788
+ $this->id,
789
+ '[create_url] - pre-approval link generated with success from mercado pago, with structure as follow: ' .
790
+ json_encode( $checkout_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
791
+ );
792
+ }
793
+ return $checkout_info['response']['init_point'];
794
+ }
795
+ } catch ( MercadoPagoException $e ) {
796
+ // Something went wrong with the payment creation.
797
+ if ( 'yes' == $this->debug ) {
798
+ $this->log->add(
799
+ $this->id,
800
+ '[create_url] - payment creation failed with exception: ' .
801
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
802
+ );
803
+ }
804
+ return false;
805
+ }
806
+
807
+ }
808
+
809
+ // Display the discount in payment method title.
810
+ public function get_payment_method_title_subscription( $title, $id ) {
811
+
812
+ if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
813
+ return $title;
814
+ }
815
+
816
+ if ( $title != $this->title || $this->gateway_discount == 0 ) {
817
+ return $title;
818
+ }
819
+
820
+ $total = (float) WC()->cart->subtotal;
821
+ if ( is_numeric( $this->gateway_discount ) ) {
822
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
823
+ $price_percent = $this->gateway_discount / 100;
824
+ if ( $price_percent > 0 ) {
825
+ $title .= ' (' . __( 'Discount Of ', 'woocommerce-mercadopago-module' ) .
826
+ strip_tags( wc_price( $total * $price_percent ) ) . ' )';
827
+ }
828
+ }
829
+ }
830
+
831
+ return $title;
832
+ }
833
+
834
+ /*
835
+ * ========================================================================
836
+ * AUXILIARY AND FEEDBACK METHODS (SERVER SIDE)
837
+ * ========================================================================
838
+ */
839
+
840
+ /**
841
+ * Summary: Check if we have valid credentials.
842
+ * Description: Check if we have valid credentials.
843
+ * @return boolean true/false depending on the validation result.
844
+ */
845
+ public function validate_credentials() {
846
+
847
+ if ( empty( $this->client_id ) || empty( $this->client_secret ) )
848
+ return false;
849
+
850
+ try {
851
+
852
+ $this->mp = new MP(
853
+ WC_WooMercadoPago_Module::get_module_version(),
854
+ $this->client_id,
855
+ $this->client_secret
856
+ );
857
+ $access_token = $this->mp->get_access_token();
858
+ $get_request = $this->mp->get( '/users/me?access_token=' . $access_token );
859
+
860
+ if ( isset( $get_request['response']['site_id'] ) ) {
861
+
862
+ $s_id = $get_request['response']['site_id'];
863
+ if ( $s_id != 'MLA' && $s_id != 'MLB' && $s_id != 'MLM') {
864
+ $this->mp = null;
865
+ return false;
866
+ }
867
+
868
+ $this->is_test_user = in_array( 'test_user', $get_request['response']['tags'] );
869
+ $this->site_id = $get_request['response']['site_id'];
870
+ $this->country_configs = WC_WooMercadoPago_Module::get_country_config( $this->site_id );
871
+
872
+ $payments = $this->mp->get( '/v1/payment_methods/?access_token=' . $access_token );
873
+ array_push( $this->payment_methods, 'n/d' );
874
+ foreach ( $payments['response'] as $payment ) {
875
+ array_push( $this->payment_methods, str_replace( '_', ' ', $payment['id'] ) );
876
+ }
877
+
878
+ // Check for auto converstion of currency (only if it is enabled).
879
+ $this->currency_ratio = -1;
880
+ if ( $this->currency_conversion == 'yes' ) {
881
+ $this->currency_ratio = WC_WooMercadoPago_Module::get_conversion_rate(
882
+ $this->country_configs['currency']
883
+ );
884
+ }
885
+
886
+ return true;
887
+
888
+ } else {
889
+ $this->mp = null;
890
+ return false;
891
+ }
892
+
893
+ } catch ( MercadoPagoException $e ) {
894
+ if ( 'yes' == $this->debug) {
895
+ $this->log->add(
896
+ $this->id,
897
+ '[validate_credentials] - while validating credentials, got exception: ' .
898
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
899
+ );
900
+ }
901
+ $this->mp = null;
902
+ return false;
903
+ }
904
+
905
+ return false;
906
+
907
+ }
908
+
909
+ // Build the string representing the path to the log file.
910
+ protected function build_log_path_string() {
911
+ return '<a href="' . esc_url( admin_url( 'admin.php?page=wc-status&tab=logs&log_file=' .
912
+ esc_attr( $this->id ) . '-' . sanitize_file_name( wp_hash( $this->id ) ) . '.log' ) ) . '">' .
913
+ __( 'WooCommerce &gt; System Status &gt; Logs', 'woocommerce-mercadopago-module' ) . '</a>';
914
+ }
915
+
916
+ // Return boolean indicating if currency is supported.
917
+ protected function is_supported_currency() {
918
+ return get_woocommerce_currency() == $this->country_configs['currency'];
919
+ }
920
+
921
+ // Called automatically by WooCommerce, verify if Module is available to use.
922
+ public function is_available() {
923
+ global $woocommerce;
924
+ // Check for recurrent product checkout.
925
+ if ( ! WC_WooMercadoPago_Module::is_subscription( $woocommerce->cart->get_cart() ) )
926
+ return false;
927
+ $available = ( 'yes' == $this->settings['enabled'] ) &&
928
+ ! empty( $this->client_id ) &&
929
+ ! empty( $this->client_secret );
930
+ return $available;
931
+ }
932
+
933
+ // Fix css for Mercado Pago in specific cases.
934
+ public function css() {
935
+ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.1', '>=' ) ) {
936
+ $page_id = wc_get_page_id( 'checkout' );
937
+ } else {
938
+ $page_id = woocommerce_get_page_id( 'checkout' );
939
+ }
940
+ if ( is_page( $page_id ) ) {
941
+ echo '<style type="text/css">#MP-Checkout-dialog { z-index: 9999 !important; }</style>' .
942
+ PHP_EOL;
943
+ }
944
+ }
945
+
946
+ // Get the URL to admin page.
947
+ protected function admin_url() {
948
+ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.1', '>=' ) ) {
949
+ return admin_url(
950
+ 'admin.php?page=wc-settings&tab=checkout&section=WC_WooMercadoPagoSubscription_Gateway'
951
+ );
952
+ }
953
+ return admin_url(
954
+ 'admin.php?page=woocommerce_settings&tab=payment_gateways&section=WC_WooMercadoPagoSubscription_Gateway'
955
+ );
956
+ }
957
+
958
+ // Notify that Client_id and/or Client_secret are not valid.
959
+ public function client_id_or_secret_missing_message() {
960
+ echo '<div class="error"><p><strong>' .
961
+ __( 'Subscription is Inactive', 'woocommerce-mercadopago-module' ) .
962
+ '</strong>: ' .
963
+ __( 'Your Mercado Pago credentials Client_id/Client_secret appears to be misconfigured.', 'woocommerce-mercadopago-module' ) .
964
+ '</p></div>';
965
+ }
966
+
967
+ /*
968
+ * ========================================================================
969
+ * IPN MECHANICS (SERVER SIDE)
970
+ * ========================================================================
971
+ */
972
+
973
+ /**
974
+ * Summary: This call checks any incoming notifications from Mercado Pago server.
975
+ * Description: This call checks any incoming notifications from Mercado Pago server.
976
+ */
977
+ public function check_ipn_response() {
978
+
979
+ @ob_clean();
980
+
981
+ if ( 'yes' == $this->debug ) {
982
+ $this->log->add(
983
+ $this->id,
984
+ '[check_ipn_response] - received _get content: ' .
985
+ json_encode( $_GET, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
986
+ );
987
+ }
988
+
989
+ // Setup sandbox mode.
990
+ $this->mp->sandbox_mode( false );
991
+
992
+ // Over here, $_GET should come with this JSON structure:
993
+ // {
994
+ // "topic": <string>,
995
+ // "id": <string>
996
+ // }
997
+ // If not, the IPN is corrupted in some way.
998
+ $data = $_GET;
999
+ if ( isset( $data['action_mp_payment_id'] ) && isset( $data['action_mp_payment_amount'] ) ) {
1000
+
1001
+ if ( $data['action_mp_payment_action'] === 'cancel' ) {
1002
+
1003
+ if ( 'yes' == $this->debug ) {
1004
+ $this->log->add(
1005
+ $this->id,
1006
+ '[check_ipn_response] - cancelling payment of ID ' . $data['action_mp_payment_id']
1007
+ );
1008
+ }
1009
+
1010
+ if ( $this->mp != null && ! empty( $data['action_mp_payment_id'] ) ) {
1011
+ $response = $this->mp->cancel_payment( $data['action_mp_payment_id'] );
1012
+ $message = $response['response']['message'];
1013
+ $status = $response['status'];
1014
+ if ( 'yes' == $this->debug ) {
1015
+ $this->log->add(
1016
+ $this->id,
1017
+ '[check_ipn_response] - cancel payment of id ' . $data['action_mp_payment_id'] .
1018
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
1019
+ );
1020
+ }
1021
+ if ( $status >= 200 && $status < 300 ) {
1022
+ header( 'HTTP/1.1 200 OK' );
1023
+ echo json_encode( array(
1024
+ 'status' => 200,
1025
+ 'message' => __( 'Operation successfully completed.', 'woocommerce-mercadopago-module' )
1026
+ ) );
1027
+ } else {
1028
+ header( 'HTTP/1.1 200 OK' );
1029
+ echo json_encode( array(
1030
+ 'status' => $status,
1031
+ 'message' => $message
1032
+ ) );
1033
+ }
1034
+ } else {
1035
+ if ( 'yes' == $this->debug ) {
1036
+ $this->log->add(
1037
+ $this->id,
1038
+ '[check_ipn_response] - no payments or credentials invalid'
1039
+ );
1040
+ }
1041
+ header( 'HTTP/1.1 500 OK' );
1042
+ }
1043
+
1044
+ } elseif ( $data['action_mp_payment_action'] === 'refund' ) {
1045
+
1046
+ if ( 'yes' == $this->debug ) {
1047
+ $this->log->add(
1048
+ $this->id,
1049
+ '[check_ipn_response] - refunding payment of ID ' . $data['action_mp_payment_id']
1050
+ );
1051
+ }
1052
+
1053
+ if ( $this->mp != null && ! empty( $data['action_mp_payment_id'] ) ) {
1054
+ $response = $this->mp->partial_refund_payment(
1055
+ $data['action_mp_payment_id'],
1056
+ (float) str_replace( ',', '.', $data['action_mp_payment_amount'] ),
1057
+ // TODO: here, we should improve by placing the actual reason and the external refarence
1058
+ __( 'Refund Payment', 'woocommerce-mercadopago-module' ) . ' ' . $data['action_mp_payment_id'],
1059
+ __( 'Refund Payment', 'woocommerce-mercadopago-module' ) . ' ' . $data['action_mp_payment_id']
1060
+ );
1061
+ $message = $response['response']['message'];
1062
+ $status = $response['status'];
1063
+ if ( 'yes' == $this->debug ) {
1064
+ $this->log->add(
1065
+ $this->id,
1066
+ '[check_ipn_response] - refund payment of id ' . $data['action_mp_payment_id'] .
1067
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
1068
+ );
1069
+ }
1070
+ if ( $status >= 200 && $status < 300 ) {
1071
+ header( 'HTTP/1.1 200 OK' );
1072
+ echo json_encode( array(
1073
+ 'status' => 200,
1074
+ 'message' => __( 'Operation successfully completed.', 'woocommerce-mercadopago-module' )
1075
+ ) );
1076
+ } else {
1077
+ header( 'HTTP/1.1 200 OK' );
1078
+ echo json_encode( array(
1079
+ 'status' => $status,
1080
+ 'message' => $message
1081
+ ) );
1082
+ }
1083
+ } else {
1084
+ if ( 'yes' == $this->debug ) {
1085
+ $this->log->add(
1086
+ $this->id,
1087
+ '[check_ipn_response] - no payments or credentials invalid'
1088
+ );
1089
+ }
1090
+ header( 'HTTP/1.1 500 OK' );
1091
+ }
1092
+
1093
+ }
1094
+
1095
+ } elseif ( isset( $data['id'] ) && isset( $data['topic'] ) ) {
1096
+
1097
+ // We have received a normal IPN call for this gateway, start process by getting the access token...
1098
+ $access_token = array( 'access_token' => $this->mp->get_access_token() );
1099
+
1100
+ // Now, we should handle the topic type that has come...
1101
+ if ( $data['topic'] == 'payment' ) {
1102
+
1103
+ // Get the payment of a preapproval.
1104
+ $payment_info = $this->mp->get( '/v1/payments/' . $data['id'], $access_token, false );
1105
+ if ( ! is_wp_error( $payment_info ) && ( $payment_info['status'] == 200 || $payment_info['status'] == 201 ) ) {
1106
+ $payment_info['response']['ipn_type'] = 'payment';
1107
+ do_action( 'valid_mercadopagosubscription_ipn_request', $payment_info['response'] );
1108
+ header( 'HTTP/1.1 200 OK' );
1109
+ } else {
1110
+ if ( 'yes' == $this->debug) {
1111
+ $this->log->add(
1112
+ $this->id,
1113
+ '[check_ipn_response] - got status not equal 200: ' .
1114
+ json_encode( $payment_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1115
+ );
1116
+ }
1117
+ return false;
1118
+ }
1119
+
1120
+ } elseif ( $data['topic'] == 'preapproval' ) {
1121
+
1122
+ // Get the preapproval reported by the IPN.
1123
+ $preapproval_info = $this->mp->get_preapproval_payment( $_GET['id'] );
1124
+ if ( ! is_wp_error( $preapproval_info ) && ( $preapproval_info['status'] == 200 || $preapproval_info['status'] == 201 ) ) {
1125
+ $preapproval_info['response']['ipn_type'] = 'preapproval';
1126
+ do_action( 'valid_mercadopagosubscription_ipn_request', $preapproval_info['response'] );
1127
+ header( 'HTTP/1.1 200 OK' );
1128
+ } else {
1129
+ if ( 'yes' == $this->debug ) {
1130
+ $this->log->add(
1131
+ $this->id,
1132
+ '[check_ipn_response] - got status not equal 200: ' .
1133
+ json_encode( $preapproval_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1134
+ );
1135
+ }
1136
+ }
1137
+
1138
+ } else {
1139
+
1140
+ // We have received an unhandled topic...
1141
+ $this->log->add(
1142
+ $this->id,
1143
+ '[check_ipn_response] - request failure, received an unhandled topic'
1144
+ );
1145
+
1146
+ }
1147
+
1148
+ } elseif ( isset( $data['data_id'] ) && isset( $data['type'] ) ) {
1149
+
1150
+ // We have received a bad, however valid) IPN call for this gateway (data is set for API V1).
1151
+ // At least, we should respond 200 to notify server that we already received it.
1152
+ header( 'HTTP/1.1 200 OK' );
1153
+
1154
+ } else {
1155
+
1156
+ // Reaching here means that we received an IPN call but there are no data!
1157
+ // Just kills the processment. No IDs? No process!
1158
+ if ( 'yes' == $this->debug ) {
1159
+ $this->log->add(
1160
+ $this->id,
1161
+ '[check_ipn_response] - request failure, received ipn call with no data'
1162
+ );
1163
+ }
1164
+ wp_die( __( 'Mercado Pago Request Failure', 'woocommerce-mercadopago-module' ) );
1165
+
1166
+ }
1167
+
1168
+ exit;
1169
+
1170
+ }
1171
+
1172
+ /**
1173
+ * Summary: Properly handles each case of notification, based in payment status.
1174
+ * Description: Properly handles each case of notification, based in payment status.
1175
+ */
1176
+ public function successful_request( $data ) {
1177
+
1178
+ if ( 'yes' == $this->debug ) {
1179
+ $this->log->add(
1180
+ $this->id,
1181
+ '[successful_request] - starting to process ipn update...'
1182
+ );
1183
+ }
1184
+
1185
+ // Get the order and check its presence.
1186
+ $order_key = $data['external_reference'];
1187
+ if ( empty( $order_key ) ) {
1188
+ return;
1189
+ }
1190
+
1191
+ $id = (int) str_replace( $this->invoice_prefix, '', $order_key );
1192
+ $order = wc_get_order( $id );
1193
+
1194
+ // Check if order exists.
1195
+ if ( ! $order ) {
1196
+ return;
1197
+ }
1198
+
1199
+ // WooCommerce 3.0 or later.
1200
+ if ( method_exists( $order, 'get_id' ) ) {
1201
+ $order_id = $order->get_id();
1202
+ } else {
1203
+ $order_id = $order->id;
1204
+ }
1205
+
1206
+ // Check if we have the correct order.
1207
+ if ( $order_id !== $id ) {
1208
+ return;
1209
+ }
1210
+
1211
+ if ( 'yes' == $this->debug ) {
1212
+ $this->log->add(
1213
+ $this->id,
1214
+ '[successful_request] - updating metadata and status with data: ' .
1215
+ json_encode( $data, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1216
+ );
1217
+ }
1218
+
1219
+ // WooCommerce 3.0 or later.
1220
+ if ( method_exists( $order, 'update_meta_data' ) ) {
1221
+ // Updates the type of gateway.
1222
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPagoSubscription_Gateway' );
1223
+
1224
+ // Here, we process the status... this is the business rules!
1225
+ // Reference: https://www.mercadopago.com.br/developers/en/api-docs/basic-checkout/ipn/payment-status/
1226
+ $status = isset( $data['status'] ) ? $data['status'] : 'pending';
1227
+
1228
+ // Updates the order metadata.
1229
+ if ( $data['ipn_type'] == 'payment' ) {
1230
+ $total_paid = isset( $data['transaction_details']['total_paid_amount'] ) ? $data['transaction_details']['total_paid_amount'] : 0.00;
1231
+ $total_refund = isset( $data['transaction_amount_refunded'] ) ? $data['transaction_amount_refunded'] : 0.00;
1232
+ $total = $data['transaction_amount'];
1233
+ if ( ! empty( $data['payer']['email'] ) ) {
1234
+ $order->update_meta_data(
1235
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1236
+ $data['payer']['email']
1237
+ );
1238
+ }
1239
+ if ( ! empty( $data['payment_type_id'] ) ) {
1240
+ $order->update_meta_data(
1241
+ __( 'Payment type', 'woocommerce-mercadopago-module' ),
1242
+ $data['payment_type_id']
1243
+ );
1244
+ }
1245
+ if ( ! empty( $data['id'] ) ) {
1246
+ $order->update_meta_data(
1247
+ 'Mercado Pago - Payment ID ' . $data['id'],
1248
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1249
+ ']/[Amount ' . $total .
1250
+ ']/[Paid ' . $total_paid .
1251
+ ']/[Refund ' . $total_refund . ']'
1252
+ );
1253
+ $payment_ids_str = $order->get_meta( '_Mercado_Pago_Sub_Payment_IDs' );
1254
+ $payment_ids = array();
1255
+ if ( ! empty( $payment_ids_str ) ) {
1256
+ $payment_ids = explode( ', ', $payment_ids_str );
1257
+ }
1258
+ $payment_ids[] = $data['id'];
1259
+ $order->update_meta_data(
1260
+ '_Mercado_Pago_Sub_Payment_IDs',
1261
+ implode( ', ', $payment_ids )
1262
+ );
1263
+ }
1264
+ $order->save();
1265
+ } elseif ( $data['ipn_type'] == 'preapproval' ) {
1266
+ $status = $data['status'];
1267
+ if ( ! empty( $data['payer_email'] ) ) {
1268
+ $order->update_meta_data(
1269
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1270
+ $data['payer_email']
1271
+ );
1272
+ }
1273
+ if ( ! empty( $data['id'] ) ) {
1274
+ $order->update_meta_data(
1275
+ 'Mercado Pago Pre-Approval',
1276
+ '[ID ' . $data['id'] .
1277
+ ']/[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1278
+ ']/[Amount ' . $data['auto_recurring']['transaction_amount'] .
1279
+ ']/[End ' . date( 'Y-m-d', strtotime( $data['auto_recurring']['end_date'] ) ) . ']'
1280
+ );
1281
+ }
1282
+
1283
+ $order->save();
1284
+ }
1285
+ } else {
1286
+ // Updates the type of gateway.
1287
+ update_post_meta( $order->id, '_used_gateway', 'WC_WooMercadoPagoSubscription_Gateway' );
1288
+
1289
+ // Here, we process the status... this is the business rules!
1290
+ // Reference: https://www.mercadopago.com.br/developers/en/api-docs/basic-checkout/ipn/payment-status/
1291
+ $status = isset( $data['status'] ) ? $data['status'] : 'pending';
1292
+
1293
+ // Updates the order metadata.
1294
+ if ( $data['ipn_type'] == 'payment' ) {
1295
+ $total_paid = isset( $data['transaction_details']['total_paid_amount'] ) ? $data['transaction_details']['total_paid_amount'] : 0.00;
1296
+ $total_refund = isset( $data['transaction_amount_refunded'] ) ? $data['transaction_amount_refunded'] : 0.00;
1297
+ $total = $data['transaction_amount'];
1298
+ if ( ! empty( $data['payer']['email'] ) ) {
1299
+ update_post_meta(
1300
+ $order_id,
1301
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1302
+ $data['payer']['email']
1303
+ );
1304
+ }
1305
+ if ( ! empty( $data['payment_type_id'] ) ) {
1306
+ update_post_meta(
1307
+ $order_id,
1308
+ __( 'Payment type', 'woocommerce-mercadopago-module' ),
1309
+ $data['payment_type_id']
1310
+ );
1311
+ }
1312
+ if ( ! empty( $data['id'] ) ) {
1313
+ update_post_meta(
1314
+ $order_id,
1315
+ 'Mercado Pago - Payment ID ' . $data['id'],
1316
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1317
+ ']/[Amount ' . $total .
1318
+ ']/[Paid ' . $total_paid .
1319
+ ']/[Refund ' . $total_refund . ']'
1320
+ );
1321
+ $payment_ids_str = get_post_meta(
1322
+ $order->id,
1323
+ '_Mercado_Pago_Sub_Payment_IDs',
1324
+ true
1325
+ );
1326
+ $payment_ids = array();
1327
+ if ( ! empty( $payment_ids_str ) ) {
1328
+ $payment_ids = explode( ', ', $payment_ids_str );
1329
+ }
1330
+ $payment_ids[] = $data['id'];
1331
+ update_post_meta(
1332
+ $order_id,
1333
+ '_Mercado_Pago_Sub_Payment_IDs',
1334
+ implode( ', ', $payment_ids )
1335
+ );
1336
+ }
1337
+ } elseif ( $data['ipn_type'] == 'preapproval' ) {
1338
+ $status = $data['status'];
1339
+ if ( ! empty( $data['payer_email'] ) ) {
1340
+ update_post_meta(
1341
+ $order_id,
1342
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1343
+ $data['payer_email']
1344
+ );
1345
+ }
1346
+ if ( ! empty( $data['id'] ) ) {
1347
+ update_post_meta(
1348
+ $order_id,
1349
+ 'Mercado Pago Pre-Approval',
1350
+ '[ID ' . $data['id'] .
1351
+ ']/[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1352
+ ']/[Amount ' . $data['auto_recurring']['transaction_amount'] .
1353
+ ']/[End ' . date( 'Y-m-d', strtotime( $data['auto_recurring']['end_date'] ) ) . ']'
1354
+ );
1355
+ }
1356
+ }
1357
+ }
1358
+
1359
+ // Switch the status and update in WooCommerce.
1360
+ switch ( $status ) {
1361
+ case 'authorized':
1362
+ case 'approved':
1363
+ $order->add_order_note(
1364
+ 'Mercado Pago: ' .
1365
+ __( 'Payment approved.', 'woocommerce-mercadopago-module' )
1366
+ );
1367
+ $order->payment_complete();
1368
+ break;
1369
+ case 'pending':
1370
+ $order->add_order_note(
1371
+ 'Mercado Pago: ' .
1372
+ __( 'Customer haven\'t paid yet.', 'woocommerce-mercadopago-module' )
1373
+ );
1374
+ break;
1375
+ case 'in_process':
1376
+ $order->update_status(
1377
+ 'on-hold',
1378
+ 'Mercado Pago: ' .
1379
+ __( 'Payment under review.', 'woocommerce-mercadopago-module' )
1380
+ );
1381
+ break;
1382
+ case 'rejected':
1383
+ $order->update_status(
1384
+ 'failed',
1385
+ 'Mercado Pago: ' .
1386
+ __( 'The payment was refused. The customer can try again.', 'woocommerce-mercadopago-module' )
1387
+ );
1388
+ break;
1389
+ case 'refunded':
1390
+ $order->update_status(
1391
+ 'refunded',
1392
+ 'Mercado Pago: ' .
1393
+ __( 'The payment was refunded to the customer.', 'woocommerce-mercadopago-module' )
1394
+ );
1395
+ break;
1396
+ case 'cancelled':
1397
+ $order->update_status(
1398
+ 'cancelled',
1399
+ 'Mercado Pago: ' .
1400
+ __( 'The payment was cancelled.', 'woocommerce-mercadopago-module' )
1401
+ );
1402
+ break;
1403
+ case 'in_mediation':
1404
+ $order->add_order_note(
1405
+ 'Mercado Pago: ' .
1406
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1407
+ );
1408
+ break;
1409
+ case 'charged-back':
1410
+ $order->add_order_note(
1411
+ 'Mercado Pago: ' .
1412
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1413
+ );
1414
+ break;
1415
+ default:
1416
+ break;
1417
+ }
1418
+
1419
+ }
1420
+
1421
+ }
mercadopago/mercadopago-ticket-gateway.php ADDED
@@ -0,0 +1,1674 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ // Mercado Pago fields.
24
+ $this->mp = null;
25
+ $this->site_id = null;
26
+ $this->collector_id = null;
27
+ $this->currency_ratio = -1;
28
+ $this->is_test_user = false;
29
+
30
+ // Auxiliary fields.
31
+ $this->currency_message = '';
32
+ $this->payment_methods = array();
33
+ $this->country_configs = array();
34
+ $this->store_categories_id = array();
35
+ $this->store_categories_description = array();
36
+
37
+ // WooCommerce fields.
38
+ $this->supports = array( 'products', 'refunds' );
39
+ $this->id = 'woocommerce-mercadopago-ticket-module';
40
+ $this->domain = get_site_url() . '/index.php';
41
+ $this->method_title = __( 'Mercado Pago - Ticket', 'woocommerce-mercadopago-module' );
42
+ $this->method_description = '<img width="200" height="52" src="' .
43
+ plugins_url(
44
+ 'images/mplogo.png',
45
+ plugin_dir_path( __FILE__ )
46
+ ) . '"><br><br>' . '<strong>' .
47
+ __( 'This module enables WooCommerce to use Mercado Pago as payment method for purchases made in your virtual store.', 'woocommerce-mercadopago-module' ) .
48
+ '</strong>';
49
+
50
+ // Fields used in Mercado Pago Module configuration page.
51
+ $this->access_token = $this->get_option( 'access_token' );
52
+ $this->title = $this->get_option( 'title' );
53
+ $this->description = $this->get_option( 'description' );
54
+ $this->coupon_mode = $this->get_option( 'coupon_mode' );
55
+ $this->category_id = $this->get_option( 'category_id' );
56
+ $this->invoice_prefix = $this->get_option( 'invoice_prefix', 'WC-' );
57
+ $this->currency_conversion = $this->get_option( 'currency_conversion', false );
58
+ $this->gateway_discount = $this->get_option( 'gateway_discount', 0 );
59
+ $this->reduce_stock_on_order_gen = $this->get_option( 'reduce_stock_on_order_gen', false );
60
+ $this->debug = $this->get_option( 'debug' );
61
+
62
+ // Logging and debug.
63
+ if ( 'yes' == $this->debug ) {
64
+ if ( class_exists( 'WC_Logger' ) ) {
65
+ $this->log = new WC_Logger();
66
+ } else {
67
+ $this->log = WC_MercadoPago_Module::woocommerce_instance()->logger();
68
+ }
69
+ }
70
+
71
+ // Render our configuration page and init/load fields.
72
+ $this->init_form_fields();
73
+ $this->init_settings();
74
+
75
+ // Used by IPN to receive IPN incomings.
76
+ add_action(
77
+ 'woocommerce_api_wc_woomercadopagoticket_gateway',
78
+ array( $this, 'process_http_request' )
79
+ );
80
+ // Used by IPN to process valid incomings.
81
+ add_action(
82
+ 'valid_mercadopagoticket_ipn_request',
83
+ array( $this, 'successful_request' )
84
+ );
85
+ // process the cancel order meta box order action
86
+ add_action(
87
+ 'woocommerce_order_action_cancel_order',
88
+ array( $this, 'process_cancel_order_meta_box_actions' )
89
+ );
90
+ // Used in settings page to hook "save settings" action.
91
+ add_action(
92
+ 'woocommerce_update_options_payment_gateways_' . $this->id,
93
+ array( $this, 'process_admin_options' )
94
+ );
95
+ // Scripts for custom checkout.
96
+ add_action(
97
+ 'wp_enqueue_scripts',
98
+ array( $this, 'ticket_checkout_scripts' )
99
+ );
100
+ // Apply the discounts.
101
+ add_action(
102
+ 'woocommerce_cart_calculate_fees',
103
+ array( $this, 'add_discount_ticket' ), 10
104
+ );
105
+ // Used in settings page to hook "save settings" action.
106
+ add_action(
107
+ 'woocommerce_update_options_payment_gateways_' . $this->id,
108
+ array( $this, 'custom_process_admin_options' )
109
+ );
110
+ // Display discount in payment method title.
111
+ add_filter(
112
+ 'woocommerce_gateway_title',
113
+ array( $this, 'get_payment_method_title_ticket' ), 10, 2
114
+ );
115
+ // Customizes thank you page.
116
+ add_filter(
117
+ 'woocommerce_thankyou_order_received_text',
118
+ array( $this, 'show_ticket_button' ), 10, 2
119
+ );
120
+
121
+ if ( ! empty( $this->settings['enabled'] ) && $this->settings['enabled'] == 'yes' ) {
122
+ if ( $is_instance ) {
123
+ if ( empty( $this->access_token ) ) {
124
+ // Verify if access token is empty.
125
+ add_action( 'admin_notices', array( $this, 'credentials_missing_message' ) );
126
+ } else {
127
+ // Verify if SSL is supported.
128
+ add_action( 'admin_notices', array( $this, 'check_ssl_absence' ) );
129
+ }
130
+ } else {
131
+ // Scripts for order configuration.
132
+ add_action(
133
+ 'woocommerce_after_checkout_form',
134
+ array( $this, 'add_checkout_script' )
135
+ );
136
+ // Checkout updates.
137
+ add_action(
138
+ 'woocommerce_thankyou',
139
+ array( $this, 'update_checkout_status' )
140
+ );
141
+ }
142
+ }
143
+
144
+ }
145
+
146
+ /**
147
+ * Summary: Initialise Gateway Settings Form Fields.
148
+ * Description: Initialise Gateway settings form fields with a customized page.
149
+ */
150
+ public function init_form_fields() {
151
+
152
+ // If module is disabled, we do not need to load and process the settings page.
153
+ if ( empty( $this->settings['enabled'] ) || 'no' == $this->settings['enabled'] ) {
154
+ $this->form_fields = array(
155
+ 'enabled' => array(
156
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
157
+ 'type' => 'checkbox',
158
+ 'label' => __( 'Enable Ticket Payment Method', 'woocommerce-mercadopago-module' ),
159
+ 'default' => 'no'
160
+ )
161
+ );
162
+ return;
163
+ }
164
+
165
+ $api_secret_locale = sprintf(
166
+ '<a href="https://www.mercadopago.com/mla/account/credentials?type=custom" target="_blank">%s</a>, ' .
167
+ '<a href="https://www.mercadopago.com/mlb/account/credentials?type=custom" target="_blank">%s</a>, ' .
168
+ '<a href="https://www.mercadopago.com/mlc/account/credentials?type=custom" target="_blank">%s</a>, ' .
169
+ '<a href="https://www.mercadopago.com/mco/account/credentials?type=custom" target="_blank">%s</a>, ' .
170
+ '<a href="https://www.mercadopago.com/mlm/account/credentials?type=custom" target="_blank">%s</a>, ' .
171
+ '<a href="https://www.mercadopago.com/mpe/account/credentials?type=custom" target="_blank">%s</a> %s ' .
172
+ '<a href="https://www.mercadopago.com/mlv/account/credentials?type=custom" target="_blank">%s</a>',
173
+ __( 'Argentine', 'woocommerce-mercadopago-module' ),
174
+ __( 'Brazil', 'woocommerce-mercadopago-module' ),
175
+ __( 'Chile', 'woocommerce-mercadopago-module' ),
176
+ __( 'Colombia', 'woocommerce-mercadopago-module' ),
177
+ __( 'Mexico', 'woocommerce-mercadopago-module' ),
178
+ __( 'Peru', 'woocommerce-mercadopago-module' ),
179
+ __( 'or', 'woocommerce-mercadopago-module' ),
180
+ __( 'Venezuela', 'woocommerce-mercadopago-module' )
181
+ );
182
+
183
+ // Trigger API to get payment methods and site_id, also validates access_token.
184
+ if ( $this->validate_credentials() ) {
185
+ // checking the currency
186
+ $this->currency_message = '';
187
+ if ( ! $this->is_supported_currency() && 'yes' == $this->settings['enabled'] ) {
188
+ if ( $this->currency_conversion == 'no' ) {
189
+ $this->currency_ratio = -1;
190
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_not_converted_msg(
191
+ $this->country_configs['currency'],
192
+ $this->country_configs['country_name']
193
+ );
194
+ } elseif ( $this->currency_conversion == 'yes' && $this->currency_ratio != -1 ) {
195
+ $this->currency_message .= WC_WooMercadoPago_Module::build_currency_converted_msg(
196
+ $this->country_configs['currency'],
197
+ $this->currency_ratio
198
+ );
199
+ } else {
200
+ $this->currency_ratio = -1;
201
+ $this->currency_message .=
202
+ WC_WooMercadoPago_Module::build_currency_conversion_err_msg(
203
+ $this->country_configs['currency']
204
+ );
205
+ }
206
+ } else {
207
+ $this->currency_ratio = -1;
208
+ }
209
+ $this->credentials_message = WC_WooMercadoPago_Module::build_valid_credentials_msg(
210
+ $this->country_configs['country_name'],
211
+ $this->site_id
212
+ );
213
+ } else {
214
+ $this->credentials_message = WC_WooMercadoPago_Module::build_invalid_credentials_msg();
215
+ }
216
+
217
+ // fill categories (can be handled without credentials).
218
+ $categories = WC_WooMercadoPago_Module::get_categories();
219
+ $this->store_categories_id = $categories['store_categories_id'];
220
+ $this->store_categories_description = $categories['store_categories_description'];
221
+
222
+ // Validate discount field.
223
+ if ( ! is_numeric( $this->gateway_discount ) ) {
224
+ $this->gateway_discount_desc = '<img width="12" height="12" src="' .
225
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
226
+ __( 'This field should be an integer greater or equal 0 and smaller than 100.', 'woocommerce-mercadopago-module' );
227
+ } elseif ( $this->gateway_discount < 0 || $this->gateway_discount >= 100 ) {
228
+ $this->gateway_discount_desc = '<img width="12" height="12" src="' .
229
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
230
+ __( 'This field should be an integer greater or equal 0 and smaller than 100.', 'woocommerce-mercadopago-module' );
231
+ } else {
232
+ $this->gateway_discount_desc =
233
+ __( 'Give a percentual discount for your customers if they use this payment gateway.', 'woocommerce-mercadopago-module' );
234
+ }
235
+
236
+ // This array draws each UI (text, selector, checkbox, label, etc).
237
+ $this->form_fields = array(
238
+ 'enabled' => array(
239
+ 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
240
+ 'type' => 'checkbox',
241
+ 'label' => __( 'Enable Ticket Payment Method', 'woocommerce-mercadopago-module' ),
242
+ 'default' => 'no'
243
+ ),
244
+ 'credentials_title' => array(
245
+ 'title' => __( 'Mercado Pago Credentials', 'woocommerce-mercadopago-module' ),
246
+ 'type' => 'title',
247
+ 'description' => sprintf( '%s', $this->credentials_message ) . '<br>' . sprintf(
248
+ __( 'You can obtain your credentials for', 'woocommerce-mercadopago-module' ) .
249
+ ' %s.', $api_secret_locale
250
+ )
251
+ ),
252
+ 'access_token' => array(
253
+ 'title' => 'Access token',
254
+ 'type' => 'text',
255
+ 'description' =>
256
+ __( 'Insert your Mercado Pago Access token.', 'woocommerce-mercadopago-module' ),
257
+ 'default' => '',
258
+ 'required' => true
259
+ ),
260
+ 'ipn_url' => array(
261
+ 'title' =>
262
+ __( 'Instant Payment Notification (IPN) URL', 'woocommerce-mercadopago-module' ),
263
+ 'type' => 'title',
264
+ 'description' => sprintf(
265
+ __( 'Your IPN URL to receive instant payment notifications is', 'woocommerce-mercadopago-module' ) .
266
+ '<br>%s', '<code>' . WC()->api_request_url( 'WC_WooMercadoPagoTicket_Gateway' ) . '</code>.'
267
+ )
268
+ ),
269
+ 'checkout_options_title' => array(
270
+ 'title' => __( 'Ticket Options', 'woocommerce-mercadopago-module' ),
271
+ 'type' => 'title',
272
+ 'description' => ''
273
+ ),
274
+ 'title' => array(
275
+ 'title' => __( 'Title', 'woocommerce-mercadopago-module' ),
276
+ 'type' => 'text',
277
+ 'description' =>
278
+ __( 'Title shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
279
+ 'default' => __( 'Mercado Pago - Ticket', 'woocommerce-mercadopago-module' )
280
+ ),
281
+ 'description' => array(
282
+ 'title' => __( 'Description', 'woocommerce-mercadopago-module' ),
283
+ 'type' => 'textarea',
284
+ 'description' =>
285
+ __( 'Description shown to the client in the checkout.', 'woocommerce-mercadopago-module' ),
286
+ 'default' => __( 'Pay with Mercado Pago', 'woocommerce-mercadopago-module' )
287
+ ),
288
+ 'coupon_mode' => array(
289
+ 'title' => __( 'Coupons', 'woocommerce-mercadopago-module' ),
290
+ 'type' => 'checkbox',
291
+ 'label' => __( 'Enable coupons of discounts', 'woocommerce-mercadopago-module' ),
292
+ 'default' => 'no',
293
+ 'description' =>
294
+ __( 'If there is a Mercado Pago campaign, allow your store to give discounts to customers.', 'woocommerce-mercadopago-module' )
295
+ ),
296
+ 'category_id' => array(
297
+ 'title' => __( 'Store Category', 'woocommerce-mercadopago-module' ),
298
+ 'type' => 'select',
299
+ 'description' =>
300
+ __( 'Define which type of products your store sells.', 'woocommerce-mercadopago-module' ),
301
+ 'options' => $this->store_categories_id
302
+ ),
303
+ 'invoice_prefix' => array(
304
+ 'title' => __( 'Store Identificator', 'woocommerce-mercadopago-module' ),
305
+ 'type' => 'text',
306
+ 'description' =>
307
+ __( 'Please, inform a prefix to your store.', 'woocommerce-mercadopago-module' )
308
+ . ' ' .
309
+ __( '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' ),
310
+ 'default' => 'WC-'
311
+ ),
312
+ 'currency_conversion' => array(
313
+ 'title' => __( 'Currency Conversion', 'woocommerce-mercadopago-module' ),
314
+ 'type' => 'checkbox',
315
+ 'label' =>
316
+ __( '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' ),
317
+ 'default' => 'no',
318
+ 'description' => sprintf( '%s', $this->currency_message )
319
+ ),
320
+ 'reduce_stock_on_order_gen' => array(
321
+ 'title' => __( 'Stock Reduce', 'woocommerce-mercadopago-module' ),
322
+ 'type' => 'checkbox',
323
+ 'label' =>
324
+ __( 'Reduce Stock in Order Generation', 'woocommerce-mercadopago-module' ),
325
+ 'default' => 'no',
326
+ 'description' => __( 'Enable this to reduce the stock on order creation. Disable this to reduce <strong>after</strong> the payment approval.', 'woocommerce-mercadopago-module' )
327
+ ),
328
+ 'gateway_discount' => array(
329
+ 'title' => __( 'Discount by Gateway', 'woocommerce-mercadopago-module' ),
330
+ 'type' => 'number',
331
+ 'description' => $this->gateway_discount_desc,
332
+ 'default' => '0'
333
+ ),
334
+ 'testing' => array(
335
+ 'title' => __( 'Test and Debug Options', 'woocommerce-mercadopago-module' ),
336
+ 'type' => 'title',
337
+ 'description' => ''
338
+ ),
339
+ 'debug' => array(
340
+ 'title' => __( 'Debug and Log', 'woocommerce-mercadopago-module' ),
341
+ 'type' => 'checkbox',
342
+ 'label' => __( 'Enable log', 'woocommerce-mercadopago-module' ),
343
+ 'default' => 'no',
344
+ 'description' => sprintf(
345
+ __( 'Register event logs of Mercado Pago, such as API requests, in the file', 'woocommerce-mercadopago-module' ) .
346
+ ' %s.', $this->build_log_path_string() . '.<br>' .
347
+ __( 'File location: ', 'woocommerce-mercadopago-module' ) .
348
+ '<code>wordpress/wp-content/uploads/wc-logs/' . $this->id . '-' .
349
+ sanitize_file_name( wp_hash( $this->id ) ) . '.log</code>' )
350
+ )
351
+ );
352
+
353
+ }
354
+
355
+ /**
356
+ * Processes and saves options.
357
+ * If there is an error thrown, will continue to save and validate fields, but will leave the
358
+ * erroring field out.
359
+ * @return bool was anything saved?
360
+ */
361
+ public function custom_process_admin_options() {
362
+ $this->init_settings();
363
+
364
+ $post_data = $this->get_post_data();
365
+
366
+ foreach ( $this->get_form_fields() as $key => $field ) {
367
+ if ( 'title' !== $this->get_field_type( $field ) ) {
368
+ try {
369
+ $this->settings[$key] = $this->get_field_value( $key, $field, $post_data );
370
+ } catch ( Exception $e ) {
371
+ $this->add_error( $e->getMessage() );
372
+ }
373
+ }
374
+ }
375
+
376
+ if ( ! empty( $this->settings['access_token'] ) ) {
377
+ $this->mp = new MP(
378
+ WC_WooMercadoPago_Module::get_module_version(),
379
+ $this->settings['access_token']
380
+ );
381
+ } else {
382
+ $this->mp = null;
383
+ }
384
+
385
+ // analytics
386
+ $infra_data = WC_WooMercadoPago_Module::get_common_settings();
387
+ $infra_data['checkout_custom_ticket'] = ( $this->settings['enabled'] == 'yes' ? 'true' : 'false' );
388
+ $infra_data['checkout_custom_ticket_coupon'] = ( $this->settings['coupon_mode'] == 'yes' ? 'true' : 'false' );
389
+ if ( $this->mp != null ) {
390
+ $response = $this->mp->analytics_save_settings( $infra_data );
391
+ if ( 'yes' == $this->debug) {
392
+ $this->log->add(
393
+ $this->id,
394
+ '[custom_process_admin_options] - analytics info response: ' .
395
+ json_encode( $response, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
396
+ );
397
+ }
398
+ }
399
+
400
+ return update_option(
401
+ $this->get_option_key(),
402
+ apply_filters( 'woocommerce_settings_api_sanitized_fields_' . $this->id, $this->settings )
403
+ );
404
+ }
405
+
406
+ /**
407
+ * Handles the manual order refunding in server-side.
408
+ */
409
+ public function process_refund( $order_id, $amount = null, $reason = '' ) {
410
+
411
+ $payments = get_post_meta(
412
+ $order_id,
413
+ '_Mercado_Pago_Payment_IDs',
414
+ true
415
+ );
416
+
417
+ // Validate.
418
+ if ( $this->mp == null || empty( $payments ) ) {
419
+ if ( 'yes' == $this->debug ) {
420
+ $this->log->add(
421
+ $this->id,
422
+ '[process_refund] - no payments or credentials invalid'
423
+ );
424
+ }
425
+ return false;
426
+ }
427
+
428
+ $total_available = 0;
429
+ $payment_structs = array();
430
+ $payment_ids = explode( ', ', $payments );
431
+ foreach ( $payment_ids as $p_id ) {
432
+ $p = get_post_meta(
433
+ $order_id,
434
+ 'Mercado Pago - Payment ' . $p_id,
435
+ true
436
+ );
437
+ $p = explode( '/', $p );
438
+ $paid = ((float) explode( ' ', substr( $p[2], 1, -1 ) )[1]);
439
+ $refund = ((float) explode( ' ', substr( $p[3], 1, -1 ) )[1]);
440
+ $p_struct = array(
441
+ 'id' => $p_id,
442
+ 'available_to_refund' => $paid - $refund
443
+ );
444
+ $total_available += $paid - $refund;
445
+ $payment_structs[] = $p_struct;
446
+ }
447
+
448
+ if ( 'yes' == $this->debug ) {
449
+ $this->log->add(
450
+ $this->id,
451
+ '[process_refund] - refunding ' . $amount . ' because of ' . $reason . ' and payments ' .
452
+ json_encode( $payment_structs, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
453
+ );
454
+ }
455
+
456
+ // Do not allow refund more than available or invalid amounts.
457
+ if ( $amount > $total_available || $amount <= 0 ) {
458
+ return false;
459
+ }
460
+
461
+ $remaining_to_refund = $amount;
462
+ foreach ( $payment_structs as $to_refund ) {
463
+ if ( $remaining_to_refund <= $to_refund['available_to_refund'] ) {
464
+ // We want to refund an amount that is less than the available for this payment, so we
465
+ // can just refund and return.
466
+ $response = $this->mp->partial_refund_payment(
467
+ $to_refund['id'],
468
+ $remaining_to_refund,
469
+ $reason,
470
+ $this->invoice_prefix . $order_id
471
+ );
472
+ $message = $response['response']['message'];
473
+ $status = $response['status'];
474
+ if ( 'yes' == $this->debug ) {
475
+ $this->log->add(
476
+ $this->id,
477
+ '[process_refund] - refund payment of id ' . $p_id .
478
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
479
+ );
480
+ }
481
+ if ( $status >= 200 && $status < 300 ) {
482
+ return true;
483
+ } else {
484
+ return false;
485
+ }
486
+ } elseif ( $to_refund['available_to_refund'] > 0 ) {
487
+ // We want to refund an amount that exceeds the available for this payment, so we
488
+ // totally refund this payment, and try to complete refund in other/next payments.
489
+ $response = $this->mp->partial_refund_payment(
490
+ $to_refund['id'],
491
+ $to_refund['available_to_refund'],
492
+ $reason,
493
+ $this->invoice_prefix . $order_id
494
+ );
495
+ $message = $response['response']['message'];
496
+ $status = $response['status'];
497
+ if ( 'yes' == $this->debug ) {
498
+ $this->log->add(
499
+ $this->id,
500
+ '[process_refund] - refund payment of id ' . $p_id .
501
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
502
+ );
503
+ }
504
+ if ( $status < 200 || $status >= 300 ) {
505
+ return false;
506
+ }
507
+ $remaining_to_refund -= $to_refund['available_to_refund'];
508
+ }
509
+ if ( $remaining_to_refund == 0 )
510
+ return true;
511
+ }
512
+
513
+ // Reaching here means that there we run out of payments, and there is an amount
514
+ // remaining to be refund, which is impossible as it implies refunding more than
515
+ // available on paid amounts.
516
+ return false;
517
+
518
+ }
519
+
520
+ /**
521
+ * Handles the manual order cancellation in server-side.
522
+ */
523
+ public function process_cancel_order_meta_box_actions( $order ) {
524
+
525
+ // WooCommerce 3.0 or later.
526
+ if ( method_exists( $order, 'get_meta' ) ) {
527
+ $used_gateway = $order->get_meta( '_used_gateway' );
528
+ $payments = $order->get_meta( '_Mercado_Pago_Payment_IDs' );
529
+ } else {
530
+ $used_gateway = get_post_meta( $order->id, '_used_gateway', true );
531
+ $payments = get_post_meta( $order->id, '_Mercado_Pago_Payment_IDs', true );
532
+ }
533
+
534
+ if ( $used_gateway != 'WC_WooMercadoPago_Gateway' ) {
535
+ return;
536
+ }
537
+
538
+ if ( 'yes' == $this->debug ) {
539
+ $this->log->add(
540
+ $this->id,
541
+ '[process_cancel_order_meta_box_actions] - cancelling payments for ' . $payments
542
+ );
543
+ }
544
+
545
+ if ( $this->mp != null && ! empty( $payments ) ) {
546
+ $payment_ids = explode( ', ', $payments );
547
+ foreach ( $payment_ids as $p_id ) {
548
+ $response = $this->mp->cancel_payment( $p_id );
549
+ $message = $response['response']['message'];
550
+ $status = $response['status'];
551
+ if ( 'yes' == $this->debug ) {
552
+ $this->log->add(
553
+ $this->id,
554
+ '[process_cancel_order_meta_box_actions] - cancel payment of id ' . $p_id .
555
+ ' => ' . ( $status >= 200 && $status < 300 ? 'SUCCESS' : 'FAIL - ' . $message )
556
+ );
557
+ }
558
+ }
559
+ } else {
560
+ if ( 'yes' == $this->debug ) {
561
+ $this->log->add(
562
+ $this->id,
563
+ '[process_cancel_order_meta_box_actions] - no payments or credentials invalid'
564
+ );
565
+ }
566
+ }
567
+
568
+ }
569
+
570
+ /*
571
+ * ========================================================================
572
+ * CHECKOUT BUSINESS RULES (CLIENT SIDE)
573
+ * ========================================================================
574
+ */
575
+
576
+ public function add_checkout_script() {
577
+
578
+ $client_id = WC_WooMercadoPago_Module::get_client_id( $this->get_option( 'access_token' ) );
579
+ $w = WC_WooMercadoPago_Module::woocommerce_instance();
580
+ $logged_user_email = null;
581
+ $payments = array();
582
+ $gateways = WC()->payment_gateways->get_available_payment_gateways();
583
+ foreach ( $gateways as $g ) {
584
+ $payments[] = $g->id;
585
+ }
586
+ $payments = str_replace( '-', '_', implode( ', ', $payments ) );
587
+
588
+ if ( wp_get_current_user()->ID != 0 ) {
589
+ $logged_user_email = wp_get_current_user()->user_email;
590
+ }
591
+
592
+ ?>
593
+ <script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
594
+ <script type="text/javascript">
595
+ var MA = ModuleAnalytics;
596
+ MA.setToken( '<?php echo $client_id; ?>' );
597
+ MA.setPlatform( 'WooCommerce' );
598
+ MA.setPlatformVersion( '<?php echo $w->version; ?>' );
599
+ MA.setModuleVersion( '<?php echo WC_WooMercadoPago_Module::VERSION; ?>' );
600
+ MA.setPayerEmail( '<?php echo ( $logged_user_email != null ? $logged_user_email : "" ); ?>' );
601
+ MA.setUserLogged( <?php echo ( empty( $logged_user_email ) ? 0 : 1 ); ?> );
602
+ MA.setInstalledModules( '<?php echo $payments; ?>' );
603
+ MA.post();
604
+ </script>
605
+ <?php
606
+
607
+ }
608
+
609
+ public function update_checkout_status( $order_id ) {
610
+
611
+ if ( get_post_meta( $order_id, '_used_gateway', true ) != 'WC_WooMercadoPagoTicket_Gateway' )
612
+ return;
613
+
614
+ if ( 'yes' == $this->debug ) {
615
+ $this->log->add(
616
+ $this->id,
617
+ '[update_checkout_status] - updating checkout statuses ' . $order_id
618
+ );
619
+ }
620
+
621
+ $access_token = WC_WooMercadoPago_Module::get_client_id( $this->get_option( 'access_token' ) );
622
+
623
+ echo '<script src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
624
+ <script type="text/javascript">
625
+ var MA = ModuleAnalytics;
626
+ MA.setToken( ' . $access_token . ' );
627
+ MA.setPaymentType("ticket");
628
+ MA.setCheckoutType("custom");
629
+ MA.put();
630
+ </script>';
631
+
632
+ }
633
+
634
+ public function show_ticket_button( $thankyoutext, $order ) {
635
+ // WooCommerce 3.0 or later.
636
+ if ( method_exists( $order, 'get_meta' ) ) {
637
+ $used_gateway = $order->get_meta( '_used_gateway' );
638
+ $transaction_details = $order->get_meta( '_transaction_details_ticket' );
639
+ } else {
640
+ $used_gateway = get_post_meta( $order->id, '_used_gateway', true );
641
+ $transaction_details = get_post_meta( $order->id, '_transaction_details_ticket', true );
642
+ }
643
+
644
+ if ( $used_gateway != 'WC_WooMercadoPagoTicket_Gateway' )
645
+ return;
646
+ $html = '<p>' .
647
+ __( 'Thank you for your order. Please, pay the ticket to get your order approved.', 'woocommerce-mercadopago-module' ) .
648
+ '</p>';
649
+ $html .= '<a id="submit-payment" target="_blank" href="' .
650
+ $transaction_details . '" class="button alt"' .
651
+ ' style="font-size:1.25rem; width:75%; height:48px; line-height:24px; text-align:center;">' .
652
+ __( 'Print the Ticket', 'woocommerce-mercadopago-module' ) .
653
+ '</a> ';
654
+ $added_text = '<p>' . $html . '</p>';
655
+ return $added_text;
656
+ }
657
+
658
+ public function ticket_checkout_scripts() {
659
+ if ( is_checkout() && $this->is_available() ) {
660
+ if ( ! get_query_var( 'order-received' ) ) {
661
+ wp_enqueue_style(
662
+ 'woocommerce-mercadopago-style', plugins_url(
663
+ 'assets/css/custom_checkout_mercadopago.css',
664
+ plugin_dir_path( __FILE__ ) ) );
665
+ wp_enqueue_script(
666
+ 'woocommerce-mercadopago-v1',
667
+ 'https://secure.mlstatic.com/sdk/javascript/v1/mercadopago.js' );
668
+ }
669
+ }
670
+ }
671
+
672
+ public function payment_fields() {
673
+ $amount = $this->get_order_total();
674
+
675
+ $parameters = array(
676
+ 'payment_methods' => $this->payment_methods,
677
+ 'site_id' => $this->site_id,
678
+ 'images_path' => plugins_url( 'images/', plugin_dir_path( __FILE__ ) ),
679
+ 'amount' => $amount * ( ( float ) $this->currency_ratio > 0 ? ( float ) $this->currency_ratio : 1 ),
680
+ 'coupon_mode' => $this->coupon_mode,
681
+ 'is_currency_conversion' => $this->currency_ratio,
682
+ 'woocommerce_currency' => get_woocommerce_currency(),
683
+ 'account_currency' => $this->country_configs['currency'],
684
+ 'discount_action_url' => $this->domain .
685
+ '/woocommerce-mercadopago-module/?wc-api=WC_WooMercadoPagoTicket_Gateway',
686
+ 'form_labels' => array(
687
+ 'form' => array(
688
+ 'payment_converted' =>
689
+ __( 'Payment converted from', 'woocommerce-mercadopago-module' ),
690
+ 'to' => __( 'to', 'woocommerce-mercadopago-module' ),
691
+ 'coupon_empty' =>
692
+ __( 'Please, inform your coupon code', 'woocommerce-mercadopago-module' ),
693
+ 'apply' => __( 'Apply', 'woocommerce-mercadopago-module' ),
694
+ 'remove' => __( 'Remove', 'woocommerce-mercadopago-module' ),
695
+ 'discount_info1' => __( 'You will save', 'woocommerce-mercadopago-module' ),
696
+ 'discount_info2' => __( 'with discount from', 'woocommerce-mercadopago-module' ),
697
+ 'discount_info3' => __( 'Total of your purchase:', 'woocommerce-mercadopago-module' ),
698
+ 'discount_info4' =>
699
+ __( 'Total of your purchase with discount:', 'woocommerce-mercadopago-module' ),
700
+ 'discount_info5' => __( '*Uppon payment approval', 'woocommerce-mercadopago-module' ),
701
+ 'discount_info6' =>
702
+ __( 'Terms and Conditions of Use', 'woocommerce-mercadopago-module' ),
703
+ 'coupon_of_discounts' => __( 'Discount Coupon', 'woocommerce-mercadopago-module' ),
704
+ 'label_choose' => __( 'Choose', 'woocommerce-mercadopago-module' ),
705
+ 'issuer_selection' =>
706
+ __( 'Please, select the ticket issuer of your preference.', 'woocommerce-mercadopago-module' ),
707
+ 'payment_instructions' =>
708
+ __( 'Click "Place order" button. The ticket will be generated and you will be redirected to print it.', 'woocommerce-mercadopago-module' ),
709
+ 'ticket_note' =>
710
+ __( 'Important: The order will be confirmed only after the payment approval.', 'woocommerce-mercadopago-module' )
711
+ )
712
+ )
713
+ );
714
+
715
+ // Find logged user.
716
+ try {
717
+ $logged_user_email = null;
718
+ $parameters['payer_email'] = null;
719
+ if ( wp_get_current_user()->ID != 0 ) {
720
+ $logged_user_email = wp_get_current_user()->user_email;
721
+ }
722
+ if ( isset( $logged_user_email ) ) {
723
+ if ( isset( $logged_user_email ) ) {
724
+ $parameters['payer_email'] = $logged_user_email;
725
+ }
726
+ } else {
727
+ $parameters['coupon_mode'] = 'no';
728
+ }
729
+ } catch ( Exception $e ) {
730
+ $parameters['coupon_mode'] = 'no';
731
+ if ( 'yes' == $this->debug ) {
732
+ $this->log->add(
733
+ $this->id,
734
+ '[process_fields] - there is a problem when retrieving information for cards: ' .
735
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
736
+ );
737
+ }
738
+ }
739
+
740
+ wc_get_template(
741
+ 'ticket/ticket-form.php',
742
+ $parameters,
743
+ 'woocommerce/mercadopago/',
744
+ WC_WooMercadoPago_Module::get_templates_path()
745
+ );
746
+ }
747
+
748
+ /**
749
+ * Summary: Handle the payment and processing the order.
750
+ * Description: This function is called after we click on [place_order] button, and each field is
751
+ * passed to this function through $_POST variable.
752
+ * @return an array containing the result of the processment and the URL to redirect.
753
+ */
754
+ public function process_payment( $order_id ) {
755
+
756
+ if ( ! isset( $_POST['mercadopago_ticket'] ) ) {
757
+ return;
758
+ }
759
+
760
+ update_post_meta( $order_id, '_used_gateway', 'WC_WooMercadoPagoTicket_Gateway' );
761
+
762
+ $order = wc_get_order( $order_id );
763
+ $mercadopago_ticket = $_POST['mercadopago_ticket'];
764
+
765
+ // We have got parameters from checkout page, now its time to charge the card.
766
+ if ( 'yes' == $this->debug ) {
767
+ $this->log->add(
768
+ $this->id,
769
+ '[process_payment] - Received [$_POST] from customer front-end page: ' .
770
+ json_encode( $_POST, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
771
+ );
772
+ }
773
+
774
+ if ( isset( $mercadopago_ticket['amount'] ) && ! empty( $mercadopago_ticket['amount'] ) &&
775
+ isset( $mercadopago_ticket['paymentMethodId'] ) && ! empty( $mercadopago_ticket['paymentMethodId'] ) ) {
776
+
777
+ return self::create_url( $order, $mercadopago_ticket );
778
+
779
+ } else {
780
+ // process when fields are imcomplete.
781
+ wc_add_notice(
782
+ '<p>' .
783
+ __( 'A problem was occurred when processing your payment. Please, try again.', 'woocommerce-mercadopago-module' ) .
784
+ '</p>',
785
+ 'error'
786
+ );
787
+ return array(
788
+ 'result' => 'fail',
789
+ 'redirect' => '',
790
+ );
791
+ }
792
+
793
+ }
794
+
795
+ /**
796
+ * Summary: Build Mercado Pago preference.
797
+ * Description: Create Mercado Pago preference and get init_point URL based in the order options
798
+ * from the cart.
799
+ * @return the preference object.
800
+ */
801
+ private function build_payment_preference( $order, $ticket_checkout ) {
802
+
803
+ // A string to register items (workaround to deal with API problem that shows only first item).
804
+ $list_of_items = array();
805
+ $amount_of_items = 0;
806
+
807
+ // Here we build the array that contains ordered items, from customer cart.
808
+ $items = array();
809
+ if ( sizeof( $order->get_items() ) > 0 ) {
810
+ foreach ( $order->get_items() as $item ) {
811
+ if ( $item['qty'] ) {
812
+ $product = new WC_product( $item['product_id'] );
813
+
814
+ // WooCommerce 3.0 or later.
815
+ if ( method_exists( $product, 'get_description' ) ) {
816
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
817
+ $product->get_name()
818
+ );
819
+ $product_content = WC_WooMercadoPago_Module::utf8_ansi(
820
+ $product->get_description()
821
+ );
822
+ } else {
823
+ $product_title = WC_WooMercadoPago_Module::utf8_ansi(
824
+ $product->post->post_title
825
+ );
826
+ $product_content = WC_WooMercadoPago_Module::utf8_ansi(
827
+ $product->post->post_content
828
+ );
829
+ }
830
+
831
+ // Remove decimals if MCO/MLC
832
+ $unit_price = floor( ( (float) $item['line_total'] + (float) $item['line_tax'] ) *
833
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 ) * 100 ) / 100;
834
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
835
+ $unit_price = floor( $unit_price );
836
+ }
837
+
838
+ // Calculate discount for payment method.
839
+ if ( is_numeric( $this->gateway_discount ) ) {
840
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
841
+ $price_percent = $this->gateway_discount / 100;
842
+ $discount = $unit_price * $price_percent;
843
+ if ( $discount > 0 ) {
844
+ $amount_of_items += $discount;
845
+ }
846
+ }
847
+ }
848
+
849
+ array_push( $list_of_items, $product_title . ' x ' . $item['qty'] );
850
+ array_push( $items, array(
851
+ 'id' => $item['product_id'],
852
+ 'title' => ( $product_title . ' x ' . $item['qty'] ),
853
+ 'description' => sanitize_file_name(
854
+ // This handles description width limit of Mercado Pago.
855
+ ( strlen( $product_content ) > 230 ?
856
+ substr( $product_content, 0, 230 ) . '...' :
857
+ $product_content )
858
+ ),
859
+ 'picture_url' => wp_get_attachment_url( $product->get_image_id() ),
860
+ 'category_id' => $this->store_categories_id[$this->category_id],
861
+ 'quantity' => 1,
862
+ 'unit_price' => $unit_price
863
+ ) );
864
+ }
865
+ }
866
+ }
867
+
868
+ // Creates the shipment cost structure.
869
+ $ship_cost = ( (float) $order->get_total_shipping() + (float) $order->get_shipping_tax() ) *
870
+ ( (float) $this->currency_ratio > 0 ? (float) $this->currency_ratio : 1 );
871
+ // Remove decimals if MCO/MLC
872
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
873
+ $ship_cost = floor( $ship_cost );
874
+ }
875
+ if ( $ship_cost > 0 ) {
876
+ $item = array(
877
+ 'title' => sanitize_file_name( $order->get_shipping_to_display() ),
878
+ 'description' => __( 'Shipping service used by store', 'woocommerce-mercadopago-module' ),
879
+ 'quantity' => 1,
880
+ 'category_id' => $this->store_categories_id[$this->category_id],
881
+ 'unit_price' => floor( $ship_cost * 100 ) / 100
882
+ );
883
+ $items[] = $item;
884
+ }
885
+
886
+ // Discounts features.
887
+ if ( isset( $ticket_checkout['discount'] ) && $ticket_checkout['discount'] != '' &&
888
+ $ticket_checkout['discount'] > 0 && isset( $ticket_checkout['coupon_code'] ) &&
889
+ $ticket_checkout['coupon_code'] != '' &&
890
+ WC()->session->chosen_payment_method == 'woocommerce-mercadopago-ticket-module' ) {
891
+
892
+ // Remove decimals if MCO/MLC
893
+ if ( $this->site_id == 'MCO' || $this->site_id == 'MLC' ) {
894
+ $ticket_checkout['discount'] = floor( $ticket_checkout['discount'] );
895
+ }
896
+
897
+ $item = array(
898
+ 'title' => __( 'Discount', 'woocommerce-mercadopago-module' ),
899
+ 'description' => __( 'Discount provided by store', 'woocommerce-mercadopago-module' ),
900
+ 'quantity' => 1,
901
+ 'category_id' => $this->store_categories_id[$this->category_id],
902
+ 'unit_price' => -( ( float ) $ticket_checkout['discount'] )
903
+ );
904
+ $items[] = $item;
905
+ }
906
+
907
+ if ( method_exists( $order, 'get_id' ) ) {
908
+ // Build additional information from the customer data.
909
+ $payer_additional_info = array(
910
+ 'first_name' => $order->get_billing_first_name(),
911
+ 'last_name' => $order->get_billing_last_name(),
912
+ //'registration_date' =>
913
+ 'phone' => array(
914
+ //'area_code' =>
915
+ 'number' => $order->get_billing_phone()
916
+ ),
917
+ 'address' => array(
918
+ 'zip_code' => $order->get_billing_postcode(),
919
+ //'street_number' =>
920
+ 'street_name' => $order->get_billing_address_1() . ' / ' .
921
+ $order->get_billing_city() . ' ' .
922
+ $order->get_billing_state() . ' ' .
923
+ $order->get_billing_country()
924
+ )
925
+ );
926
+
927
+ // Create the shipment address information set.
928
+ $shipments = array(
929
+ 'receiver_address' => array(
930
+ 'zip_code' => $order->get_shipping_postcode(),
931
+ //'street_number' =>
932
+ 'street_name' => $order->get_shipping_address_1() . ' ' .
933
+ $order->get_shipping_address_2() . ' ' .
934
+ $order->get_shipping_city() . ' ' .
935
+ $order->get_shipping_state() . ' ' .
936
+ $order->get_shipping_country(),
937
+ //'floor' =>
938
+ 'apartment' => $order->get_shipping_address_2()
939
+ )
940
+ );
941
+
942
+ // The payment preference.
943
+ $preferences = array(
944
+ 'transaction_amount' => floor( ( ( float ) $ticket_checkout['amount'] ) * 100 ) / 100 - $amount_of_items,
945
+ 'description' => implode( ', ', $list_of_items ),
946
+ 'payment_method_id' => $ticket_checkout['paymentMethodId'],
947
+ 'payer' => array(
948
+ 'email' => $order->get_billing_email()
949
+ ),
950
+ 'external_reference' => $this->invoice_prefix . $order->get_id(),
951
+ 'additional_info' => array(
952
+ 'items' => $items,
953
+ 'payer' => $payer_additional_info,
954
+ 'shipments' => $shipments
955
+ )
956
+ );
957
+ } else {
958
+ // Build additional information from the customer data.
959
+ $payer_additional_info = array(
960
+ 'first_name' => $order->billing_first_name,
961
+ 'last_name' => $order->billing_last_name,
962
+ //'registration_date' =>
963
+ 'phone' => array(
964
+ //'area_code' =>
965
+ 'number' => $order->billing_phone
966
+ ),
967
+ 'address' => array(
968
+ 'zip_code' => $order->billing_postcode,
969
+ //'street_number' =>
970
+ 'street_name' => $order->billing_address_1 . ' / ' .
971
+ $order->billing_city . ' ' .
972
+ $order->billing_state . ' ' .
973
+ $order->billing_country
974
+ )
975
+ );
976
+
977
+ // Create the shipment address information set.
978
+ $shipments = array(
979
+ 'receiver_address' => array(
980
+ 'zip_code' => $order->shipping_postcode,
981
+ //'street_number' =>
982
+ 'street_name' => $order->shipping_address_1 . ' ' .
983
+ $order->shipping_address_2 . ' ' .
984
+ $order->shipping_city . ' ' .
985
+ $order->shipping_state . ' ' .
986
+ $order->shipping_country,
987
+ //'floor' =>
988
+ 'apartment' => $order->shipping_address_2
989
+ )
990
+ );
991
+
992
+ // The payment preference.
993
+ $preferences = array(
994
+ 'transaction_amount' => floor( ( ( float ) $ticket_checkout['amount'] ) * 100 ) / 100 - $amount_of_items,
995
+ 'description' => implode( ', ', $list_of_items ),
996
+ 'payment_method_id' => $ticket_checkout['paymentMethodId'],
997
+ 'payer' => array(
998
+ 'email' => $order->billing_email
999
+ ),
1000
+ 'external_reference' => $this->invoice_prefix . $order->id,
1001
+ 'additional_info' => array(
1002
+ 'items' => $items,
1003
+ 'payer' => $payer_additional_info,
1004
+ 'shipments' => $shipments
1005
+ )
1006
+ );
1007
+ }
1008
+
1009
+ // Do not set IPN url if it is a localhost.
1010
+ if ( ! strrpos( $this->domain, 'localhost' ) ) {
1011
+ $preferences['notification_url'] = WC_WooMercadoPago_Module::workaround_ampersand_bug(
1012
+ WC()->api_request_url( 'WC_WooMercadoPagoTicket_Gateway' )
1013
+ );
1014
+ }
1015
+
1016
+ // Discounts features.
1017
+ if ( isset( $ticket_checkout['discount'] ) && $ticket_checkout['discount'] != '' &&
1018
+ $ticket_checkout['discount'] > 0 && isset( $ticket_checkout['coupon_code'] ) &&
1019
+ $ticket_checkout['coupon_code'] != '' &&
1020
+ WC()->session->chosen_payment_method == 'woocommerce-mercadopago-ticket-module' ) {
1021
+
1022
+ $preferences['campaign_id'] = (int) $ticket_checkout['campaign_id'];
1023
+ $preferences['coupon_amount'] = ( (float) $ticket_checkout['discount'] );
1024
+ $preferences['coupon_code'] = strtoupper( $ticket_checkout['coupon_code'] );
1025
+ }
1026
+
1027
+ // Set sponsor ID.
1028
+ if ( ! $this->is_test_user ) {
1029
+ $preferences['sponsor_id'] = $this->country_configs['sponsor_id'];
1030
+ }
1031
+
1032
+ if ( 'yes' == $this->debug ) {
1033
+ $this->log->add(
1034
+ $this->id,
1035
+ '[build_payment_preference] - returning just created [$preferences] structure: ' .
1036
+ json_encode( $preferences, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1037
+ );
1038
+ }
1039
+
1040
+ $preferences = apply_filters(
1041
+ 'woocommerce_mercadopago_module_ticket_preferences',
1042
+ $preferences, $order
1043
+ );
1044
+ return $preferences;
1045
+ }
1046
+
1047
+ // --------------------------------------------------
1048
+
1049
+ protected function create_url( $order, $ticket_checkout ) {
1050
+
1051
+ // Creates the order parameters by checking the cart configuration.
1052
+ $preferences = $this->build_payment_preference( $order, $ticket_checkout );
1053
+
1054
+ $this->mp->sandbox_mode( false );
1055
+
1056
+ // Create order preferences with Mercado Pago API request.
1057
+ try {
1058
+ $ticket_info = $this->mp->create_payment( json_encode( $preferences ) );
1059
+ if ( $ticket_info['status'] < 200 || $ticket_info['status'] >= 300 ) {
1060
+ // Mercado Pago trowed an error.
1061
+ if ( 'yes' == $this->debug ) {
1062
+ $this->log->add(
1063
+ $this->id,
1064
+ '[create_url] - mercado pago gave error, payment creation failed with error: ' .
1065
+ $ticket_info['response']['message'] );
1066
+ }
1067
+ return false;
1068
+ } elseif ( is_wp_error( $ticket_info ) ) {
1069
+ // WordPress throwed an error.
1070
+ if ( 'yes' == $this->debug ) {
1071
+ $this->log->add(
1072
+ $this->id,
1073
+ '[create_url] - wordpress gave error, payment creation failed with error: ' .
1074
+ $ticket_info['response']['message'] );
1075
+ }
1076
+ return false;
1077
+ } else {
1078
+ // Obtain the URL.
1079
+ $response = $ticket_info['response'];
1080
+ if ( array_key_exists( 'status', $response ) ) {
1081
+ if ( $response['status'] == 'pending' ) {
1082
+ if ( $response['status_detail'] == 'pending_waiting_payment' ) {
1083
+ WC()->cart->empty_cart();
1084
+ if ( $this->reduce_stock_on_order_gen == 'yes' ) {
1085
+ $order->reduce_order_stock();
1086
+ }
1087
+ /*$html = '<p></p><p>' . wordwrap(
1088
+ __( 'Thank you for your order. Please, pay the ticket to get your order approved.', 'woocommerce-mercadopago-module' ),
1089
+ 60, '<br>'
1090
+ ) . '</p>';
1091
+ $html .= '<a id="submit-payment" target="_blank" href="' .
1092
+ $response['transaction_details']['external_resource_url'] .
1093
+ '" class="button alt">' .
1094
+ __( 'Print the Ticket', 'woocommerce-mercadopago-module' ) .
1095
+ '</a> ';
1096
+ wc_add_notice( '<p>' . $html . '</p>', 'notice' );*/
1097
+
1098
+ // WooCommerce 3.0 or later.
1099
+ if ( method_exists( $order, 'update_meta_data' ) ) {
1100
+ $order->update_meta_data( '_transaction_details_ticket', $response['transaction_details']['external_resource_url'] );
1101
+ $order->save();
1102
+ } else {
1103
+ update_post_meta(
1104
+ $order->id,
1105
+ '_transaction_details_ticket',
1106
+ $response['transaction_details']['external_resource_url']
1107
+ );
1108
+ }
1109
+
1110
+ $order->add_order_note(
1111
+ 'Mercado Pago: ' .
1112
+ __( 'Customer haven\'t paid yet.', 'woocommerce-mercadopago-module' )
1113
+ );
1114
+ $order->add_order_note(
1115
+ 'Mercado Pago: ' .
1116
+ __( 'To reprint the ticket click ', 'woocommerce-mercadopago-module' ) .
1117
+ '<a target="_blank" href="' .
1118
+ $response['transaction_details']['external_resource_url'] . '">' .
1119
+ __( 'here', 'woocommerce-mercadopago-module' ) .
1120
+ '</a>', 1, false
1121
+ );
1122
+
1123
+ /*return array(
1124
+ 'result' => 'success',
1125
+ 'redirect' => $order->get_checkout_payment_url( true )
1126
+ );*/
1127
+ return array(
1128
+ 'result' => 'success',
1129
+ 'redirect' => $order->get_checkout_order_received_url()
1130
+ );
1131
+ }
1132
+ }
1133
+ }
1134
+ return false;
1135
+ }
1136
+ } catch ( MercadoPagoException $e ) {
1137
+ // Something went wrong with the payment creation.
1138
+ if ( 'yes' == $this->debug ) {
1139
+ $this->log->add(
1140
+ $this->id,
1141
+ '[create_url] - payment creation failed with exception: ' .
1142
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1143
+ );
1144
+ }
1145
+ }
1146
+ return false;
1147
+ }
1148
+
1149
+ /**
1150
+ * Summary: Receive post data and applies a discount based in the received values.
1151
+ * Description: Receive post data and applies a discount based in the received values.
1152
+ */
1153
+ public function add_discount_ticket() {
1154
+
1155
+ if ( ! isset( $_POST['mercadopago_ticket'] ) )
1156
+ return;
1157
+
1158
+ if ( is_admin() && ! defined( 'DOING_AJAX' ) || is_cart() ) {
1159
+ return;
1160
+ }
1161
+
1162
+ $mercadopago_ticket = $_POST['mercadopago_ticket'];
1163
+ if ( isset( $mercadopago_ticket['discount'] ) && $mercadopago_ticket['discount'] != '' &&
1164
+ $mercadopago_ticket['discount'] > 0 && isset( $mercadopago_ticket['coupon_code'] ) &&
1165
+ $mercadopago_ticket['coupon_code'] != '' &&
1166
+ WC()->session->chosen_payment_method == 'woocommerce-mercadopago-ticket-module' ) {
1167
+
1168
+ if ( 'yes' == $this->debug ) {
1169
+ $this->log->add(
1170
+ $this->id,
1171
+ '[add_discount_ticket] - ticket trying to apply discount...'
1172
+ );
1173
+ }
1174
+
1175
+ $value = ( $mercadopago_ticket['discount'] ) /
1176
+ ( ( float ) $this->currency_ratio > 0 ? ( float ) $this->currency_ratio : 1 );
1177
+ global $woocommerce;
1178
+ if ( apply_filters(
1179
+ 'wc_mercadopagoticket_module_apply_discount',
1180
+ 0 < $value, $woocommerce->cart )
1181
+ ) {
1182
+ $woocommerce->cart->add_fee( sprintf(
1183
+ __( 'Discount for %s coupon', 'woocommerce-mercadopago-module' ),
1184
+ esc_attr( $mercadopago_ticket['campaign']
1185
+ ) ), ( $value * -1 ), true
1186
+ );
1187
+ }
1188
+ }
1189
+
1190
+ }
1191
+
1192
+ // Display the discount in payment method title.
1193
+ public function get_payment_method_title_ticket( $title, $id ) {
1194
+
1195
+ if ( ! is_checkout() && ! ( defined( 'DOING_AJAX' ) && DOING_AJAX ) ) {
1196
+ return $title;
1197
+ }
1198
+
1199
+ if ( $title != $this->title || $this->gateway_discount == 0 ) {
1200
+ return $title;
1201
+ }
1202
+
1203
+ $total = (float) WC()->cart->subtotal;
1204
+ if ( is_numeric( $this->gateway_discount ) ) {
1205
+ if ( $this->gateway_discount >= 0 && $this->gateway_discount < 100 ) {
1206
+ $price_percent = $this->gateway_discount / 100;
1207
+ if ( $price_percent > 0 ) {
1208
+ $title .= ' (' . __( 'Discount Of ', 'woocommerce-mercadopago-module' ) .
1209
+ strip_tags( wc_price( $total * $price_percent ) ) . ' )';
1210
+ }
1211
+ }
1212
+ }
1213
+
1214
+ return $title;
1215
+ }
1216
+
1217
+ /*
1218
+ * ========================================================================
1219
+ * AUXILIARY AND FEEDBACK METHODS (SERVER SIDE)
1220
+ * ========================================================================
1221
+ */
1222
+
1223
+ /**
1224
+ * Summary: Check if we have valid credentials.
1225
+ * Description: Check if we have valid credentials.
1226
+ * @return boolean true/false depending on the validation result.
1227
+ */
1228
+ public function validate_credentials() {
1229
+
1230
+ if ( empty( $this->access_token ) )
1231
+ return false;
1232
+
1233
+ try {
1234
+
1235
+ $this->mp = new MP(
1236
+ WC_WooMercadoPago_Module::get_module_version(),
1237
+ $this->access_token
1238
+ );
1239
+ $get_request = $this->mp->get( '/users/me?access_token=' . $this->access_token );
1240
+
1241
+ if ( isset( $get_request['response']['site_id'] ) ) {
1242
+
1243
+ // TODO: revalidate MLU
1244
+ if ( $get_request['response']['site_id'] == 'MLU' ) {
1245
+ $this->mp = null;
1246
+ return false;
1247
+ }
1248
+
1249
+ $this->is_test_user = in_array( 'test_user', $get_request['response']['tags'] );
1250
+ $this->site_id = $get_request['response']['site_id'];
1251
+ $this->collector_id = $get_request['response']['id'];
1252
+ $this->country_configs = WC_WooMercadoPago_Module::get_country_config( $this->site_id );
1253
+
1254
+ // Get ticket payments.
1255
+ $payments = $this->mp->get( '/v1/payment_methods/?access_token=' . $this->access_token );
1256
+ foreach ( $payments['response'] as $payment ) {
1257
+ if ( $payment['payment_type_id'] != 'account_money' &&
1258
+ $payment['payment_type_id'] != 'credit_card' &&
1259
+ $payment['payment_type_id'] != 'debit_card' &&
1260
+ $payment['payment_type_id'] != 'prepaid_card' ) {
1261
+
1262
+ array_push( $this->payment_methods, $payment );
1263
+
1264
+ }
1265
+ }
1266
+
1267
+ // Check for auto converstion of currency.
1268
+ $this->currency_ratio = -1;
1269
+ if ( $this->currency_conversion == 'yes' ) {
1270
+ $this->currency_ratio = WC_WooMercadoPago_Module::get_conversion_rate(
1271
+ $this->country_configs['currency']
1272
+ );
1273
+ }
1274
+
1275
+ return true;
1276
+
1277
+ } else {
1278
+ $this->mp = null;
1279
+ return false;
1280
+ }
1281
+
1282
+ } catch ( MercadoPagoException $e ) {
1283
+ if ( 'yes' == $this->debug ) {
1284
+ $this->log->add(
1285
+ $this->id,
1286
+ '[validate_credentials] - while validating credentials, got exception: ' .
1287
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1288
+ );
1289
+ }
1290
+ $this->mp = null;
1291
+ return false;
1292
+ }
1293
+
1294
+ return false;
1295
+
1296
+ }
1297
+
1298
+ // Build the string representing the path to the log file.
1299
+ protected function build_log_path_string() {
1300
+ return '<a href="' . esc_url( admin_url( 'admin.php?page=wc-status&tab=logs&log_file=' .
1301
+ esc_attr( $this->id ) . '-' . sanitize_file_name( wp_hash( $this->id ) ) . '.log' ) ) . '">' .
1302
+ __( 'WooCommerce &gt; System Status &gt; Logs', 'woocommerce-mercadopago-module' ) . '</a>';
1303
+ }
1304
+
1305
+ // Return boolean indicating if currency is supported.
1306
+ protected function is_supported_currency() {
1307
+ return get_woocommerce_currency() == $this->country_configs['currency'];
1308
+ }
1309
+
1310
+ // Called automatically by WooCommerce, verify if Module is available to use.
1311
+ public function is_available() {
1312
+ global $woocommerce;
1313
+ // Check if we have SSL.
1314
+ if ( empty( $_SERVER['HTTPS'] ) || $_SERVER['HTTPS'] == 'off' ) {
1315
+ return false;
1316
+ }
1317
+ // Check for recurrent product checkout.
1318
+ if ( WC_WooMercadoPago_Module::is_subscription( $woocommerce->cart->get_cart() ) ) {
1319
+ return false;
1320
+ }
1321
+ // Check if this gateway is enabled and well configured.
1322
+ $available = ( 'yes' == $this->settings['enabled'] ) && ! empty( $this->access_token );
1323
+ return $available;
1324
+ }
1325
+
1326
+ public function check_ssl_absence() {
1327
+ if ( empty( $_SERVER['HTTPS'] ) || $_SERVER['HTTPS'] == 'off' ) {
1328
+ if ( 'yes' == $this->settings['enabled'] ) {
1329
+ echo '<div class="error"><p><strong>' .
1330
+ __( 'Ticket is Inactive', 'woocommerce-mercadopago-module' ) .
1331
+ '</strong>: ' .
1332
+ sprintf(
1333
+ __( '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' )
1334
+ ) . '</p></div>';
1335
+ }
1336
+ }
1337
+ }
1338
+
1339
+ // Get the URL to admin page.
1340
+ protected function admin_url() {
1341
+ if ( defined( 'WC_VERSION' ) && version_compare( WC_VERSION, '2.1', '>=' ) ) {
1342
+ return admin_url(
1343
+ 'admin.php?page=wc-settings&tab=checkout&section=wc_woomercadopagoticket_gateway'
1344
+ );
1345
+ }
1346
+ return admin_url(
1347
+ 'admin.php?page=woocommerce_settings&tab=payment_gateways&section=WC_WooMercadoPagoTicket_Gateway'
1348
+ );
1349
+ }
1350
+
1351
+ // Notify that access_token are not valid.
1352
+ public function credentials_missing_message() {
1353
+ echo '<div class="error"><p><strong>' .
1354
+ __( 'Ticket is Inactive', 'woocommerce-mercadopago-module' ) .
1355
+ '</strong>: ' .
1356
+ __( 'Your Mercado Pago credentials Access Token appears to be misconfigured.', 'woocommerce-mercadopago-module' ) .
1357
+ '</p></div>';
1358
+ }
1359
+
1360
+ /*
1361
+ * ========================================================================
1362
+ * IPN MECHANICS (SERVER SIDE)
1363
+ * ========================================================================
1364
+ */
1365
+
1366
+ /**
1367
+ * Summary: This call checks any incoming notifications from Mercado Pago server.
1368
+ * Description: This call checks any incoming notifications from Mercado Pago server.
1369
+ */
1370
+ public function process_http_request() {
1371
+ @ob_clean();
1372
+ if ( 'yes' == $this->debug ) {
1373
+ $this->log->add(
1374
+ $this->id,
1375
+ '[process_http_request] - Received _get content: ' .
1376
+ json_encode( $_GET, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1377
+ );
1378
+ }
1379
+ if ( isset( $_GET['coupon_id'] ) && $_GET['coupon_id'] != '' ) {
1380
+ // process coupon evaluations.
1381
+ if ( isset( $_GET['payer'] ) && $_GET['payer'] != '' ) {
1382
+ $logged_user_email = $_GET['payer'];
1383
+ $coupon_id = $_GET['coupon_id'];
1384
+ $this->mp->sandbox_mode( false );
1385
+ $response = $this->mp->check_discount_campaigns(
1386
+ $_GET['amount'],
1387
+ $logged_user_email,
1388
+ $coupon_id
1389
+ );
1390
+ header( 'HTTP/1.1 200 OK' );
1391
+ header( 'Content-Type: application/json' );
1392
+ echo json_encode( $response );
1393
+ } else {
1394
+ $obj = new stdClass();
1395
+ $obj->status = 404;
1396
+ $obj->response = array(
1397
+ 'message' =>
1398
+ __( 'Please, inform your email in billing address to use this feature', 'woocommerce-mercadopago-module' ),
1399
+ 'error' => 'payer_not_found',
1400
+ 'status' => 404,
1401
+ 'cause' => array()
1402
+ );
1403
+ header( 'HTTP/1.1 200 OK' );
1404
+ header( 'Content-Type: application/json' );
1405
+ echo json_encode( $obj );
1406
+ }
1407
+ exit( 0 );
1408
+ } else {
1409
+ // process IPN messages.
1410
+ $data = $this->check_ipn_request_is_valid( $_GET );
1411
+ if ( $data ) {
1412
+ header( 'HTTP/1.1 200 OK' );
1413
+ do_action( 'valid_mercadopagoticket_ipn_request', $data );
1414
+ }
1415
+ }
1416
+ }
1417
+
1418
+ /**
1419
+ * Summary: Get received data from IPN and checks if its a merchant_order or a payment.
1420
+ * Description: If we have these information, we return data to be processed by
1421
+ * successful_request function.
1422
+ * @return boolean indicating if it was successfuly processed.
1423
+ */
1424
+ public function check_ipn_request_is_valid( $data ) {
1425
+
1426
+ if ( ! isset( $data['data_id'] ) || ! isset( $data['type'] ) ) {
1427
+ if ( 'yes' == $this->debug ) {
1428
+ $this->log->add(
1429
+ $this->id,
1430
+ '[check_ipn_request_is_valid] - data_id or type not set: ' .
1431
+ json_encode( $data, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1432
+ );
1433
+ }
1434
+ // at least, check if its a v0 ipn.
1435
+ if ( ! isset( $data['id'] ) || ! isset( $data['topic'] ) ) {
1436
+ if ( 'yes' == $this->debug ) {
1437
+ $this->log->add(
1438
+ $this->id,
1439
+ '[check_ipn_response] - Mercado Pago Request Failure: ' .
1440
+ json_encode( $_GET, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1441
+ );
1442
+ }
1443
+ wp_die( __( 'Mercado Pago Request Failure', 'woocommerce-mercadopago-module' ) );
1444
+ } else {
1445
+ header( 'HTTP/1.1 200 OK' );
1446
+ }
1447
+ // No ID? No process!
1448
+ return false;
1449
+ }
1450
+
1451
+ $this->mp->sandbox_mode( false );
1452
+
1453
+ try {
1454
+ // Get the payment reported by the IPN.
1455
+ if ( $data['type'] == 'payment' ) {
1456
+ $access_token = array( 'access_token' => $this->mp->get_access_token() );
1457
+ $payment_info = $this->mp->get(
1458
+ '/v1/payments/' . $data['data_id'], $access_token, false
1459
+ );
1460
+ if ( ! is_wp_error( $payment_info ) &&
1461
+ ( $payment_info['status'] == 200 || $payment_info['status'] == 201 ) ) {
1462
+ return $payment_info['response'];
1463
+ } else {
1464
+ if ( 'yes' == $this->debug ) {
1465
+ $this->log->add(
1466
+ $this->id,
1467
+ '[check_ipn_request_is_valid] - error when processing received data: ' .
1468
+ json_encode( $payment_info, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1469
+ );
1470
+ }
1471
+ return false;
1472
+ }
1473
+ }
1474
+ } catch ( MercadoPagoException $e ) {
1475
+ if ( 'yes' == $this->debug ) {
1476
+ $this->log->add(
1477
+ $this->id,
1478
+ '[check_ipn_request_is_valid] - MercadoPagoException: ' .
1479
+ json_encode( array( 'status' => $e->getCode(), 'message' => $e->getMessage() ) )
1480
+ );
1481
+ }
1482
+ return false;
1483
+ }
1484
+ return true;
1485
+ }
1486
+
1487
+ /**
1488
+ * Summary: Properly handles each case of notification, based in payment status.
1489
+ * Description: Properly handles each case of notification, based in payment status.
1490
+ */
1491
+ public function successful_request( $data ) {
1492
+
1493
+ if ( 'yes' == $this->debug ) {
1494
+ $this->log->add(
1495
+ $this->id,
1496
+ '[successful_request] - starting to process ipn update...'
1497
+ );
1498
+ }
1499
+
1500
+ // Get the order and check its presence.
1501
+ $order_key = $data['external_reference'];
1502
+ if ( empty( $order_key ) ) {
1503
+ return;
1504
+ }
1505
+ $id = (int) str_replace( $this->invoice_prefix, '', $order_key );
1506
+ $order = wc_get_order( $id );
1507
+
1508
+ // Check if order exists.
1509
+ if ( ! $order ) {
1510
+ return;
1511
+ }
1512
+
1513
+ // WooCommerce 3.0 or later.
1514
+ if ( method_exists( $order, 'get_id' ) ) {
1515
+ $order_id = $order->get_id();
1516
+ } else {
1517
+ $order_id = $order->id;
1518
+ }
1519
+
1520
+ // Check if we have the correct order.
1521
+ if ( $order_id !== $id ) {
1522
+ return;
1523
+ }
1524
+
1525
+ if ( 'yes' == $this->debug ) {
1526
+ $this->log->add(
1527
+ $this->id,
1528
+ '[successful_request] - updating metadata and status with data: ' .
1529
+ json_encode( $data, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
1530
+ );
1531
+ }
1532
+
1533
+ // Here, we process the status... this is the business rules!
1534
+ // Reference: https://www.mercadopago.com.br/developers/en/api-docs/basic-checkout/ipn/payment-status/
1535
+ $status = isset( $data['status'] ) ? $data['status'] : 'pending';
1536
+ $total_paid = isset( $data['transaction_details']['total_paid_amount'] ) ? $data['transaction_details']['total_paid_amount'] : 0.00;
1537
+ $total_refund = isset( $data['transaction_amount_refunded'] ) ? $data['transaction_amount_refunded'] : 0.00;
1538
+ $total = $data['transaction_amount'];
1539
+
1540
+ // WooCommerce 3.0 or later.
1541
+ if ( method_exists( $order, 'update_meta_data' ) ) {
1542
+ // Updates the type of gateway.
1543
+ $order->update_meta_data( '_used_gateway', 'WC_WooMercadoPagoTicket_Gateway' );
1544
+
1545
+ if ( ! empty( $data['payer']['email'] ) ) {
1546
+ $order->update_meta_data( __( 'Payer email', 'woocommerce-mercadopago-module' ), $data['payer']['email'] );
1547
+ }
1548
+ if ( ! empty( $data['payment_type_id'] ) ) {
1549
+ $order->update_meta_data( __( 'Payment type', 'woocommerce-mercadopago-module' ), $data['payment_type_id'] );
1550
+ }
1551
+ $payment_id = $data['id'];
1552
+ $order->update_meta_data(
1553
+ 'Mercado Pago - Payment ' . $payment_id,
1554
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1555
+ ']/[Amount ' . $total .
1556
+ ']/[Paid ' . $total_paid .
1557
+ ']/[Refund ' . $total_refund . ']'
1558
+ );
1559
+ $order->update_meta_data( '_Mercado_Pago_Payment_IDs', $payment_id );
1560
+
1561
+ $order->save();
1562
+ } else {
1563
+ // Updates the type of gateway.
1564
+ update_post_meta( $order->id, '_used_gateway', 'WC_WooMercadoPagoTicket_Gateway' );
1565
+
1566
+ if ( ! empty( $data['payer']['email'] ) ) {
1567
+ update_post_meta(
1568
+ $order_id,
1569
+ __( 'Payer email', 'woocommerce-mercadopago-module' ),
1570
+ $data['payer']['email']
1571
+ );
1572
+ }
1573
+ if ( ! empty( $data['payment_type_id'] ) ) {
1574
+ update_post_meta(
1575
+ $order_id,
1576
+ __( 'Payment type', 'woocommerce-mercadopago-module' ),
1577
+ $data['payment_type_id']
1578
+ );
1579
+ }
1580
+ $payment_id = $data['id'];
1581
+ update_post_meta(
1582
+ $order_id,
1583
+ 'Mercado Pago - Payment ' . $payment_id,
1584
+ '[Date ' . date( 'Y-m-d H:i:s', strtotime( $data['date_created'] ) ) .
1585
+ ']/[Amount ' . $total .
1586
+ ']/[Paid ' . $total_paid .
1587
+ ']/[Refund ' . $total_refund . ']'
1588
+ );
1589
+ update_post_meta(
1590
+ $order_id,
1591
+ '_Mercado_Pago_Payment_IDs',
1592
+ $payment_id
1593
+ );
1594
+ }
1595
+
1596
+ // Switch the status and update in WooCommerce.
1597
+ switch ( $status ) {
1598
+ case 'approved':
1599
+ $order->add_order_note(
1600
+ 'Mercado Pago: ' . __( 'Payment approved.', 'woocommerce-mercadopago-module' )
1601
+ );
1602
+ if ( $this->reduce_stock_on_order_gen == 'no' ) {
1603
+ $order->payment_complete();
1604
+ } else {
1605
+ $order->update_status( 'processing' );
1606
+ }
1607
+ break;
1608
+ case 'pending':
1609
+ // decrease stock if not yet decreased and order not exists.
1610
+ $notes = $order->get_customer_order_notes();
1611
+ $has_note = false;
1612
+ if ( sizeof( $notes ) > 1 ) {
1613
+ $has_note = true;
1614
+ break;
1615
+ }
1616
+ if ( ! $has_note ) {
1617
+ $order->add_order_note(
1618
+ 'Mercado Pago: ' .
1619
+ __( 'Waiting for the ticket payment.', 'woocommerce-mercadopago-module' )
1620
+ );
1621
+ $order->add_order_note(
1622
+ 'Mercado Pago: ' .
1623
+ __( 'Waiting for the ticket payment.', 'woocommerce-mercadopago-module' ),
1624
+ 1, false
1625
+ );
1626
+ }
1627
+ break;
1628
+ case 'in_process':
1629
+ $order->update_status(
1630
+ 'on-hold',
1631
+ 'Mercado Pago: ' . __( 'Payment under review.', 'woocommerce-mercadopago-module' )
1632
+ );
1633
+ break;
1634
+ case 'rejected':
1635
+ $order->update_status(
1636
+ 'failed',
1637
+ 'Mercado Pago: ' .
1638
+ __( 'The payment was refused. The customer can try again.', 'woocommerce-mercadopago-module' )
1639
+ );
1640
+ break;
1641
+ case 'refunded':
1642
+ $order->update_status(
1643
+ 'refunded',
1644
+ 'Mercado Pago: ' .
1645
+ __( 'The payment was refunded to the customer.', 'woocommerce-mercadopago-module' )
1646
+ );
1647
+ break;
1648
+ case 'cancelled':
1649
+ $order->update_status(
1650
+ 'cancelled',
1651
+ 'Mercado Pago: ' .
1652
+ __( 'The payment was cancelled.', 'woocommerce-mercadopago-module' )
1653
+ );
1654
+ break;
1655
+ case 'in_mediation':
1656
+ $order->add_order_note(
1657
+ 'Mercado Pago: ' .
1658
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1659
+ );
1660
+ break;
1661
+ case 'charged-back':
1662
+ $order->add_order_note(
1663
+ 'Mercado Pago: ' .
1664
+ __( 'The payment is under mediation or it was charged-back.', 'woocommerce-mercadopago-module' )
1665
+ );
1666
+ break;
1667
+ default:
1668
+ break;
1669
+ }
1670
+ }
1671
+
1672
+ }
1673
+
1674
+ new WC_WooMercadoPagoTicket_Gateway( true );
mercadopago/sdk/lib/cacert.pem CHANGED
File without changes
mercadopago/sdk/lib/mercadopago.php CHANGED
@@ -1,413 +1,758 @@
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 +760,335 @@ 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.1';
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 sandbox_mode( $enable = NULL ) {
49
+ if ( ! is_null( $enable ) ) {
50
+ $this->sandbox = $enable === TRUE;
51
+ }
52
+ return $this->sandbox;
53
+ }
54
+
55
+ /**
56
+ * Summary: Get Access Token for API use.
57
+ * Description: Get Access Token for API use.
58
+ * @return a string that identifies the access token.
59
+ */
60
+ public function get_access_token() {
61
+
62
+ if ( isset( $this->ll_access_token ) && ! is_null( $this->ll_access_token ) ) {
63
+ return $this->ll_access_token;
64
+ }
65
+
66
+ $app_client_values = array(
67
+ 'client_id' => $this->client_id,
68
+ 'client_secret' => $this->client_secret,
69
+ 'grant_type' => 'client_credentials'
70
+ );
71
+
72
+ $access_data = MPRestClient::post(
73
+ array(
74
+ 'uri' => '/oauth/token',
75
+ 'data' => $app_client_values,
76
+ 'headers' => array(
77
+ 'content-type' => 'application/x-www-form-urlencoded'
78
+ )
79
+ ),
80
+ $this->version
81
+ );
82
+
83
+ if ( $access_data['status'] != 200 ) {
84
+ throw new MercadoPagoException (
85
+ $access_data['response']['message'], $access_data['status']
86
+ );
87
+ }
88
+
89
+ $access_data = $access_data['response'];
90
+ return $access_data['access_token'];
91
+
92
+ }
93
+
94
+ /**
95
+ * Summary: Search for a payment given its id.
96
+ * Description: Search for a payment given its id.
97
+ * @param string $id
98
+ * @return array( json )
99
+ */
100
+ public function search_paymentV1( $id ) {
101
+
102
+ $request = array(
103
+ 'uri' => '/v1/payments/' . $id,
104
+ 'params' => array(
105
+ 'access_token' => $this->get_access_token()
106
+ )
107
+ );
108
+
109
+ $payment = MPRestClient::get( $request, $this->version );
110
+ return $payment;
111
+
112
+ }
113
+
114
+ //=== CUSTOMER CARDS FUNCTIONS ===
115
+
116
+ /**
117
+ * Summary: Trigger API to find a card owner and create him if dont find.
118
+ * Description: Trigger API to find a card owner and create him if dont find.
119
+ * @param string $payer_email
120
+ * @return array( json )
121
+ */
122
+ public function get_or_create_customer( $payer_email ) {
123
+
124
+ $customer = $this->search_customer( $payer_email );
125
+
126
+ if ( $customer['status'] == 200 && $customer['response']['paging']['total'] > 0 ) {
127
+ $customer = $customer['response']['results'][0];
128
+ } else {
129
+ $resp = $this->create_customer( $payer_email );
130
+ $customer = $resp['response'];
131
+ }
132
+
133
+ return $customer;
134
+
135
+ }
136
+
137
+ /**
138
+ * Summary: Create a card owner.
139
+ * Description: Create a card owner.
140
+ * @param string $payer_email
141
+ * @return array( json )
142
+ */
143
+ public function create_customer( $email ) {
144
+
145
+ $request = array(
146
+ 'uri' => '/v1/customers',
147
+ 'params' => array(
148
+ 'access_token' => $this->get_access_token()
149
+ ),
150
+ 'data' => array(
151
+ 'email' => $email
152
+ )
153
+ );
154
+
155
+ $customer = MPRestClient::post( $request, $this->version );
156
+ return $customer;
157
+
158
+ }
159
+
160
+ /**
161
+ * Summary: Try to find a card owner.
162
+ * Description: Try to find a card owner.
163
+ * @param string $payer_email
164
+ * @return array( json )
165
+ */
166
+ public function search_customer( $email ) {
167
+
168
+ $request = array(
169
+ 'uri' => '/v1/customers/search',
170
+ 'params' => array(
171
+ 'access_token' => $this->get_access_token(),
172
+ 'email' => $email
173
+ )
174
+ );
175
+
176
+ $customer = MPRestClient::get( $request, $this->version );
177
+ return $customer;
178
+
179
+ }
180
+
181
+ /**
182
+ * Summary: Given a customer, create a card for him.
183
+ * Description: Given a customer, create a card for him.
184
+ * @param string $customer_id
185
+ * @param string $token
186
+ * @param string $payment_method_id
187
+ * @param string $issuer_id
188
+ * @return array( json )
189
+ */
190
+ public function create_card_in_customer( $customer_id, $token, $payment_method_id = null,
191
+ $issuer_id = null ) {
192
+
193
+ $request = array(
194
+ 'uri' => '/v1/customers/' . $customer_id . '/cards',
195
+ 'params' => array(
196
+ 'access_token' => $this->get_access_token()
197
+ ),
198
+ 'data' => array(
199
+ 'token' => $token,
200
+ 'issuer_id' => $issuer_id,
201
+ 'payment_method_id' => $payment_method_id
202
+ )
203
+ );
204
+
205
+ $card = MPRestClient::post( $request, $this->version );
206
+ return $card;
207
+
208
+ }
209
+
210
+ /**
211
+ * Summary: Given a customer, find all of his cards.
212
+ * Description: Given a customer, find all of his cards.
213
+ * @param string $customer_id
214
+ * @param string $token
215
+ * @return array( json )
216
+ */
217
+ public function get_all_customer_cards( $customer_id, $token ) {
218
+
219
+ $request = array(
220
+ 'uri' => '/v1/customers/' . $customer_id . '/cards',
221
+ 'params' => array(
222
+ 'access_token' => $this->get_access_token()
223
+ )
224
+ );
225
+
226
+ $cards = MPRestClient::get( $request, $this->version );
227
+ return $cards;
228
+
229
+ }
230
+
231
+ //=== COUPOM AND DISCOUNTS FUNCTIONS ===
232
+
233
+ /**
234
+ * Summary: Check for discounts for a combination of amount, payer and coupm code.
235
+ * Description: Check for discounts for a combination of amount, payer and coupm code.
236
+ * @param string $transaction_amount
237
+ * @param string $payer_email
238
+ * @param string $coupon_code
239
+ * @return array( json )
240
+ */
241
+ public function check_discount_campaigns( $transaction_amount, $payer_email, $coupon_code ) {
242
+
243
+ $request = array(
244
+ 'uri' => '/discount_campaigns',
245
+ 'params' => array(
246
+ 'access_token' => $this->get_access_token(),
247
+ 'transaction_amount' => $transaction_amount,
248
+ 'payer_email' => $payer_email,
249
+ 'coupon_code' => $coupon_code
250
+ )
251
+ );
252
+
253
+ $discount_info = MPRestClient::get( $request, $this->version );
254
+ return $discount_info;
255
+
256
+ }
257
+
258
+ //=== ACCOUNT SETTINGS FUNCTIONS ===
259
+
260
+ /**
261
+ * Summary: Check the status of a account regarding its option to use two cards for pay.
262
+ * Description: Check the status of a account regarding its option to use two cards for pay.
263
+ * @return array( json )
264
+ */
265
+ public function check_two_cards() {
266
+
267
+ $request = array(
268
+ 'uri' => '/account/settings?access_token=' . $this->get_access_token()
269
+ );
270
+
271
+ $two_cards_info = MPRestClient::get( $request, $this->version );
272
+ if ( $two_cards_info['status'] == 200 )
273
+ return $two_cards_info['response']['two_cards'];
274
+ else {
275
+ return 'inactive';
276
+ }
277
+
278
+ }
279
+
280
+ /**
281
+ * Summary: Set paymennts with two cards for the merchant.
282
+ * Description: Set paymennts with two cards for the merchant.
283
+ * @param string $mode ( should be 'active' or 'inactive' string )
284
+ * @return array( json )
285
+ */
286
+ public function set_two_cards_mode( $mode ) {
287
+
288
+ $request = array(
289
+ 'uri' => '/account/settings?access_token=' . $this->get_access_token(),
290
+ 'data' => array(
291
+ 'two_cards' => $mode
292
+ ),
293
+ 'headers' => array(
294
+ 'content-type' => 'application/json'
295
+ )
296
+ );
297
+
298
+ $two_cards_info = MPRestClient::put( $request, $this->version );
299
+ return $two_cards_info;
300
+
301
+ }
302
+
303
+ //=== CHECKOUT AUXILIARY FUNCTIONS ===
304
+
305
+ /**
306
+ * Summary: Get information for specific payment.
307
+ * Description: Get information for specific payment.
308
+ * @param int $id
309
+ * @return array( json )
310
+ */
311
+ public function get_payment_info( $id ) {
312
+
313
+ $uri_prefix = $this->sandbox ? '/sandbox' : '';
314
+
315
+ $request = array(
316
+ 'uri' => $uri_prefix.'/collections/notifications/{$id}',
317
+ 'params' => array(
318
+ 'access_token' => $this->get_access_token()
319
+ )
320
+ );
321
+
322
+ $payment_info = MPRestClient::get( $request, $this->version );
323
+ return $payment_info;
324
+
325
+ }
326
+
327
+ /**
328
+ * Summary: Search payments according to filters, with pagination.
329
+ * Description: Search payments according to filters, with pagination.
330
+ * @param array $filters
331
+ * @param int $offset
332
+ * @param int $limit
333
+ * @return array( json )
334
+ */
335
+ public function search_payment( $filters, $offset = 0, $limit = 0 ) {
336
+
337
+ $filters['offset'] = $offset;
338
+ $filters['limit'] = $limit;
339
+
340
+ $uri_prefix = $this->sandbox ? '/sandbox' : '';
341
+
342
+ $request = array(
343
+ 'uri' => $uri_prefix . '/collections/search',
344
+ 'params' => array_merge ( $filters, array(
345
+ 'access_token' => $this->get_access_token()
346
+ ) )
347
+ );
348
+
349
+ $collection_result = MPRestClient::get( $request, $this->version );
350
+ return $collection_result;
351
+
352
+ }
353
+
354
+ /**
355
+ * Summary: Get information for specific authorized payment.
356
+ * Description: Get information for specific authorized payment.
357
+ * @param id
358
+ * @return array( json )
359
+ */
360
+ public function get_authorized_payment( $id ) {
361
+
362
+ $request = array(
363
+ 'uri' => '/authorized_payments/{$id}',
364
+ 'params' => array(
365
+ 'access_token' => $this->get_access_token()
366
+ )
367
+ );
368
+
369
+ $authorized_payment_info = MPRestClient::get( $request, $this->version );
370
+ return $authorized_payment_info;
371
+
372
+ }
373
+
374
+ /**
375
+ * Summary: Create a checkout preference.
376
+ * Description: Create a checkout preference.
377
+ * @param array $preference
378
+ * @return array( json )
379
+ */
380
+ public function create_preference( $preference ) {
381
+
382
+ $request = array(
383
+ 'uri' => '/checkout/preferences',
384
+ 'params' => array(
385
+ 'access_token' => $this->get_access_token()
386
+ ),
387
+ 'headers' => array(
388
+ 'user-agent' => 'platform:desktop,type:woocommerce,so:' . $this->version
389
+ ),
390
+ 'data' => $preference
391
+ );
392
+
393
+ $preference_result = MPRestClient::post( $request, $this->version );
394
+ return $preference_result;
395
+
396
+ }
397
+
398
+ /**
399
+ * Summary: Update a checkout preference.
400
+ * Description: Update a checkout preference.
401
+ * @param string $id
402
+ * @param array $preference
403
+ * @return array( json )
404
+ */
405
+ public function update_preference( $id, $preference ) {
406
+
407
+ $request = array(
408
+ 'uri' => '/checkout/preferences/{$id}',
409
+ 'params' => array(
410
+ 'access_token' => $this->get_access_token()
411
+ ),
412
+ 'data' => $preference
413
+ );
414
+
415
+ $preference_result = MPRestClient::put( $request, $this->version );
416
+ return $preference_result;
417
+
418
+ }
419
+
420
+ /**
421
+ * Summary: Get a checkout preference.
422
+ * Description: Get a checkout preference.
423
+ * @param string $id
424
+ * @return array( json )
425
+ */
426
+ public function get_preference( $id ) {
427
+
428
+ $request = array(
429
+ 'uri' => '/checkout/preferences/{$id}',
430
+ 'params' => array(
431
+ 'access_token' => $this->get_access_token()
432
+ )
433
+ );
434
+
435
+ $preference_result = MPRestClient::get( $request, $this->version );
436
+ return $preference_result;
437
+
438
+ }
439
+
440
+ /**
441
+ * Summary: Create a checkout preference.
442
+ * Description: Create a checkout preference.
443
+ * @param array $preference
444
+ * @return array( json )
445
+ */
446
+ public function create_payment( $preference ) {
447
+
448
+ $request = array(
449
+ 'uri' => '/v1/payments',
450
+ 'params' => array(
451
+ 'access_token' => $this->get_access_token()
452
+ ),
453
+ 'headers' => array(
454
+ 'X-Tracking-Id' => 'platform:v1-whitelabel,type:woocommerce,so:' . $this->version
455
+ ),
456
+ 'data' => $preference
457
+ );
458
+
459
+ $payment = MPRestClient::post( $request, $this->version );
460
+ return $payment;
461
+ }
462
+
463
+ /**
464
+ * Summary: Create a preapproval payment.
465
+ * Description: Create a preapproval payment.
466
+ * @param array $preapproval_payment
467
+ * @return array( json )
468
+ */
469
+ public function create_preapproval_payment( $preapproval_payment ) {
470
+
471
+ $request = array(
472
+ 'uri' => '/preapproval',
473
+ 'params' => array(
474
+ 'access_token' => $this->get_access_token()
475
+ ),
476
+ 'data' => $preapproval_payment
477
+ );
478
+
479
+ $preapproval_payment_result = MPRestClient::post( $request, $this->version );
480
+ return $preapproval_payment_result;
481
+
482
+ }
483
+
484
+ /**
485
+ * Summary: Get a preapproval payment.
486
+ * Description: Get a preapproval payment.
487
+ * @param string $id
488
+ * @return array( json )
489
+ */
490
+ public function get_preapproval_payment( $id ) {
491
+
492
+ $request = array(
493
+ 'uri' => '/preapproval/{$id}',
494
+ 'params' => array(
495
+ 'access_token' => $this->get_access_token()
496
+ )
497
+ );
498
+
499
+ $preapproval_payment_result = MPRestClient::get( $request, $this->version );
500
+ return $preapproval_payment_result;
501
+
502
+ }
503
+
504
+ /**
505
+ * Summary: Update a preapproval payment.
506
+ * Description: Update a preapproval payment.
507
+ * @param string $preapproval_payment, $id
508
+ * @return array( json )
509
+ */
510
+ public function update_preapproval_payment( $id, $preapproval_payment ) {
511
+
512
+ $request = array(
513
+ 'uri' => '/preapproval/{$id}',
514
+ 'params' => array(
515
+ 'access_token' => $this->get_access_token()
516
+ ),
517
+ 'data' => $preapproval_payment
518
+ );
519
+
520
+ $preapproval_payment_result = MPRestClient::put( $request, $this->version );
521
+ return $preapproval_payment_result;
522
+
523
+ }
524
+
525
+ /**
526
+ * Summary: Cancel preapproval payment.
527
+ * Description: Cancel preapproval payment.
528
+ * @param int $id
529
+ * @return array( json )
530
+ */
531
+ public function cancel_preapproval_payment( $id ) {
532
+
533
+ $request = array(
534
+ 'uri' => '/preapproval/{$id}',
535
+ 'params' => array(
536
+ 'access_token' => $this->get_access_token()
537
+ ),
538
+ 'data' => array(
539
+ 'status' => 'cancelled'
540
+ )
541
+ );
542
+
543
+ $response = MPRestClient::put( $request, $this->version );
544
+ return $response;
545
+
546
+ }
547
+
548
+ //=== REFUND AND CANCELING FLOW FUNCTIONS ===
549
+
550
+ /**
551
+ * Summary: Refund accredited payment.
552
+ * Description: Refund accredited payment.
553
+ * @param int $id
554
+ * @return array( json )
555
+ */
556
+ public function refund_payment( $id ) {
557
+
558
+ $request = array(
559
+ 'uri' => '/collections/' . $id,
560
+ 'params' => array(
561
+ 'access_token' => $this->get_access_token()
562
+ ),
563
+ 'data' => '{"status":"refunded"}'
564
+ );
565
+
566
+ $response = MPRestClient::put( $request, $this->version );
567
+ return $response;
568
+
569
+ }
570
+
571
+ /**
572
+ * Summary: Partially refund accredited payment.
573
+ * Description: Partially refund accredited payment.
574
+ * @param int $id
575
+ * @return array( json )
576
+ */
577
+ public function partial_refund_payment( $id, $amount, $reason, $external_reference ) {
578
+
579
+ $request = array(
580
+ 'uri' => '/collections/' . $id . '/refunds?access_token=' . $this->get_access_token(),
581
+ 'data' => array(
582
+ 'amount' => $amount,
583
+ 'metadata' => array(
584
+ 'metadata' => $reason,
585
+ 'external_reference' => $external_reference
586
+ )
587
+ )
588
+ );
589
+
590
+ $response = MPRestClient::post( $request, $this->version );
591
+ return $response;
592
+
593
+ }
594
+
595
+ /**
596
+ * Summary: Cancel pending payment.
597
+ * Description: Cancel pending payment.
598
+ * @param int $id
599
+ * @return array( json )
600
+ */
601
+ public function cancel_payment( $id ) {
602
+
603
+ $request = array(
604
+ 'uri' => '/collections/' . $id,
605
+ 'params' => array(
606
+ 'access_token' => $this->get_access_token()
607
+ ),
608
+ 'data' => '{"status":"cancelled"}'
609
+ );
610
+
611
+ $response = MPRestClient::put( $request, $this->version );
612
+ return $response;
613
+
614
+ }
615
+
616
+ //=== GENERIC RESOURCE CALL METHODS ===
617
+
618
+ /**
619
+ * Summary: Generic resource get.
620
+ * Description: Generic resource get.
621
+ * @param request
622
+ * @param params (deprecated)
623
+ * @param authenticate = true (deprecated)
624
+ */
625
+ public function get( $request, $params = null, $authenticate = true ) {
626
+
627
+ if ( is_string ( $request ) ) {
628
+ $request = array(
629
+ 'uri' => $request,
630
+ 'params' => $params,
631
+ 'authenticate' => $authenticate
632
+ );
633
+ }
634
+
635
+ $request['params'] = isset( $request['params'] ) && is_array( $request['params'] ) ?
636
+ $request['params'] :
637
+ array();
638
+
639
+ if ( ! isset( $request['authenticate'] ) || $request['authenticate'] !== false ) {
640
+ $request['params']['access_token'] = $this->get_access_token();
641
+ }
642
+
643
+ $result = MPRestClient::get( $request, $this->version );
644
+ return $result;
645
+
646
+ }
647
+
648
+ /**
649
+ * Summary: Generic resource post.
650
+ * Description: Generic resource get.
651
+ * @param request
652
+ * @param data (deprecated)
653
+ * @param params (deprecated)
654
+ */
655
+ public function post( $request, $data = null, $params = null ) {
656
+
657
+ if ( is_string ( $request ) ) {
658
+ $request = array(
659
+ 'uri' => $request,
660
+ 'data' => $data,
661
+ 'params' => $params
662
+ );
663
+ }
664
+
665
+ $request['params'] = isset( $request['params'] ) && is_array( $request['params'] ) ?
666
+ $request["params"] :
667
+ array();
668
+
669
+ if ( ! isset ( $request['authenticate'] ) || $request['authenticate'] !== false ) {
670
+ $request['params']['access_token'] = $this->get_access_token();
671
+ }
672
+
673
+ $result = MPRestClient::post( $request, $this->version );
674
+ return $result;
675
+
676
+ }
677
+
678
+ /**
679
+ * Summary: Generic resource put.
680
+ * Description: Generic resource put.
681
+ * @param request
682
+ * @param data (deprecated)
683
+ * @param params (deprecated)
684
+ */
685
+ public function put( $request, $data = null, $params = null ) {
686
+
687
+ if ( is_string ( $request ) ) {
688
+ $request = array(
689
+ 'uri' => $request,
690
+ 'data' => $data,
691
+ 'params' => $params
692
+ );
693
+ }
694
+
695
+ $request['params'] = isset( $request['params'] ) && is_array( $request['params'] ) ?
696
+ $request['params'] :
697
+ array();
698
+
699
+ if ( ! isset ( $request['authenticate'] ) || $request['authenticate'] !== false ) {
700
+ $request['params']['access_token'] = $this->get_access_token();
701
+ }
702
+
703
+ $result = MPRestClient::put( $request, $this->version );
704
+ return $result;
705
+
706
+ }
707
+
708
+ /**
709
+ * Summary: Generic resource delete.
710
+ * Description: Generic resource delete.
711
+ * @param request
712
+ * @param data (deprecated)
713
+ * @param params (deprecated)
714
+ */
715
+ public function delete( $request, $params = null ) {
716
+
717
+ if ( is_string ( $request ) ) {
718
+ $request = array(
719
+ 'uri' => $request,
720
+ 'params' => $params
721
+ );
722
+ }
723
+
724
+ $request['params'] = isset( $request['params'] ) && is_array( $request['params'] ) ?
725
+ $request['params'] :
726
+ array();
727
+
728
+ if ( ! isset( $request['authenticate'] ) || $request['authenticate'] !== false ) {
729
+ $request['params']['access_token'] = $this->get_access_token();
730
+ }
731
+
732
+ $result = MPRestClient::delete( $request, $this->version );
733
+ return $result;
734
+
735
+ }
736
+
737
+ //=== MODULE ANALYTICS FUNCTIONS ===
738
+
739
+ /**
740
+ * Summary: Save the settings of the module for analytics purposes.
741
+ * Description: Save the settings of the module for analytics purposes.
742
+ * @param array( json )
743
+ * @return array( json )
744
+ */
745
+ public function analytics_save_settings( $module_info ) {
746
+
747
+ $request = array(
748
+ 'uri' => '/modules/tracking/settings?access_token=' . $this->get_access_token(),
749
+ 'data' => $module_info
750
+ );
751
+
752
+ $result = MPRestClient::post( $request, $this->version );
753
+ return $result;
754
+
755
+ }
756
 
757
  }
758
 
760
  * MercadoPago cURL RestClient
761
  */
762
  class MPRestClient {
763
+
764
+ const API_BASE_URL = 'https://api.mercadopago.com';
765
+
766
+ private static function build_request( $request, $version ) {
767
+
768
+ if ( ! extension_loaded ( 'curl' ) ) {
769
+ throw new MercadoPagoException( 'cURL extension not found. You need to enable cURL in your php.ini or another configuration you have.' );
770
+ }
771
+
772
+ if ( ! isset( $request['method'] ) ) {
773
+ throw new MercadoPagoException( 'No HTTP METHOD specified' );
774
+ }
775
+
776
+ if ( ! isset( $request['uri'] ) ) {
777
+ throw new MercadoPagoException( 'No URI specified' );
778
+ }
779
+
780
+ // Set headers
781
+ $headers = array( 'accept: application/json' );
782
+ $json_content = true;
783
+ $form_content = false;
784
+ $default_content_type = true;
785
+
786
+ if ( isset( $request['headers'] ) && is_array( $request['headers'] ) ) {
787
+ foreach ( $request['headers'] as $h => $v ) {
788
+ $h = strtolower( $h );
789
+ $v = strtolower( $v );
790
+ if ( $h == 'content-type' ) {
791
+ $default_content_type = false;
792
+ $json_content = $v == 'application/json';
793
+ $form_content = $v == 'application/x-www-form-urlencoded';
794
+ }
795
+ array_push ( $headers, $h . ': ' . $v );
796
+ }
797
+ }
798
+ if ( $default_content_type ) {
799
+ array_push( $headers, 'content-type: application/json' );
800
+ }
801
+
802
+ // Build $connect
803
+ $connect = curl_init();
804
+
805
+ curl_setopt(
806
+ $connect,
807
+ CURLOPT_USERAGENT,
808
+ 'platform:v1-whitelabel,type:woocommerce,so:' . $version );
809
+ curl_setopt(
810
+ $connect,
811
+ CURLOPT_RETURNTRANSFER,
812
+ true );
813
+ curl_setopt(
814
+ $connect,
815
+ CURLOPT_SSL_VERIFYPEER,
816
+ true );
817
+ curl_setopt(
818
+ $connect,
819
+ CURLOPT_CAINFO,
820
+ $GLOBALS['LIB_LOCATION'] . '/cacert.pem' );
821
+ curl_setopt(
822
+ $connect,
823
+ CURLOPT_CUSTOMREQUEST,
824
+ $request['method'] );
825
+ curl_setopt(
826
+ $connect,
827
+ CURLOPT_HTTPHEADER,
828
+ $headers );
829
+
830
+ // Set parameters and url
831
+ if ( isset( $request['params'] ) && is_array( $request['params'] ) ) {
832
+ if ( count( $request['params'] > 0 ) ) {
833
+ $request['uri'] .= ( strpos( $request['uri'], '?' ) === false ) ? '?' : '&';
834
+ $request['uri'] .= self::build_query( $request['params'] );
835
+ }
836
+ }
837
+ curl_setopt( $connect, CURLOPT_URL, MPRestClient::API_BASE_URL . $request['uri'] );
838
+
839
+ // Set data
840
+ if ( isset( $request['data'] ) ) {
841
+ if ( $json_content ) {
842
+ if ( gettype( $request['data'] ) == 'string' ) {
843
+ json_decode( $request['data'], true );
844
+ } else {
845
+ $request['data'] = json_encode( $request['data'] );
846
+ }
847
+ if( function_exists( 'json_last_error' ) ) {
848
+ $json_error = json_last_error();
849
+ if ( $json_error != JSON_ERROR_NONE ) {
850
+ throw new MercadoPagoException(
851
+ 'JSON Error [{$json_error}] - Data: ' . $request['data']
852
+ );
853
+ }
854
+ }
855
+ } elseif ( $form_content ) {
856
+ $request['data'] = self::build_query( $request['data'] );
857
+ }
858
+ curl_setopt( $connect, CURLOPT_POSTFIELDS, $request['data'] );
859
+ }
860
+
861
+ return $connect;
862
+
863
+ }
864
+
865
+ private static function exec( $request, $version ) {
866
+
867
+ $connect = self::build_request( $request, $version );
868
+
869
+ $api_result = curl_exec( $connect );
870
+ $api_http_code = curl_getinfo( $connect, CURLINFO_HTTP_CODE );
871
+
872
+ if ( $api_result === FALSE ) {
873
+ throw new MercadoPagoException ( curl_error ( $connect ) );
874
+ }
875
+
876
+ $response = array(
877
+ 'status' => $api_http_code,
878
+ 'response' => json_decode( $api_result, true )
879
+ );
880
+
881
+ curl_close( $connect );
882
+
883
+ return $response;
884
+
885
+ }
886
+
887
+ private static function build_query( $params ) {
888
+
889
+ if ( function_exists( 'http_build_query' ) ) {
890
+ return http_build_query( $params, '', '&' );
891
+ } else {
892
+ foreach ( $params as $name => $value ) {
893
+ $elements[] = '{$name}=' . urlencode( $value );
894
+ }
895
+ return implode( '&', $elements );
896
+ }
897
+
898
+ }
899
+
900
+ public static function get( $request, $version ) {
901
+ $request['method'] = 'GET';
902
+
903
+ return self::exec( $request, $version );
904
+ }
905
+
906
+ public static function post( $request, $version ) {
907
+ $request['method'] = 'POST';
908
+
909
+ return self::exec( $request, $version );
910
+ }
911
+
912
+ public static function put( $request, $version ) {
913
+ $request['method'] = 'PUT';
914
+
915
+ return self::exec( $request, $version );
916
+ }
917
+
918
+ public static function delete( $request, $version ) {
919
+ $request['method'] = 'DELETE';
920
+
921
+ return self::exec( $request, $version );
922
+ }
923
+
924
+ }
925
+
926
+ class MeliRestClient{
927
+ const API_BASE_URL = 'https://api.mercadolibre.com';
928
+
929
+ private static function build_request( $request, $version ) {
930
+
931
+ if ( ! extension_loaded ( 'curl' ) ) {
932
+ throw new MercadoPagoException( 'cURL extension not found. You need to enable cURL in your php.ini or another configuration you have.' );
933
+ }
934
+
935
+ if ( ! isset( $request['method'] ) ) {
936
+ throw new MercadoPagoException( 'No HTTP METHOD specified' );
937
+ }
938
+
939
+ if ( ! isset( $request['uri'] ) ) {
940
+ throw new MercadoPagoException( 'No URI specified' );
941
+ }
942
+
943
+ // Set headers
944
+ $headers = array( 'accept: application/json' );
945
+ $json_content = true;
946
+ $form_content = false;
947
+ $default_content_type = true;
948
+
949
+ if ( isset( $request['headers'] ) && is_array( $request['headers'] ) ) {
950
+ foreach ( $request['headers'] as $h => $v ) {
951
+ $h = strtolower( $h );
952
+ $v = strtolower( $v );
953
+ if ( $h == 'content-type' ) {
954
+ $default_content_type = false;
955
+ $json_content = $v == 'application/json';
956
+ $form_content = $v == 'application/x-www-form-urlencoded';
957
+ }
958
+ array_push ( $headers, $h . ': ' . $v );
959
+ }
960
+ }
961
+ if ( $default_content_type ) {
962
+ array_push( $headers, 'content-type: application/json' );
963
+ }
964
+
965
+ // Build $connect
966
+ $connect = curl_init();
967
+
968
+ curl_setopt(
969
+ $connect,
970
+ CURLOPT_USERAGENT,
971
+ 'platform:v1-whitelabel,type:woocommerce,so:' . $version );
972
+ curl_setopt(
973
+ $connect,
974
+ CURLOPT_RETURNTRANSFER,
975
+ true );
976
+ curl_setopt(
977
+ $connect,
978
+ CURLOPT_SSL_VERIFYPEER,
979
+ true );
980
+ curl_setopt(
981
+ $connect,
982
+ CURLOPT_CAINFO,
983
+ $GLOBALS['LIB_LOCATION'] . '/cacert.pem' );
984
+ curl_setopt(
985
+ $connect,
986
+ CURLOPT_CUSTOMREQUEST,
987
+ $request['method'] );
988
+ curl_setopt(
989
+ $connect,
990
+ CURLOPT_HTTPHEADER,
991
+ $headers );
992
+
993
+ // Set parameters and url
994
+ if ( isset( $request['params'] ) && is_array( $request['params'] ) ) {
995
+ if ( count( $request['params'] > 0 ) ) {
996
+ $request['uri'] .= ( strpos( $request['uri'], '?' ) === false ) ? '?' : '&';
997
+ $request['uri'] .= self::build_query( $request['params'] );
998
+ }
999
+ }
1000
+ curl_setopt( $connect, CURLOPT_URL, MeliRestClient::API_BASE_URL . $request['uri'] );
1001
+
1002
+ // Set data
1003
+ if ( isset( $request['data'] ) ) {
1004
+ if ( $json_content ) {
1005
+ if ( gettype( $request['data'] ) == 'string' ) {
1006
+ json_decode( $request['data'], true );
1007
+ } else {
1008
+ $request['data'] = json_encode( $request['data'] );
1009
+ }
1010
+ if( function_exists( 'json_last_error' ) ) {
1011
+ $json_error = json_last_error();
1012
+ if ( $json_error != JSON_ERROR_NONE ) {
1013
+ throw new MercadoPagoException(
1014
+ 'JSON Error [{$json_error}] - Data: ' . $request['data']
1015
+ );
1016
+ }
1017
+ }
1018
+ } elseif ( $form_content ) {
1019
+ $request['data'] = self::build_query( $request['data'] );
1020
+ }
1021
+ curl_setopt( $connect, CURLOPT_POSTFIELDS, $request['data'] );
1022
+ }
1023
+
1024
+ return $connect;
1025
+ }
1026
+
1027
+
1028
+ private static function exec( $request, $version ) {
1029
+
1030
+ $connect = self::build_request( $request, $version );
1031
+
1032
+ $api_result = curl_exec( $connect );
1033
+ $api_http_code = curl_getinfo( $connect, CURLINFO_HTTP_CODE );
1034
+
1035
+ if ( $api_result === FALSE ) {
1036
+ throw new MercadoPagoException ( curl_error ( $connect ) );
1037
+ }
1038
+
1039
+ $response = array(
1040
+ 'status' => $api_http_code,
1041
+ 'response' => json_decode( $api_result, true )
1042
+ );
1043
+
1044
+ curl_close( $connect );
1045
+
1046
+ return $response;
1047
+
1048
+ }
1049
+
1050
+ private static function build_query( $params ) {
1051
+
1052
+ if ( function_exists( 'http_build_query' ) ) {
1053
+ return http_build_query( $params, '', '&' );
1054
+ } else {
1055
+ foreach ( $params as $name => $value ) {
1056
+ $elements[] = '{$name}=' . urlencode( $value );
1057
+ }
1058
+ return implode( '&', $elements );
1059
+ }
1060
+
1061
+ }
1062
+
1063
+ public static function get( $request, $version ) {
1064
+ $request['method'] = 'GET';
1065
+
1066
+ return self::exec( $request, $version );
1067
+ }
1068
+
1069
+ public static function post( $request, $version ) {
1070
+ $request['method'] = 'POST';
1071
+
1072
+ return self::exec( $request, $version );
1073
+ }
1074
+
1075
+ public static function put( $request, $version ) {
1076
+ $request['method'] = 'PUT';
1077
+
1078
+ return self::exec( $request, $version );
1079
+ }
1080
+
1081
+ public static function delete( $request, $version ) {
1082
+ $request['method'] = 'DELETE';
1083
+
1084
+ return self::exec( $request, $version );
1085
+ }
1086
+
1087
  }
1088
 
1089
  class MercadoPagoException extends Exception {
1090
+ public function __construct( $message, $code = 500, Exception $previous = null ) {
1091
+ // Default code 500
1092
+ parent::__construct( $message, $code, $previous );
1093
+ }
1094
+ }
shipment/abstract-wc-mercadoenvios-shipping.php ADDED
@@ -0,0 +1,352 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+
113
+ // Object package.
114
+ $me_package = new WC_MercadoEnvios_Package( $package );
115
+ $dimensions = $me_package->get_data();
116
+
117
+ // Set zipcode.
118
+ $zip_code = $package['destination']['postcode'];
119
+
120
+ // Height x width x length (centimeters), weight (grams).
121
+ $params = array(
122
+ 'dimensions' => (int) $dimensions['height'] . 'x' . (int) $dimensions['width'] . 'x' .
123
+ (int) $dimensions['length'] . ',' . $dimensions['weight'] * 1000,
124
+ 'zip_code' => preg_replace( '([^0-9])', '', sanitize_text_field( $zip_code ) ),
125
+ 'item_price' => $package['contents_cost'],
126
+ 'access_token' => $this->mp->get_access_token()
127
+ );
128
+
129
+ if ( $this->get_option( 'free_shipping' ) == 'yes' ) {
130
+ $params['free_method'] = $shipping_method_id;
131
+ } else {
132
+ $list_shipping_methods = $this->get_shipping_methods_zone_by_shipping_id( $this->instance_id );
133
+ foreach ( $list_shipping_methods as $key => $shipping_object ) {
134
+ if ( $key == 'mercadoenvios-normal' || $key == 'mercadoenvios-express' ) {
135
+ // WTF?
136
+ $shipping_object = new $shipping_object( $shipping_object->instance_id );
137
+ if ( $shipping_object->get_option( 'free_shipping' ) == 'yes' ) {
138
+ $temp_shipping_method_id = $shipping_object->get_shipping_method_id( $checkout_standard->site_id );
139
+ $params['free_method'] = $temp_shipping_method_id;
140
+ }
141
+ }
142
+ }
143
+ }
144
+
145
+ $response = $this->mp->get( '/shipping_options', $params );
146
+ $this->log->add( $this->id, '[calculate_shipping] Params sent: ' . json_encode( $params, JSON_PRETTY_PRINT ) );
147
+ $this->log->add( $this->id, '[calculate_shipping] Shipments Response API: ' . json_encode( $response, JSON_PRETTY_PRINT ) );
148
+
149
+ if ( $response['status'] != 200 ) {
150
+ $this->log->add(
151
+ $this->id,
152
+ '[calculate_shipping] got response different of 200... returning false.'
153
+ );
154
+ return false;
155
+ }
156
+
157
+ // $shippiments = array();
158
+ foreach ( $response['response']['options'] as $shipping ) {
159
+ if ( $shipping_method_id == $shipping['shipping_method_id'] ) {
160
+ $label_free_shipping = '';
161
+ if ( $this->get_option( 'free_shipping' ) == 'yes' || $shipping['cost'] == 0 ) {
162
+ $label_free_shipping = __( 'Free Shipping', 'woocommerce-mercadopago-module' );
163
+ }
164
+ $label_delivery_time = '';
165
+ if ( $this->get_option( 'show_delivery_time' ) == 'yes' ) {
166
+ $days = $shipping['estimated_delivery_time']['shipping'] / 24;
167
+ if ( $days <= 1 ) {
168
+ $label_delivery_time = $days . ' ' . __( 'Day', 'woocommerce-mercadopago-module' );
169
+ } else {
170
+ $label_delivery_time = $days . ' ' . __( 'Days', 'woocommerce-mercadopago-module' );
171
+ }
172
+ }
173
+ $separator = '';
174
+ if ( $label_free_shipping != '' && $label_delivery_time != '' ) {
175
+ $separator = ' - ';
176
+ }
177
+ $label_info = '';
178
+ if ( $label_free_shipping != '' || $label_delivery_time ) {
179
+ $label_info = ' (' . $label_delivery_time . $separator . $label_free_shipping . ')';
180
+ }
181
+ $option = array(
182
+ 'label' => 'Mercado Envios - ' . $shipping['name'] . $label_info,
183
+ 'package' => $package,
184
+ 'cost' => (float) $shipping['cost'],
185
+ 'meta_data' => array(
186
+ 'dimensions' => $params['dimensions'],
187
+ 'shipping_method_id' => $shipping_method_id,
188
+ 'free_shipping' => $this->get_option( 'free_shipping' )
189
+ )
190
+ );
191
+ $this->log->add(
192
+ $this->id,
193
+ '-----> Optiond added: ' . json_encode( $option, JSON_PRETTY_PRINT )
194
+ );
195
+ $this->add_rate( $option );
196
+ }
197
+ }
198
+
199
+ }
200
+
201
+ /**
202
+ * Replace comma by dot.
203
+ *
204
+ * @param mixed $value Value to fix.
205
+ *
206
+ * @return mixed
207
+ */
208
+ private function fix_format( $value ) {
209
+ $value = str_replace( ',', '.', $value );
210
+ return $value;
211
+ }
212
+
213
+ /**
214
+ * Init form fields.
215
+ */
216
+ public function init_form_fields() {
217
+
218
+ // Force quit loop.
219
+ $mp = WC_WooMercadoPago_Module::init_mercado_pago_gateway_class();
220
+ if ( isset( $mp->mercado_envios_loop ) && $mp->mercado_envios_loop ) {
221
+ return false;
222
+ }
223
+
224
+ $warning_active_shipping_methods = '';
225
+
226
+ if ( $this->show_message_shipping_methods() ) {
227
+ $warning_active_shipping_methods = '<img width="12" height="12" src="' .
228
+ plugins_url( 'images/warning.png', plugin_dir_path( __FILE__ ) ) . '">' . ' ' .
229
+ __( 'Enable the two shipping methods the Mercado Envios (Express and Normal) for the proper functioning of the module.', 'woocommerce-mercadopago-module' );
230
+ }
231
+
232
+ $this->instance_form_fields = array(
233
+ 'mercado_envios_title' => array(
234
+ 'title' => __( 'Mercado Envios', 'woocommerce-mercadopago-module' ),
235
+ 'type' => 'title',
236
+ 'description' => sprintf( '%s', $warning_active_shipping_methods )
237
+ ),
238
+ // 'enabled' => array(
239
+ // 'title' => __( 'Enable/Disable', 'woocommerce-mercadopago-module' ),
240
+ // 'type' => 'checkbox',
241
+ // 'label' => __( 'Enable this shipping method', 'woocommerce-mercadopago-module' ),
242
+ // 'default' => 'yes',
243
+ // ),
244
+ 'title' => array(
245
+ 'title' => __( 'Mercado Envios', 'woocommerce-mercadopago-module' ),
246
+ 'type' => 'text',
247
+ 'description' => __( 'This controls the title which the user sees during checkout.', 'woocommerce-mercadopago-module' ),
248
+ 'default' => __( 'Mercado Envios', 'woocommerce-mercadopago-module' ),
249
+ 'desc_tip' => true,
250
+ ),
251
+ 'free_shipping' => array(
252
+ 'title' => __( 'Free Shipping', 'woocommerce-mercadopago-module' ),
253
+ 'type' => 'checkbox',
254
+ 'label' => __( 'Enable free shipping for this shipping method', 'woocommerce-mercadopago-module' ),
255
+ 'default' => 'no',
256
+ ),
257
+ 'show_delivery_time' => array(
258
+ 'title' => __( 'Delivery Time', 'woocommerce-mercadopago-module' ),
259
+ 'type' => 'checkbox',
260
+ 'label' => __( 'Show estimated delivery time', 'woocommerce-mercadopago-module' ),
261
+ 'description' => __( 'Display the estimated delivery time in working days.', 'woocommerce-mercadopago-module' ),
262
+ 'desc_tip' => true,
263
+ 'default' => 'no',
264
+ )
265
+ );
266
+
267
+ }
268
+
269
+ /**
270
+ * Return shipping methods by zone and shipping id.
271
+ */
272
+ public function get_shipping_methods_zone_by_shipping_id( $shipping_id ) {
273
+ $shipping_zone = WC_Shipping_Zones::get_zone_by( 'instance_id', $shipping_id );
274
+ // Set looping shipping methods.
275
+ $mp = WC_WooMercadoPago_Module::init_mercado_pago_gateway_class();
276
+ $mp->mercado_envios_loop = true;
277
+ $shipping_methods_list = array();
278
+ foreach ( $shipping_zone->get_shipping_methods() as $key => $shipping_object ) {
279
+ $shipping_methods_list[$shipping_object->id] = $shipping_object;
280
+ }
281
+ $mp->mercado_envios_loop = false;
282
+ return $shipping_methods_list;
283
+ }
284
+
285
+ /**
286
+ * Validate if it is necessary to enable message.
287
+ */
288
+ public function show_message_shipping_methods() {
289
+ // Check if is admin.
290
+ if ( is_admin() ) {
291
+ if ( $this->instance_id > 0 ) {
292
+ $shipping_methods_list = $this->get_shipping_methods_zone_by_shipping_id( $this->instance_id );
293
+ $shipping_methods = array();
294
+ foreach ( $shipping_methods_list as $key => $shipping_object ) {
295
+ $shipping_methods[$shipping_object->id] = $shipping_object->is_enabled();
296
+ }
297
+ if ( isset($shipping_methods['mercadoenvios-normal'] ) && isset( $shipping_methods['mercadoenvios-express'] ) ) {
298
+ if ( $shipping_methods['mercadoenvios-normal'] === true && $shipping_methods['mercadoenvios-express'] === true ) {
299
+ // Add settings.
300
+ $this->update_settings_api( 'true' );
301
+ // Not display message.
302
+ return false;
303
+ } elseif ( $shipping_methods['mercadoenvios-normal'] === false && $shipping_methods['mercadoenvios-express'] === false ) {
304
+ // Remove settings.
305
+ $this->update_settings_api( 'false' );
306
+ // Not display message.
307
+ return false;
308
+ }
309
+ }
310
+ // Show message.
311
+ return true;
312
+ } else {
313
+ return false;
314
+ }
315
+ }
316
+ }
317
+
318
+ /**
319
+ * Return shipping method id Mercado Envios.
320
+ */
321
+ public function get_shipping_method_id( $site_id ) {
322
+ return $this->shipments_id[$site_id];
323
+ }
324
+
325
+ /**
326
+ * Update settings api.
327
+ */
328
+ public function update_settings_api( $status ) {
329
+ $checkout_standard = new WC_WooMercadoPago_Gateway();
330
+ $client_id = $checkout_standard->get_option( 'client_id' );
331
+ $client_secret = $checkout_standard->get_option( 'client_secret' );
332
+
333
+ if ( $client_id != '' && $client_secret != '' ) {
334
+ $this->mp = new MP(
335
+ WC_WooMercadoPago_Module::get_module_version(),
336
+ $client_id,
337
+ $client_secret
338
+ );
339
+ // Get default data.
340
+ $infra_data = WC_WooMercadoPago_Module::get_common_settings();
341
+ $infra_data['mercado_envios'] = $status;
342
+ // Request.
343
+ $response = $this->mp->analytics_save_settings( $infra_data );
344
+ $this->log->add(
345
+ $this->id,
346
+ '[update_settings_api] - analytics response: ' .
347
+ json_encode( $response, JSON_PRETTY_PRINT|JSON_UNESCAPED_UNICODE )
348
+ );
349
+ }
350
+ }
351
+
352
+ }
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,1376 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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 36px 16px 36px;">
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 36px 0px 36px;">
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 36px 0px 36px;">
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" style="padding:0px 36px 0px 36px;">
223
+ <div class="mp-box-inputs mp-col-50" id="mp-box-installments-selector">
224
+ <label for="installments">
225
+ <?php echo $form_labels['form']['installments']; ?>
226
+ <?php if ($is_currency_conversion > 0) :
227
+ echo "(" . $form_labels['form']['payment_converted'] . " " .
228
+ $woocommerce_currency . " " . $form_labels['form']['to'] . " " .
229
+ $account_currency . ")";
230
+ endif; ?> <em>*</em>
231
+ </label>
232
+ <select id="installments" data-checkout="installments"
233
+ name="mercadopago_custom[installments]"></select>
234
+ </div>
235
+ <div class="mp-box-inputs mp-col-50 mp-col-70" id="mp-box-input-tax-cft">
236
+ <label >&nbsp;</label>
237
+ <div id="mp-tax-cft-text"></div>
238
+ </div>
239
+ <div class="mp-box-inputs mp-col-100" id="mp-box-input-tax-tea">
240
+ <div id="mp-tax-tea-text"></div>
241
+ </div>
242
+ </div>
243
+ <div class="mp-box-inputs mp-line" style="padding:0px 36px 0px 36px;">
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 36px 0px 36px;">
252
+ <input type="hidden" id="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
+ }
1291
+
1292
+ if ( MPv1.debug ) {
1293
+ document.querySelector( MPv1.selectors.utilities_fields ).style.display = "inline-block";
1294
+ }
1295
+
1296
+ document.querySelector( MPv1.selectors.site_id ).value = MPv1.site_id;
1297
+
1298
+ return;
1299
+
1300
+ }
1301
+
1302
+ this.MPv1 = MPv1;
1303
+
1304
+ } ).call();
1305
+
1306
+ // === Instantiation
1307
+
1308
+ var mercadopago_site_id = "<?php echo $site_id; ?>";
1309
+ var mercadopago_public_key = "<?php echo $public_key; ?>";
1310
+ var mercadopago_payer_email = "<?php echo $payer_email; ?>";
1311
+ var mercadopago_coupon_mode = "<?php echo $coupon_mode; ?>";
1312
+ var mercadopago_discount_action_url = "<?php echo $discount_action_url; ?>";
1313
+
1314
+ MPv1.text.choose = "<?php echo $form_labels['form']['label_choose']; ?>";
1315
+ MPv1.text.other_bank = "<?php echo $form_labels['form']['label_other_bank']; ?>";
1316
+ MPv1.text.discount_info1 = "<?php echo $form_labels['form']['discount_info1']; ?>";
1317
+ MPv1.text.discount_info2 = "<?php echo $form_labels['form']['discount_info2']; ?>";
1318
+ MPv1.text.discount_info3 = "<?php echo $form_labels['form']['discount_info3']; ?>";
1319
+ MPv1.text.discount_info4 = "<?php echo $form_labels['form']['discount_info4']; ?>";
1320
+ MPv1.text.discount_info5 = "<?php echo $form_labels['form']['discount_info5']; ?>";
1321
+ MPv1.text.discount_info6 = "<?php echo $form_labels['form']['discount_info6']; ?>";
1322
+ MPv1.text.apply = "<?php echo $form_labels['form']['apply']; ?>";
1323
+ MPv1.text.remove = "<?php echo $form_labels['form']['remove']; ?>";
1324
+ MPv1.text.coupon_empty = "<?php echo $form_labels['form']['coupon_empty']; ?>";
1325
+ MPv1.paths.loading = "<?php echo ( $images_path . 'loading.gif' ); ?>";
1326
+ MPv1.paths.check = "<?php echo ( $images_path . 'check.png' ); ?>";
1327
+ MPv1.paths.error = "<?php echo ( $images_path . 'error.png' ); ?>";
1328
+
1329
+ // Overriding this function to give form padding attribute.
1330
+ MPv1.setForm = function() {
1331
+ if ( MPv1.customer_and_card.status ) {
1332
+ document.querySelector( MPv1.selectors.form ).style.display = "none";
1333
+ document.querySelector( MPv1.selectors.mpSecurityCodeCustomerAndCard ).removeAttribute( "style" );
1334
+ } else {
1335
+ document.querySelector( MPv1.selectors.mpSecurityCodeCustomerAndCard ).style.display = "none";
1336
+ document.querySelector( MPv1.selectors.form ).removeAttribute( "style" );
1337
+ document.querySelector( MPv1.selectors.form ).style.padding = "0px 36px 0px 36px";
1338
+ }
1339
+ Mercadopago.clearSession();
1340
+ if ( MPv1.create_token_on.event ) {
1341
+ MPv1.createTokenByEvent();
1342
+ MPv1.validateInputsCreateToken();
1343
+ }
1344
+ document.querySelector( MPv1.selectors.CustomerAndCard ).value =
1345
+ MPv1.customer_and_card.status;
1346
+ }
1347
+
1348
+ MPv1.getAmount = function() {
1349
+ return document.querySelector( MPv1.selectors.amount )
1350
+ .value - document.querySelector( MPv1.selectors.discount ).value;
1351
+ }
1352
+
1353
+ MPv1.getAmountWithoutDiscount = function() {
1354
+ return document.querySelector( MPv1.selectors.amount ).value;
1355
+ }
1356
+
1357
+ MPv1.showErrors = function( response ) {
1358
+ var $form = MPv1.getForm();
1359
+ for ( var x=0; x<response.cause.length; x++ ) {
1360
+ var error = response.cause[x];
1361
+ var $span = $form.querySelector( "#mp-error-" + error.code );
1362
+ var $input = $form.querySelector( $span.getAttribute( "data-main" ) );
1363
+ $span.style.display = "inline-block";
1364
+ $input.classList.add( "mp-error-input" );
1365
+ }
1366
+ return;
1367
+ }
1368
+ MPv1.Initialize(
1369
+ mercadopago_site_id,
1370
+ mercadopago_public_key,
1371
+ mercadopago_coupon_mode == "yes",
1372
+ mercadopago_discount_action_url,
1373
+ mercadopago_payer_email
1374
+ );
1375
+
1376
+ </script>
templates/ticket/ticket-form.php ADDED
@@ -0,0 +1,455 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ <div class="mp-box-inputs mp-line" id="mercadopago-form-coupon-ticket"
32
+ style="padding:0px 36px 16px 36px;">
33
+ <label for="couponCodeLabel">
34
+ <?php echo $form_labels['form']['coupon_of_discounts']; ?>
35
+ </label>
36
+ <div class="mp-box-inputs mp-col-65">
37
+ <input type="text" id="couponCodeTicket" name="mercadopago_ticket[coupon_code]"
38
+ autocomplete="off" maxlength="24" />
39
+ </div>
40
+ <div class="mp-box-inputs mp-col-10">
41
+ <div id="mp-separete-date"></div>
42
+ </div>
43
+ <div class="mp-box-inputs mp-col-25">
44
+ <input type="button" class="button" id="applyCouponTicket"
45
+ value="<?php echo $form_labels['form']['apply']; ?>">
46
+ </div>
47
+ <div class="mp-box-inputs mp-col-100 mp-box-message">
48
+ <span class="mp-discount" id="mpCouponApplyedTicket" ></span>
49
+ <span class="mp-error" id="mpCouponErrorTicket" ></span>
50
+ </div>
51
+ </div>
52
+
53
+ <div style="padding:0px 36px 0px 36px;">
54
+ <p>
55
+ <?php
56
+ if ( count( $payment_methods ) > 1 ) :
57
+ echo $form_labels['form']['issuer_selection'];
58
+ endif;
59
+ echo $form_labels['form']['payment_instructions'];
60
+ ?> <br /> <?php
61
+ echo $form_labels['form']['ticket_note'];
62
+ if ( $is_currency_conversion > 0 ) :
63
+ echo " (" . $form_labels['form']['payment_converted'] . " " .
64
+ $woocommerce_currency . " " . $form_labels['form']['to'] . " " .
65
+ $account_currency . ")";
66
+ endif;
67
+ ?>
68
+ </p>
69
+ <?php if ( count( $payment_methods ) > 1 ) : ?>
70
+ <div class="mp-box-inputs mp-col-100">
71
+ <?php $atFirst = true; ?>
72
+ <?php foreach ( $payment_methods as $payment ) : ?>
73
+ <div class="mp-box-inputs mp-line">
74
+ <div id="paymentMethodId" class="mp-box-inputs mp-col-5">
75
+ <input type="radio" class="input-radio"
76
+ name="mercadopago_ticket[paymentMethodId]"
77
+ style="height:16px; width:16px;" value="<?php echo $payment['id']; ?>"
78
+ <?php if ( $atFirst ) : ?> checked="checked" <?php endif; ?> />
79
+ </div>
80
+ <div class="mp-box-inputs mp-col-45">
81
+ <label>
82
+ <img src="<?php echo $payment['secure_thumbnail']; ?>"
83
+ alt="<?php echo $payment['name']; ?>" />
84
+ &nbsp;&nbsp;<?php echo $payment['name']; ?>
85
+ </label>
86
+ </div>
87
+ </div>
88
+ <?php $atFirst = false; ?>
89
+ <?php endforeach; ?>
90
+ </div>
91
+ <?php else : ?>
92
+ <div class="mp-box-inputs mp-col-100" style="display:none;">
93
+ <select id="paymentMethodId" name="mercadopago_ticket[paymentMethodId]">
94
+ <?php foreach ( $payment_methods as $payment ) : ?>
95
+ <option value="<?php echo $payment['id']; ?>" style="padding: 8px;
96
+ background: url('https://img.mlstatic.com/org-img/MP3/API/logos/bapropagos.gif')
97
+ 98% 50% no-repeat;"> <?php echo $payment['name']; ?>
98
+ </option>
99
+ <?php endforeach; ?>
100
+ </select>
101
+ </div>
102
+ <?php endif; ?>
103
+
104
+ <div class="mp-box-inputs mp-line">
105
+ <div class="mp-box-inputs mp-col-25">
106
+ <div id="mp-box-loading">
107
+ </div>
108
+ </div>
109
+ </div>
110
+
111
+ <!-- utilities -->
112
+ <div class="mp-box-inputs mp-col-100" id="mercadopago-utilities">
113
+ <input type="hidden" id="site_id" value="<?php echo $site_id; ?>" name="mercadopago_ticket[site_id]"/>
114
+ <input type="hidden" id="amountTicket" value="<?php echo $amount; ?>" name="mercadopago_ticket[amount]"/>
115
+ <input type="hidden" id="campaign_idTicket" name="mercadopago_ticket[campaign_id]"/>
116
+ <input type="hidden" id="campaignTicket" name="mercadopago_ticket[campaign]"/>
117
+ <input type="hidden" id="discountTicket" name="mercadopago_ticket[discount]"/>
118
+ </div>
119
+
120
+ </div>
121
+ </fieldset>
122
+
123
+ <script type="text/javascript">
124
+
125
+ ( function() {
126
+
127
+ var MPv1Ticket = {
128
+ site_id: "",
129
+ coupon_of_discounts: {
130
+ discount_action_url: "",
131
+ payer_email: "",
132
+ default: true,
133
+ status: false
134
+ },
135
+ inputs_to_create_discount: [
136
+ "couponCodeTicket",
137
+ "applyCouponTicket"
138
+ ],
139
+ selectors: {
140
+ // coupom
141
+ couponCode: "#couponCodeTicket",
142
+ applyCoupon: "#applyCouponTicket",
143
+ mpCouponApplyed: "#mpCouponApplyedTicket",
144
+ mpCouponError: "#mpCouponErrorTicket",
145
+ campaign_id: "#campaign_idTicket",
146
+ campaign: "#campaignTicket",
147
+ discount: "#discountTicket",
148
+ // payment method and checkout
149
+ paymentMethodId: "#paymentMethodId",
150
+ amount: "#amountTicket",
151
+ // form
152
+ formCoupon: '#mercadopago-form-coupon-ticket'
153
+ },
154
+ text: {
155
+ discount_info1: "You will save",
156
+ discount_info2: "with discount from",
157
+ discount_info3: "Total of your purchase:",
158
+ discount_info4: "Total of your purchase with discount:",
159
+ discount_info5: "*Uppon payment approval",
160
+ discount_info6: "Terms and Conditions of Use",
161
+ coupon_empty: "Please, inform your coupon code",
162
+ apply: "Apply",
163
+ remove: "Remove"
164
+ },
165
+ paths: {
166
+ loading: "images/loading.gif",
167
+ check: "images/check.png",
168
+ error: "images/error.png"
169
+ }
170
+ }
171
+
172
+ // === Coupon of Discounts
173
+
174
+ MPv1Ticket.currencyIdToCurrency = function ( currency_id ) {
175
+ if ( currency_id == "ARS" ) {
176
+ return "$";
177
+ } else if ( currency_id == "BRL" ) {
178
+ return "R$";
179
+ } else if ( currency_id == "COP" ) {
180
+ return "$";
181
+ } else if ( currency_id == "CLP" ) {
182
+ return "$";
183
+ } else if ( currency_id == "MXN" ) {
184
+ return "$";
185
+ } else if ( currency_id == "VEF" ) {
186
+ return "Bs";
187
+ } else if ( currency_id == "PEN" ) {
188
+ return "S/";
189
+ } else if ( currency_id == "UYU" ) {
190
+ return "$U";
191
+ } else {
192
+ return "$";
193
+ }
194
+ }
195
+
196
+ MPv1Ticket.checkCouponEligibility = function () {
197
+ if ( document.querySelector( MPv1Ticket.selectors.couponCode ).value == "" ) {
198
+ // Coupon code is empty.
199
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).style.display = "none";
200
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).style.display = "block";
201
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).innerHTML = MPv1Ticket.text.coupon_empty;
202
+ MPv1Ticket.coupon_of_discounts.status = false;
203
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background = null;
204
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).value = MPv1Ticket.text.apply;
205
+ document.querySelector( MPv1Ticket.selectors.discount ).value = 0;
206
+ // --- No cards handler ---
207
+ } else if ( MPv1Ticket.coupon_of_discounts.status ) {
208
+ // We already have a coupon set, so we remove it.
209
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).style.display = "none";
210
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).style.display = "none";
211
+ MPv1Ticket.coupon_of_discounts.status = false;
212
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).style.background = null;
213
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).value = MPv1Ticket.text.apply;
214
+ document.querySelector( MPv1Ticket.selectors.couponCode ).value = "";
215
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background = null;
216
+ document.querySelector( MPv1Ticket.selectors.discount ).value = 0;
217
+ // --- No cards handler ---
218
+ } else {
219
+ // Set loading.
220
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).style.display = "none";
221
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).style.display = "none";
222
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background = "url(" + MPv1Ticket.paths.loading + ") 98% 50% no-repeat #fff";
223
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).disabled = true;
224
+
225
+ // Check if there are params in the url.
226
+ var url = MPv1Ticket.coupon_of_discounts.discount_action_url;
227
+ var sp = "?";
228
+ if ( url.indexOf( "?" ) >= 0 ) {
229
+ sp = "&";
230
+ }
231
+ url += sp + "site_id=" + MPv1Ticket.site_id;
232
+ url += "&coupon_id=" + document.querySelector( MPv1Ticket.selectors.couponCode ).value;
233
+ url += "&amount=" + document.querySelector( MPv1Ticket.selectors.amount ).value;
234
+ url += "&payer=" + MPv1Ticket.coupon_of_discounts.payer_email;
235
+ //url += "&payer=" + document.getElementById( "billing_email" ).value;
236
+
237
+ MPv1Ticket.AJAX({
238
+ url: url,
239
+ method : "GET",
240
+ timeout : 5000,
241
+ error: function() {
242
+ // Request failed.
243
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).style.display = "none";
244
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).style.display = "none";
245
+ MPv1Ticket.coupon_of_discounts.status = false;
246
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).style.background = null;
247
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).value = MPv1Ticket.text.apply;
248
+ document.querySelector( MPv1Ticket.selectors.couponCode ).value = "";
249
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background = null;
250
+ document.querySelector( MPv1Ticket.selectors.discount ).value = 0;
251
+ // --- No cards handler ---
252
+ },
253
+ success : function ( status, response ) {
254
+ if ( response.status == 200 ) {
255
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).style.display =
256
+ "block";
257
+ document.querySelector( MPv1Ticket.selectors.discount ).value =
258
+ response.response.coupon_amount;
259
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).innerHTML =
260
+ //"<div style='border-style: solid; border-width:thin; " +
261
+ //"border-color: #009EE3; padding: 8px 8px 8px 8px; margin-top: 4px;'>" +
262
+ MPv1Ticket.text.discount_info1 + " <strong>" +
263
+ MPv1Ticket.currencyIdToCurrency( response.response.currency_id ) + " " +
264
+ Math.round( response.response.coupon_amount * 100 ) / 100 +
265
+ "</strong> " + MPv1Ticket.text.discount_info2 + " " +
266
+ response.response.name + ".<br>" + MPv1Ticket.text.discount_info3 + " <strong>" +
267
+ MPv1Ticket.currencyIdToCurrency( response.response.currency_id ) + " " +
268
+ Math.round( MPv1Ticket.getAmountWithoutDiscount() * 100 ) / 100 +
269
+ "</strong><br>" + MPv1Ticket.text.discount_info4 + " <strong>" +
270
+ MPv1Ticket.currencyIdToCurrency( response.response.currency_id ) + " " +
271
+ Math.round( MPv1Ticket.getAmount() * 100 ) / 100 + "*</strong><br>" +
272
+ "<i>" + MPv1Ticket.text.discount_info5 + "</i><br>" +
273
+ "<a href='https://api.mercadolibre.com/campaigns/" +
274
+ response.response.id +
275
+ "/terms_and_conditions?format_type=html' target='_blank'>" +
276
+ MPv1Ticket.text.discount_info6 + "</a>";
277
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).style.display =
278
+ "none";
279
+ MPv1Ticket.coupon_of_discounts.status = true;
280
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background =
281
+ null;
282
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background =
283
+ "url(" + MPv1Ticket.paths.check + ") 98% 50% no-repeat #fff";
284
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).value =
285
+ MPv1Ticket.text.remove;
286
+ // --- No cards handler ---
287
+ document.querySelector( MPv1Ticket.selectors.campaign_id ).value =
288
+ response.response.id;
289
+ document.querySelector( MPv1Ticket.selectors.campaign ).value =
290
+ response.response.name;
291
+ } else if ( response.status == 400 || response.status == 404 ) {
292
+ document.querySelector( MPv1Ticket.selectors.mpCouponApplyed ).style.display = "none";
293
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).style.display = "block";
294
+ document.querySelector( MPv1Ticket.selectors.mpCouponError ).innerHTML = response.response.message;
295
+ MPv1Ticket.coupon_of_discounts.status = false;
296
+ document.querySelector(MPv1Ticket.selectors.couponCode).style.background = null;
297
+ document.querySelector( MPv1Ticket.selectors.couponCode ).style.background = "url(" + MPv1Ticket.paths.error + ") 98% 50% no-repeat #fff";
298
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).value = MPv1Ticket.text.apply;
299
+ document.querySelector( MPv1Ticket.selectors.discount ).value = 0;
300
+ // --- No cards handler ---
301
+ }
302
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ).disabled = false;
303
+ }
304
+ });
305
+ }
306
+ }
307
+
308
+ // === Initialization function
309
+
310
+ MPv1Ticket.addListenerEvent = function( el, eventName, handler ) {
311
+ if ( el.addEventListener ) {
312
+ el.addEventListener( eventName, handler );
313
+ } else {
314
+ el.attachEvent( "on" + eventName, function() {
315
+ handler.call( el );
316
+ } );
317
+ }
318
+ };
319
+
320
+ /*
321
+ *
322
+ * Utilities
323
+ *
324
+ */
325
+
326
+ MPv1Ticket.referer = (function () {
327
+ var referer = window.location.protocol + "//" +
328
+ window.location.hostname + ( window.location.port ? ":" + window.location.port: "" );
329
+ return referer;
330
+ })();
331
+
332
+ MPv1Ticket.AJAX = function( options ) {
333
+ var useXDomain = !!window.XDomainRequest;
334
+ var req = useXDomain ? new XDomainRequest() : new XMLHttpRequest()
335
+ var data;
336
+ options.url += ( options.url.indexOf( "?" ) >= 0 ? "&" : "?" ) + "referer=" + escape( MPv1Ticket.referer );
337
+ options.requestedMethod = options.method;
338
+ if ( useXDomain && options.method == "PUT" ) {
339
+ options.method = "POST";
340
+ options.url += "&_method=PUT";
341
+ }
342
+ req.open( options.method, options.url, true );
343
+ req.timeout = options.timeout || 1000;
344
+ if ( window.XDomainRequest ) {
345
+ req.onload = function() {
346
+ data = JSON.parse( req.responseText );
347
+ if ( typeof options.success === "function" ) {
348
+ options.success( options.requestedMethod === "POST" ? 201 : 200, data );
349
+ }
350
+ };
351
+ req.onerror = req.ontimeout = function() {
352
+ if ( typeof options.error === "function" ) {
353
+ options.error( 400, {
354
+ user_agent:window.navigator.userAgent, error : "bad_request", cause:[]
355
+ });
356
+ }
357
+ };
358
+ req.onprogress = function() {};
359
+ } else {
360
+ req.setRequestHeader( "Accept", "application/json" );
361
+ if ( options.contentType ) {
362
+ req.setRequestHeader( "Content-Type", options.contentType );
363
+ } else {
364
+ req.setRequestHeader( "Content-Type", "application/json" );
365
+ }
366
+ req.onreadystatechange = function() {
367
+ if ( this.readyState === 4 ) {
368
+ if ( this.status >= 200 && this.status < 400 ) {
369
+ // Success!
370
+ data = JSON.parse( this.responseText );
371
+ if ( typeof options.success === "function" ) {
372
+ options.success( this.status, data );
373
+ }
374
+ } else if ( this.status >= 400 ) {
375
+ data = JSON.parse( this.responseText );
376
+ if ( typeof options.error === "function" ) {
377
+ options.error( this.status, data );
378
+ }
379
+ } else if ( typeof options.error === "function" ) {
380
+ options.error( 503, {} );
381
+ }
382
+ }
383
+ };
384
+ }
385
+ if ( options.method === "GET" || options.data == null || options.data == undefined ) {
386
+ req.send();
387
+ } else {
388
+ req.send( JSON.stringify( options.data ) );
389
+ }
390
+ }
391
+
392
+ MPv1Ticket.Initialize = function( site_id, coupon_mode, discount_action_url, payer_email ) {
393
+
394
+ // Sets.
395
+ MPv1Ticket.site_id = site_id;
396
+ MPv1Ticket.coupon_of_discounts.default = coupon_mode;
397
+ MPv1Ticket.coupon_of_discounts.discount_action_url = discount_action_url;
398
+ MPv1Ticket.coupon_of_discounts.payer_email = payer_email;
399
+
400
+ // Flow coupon of discounts.
401
+ if ( MPv1Ticket.coupon_of_discounts.default ) {
402
+ MPv1Ticket.addListenerEvent(
403
+ document.querySelector( MPv1Ticket.selectors.applyCoupon ),
404
+ "click",
405
+ MPv1Ticket.checkCouponEligibility
406
+ );
407
+ } else {
408
+ document.querySelector( MPv1Ticket.selectors.formCoupon ).style.display = "none";
409
+ }
410
+
411
+ return;
412
+
413
+ }
414
+
415
+ this.MPv1Ticket = MPv1Ticket;
416
+
417
+ } ).call();
418
+
419
+ // === Instantiation
420
+
421
+ var mercadopago_site_id = "<?php echo $site_id; ?>";
422
+ var mercadopago_payer_email = "<?php echo $payer_email; ?>";
423
+ var mercadopago_coupon_mode = "<?php echo $coupon_mode; ?>";
424
+ var mercadopago_discount_action_url = "<?php echo $discount_action_url; ?>";
425
+
426
+ MPv1Ticket.text.discount_info1 = "<?php echo $form_labels['form']['discount_info1']; ?>";
427
+ MPv1Ticket.text.discount_info2 = "<?php echo $form_labels['form']['discount_info2']; ?>";
428
+ MPv1Ticket.text.discount_info3 = "<?php echo $form_labels['form']['discount_info3']; ?>";
429
+ MPv1Ticket.text.discount_info4 = "<?php echo $form_labels['form']['discount_info4']; ?>";
430
+ MPv1Ticket.text.discount_info5 = "<?php echo $form_labels['form']['discount_info5']; ?>";
431
+ MPv1Ticket.text.discount_info6 = "<?php echo $form_labels['form']['discount_info6']; ?>";
432
+ MPv1Ticket.text.apply = "<?php echo $form_labels['form']['apply']; ?>";
433
+ MPv1Ticket.text.remove = "<?php echo $form_labels['form']['remove']; ?>";
434
+ MPv1Ticket.text.coupon_empty = "<?php echo $form_labels['form']['coupon_empty']; ?>";
435
+ MPv1Ticket.paths.loading = "<?php echo ( $images_path . 'loading.gif' ); ?>";
436
+ MPv1Ticket.paths.check = "<?php echo ( $images_path . 'check.png' ); ?>";
437
+ MPv1Ticket.paths.error = "<?php echo ( $images_path . 'error.png' ); ?>";
438
+
439
+ MPv1Ticket.getAmount = function() {
440
+ return document.querySelector( MPv1Ticket.selectors.amount )
441
+ .value - document.querySelector( MPv1Ticket.selectors.discount ).value;
442
+ }
443
+
444
+ MPv1Ticket.getAmountWithoutDiscount = function() {
445
+ return document.querySelector( MPv1Ticket.selectors.amount ).value;
446
+ }
447
+
448
+ MPv1Ticket.Initialize(
449
+ mercadopago_site_id,
450
+ mercadopago_coupon_mode == "yes",
451
+ mercadopago_discount_action_url,
452
+ mercadopago_payer_email
453
+ );
454
+
455
+ </script>