WooCommerce MercadoPago - Version 4.0.0-Beta

Version Description

Download this release

Release Info

Developer mercadopago
Plugin Icon 128x128 WooCommerce MercadoPago
Version 4.0.0-Beta
Comparing to
See all releases

Code changes from version 3.1.1 to 4.0.0-Beta

Files changed (148) hide show
  1. assets/css/basic_checkout_mercadopago.css +486 -0
  2. assets/css/config_mercadopago.css +300 -0
  3. assets/css/custom_checkout_mercadopago.css +0 -368
  4. assets/images/MCO/CUPOM_MCO.jpg +0 -0
  5. assets/images/MCO/MCO.png +0 -0
  6. assets/images/MCO/banner_all_methods.png +0 -0
  7. assets/images/MCO/credit_card.png +0 -0
  8. assets/images/MCO/standard_mco.jpg +0 -0
  9. assets/images/MLA/CUPOM_MLA.jpg +0 -0
  10. assets/images/MLA/MLA.png +0 -0
  11. assets/images/MLA/banner_all_methods.png +0 -0
  12. assets/images/MLA/credit_card.png +0 -0
  13. assets/images/MLA/standard_mla.jpg +0 -0
  14. assets/images/MLB/CUPOM_MLB.jpg +0 -0
  15. assets/images/MLB/MLB.png +0 -0
  16. assets/images/MLB/banner_all_methods.png +0 -0
  17. assets/images/MLB/credit_card.png +0 -0
  18. assets/images/MLB/cupom1.jpg +0 -0
  19. assets/images/MLB/cupom2.jpg +0 -0
  20. assets/images/MLB/cupom3.jpg +0 -0
  21. assets/images/MLB/desconto_MLB.jpg +0 -0
  22. assets/images/MLB/standard_mlb.jpg +0 -0
  23. assets/images/MLC/CUPOM_MLC.jpg +0 -0
  24. assets/images/MLC/MLC.png +0 -0
  25. assets/images/MLC/banner_all_methods.png +0 -0
  26. assets/images/MLC/credit_card.png +0 -0
  27. assets/images/MLC/standard_mlc.gif +0 -0
  28. assets/images/MLM/CUPOM_MLM.jpg +0 -0
  29. assets/images/MLM/MLM.png +0 -0
  30. assets/images/MLM/banner_all_methods.png +0 -0
  31. assets/images/MLM/credit_card.png +0 -0
  32. assets/images/MLM/standard_mlm.jpg +0 -0
  33. assets/images/MLU/CUPOM_MLU.png +0 -0
  34. assets/images/MLU/MLU.png +0 -0
  35. assets/images/MLU/banner_all_methods.png +0 -0
  36. assets/images/MLU/credit_card.png +0 -0
  37. assets/images/MLU/standard_mlu.png +0 -0
  38. assets/images/MLV/CUPOM_MLV.jpg +0 -0
  39. assets/images/MLV/MLV.png +0 -0
  40. assets/images/MLV/banner_all_methods.png +0 -0
  41. assets/images/MLV/credit_card.png +0 -0
  42. assets/images/MLV/standard_mlv.jpg +0 -0
  43. assets/images/MPE/CUPOM_MPE.png +0 -0
  44. assets/images/MPE/MPE.png +0 -0
  45. assets/images/MPE/banner_all_methods.png +0 -0
  46. assets/images/MPE/credit_card.png +0 -0
  47. assets/images/MPE/standard_mpe.png +0 -0
  48. assets/images/bandeiras/amex.png +0 -0
  49. assets/images/bandeiras/boleto.png +0 -0
  50. assets/images/bandeiras/cash.png +0 -0
  51. assets/images/bandeiras/diners.png +0 -0
  52. assets/images/bandeiras/elo.png +0 -0
  53. assets/images/bandeiras/hipercard.png +0 -0
  54. assets/images/bandeiras/master.png +0 -0
  55. assets/images/bandeiras/melicard.png +0 -0
  56. assets/images/bandeiras/visa.png +0 -0
  57. assets/images/banner.png +0 -0
  58. assets/images/bar_code.png +0 -0
  59. assets/images/boleto.png +0 -0
  60. assets/images/cart.png +0 -0
  61. assets/images/check.png +0 -0
  62. assets/images/credit_card.png +0 -0
  63. assets/images/cvv.png +0 -0
  64. assets/images/error.png +0 -0
  65. assets/images/loading.gif +0 -0
  66. assets/images/mercadopago.png +0 -0
  67. assets/images/mplogo.png +0 -0
  68. assets/images/redirect_checkout.png +0 -0
  69. assets/images/warning.png +0 -0
  70. assets/js/basic-cho.js +9 -0
  71. assets/js/basic_config_mercadopago.js +240 -0
  72. assets/js/credit-card.js +1015 -1013
  73. assets/js/custom_config_mercadopago.js +117 -0
  74. assets/js/ticket.js +585 -589
  75. assets/js/ticket_config_mercadopago.js +155 -0
  76. i18n/languages/woocommerce-mercadopago-es_AR.mo +0 -0
  77. i18n/languages/woocommerce-mercadopago-es_AR.po +743 -716
  78. i18n/languages/woocommerce-mercadopago-es_CL.mo +0 -0
  79. i18n/languages/woocommerce-mercadopago-es_CL.po +742 -706
  80. i18n/languages/woocommerce-mercadopago-es_CO.mo +0 -0
  81. i18n/languages/woocommerce-mercadopago-es_CO.po +741 -717
  82. i18n/languages/woocommerce-mercadopago-es_ES.mo +0 -0
  83. i18n/languages/woocommerce-mercadopago-es_ES.po +741 -717
  84. i18n/languages/woocommerce-mercadopago-es_MX.mo +0 -0
  85. i18n/languages/woocommerce-mercadopago-es_MX.po +741 -717
  86. i18n/languages/woocommerce-mercadopago-es_PE.mo +0 -0
  87. i18n/languages/woocommerce-mercadopago-es_PE.po +741 -717
  88. i18n/languages/woocommerce-mercadopago-es_UY.mo +0 -0
  89. i18n/languages/woocommerce-mercadopago-es_UY.po +741 -717
  90. i18n/languages/woocommerce-mercadopago-es_VE.mo +0 -0
  91. i18n/languages/woocommerce-mercadopago-es_VE.po +741 -717
  92. i18n/languages/woocommerce-mercadopago-pt_BR.mo +0 -0
  93. i18n/languages/woocommerce-mercadopago-pt_BR.po +751 -718
  94. i18n/languages/woocommerce-mercadopago.pot +251 -47
  95. includes/WC_WooMercadoPago_BasicGateway.php +0 -1508
  96. includes/WC_WooMercadoPago_CustomGateway.php +0 -1393
  97. includes/WC_WooMercadoPago_PSEGateway.php +0 -1315
  98. includes/WC_WooMercadoPago_SubscriptionGateway.php +0 -1157
  99. includes/WC_WooMercadoPago_TicketGateway.php +0 -1339
  100. includes/admin/{class-wc-mercadoenvios-admin-orders.php → WC_MercadoEnvios_Admin_Orders.php} +5 -18
  101. includes/class-wc-product-mp_recurrent.php +0 -210
  102. includes/module/WC_WooMercadoPago_Configs.php +266 -0
  103. includes/module/WC_WooMercadoPago_Credentials.php +287 -0
  104. includes/module/WC_WooMercadoPago_Exception.php +21 -0
  105. includes/module/WC_WooMercadoPago_Module.php +795 -0
  106. includes/module/log/WC_WooMercadoPago_Log.php +99 -0
  107. includes/module/preference/WC_WooMercadoPago_PreferenceAbstract.php +318 -0
  108. includes/module/preference/WC_WooMercadoPago_PreferenceBasic.php +156 -0
  109. includes/module/preference/WC_WooMercadoPago_PreferenceCustom.php +103 -0
  110. includes/module/preference/WC_WooMercadoPago_PreferencePSE.php +73 -0
  111. includes/module/preference/WC_WooMercadoPago_PreferenceTicket.php +81 -0
  112. includes/module/sdk/lib/MP.php +743 -0
  113. includes/module/sdk/lib/RestClient/AbstractRestClient.php +235 -0
  114. includes/module/sdk/lib/RestClient/MeliRestClient.php +56 -0
  115. includes/module/sdk/lib/RestClient/MpRestClient.php +58 -0
  116. includes/{sdk → module/sdk}/lib/cacert.pem +0 -0
  117. includes/notification/WC_WooMercadoPago_Notification_Abstract.php +311 -0
  118. includes/notification/WC_WooMercadoPago_Notification_IPN.php +303 -0
  119. includes/notification/WC_WooMercadoPago_Notification_Webhook.php +187 -0
  120. includes/payments/WC_WooMercadoPago_BasicGateway.php +590 -0
  121. includes/payments/WC_WooMercadoPago_CustomGateway.php +537 -0
  122. includes/payments/WC_WooMercadoPago_PSEGateway.php +906 -0
  123. includes/payments/WC_WooMercadoPago_PaymentAbstract.php +1224 -0
  124. includes/payments/WC_WooMercadoPago_TicketGateway.php +546 -0
  125. includes/payments/hooks/WC_WooMercadoPago_Hook_Abstract.php +368 -0
  126. includes/payments/hooks/WC_WooMercadoPago_Hook_Basic.php +131 -0
  127. includes/payments/hooks/WC_WooMercadoPago_Hook_Custom.php +69 -0
  128. includes/payments/hooks/WC_WooMercadoPago_Hook_Pse.php +126 -0
  129. includes/payments/hooks/WC_WooMercadoPago_Hook_Ticket.php +87 -0
  130. includes/payments/mercadoenvios/WC_WooMercadoPago_Product_Recurrent.php +241 -0
  131. includes/sdk/lib/mercadopago.php +0 -1225
  132. includes/shipment/WC_MercadoEnvios_Package.php +266 -0
  133. includes/shipment/WC_MercadoEnvios_Shipping_Abstract.php +330 -0
  134. includes/shipment/{class-wc-mercadoenvios-shipping-express.php → WC_MercadoEnvios_Shipping_Express.php} +1 -1
  135. includes/shipment/{class-wc-mercadoenvios-shipping-normal.php → WC_MercadoEnvios_Shipping_Normal.php} +1 -1
  136. includes/shipment/abstract-wc-mercadoenvios-shipping.php +0 -378
  137. includes/shipment/class-wc-mercadoenvios-package.php +0 -257
  138. readme.txt +96 -194
  139. templates/checkout/basic_checkout.php +63 -0
  140. templates/checkout/custom_checkout.php +1499 -0
  141. templates/checkout/pse_checkout.php +0 -0
  142. templates/checkout/ticket_checkout.php +218 -0
  143. templates/credit-card/payment-form.php +0 -1428
  144. templates/mp_main_settings.php +0 -356
  145. templates/pse/pse-form.php +0 -508
  146. templates/ticket/ticket-form.php +0 -854
  147. templates/woocommerce-altas.html +0 -498
  148. woocommerce-mercadopago.php +44 -1111
assets/css/basic_checkout_mercadopago.css ADDED
@@ -0,0 +1,486 @@
1
+ .pt-20 {
2
+ padding-top: 20px !important;
3
+ }
4
+
5
+ .pt-15 {
6
+ padding-top: 15px !important;
7
+ }
8
+
9
+ .pt-10 {
10
+ padding-top: 10px !important;
11
+ }
12
+
13
+ .pt-0{
14
+ padding-top: 0px !important;
15
+ }
16
+
17
+ .pt-30 {
18
+ padding-top: 30px !important;
19
+ }
20
+
21
+ .pb-15 {
22
+ padding-bottom: 15px !important;
23
+ }
24
+
25
+ .pb-20 {
26
+ padding-bottom: 20px !important;
27
+ }
28
+
29
+ .pb-30 {
30
+ padding-bottom: 30px !important;
31
+ }
32
+
33
+ .pl-10 {
34
+ padding-left: 10px !important;
35
+ }
36
+
37
+ .pr-10 {
38
+ padding-right: 10px !important;
39
+ }
40
+
41
+ .pr-15 {
42
+ padding-right: 15px !important;
43
+ }
44
+
45
+ .mt-5 {
46
+ margin-top: 5px !important;
47
+ }
48
+
49
+ .mb-0 {
50
+ margin-bottom: 0px !important;
51
+ }
52
+
53
+ .mb-20 {
54
+ margin-bottom: 20px !important;
55
+ }
56
+
57
+ .mb-30 {
58
+ margin-bottom: 30px !important;
59
+ }
60
+
61
+ .mt-20 {
62
+ margin-top: 20px !important;
63
+ }
64
+
65
+ .display-inherit {
66
+ display: inherit !important;
67
+ }
68
+
69
+ .pointer {
70
+ cursor: pointer !important;
71
+ }
72
+
73
+ .text-center{
74
+ text-align: center !important;
75
+ }
76
+
77
+ .text-justify{
78
+ text-align: justify !important;
79
+ }
80
+
81
+ .min-hg{
82
+ min-height: 40px !important;
83
+ }
84
+
85
+ .row {
86
+ width: 100%;
87
+ display: inline-block;
88
+ }
89
+
90
+ .col-md-12 {
91
+ width: 100%;
92
+ display: inline-block;
93
+ padding-left: 0px;
94
+ padding-right: 0px;
95
+ text-align: left !important;
96
+ }
97
+
98
+ .col-md-9 {
99
+ flex: 0 0 75%;
100
+ width: 75%;
101
+ float: left;
102
+ }
103
+
104
+ .col-md-8 {
105
+ flex: 0 0 66.666667%;
106
+ width: 66.666667%;
107
+ float: left;
108
+ }
109
+
110
+ .col-md-6 {
111
+ width: 50%;
112
+ float: left;
113
+ padding-left: 0px;
114
+ padding-right: 0px;
115
+ text-align: left !important;
116
+ }
117
+
118
+ .col-md-4 {
119
+ flex: 0 0 33.333333%;
120
+ width: 33.333333%;
121
+ float: left;
122
+ }
123
+
124
+ .col-md-3 {
125
+ flex: 0 0 25%;
126
+ width: 25%;
127
+ float: left;
128
+ }
129
+
130
+ .img-fluid {
131
+ max-width: 100%;
132
+ height: auto;
133
+ }
134
+
135
+ .panel-checkout {
136
+ background-color: #fff;
137
+ padding: 10px 15px 25px;
138
+ }
139
+
140
+ .title-checkout {
141
+ padding: 15px 0 0px;
142
+ font-family: sans-serif;
143
+ font-size: 1.20rem !important;
144
+ font-weight: 600 !important;
145
+ font-style: normal;
146
+ font-stretch: normal;
147
+ line-height: 1.25 !important;
148
+ letter-spacing: normal;
149
+ color: #04204c;
150
+ margin: 0 !important;
151
+ }
152
+
153
+ .title-checkout::before {
154
+ content: "" !important;
155
+ width: 0 !important;
156
+ height: 0 !important;
157
+ margin: 0 !important;
158
+ }
159
+
160
+ .subtitle-checkout {
161
+ font-size: 14px !important;
162
+ font-family: sans-serif !important;
163
+ color: #7a7a7a;
164
+ font-weight: 400;
165
+ padding: 20px 0px 0px;
166
+ margin: 0px 0 5px !important;
167
+ text-transform: uppercase;
168
+ }
169
+
170
+ .subtitle-basic-checkout {
171
+ font-size: 14px !important;
172
+ font-family: sans-serif !important;
173
+ color: #7a7a7a;
174
+ font-weight: 400;
175
+ padding: 0.625em 0px 0px;
176
+ margin: 0px 0 5px !important;
177
+ text-transform: uppercase;
178
+ }
179
+
180
+ .badge-checkout {
181
+ font-size: 15px !important;
182
+ font-family: sans-serif !important;
183
+ padding: 5px 10px;
184
+ margin-left: 5px;
185
+ display: inline-block;
186
+ background-color: #2ec74b;
187
+ color: #fff;
188
+ text-transform: none;
189
+ border-radius: 2px;
190
+ }
191
+
192
+ .img-tarjetas {
193
+ padding: 8px !important;
194
+ max-height: 35px !important;
195
+ width: auto !important;
196
+ }
197
+
198
+ .redirect-frame {
199
+ width: 100%;
200
+ text-align: center;
201
+ background-color: #f5f5f5;
202
+ padding: 25px 20px 20px;
203
+ display: inline-block;
204
+ }
205
+
206
+ .redirect-frame img {
207
+ max-width: 160px !important;
208
+ }
209
+
210
+ .redirect-frame p {
211
+ padding-top: 15px !important;
212
+ margin-top: 0px !important;
213
+ font-family: sans-serif !important;
214
+ font-size: 14px !important;
215
+ font-weight: 600 !important;
216
+ font-style: normal !important;
217
+ font-stretch: normal !important;
218
+ line-height: 1.71 !important;
219
+ letter-spacing: normal !important;
220
+ text-align: center !important;
221
+ color: #333333 !important;
222
+ }
223
+
224
+ /* ----- Custom Checkout ----- */
225
+
226
+ .panel-custom-checkout {
227
+ background-color: #fff;
228
+ padding: 10px 15px 0px;
229
+ }
230
+
231
+ .subtitle-custom-checkout {
232
+ font-size: 17px !important;
233
+ font-family: sans-serif !important;
234
+ color: #04204c;
235
+ font-weight: 600;
236
+ padding: 20px 0px 0px;
237
+ margin: 0px 0 5px !important;
238
+ }
239
+
240
+ .subtitle-ticket-checkout {
241
+ font-size: 17px !important;
242
+ font-family: sans-serif !important;
243
+ color: #04204c;
244
+ font-weight: 600;
245
+ padding: 0px 0px 0px;
246
+ margin: 0px 0 5px !important;
247
+ }
248
+
249
+
250
+ .mp-form-control {
251
+ font-family: sans-serif !important;
252
+ width: 100%;
253
+ height: 40px;
254
+ border-radius: 5px !important;
255
+ font-size: 13px !important;
256
+ padding: 0 10px !important;
257
+ background-color: #fff !important;
258
+ border: 1px solid #d1d1d1 !important;
259
+ }
260
+
261
+ .mp-form-control-error {
262
+ border: 2px solid #f04449 !important;
263
+ }
264
+
265
+ .mp-form-control-check {
266
+ margin: 5px 10px 0 0 !important;
267
+ font-family: sans-serif !important;
268
+ border-radius: 5px !important;
269
+ font-size: 13px !important;
270
+ padding: 0 10px !important;
271
+ background-color: #fff !important;
272
+ border: 1px solid #d1d1d1 !important;
273
+ float: left;
274
+ }
275
+
276
+ .mp-button {
277
+ width: 100%;
278
+ height: 40px;
279
+ border-radius: 5px !important;
280
+ color: #fff !important;
281
+ background-color: #3483fa !important;
282
+ text-transform: none !important;
283
+ font-size: 15px !important;
284
+ font-weight: normal !important;
285
+ font-style: normal;
286
+ font-stretch: normal;
287
+ line-height: 1 !important;
288
+ letter-spacing: normal !important;
289
+ text-align: center !important;
290
+ }
291
+
292
+ .mp-button:hover{
293
+ opacity: 0.8;
294
+ }
295
+
296
+ .mp-error {
297
+ font-family: sans-serif !important;
298
+ font-size: 12px !important;
299
+ font-weight: normal !important;
300
+ font-style: normal;
301
+ font-stretch: normal;
302
+ line-height: 1.29;
303
+ letter-spacing: normal;
304
+ color: #f04449 !important;
305
+ }
306
+
307
+ .mp-desc {
308
+ font-family: sans-serif !important;
309
+ font-size: 12px !important;
310
+ font-weight: normal !important;
311
+ font-style: normal;
312
+ font-stretch: normal;
313
+ line-height: 1.29;
314
+ letter-spacing: normal;
315
+ color: rgba(0, 0, 0, 0.45) !important;
316
+ }
317
+
318
+ .mp-label-form-check {
319
+ font-family: sans-serif !important;
320
+ font-size: 14px !important;
321
+ font-weight: normal !important;
322
+ font-style: normal;
323
+ font-stretch: normal;
324
+ line-height: 1;
325
+ letter-spacing: normal;
326
+ color: rgba(0, 0, 0, 0.8) !important;
327
+ vertical-align: baseline !important;
328
+ }
329
+
330
+ .mp-label-form {
331
+ font-family: sans-serif !important;
332
+ font-size: 14px !important;
333
+ font-weight: normal !important;
334
+ font-style: normal;
335
+ font-stretch: normal;
336
+ line-height: 1;
337
+ letter-spacing: normal;
338
+ color: rgba(0, 0, 0, 0.45) !important;
339
+ }
340
+
341
+ .mp-label-form em {
342
+ font-size: 18px !important;
343
+ color: #f04449 !important;
344
+ font-family: "Merriweather, Georgia";
345
+ }
346
+
347
+ .mp-obrigatory {
348
+ font-family: sans-serif !important;
349
+ font-size: 12px !important;
350
+ font-weight: normal !important;
351
+ font-style: normal;
352
+ font-stretch: normal;
353
+ line-height: 1.29;
354
+ letter-spacing: normal;
355
+ color: #f04449 !important;
356
+ padding-top: 10px;
357
+ }
358
+
359
+ .mp-obrigatory em {
360
+ font-size: 18px !important;
361
+ color: #f04449 !important;
362
+ margin: -2px 5px 0 0px;
363
+ font-family: "Merriweather, Georgia";
364
+ float: left;
365
+ }
366
+
367
+ .mp-frame-links {
368
+ display: inline-flex;
369
+ padding-top: 10px;
370
+ text-align: left;
371
+ }
372
+
373
+ .mp-checkout-link {
374
+ font-family: sans-serif !important;
375
+ font-size: 14px;
376
+ text-decoration: none !important;
377
+ vertical-align: middle;
378
+ box-shadow: none !important;
379
+ cursor: pointer;
380
+ }
381
+
382
+ .frame-payments {
383
+ display: none;
384
+ background-color: #f5f5f5;
385
+ margin-top: 10px;
386
+ padding: 10px 10px 10px;
387
+ }
388
+
389
+ .subtitle-checkout-custom {
390
+ font-size: 13px !important;
391
+ font-family: sans-serif !important;
392
+ color: #7a7a7a;
393
+ font-weight: 400;
394
+ padding: 00px 0px 0px;
395
+ margin: 0px 0 5px !important;
396
+ text-transform: uppercase;
397
+ }
398
+
399
+ .tooltip {
400
+ position: relative;
401
+ display: inline-block;
402
+ border-bottom: 1px dotted black;
403
+ }
404
+
405
+ .tooltip .tooltiptext {
406
+ visibility: hidden;
407
+ background: #3483fa;
408
+ color: #fff;
409
+ padding: 5px 0;
410
+ position: absolute;
411
+ width: 250px;
412
+ text-align: center;
413
+ margin: -20px 0 0 100px;
414
+ font-size: 12px;
415
+ }
416
+
417
+ .tooltip .tooltiptext:before {
418
+ border: 6px solid transparent;
419
+ border-right-color: #3483fa;
420
+ content: "";
421
+ left: -12px;
422
+ position: absolute;
423
+ top: 5px;
424
+ }
425
+
426
+ .tooltip:hover .tooltiptext {
427
+ visibility: visible;
428
+ }
429
+
430
+ /* ----- Ticket ----- */
431
+ .erro_febraban {
432
+ font-family: sans-serif !important;
433
+ font-size: 12px !important;
434
+ font-weight: normal !important;
435
+ font-style: normal;
436
+ font-stretch: normal;
437
+ line-height: 1.29;
438
+ letter-spacing: normal;
439
+ color: #f04449 !important;
440
+ }
441
+
442
+ .subtitle-ticket-checkout {
443
+ font-size: 17px !important;
444
+ font-family: sans-serif !important;
445
+ color: #04204c;
446
+ font-weight: 600;
447
+ margin: 0px 0 5px !important;
448
+ }
449
+
450
+ .ticket-name{
451
+ font-weight: bold;
452
+ color: rgba(0, 0, 0, 0.8);
453
+ padding-left: 5px;
454
+ font-size: 13px;
455
+ }
456
+
457
+ .ticket-payments{
458
+ text-overflow: ellipsis;
459
+ white-space: nowrap;
460
+ overflow: hidden;
461
+ padding: 0 10px;
462
+ }
463
+
464
+ #mp-box-input-tax-cft {
465
+ margin-top: 4px;
466
+ }
467
+
468
+ #mp-tax-tea-text {
469
+ color: #797979;
470
+ font-size: 12px;
471
+ font-weight: normal;
472
+ font-style: normal;
473
+ font-stretch: normal;
474
+ line-height: 1.29;
475
+ letter-spacing: normal;
476
+ }
477
+
478
+ #mp-tax-cft-text {
479
+ font-size: 27px;
480
+ font-weight: normal;
481
+ font-style: normal;
482
+ font-stretch: normal;
483
+ line-height: 1.25;
484
+ letter-spacing: normal;
485
+ color: #868686;
486
+ }
assets/css/config_mercadopago.css ADDED
@@ -0,0 +1,300 @@
1
+ .px-20 {
2
+ padding-left: 20px !important;
3
+ padding-right: 20px !important;
4
+ }
5
+
6
+ .pt-10 {
7
+ padding-top: 10px !important;
8
+ }
9
+
10
+ .pb-10 {
11
+ padding-bottom: 10px !important;
12
+ }
13
+
14
+ .pb-20 {
15
+ padding-bottom: 20px !important;
16
+ }
17
+
18
+ .mt--10 {
19
+ margin-top: -10px !important;
20
+ }
21
+
22
+ .mt-5 {
23
+ margin-top: 5px;
24
+ }
25
+
26
+ .mb-0 {
27
+ margin-bottom: 0px !important;
28
+ }
29
+
30
+ .mg-0 {
31
+ margin: 0px !important;
32
+ }
33
+
34
+ .fw-400 {
35
+ font-weight: 400 !important;
36
+ }
37
+
38
+ .text-center {
39
+ text-align: center !important;
40
+ }
41
+
42
+ .row {
43
+ width: 100%;
44
+ display: inline-block;
45
+ }
46
+
47
+ .col-md-12 {
48
+ width: 100%;
49
+ display: inline-block;
50
+ text-align: justify !important;
51
+ }
52
+
53
+ .col-md-3 {
54
+ width: 25%;
55
+ float: left;
56
+ }
57
+
58
+ .col-md-2 {
59
+ width: 20%;
60
+ float: left;
61
+ }
62
+
63
+ .mouse_pointe {
64
+ cursor: pointer;
65
+ }
66
+
67
+ #mp_field_text {
68
+ font-family: sans-serif !important;
69
+ font-size: 14px !important;
70
+ font-weight: 600 !important;
71
+ font-style: normal;
72
+ font-stretch: normal;
73
+ line-height: 1.54;
74
+ letter-spacing: normal;
75
+ color: #555555 !important;
76
+ }
77
+
78
+ #input_payments {
79
+ border: 1px solid #ccc;
80
+ padding: 15px;
81
+ width: 365px;
82
+ font-weight: bold;
83
+ margin-top: -8px !important;
84
+ margin-bottom: 37px !important;
85
+ }
86
+
87
+ #input_payments_mt {
88
+ border: 1px solid #ccc;
89
+ padding: 15px;
90
+ width: 365px;
91
+ margin-top: -39px !important;
92
+ }
93
+
94
+ .mp_text {
95
+ font-family: sans-serif;
96
+ font-size: 14px !important;
97
+ font-weight: normal;
98
+ font-style: normal;
99
+ font-stretch: normal;
100
+ line-height: 1.25;
101
+ letter-spacing: normal;
102
+ color: rgba(0, 0, 0, 0.8);
103
+ }
104
+
105
+ .mp_subtitle {
106
+ font-size: 18px !important;
107
+ margin-bottom: 0px !important;
108
+ }
109
+
110
+ .mp_subtitle_bd {
111
+ border-top: 1px solid #bbb;
112
+ padding-top: 20px;
113
+ font-size: 20px !important;
114
+ margin-top: 0 !important;
115
+ }
116
+
117
+ .mp_subtitle_bd_mb {
118
+ border-top: 1px solid #bbb;
119
+ padding-top: 20px;
120
+ font-size: 20px !important;
121
+ margin-bottom: 0px !important;
122
+ }
123
+
124
+ .mp_small_text {
125
+ font-family: sans-serif;
126
+ font-size: 14px !important;
127
+ font-weight: normal;
128
+ font-style: normal !important;
129
+ font-stretch: normal;
130
+ line-height: 16px !important;
131
+ letter-spacing: normal;
132
+ color: #555555;
133
+ }
134
+
135
+ .mp_title_bd {
136
+ font-family: sans-serif;
137
+ font-size: 30px !important;
138
+ font-weight: 400;
139
+ font-style: normal;
140
+ font-stretch: normal;
141
+ line-height: 1.07;
142
+ letter-spacing: normal;
143
+ color: #303030;
144
+ border-top: 1px solid #bbb;
145
+ padding-top: 20px;
146
+ margin-bottom: 5px !important;
147
+ }
148
+
149
+ .mp_title_checkout {
150
+ font-family: sans-serif;
151
+ font-size: 30px !important;
152
+ font-weight: 400;
153
+ font-style: normal;
154
+ font-stretch: normal;
155
+ line-height: 1.07;
156
+ letter-spacing: normal;
157
+ color: #303030;
158
+ margin-bottom: 5px !important;
159
+ margin-top: 10px !important;
160
+ }
161
+
162
+ .mp_tienda_link {
163
+ display: inline-block;
164
+ }
165
+
166
+ .mp_tienda_link a {
167
+ display: inline-block;
168
+ margin-bottom: 0;
169
+ font-weight: 400;
170
+ text-align: center;
171
+ vertical-align: middle;
172
+ cursor: pointer;
173
+ white-space: nowrap;
174
+ line-height: 1.42857;
175
+ border-radius: 2px !important;
176
+ border: solid 1px #c2c2c2 !important;
177
+ padding: 12px 50px !important;
178
+ font-size: 13px !important;
179
+ background-color: #fafafa !important;
180
+ text-decoration: none;
181
+ color: #555;
182
+ font-family: sans-serif;
183
+ }
184
+
185
+ .mp_tienda_link:hover a {
186
+ color: #fff !important;
187
+ background-color: #00aff0 !important;
188
+ border-color: #008abd !important;
189
+ -webkit-box-shadow: none !important;
190
+ box-shadow: none;
191
+ }
192
+
193
+ .mp_general_links {
194
+ display: inline-block;
195
+ margin-bottom: 0;
196
+ font-weight: 400;
197
+ text-align: center;
198
+ vertical-align: middle;
199
+ cursor: pointer;
200
+ white-space: nowrap;
201
+ line-height: 1.42857;
202
+ border-radius: 2px !important;
203
+ border: solid 1px #c2c2c2 !important;
204
+ padding: 12px 50px !important;
205
+ font-size: 13px !important;
206
+ background-color: #fafafa !important;
207
+ text-decoration: none;
208
+ color: #555;
209
+ font-family: sans-serif;
210
+ }
211
+
212
+ .mp_general_links:hover {
213
+ color: #fff !important;
214
+ background-color: #00aff0 !important;
215
+ border-color: #008abd !important;
216
+ -webkit-box-shadow: none !important;
217
+ box-shadow: none;
218
+ }
219
+
220
+ .btn-collapsible {
221
+ float: right;
222
+ font-size: 25px;
223
+ padding-right: 5px;
224
+ }
225
+
226
+ .title-checkout-body {
227
+ font-family: sans-serif !important;
228
+ margin: 5px 0 5px !important;
229
+ font-size: 20px !important;
230
+ font-weight: 300 !important;
231
+ font-style: normal;
232
+ font-stretch: normal;
233
+ line-height: 1.25;
234
+ letter-spacing: normal;
235
+ color: rgba(0, 0, 0, 0.8);
236
+ }
237
+
238
+ .text-checkout-body {
239
+ font-size: 14px !important;
240
+ font-weight: 400 !important;
241
+ font-style: normal;
242
+ font-stretch: normal;
243
+ line-height: 1.5;
244
+ letter-spacing: normal;
245
+ color: rgba(0, 0, 0, 0.8);
246
+ }
247
+
248
+ .number-checkout-body {
249
+ border-radius: 100%;
250
+ border: solid 1px #979797;
251
+ display: block;
252
+ width: 30px;
253
+ height: 30px;
254
+ margin: 0 auto 8px !important;
255
+ font-size: 20px;
256
+ font-weight: bold;
257
+ }
258
+
259
+ .mp-header-logo {
260
+ align-items: center;
261
+ }
262
+
263
+ .left-header {
264
+ min-width: 120px;
265
+ }
266
+
267
+ .left-header img {
268
+ max-width: 150px;
269
+ }
270
+
271
+ .right-header {
272
+ padding-top: 20px;
273
+ }
274
+
275
+ .mp-save-button {
276
+ display: inline-block;
277
+ font-weight: 400;
278
+ text-align: center;
279
+ vertical-align: middle;
280
+ cursor: pointer;
281
+ white-space: nowrap;
282
+ line-height: 1.42857;
283
+ border-radius: 2px !important;
284
+ border: solid 1px #c2c2c2 !important;
285
+ padding: 12px 50px !important;
286
+ font-size: 13px !important;
287
+ background-color: #fafafa !important;
288
+ text-decoration: none;
289
+ color: #555;
290
+ font-family: sans-serif;
291
+ margin-bottom: 10px !important;
292
+ }
293
+
294
+ .mp-save-button:hover {
295
+ color: #fff !important;
296
+ background-color: #00aff0 !important;
297
+ border-color: #008abd !important;
298
+ -webkit-box-shadow: none !important;
299
+ box-shadow: none;
300
+ }
assets/css/custom_checkout_mercadopago.css DELETED
@@ -1,368 +0,0 @@
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: 10px;
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
- vertical-align: middle;
91
- }
92
-
93
- .mp-box-inputs input:focus, .mp-box-inputs select:focus{
94
- border: 1px solid #999;
95
- outline: 0;
96
- }
97
-
98
-
99
- .mp-box-inputs input.mp-error-input, .mp-box-inputs select.mp-error-input{
100
- border: 1px solid red;
101
- }
102
-
103
- #mp-box-loading{
104
- width: 30px;
105
- height: 30px;
106
- display: inline-block;
107
- margin: -10px 0px;
108
- }
109
-
110
- #mp-separete-date{
111
- vertical-align: middle;
112
- line-height: 65px;
113
- text-align: center;
114
- height: 48px;
115
- font-size: 24px;
116
- font-weight: 100;
117
- }
118
-
119
- #mercadopago-utilities{
120
- display: none;
121
- }
122
-
123
- .mp-btn, .ch-btn {
124
- background-color: #009ee3;
125
- border: 1px solid #009ee3;
126
- border-radius: 4px;
127
- color: #fff;
128
- display: inline-block;
129
- font-family: Arial,sans-serif;
130
- font-size: 18px;
131
- font-weight: normal;
132
- margin: 0;
133
- padding: 10px;
134
- text-align: center;
135
- width: 100%;
136
- }
137
-
138
- #submit{
139
- color: #fff;
140
- background-color: #337ab7;
141
- border-color: #2e6da4;
142
- padding: 6px 12px;
143
- border: 1px solid transparent;
144
- border-radius: 4px;
145
- text-align: center;
146
- font-size: 14px;
147
- font-weight: 400;
148
- }
149
-
150
- #submit:hover {
151
- color: #fff;
152
- background-color: #286090;
153
- border-color: #204d74;
154
- }
155
-
156
- .mp-discount{
157
- text-transform: uppercase;
158
- font-size: 12px;
159
- /*color: #009EE3;*/
160
- color: #333333;
161
- display: none;
162
- font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
163
- clear: both;
164
- float: left;
165
- }
166
-
167
- #mpCouponApplyed{
168
- display: none;
169
- border-style: solid;
170
- border-width: thin;
171
- border-color: #009EE3;
172
- padding: 8px 8px 8px 8px;
173
- }
174
-
175
- #mpCouponApplyedTicket{
176
- display: none;
177
- border-style: solid;
178
- border-width: thin;
179
- border-color: #009EE3;
180
- padding: 8px 8px 8px 8px;
181
- }
182
-
183
- #mercadopago-form-coupon .mp-box-message{
184
- margin: -5px 0 5px;
185
- }
186
-
187
- [class^=form-col-]{
188
- position: relative;
189
- min-height: 1px;
190
- padding-right: 5px;
191
- padding-left: 5px;
192
- float: left;
193
- -webkit-box-sizing: border-box; /* Safari/Chrome, other WebKit */
194
- -moz-box-sizing: border-box; /* Firefox, other Gecko */
195
- box-sizing: border-box;
196
- }
197
-
198
- .form-col-1{
199
- width: 8.33333333%;
200
- }
201
- .form-col-2{
202
- width: 16.66666667%;
203
- }
204
- .form-col-3{
205
- width: 25%;
206
- }
207
- .form-col-4{
208
- width: 33.33333333%;
209
- }
210
- .form-col-5{
211
- width: 41.66666667%;
212
- }
213
- .form-col-6{
214
- width: 50%;
215
- }
216
- .form-col-7{
217
- width: 58.33333333%;
218
- }
219
- .form-col-8{
220
- width: 66.66666667%;
221
- }
222
- .form-col-9{
223
- width: 75%;
224
- }
225
- .form-col-10{
226
- width: 83.33333333%;
227
- }
228
- .form-col-11{
229
- width: 91.66666667%;
230
- }
231
- .form-col-12{
232
- width: 100%;
233
- }
234
-
235
- .form-control-mine {
236
- width: 100%;
237
- padding: 5px;
238
- font-size: 14px;
239
- color: #555;
240
- background-color: #fff;
241
- background-image: none;
242
- border: 1px solid #ccc;
243
- border-radius: 4px;
244
- margin-bottom: 12px;
245
- }
246
-
247
- select#fixed {
248
- -webkit-appearance: none;
249
- }
250
-
251
- .mensagem-credit-card{
252
- font-size: 10px;
253
- margin-top: 8px;
254
- margin-bottom: 16px;
255
- font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
256
- }
257
-
258
- .mensagem-febraban{
259
- text-transform: none;
260
- font-size: 12px;
261
- display: block;
262
- margin-top: 8px;
263
- margin-bottom: 16px;
264
- font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
265
- }
266
-
267
- .mensagem-ticket{
268
- text-transform: none;
269
- font-size: 12px;
270
- display: block;
271
- font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
272
- text-align: center;
273
- }
274
-
275
- /* Tooltip container */
276
- .tooltip {
277
- position: relative;
278
- display: inline-block;
279
- border-bottom: 1px dotted black; /* If you want dots under the hoverable text */
280
- }
281
-
282
- /* Tooltip text */
283
- .tooltip .tooltiptext {
284
- visibility: hidden;
285
- width: 280px;
286
- background-color: #333333;
287
- color: #fff;
288
- text-transform: none;
289
- text-align: center;
290
- padding: 5px 0;
291
- border-radius: 6px;
292
- margin-top: 4px;
293
-
294
- /* Position the tooltip text - see examples below! */
295
- position: absolute;
296
- z-index: 1;
297
- }
298
-
299
- /* Show the tooltip text when you mouse over the tooltip container */
300
- .tooltip:hover .tooltiptext {
301
- visibility: visible;
302
- }
303
-
304
- .twenty-seventeen-cc-header {
305
- width: 100%;
306
- height: 64px;
307
- margin-bottom: 2px;
308
- padding: 16px 32px 8px 32px;
309
- background: white;
310
- }
311
-
312
- .other-themes-cc-header {
313
- width: 100%;
314
- height: 48px;
315
- margin-bottom: 2px;
316
- padding: 16px 16px 8px 16px;
317
- background: white;
318
- }
319
-
320
- /*
321
- *
322
- *
323
- * Error
324
- *
325
- *
326
- */
327
-
328
- .mp-error{
329
- text-transform: uppercase;
330
- font-size: 10px;
331
- margin-bottom: 12px;
332
- color: red;
333
- font-weight: bold;
334
- display: none;
335
- font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
336
- clear: both;
337
- float: left;
338
- }
339
-
340
- .erro_febraban{
341
- text-transform: uppercase;
342
- font-size: 10px;
343
- margin-left: -10px;
344
- margin-right: -10px;
345
- margin-bottom: 12px;
346
- color: red;
347
- font-weight: bold;
348
- display: none;
349
- font-family: "Helvetica Neue",Helvetica,Arial,sans-serif;
350
- clear: both;
351
- }
352
-
353
- #mp-box-input-tax-tea{
354
- font-weight: 300;
355
- text-align: center;
356
- color: #333;
357
- font-size: 12px;
358
- display: none;
359
- }
360
-
361
- #mp-box-input-tax-cft{
362
- font-weight: 300;
363
- text-align: center;
364
- color: #333;
365
- font-size: 20px;
366
- margin-top: 16px;
367
- display: none;
368
- }
assets/images/MCO/CUPOM_MCO.jpg CHANGED
File without changes
assets/images/MCO/MCO.png CHANGED
File without changes
assets/images/MCO/banner_all_methods.png CHANGED
File without changes
assets/images/MCO/credit_card.png CHANGED
File without changes
assets/images/MCO/standard_mco.jpg CHANGED
File without changes
assets/images/MLA/CUPOM_MLA.jpg CHANGED
File without changes
assets/images/MLA/MLA.png CHANGED
File without changes
assets/images/MLA/banner_all_methods.png CHANGED
File without changes
assets/images/MLA/credit_card.png CHANGED
File without changes
assets/images/MLA/standard_mla.jpg CHANGED
File without changes
assets/images/MLB/CUPOM_MLB.jpg CHANGED
File without changes
assets/images/MLB/MLB.png CHANGED
File without changes
assets/images/MLB/banner_all_methods.png CHANGED
File without changes
assets/images/MLB/credit_card.png CHANGED
File without changes
assets/images/MLB/cupom1.jpg CHANGED
File without changes
assets/images/MLB/cupom2.jpg CHANGED
File without changes
assets/images/MLB/cupom3.jpg CHANGED
File without changes
assets/images/MLB/desconto_MLB.jpg CHANGED
File without changes
assets/images/MLB/standard_mlb.jpg CHANGED
File without changes
assets/images/MLC/CUPOM_MLC.jpg CHANGED
File without changes
assets/images/MLC/MLC.png CHANGED
File without changes
assets/images/MLC/banner_all_methods.png CHANGED
File without changes
assets/images/MLC/credit_card.png CHANGED
File without changes
assets/images/MLC/standard_mlc.gif CHANGED
File without changes
assets/images/MLM/CUPOM_MLM.jpg CHANGED
File without changes
assets/images/MLM/MLM.png CHANGED
File without changes
assets/images/MLM/banner_all_methods.png CHANGED
File without changes
assets/images/MLM/credit_card.png CHANGED
File without changes
assets/images/MLM/standard_mlm.jpg CHANGED
File without changes
assets/images/MLU/CUPOM_MLU.png CHANGED
File without changes
assets/images/MLU/MLU.png CHANGED
File without changes
assets/images/MLU/banner_all_methods.png CHANGED
File without changes
assets/images/MLU/credit_card.png CHANGED
File without changes
assets/images/MLU/standard_mlu.png CHANGED
File without changes
assets/images/MLV/CUPOM_MLV.jpg CHANGED
File without changes
assets/images/MLV/MLV.png CHANGED
File without changes
assets/images/MLV/banner_all_methods.png CHANGED
File without changes
assets/images/MLV/credit_card.png CHANGED
File without changes
assets/images/MLV/standard_mlv.jpg CHANGED
File without changes
assets/images/MPE/CUPOM_MPE.png CHANGED
File without changes
assets/images/MPE/MPE.png CHANGED
File without changes
assets/images/MPE/banner_all_methods.png CHANGED
File without changes
assets/images/MPE/credit_card.png CHANGED
File without changes
assets/images/MPE/standard_mpe.png CHANGED
File without changes
assets/images/bandeiras/amex.png CHANGED
File without changes
assets/images/bandeiras/boleto.png CHANGED
File without changes
assets/images/bandeiras/cash.png CHANGED
File without changes
assets/images/bandeiras/diners.png CHANGED
File without changes
assets/images/bandeiras/elo.png CHANGED
File without changes
assets/images/bandeiras/hipercard.png CHANGED
File without changes
assets/images/bandeiras/master.png CHANGED
File without changes
assets/images/bandeiras/melicard.png CHANGED
File without changes
assets/images/bandeiras/visa.png CHANGED
File without changes
assets/images/banner.png CHANGED
File without changes
assets/images/bar_code.png CHANGED
File without changes
assets/images/boleto.png CHANGED
File without changes
assets/images/cart.png CHANGED
File without changes
assets/images/check.png CHANGED
File without changes
assets/images/credit_card.png CHANGED
File without changes
assets/images/cvv.png CHANGED
File without changes
assets/images/error.png CHANGED
File without changes
assets/images/loading.gif CHANGED
File without changes
assets/images/mercadopago.png CHANGED
Binary file
assets/images/mplogo.png CHANGED
File without changes
assets/images/redirect_checkout.png ADDED
Binary file
assets/images/warning.png CHANGED
File without changes
assets/js/basic-cho.js ADDED
@@ -0,0 +1,9 @@
1
+ (function () {
2
+ if (document.getElementById("payment") != undefined && document.getElementById("payment").offsetWidth <= 440) {
3
+ var framePayments = document.querySelectorAll('#framePayments');
4
+ for (var i = 0; i < framePayments.length; i++) {
5
+ framePayments[i].className = '';
6
+ framePayments[i].classList.add('col-md-12');
7
+ }
8
+ }
9
+ }).call();
assets/js/basic_config_mercadopago.js ADDED
@@ -0,0 +1,240 @@
1
+ window.onload = function () {
2
+ //remove link breadcrumb, header and save button
3
+ document.querySelector(".wc-admin-breadcrumb").style.display = 'none';
4
+ document.querySelector(".mp-header-logo").style.display = 'none';
5
+ document.querySelector("#_wpnonce").parentElement.style.display = 'none';
6
+ document.querySelectorAll("h2")[4].style.display = 'none';
7
+
8
+ //update form_fields label
9
+ var label = document.querySelectorAll("th.titledesc");
10
+ for (var i = 0; i < label.length; i++) {
11
+ label[i].id = "mp_field_text";
12
+ if (label[i].children[0].children[0] != null) {
13
+ label[i].children[0].children[0].style.position = 'relative';
14
+ label[i].children[0].children[0].style.fontSize = '22px';
15
+ }
16
+ }
17
+
18
+ //collpase ajustes avanzados
19
+ var table = document.querySelectorAll(".form-table");
20
+ for (i = 0; i < table.length; i++) {
21
+ table[i].id = "mp_table_" + i;
22
+ }
23
+
24
+ // Remove title and description label necessary for custom
25
+ document.querySelector(".hidden-field-mp-title").setAttribute("type", "hidden");
26
+ document.querySelector(".hidden-field-mp-desc").setAttribute("type", "hidden");
27
+ var removeLabel = document.querySelectorAll("#mp_table_0");
28
+ removeLabel[0].children[0].children[0].style.display = 'none';
29
+ removeLabel[0].children[0].children[1].style.display = 'none';
30
+
31
+ //clone save button
32
+ var cloneSaveButton = document.getElementById('woocommerce_woo-mercado-pago-basic_checkout_btn_save');
33
+ if (document.getElementById("woocommerce_woo-mercado-pago-basic_checkout_homolog_title") != undefined || document.getElementById("woocommerce_woo-mercado-pago-basic_checkout_credential_description_prod") != undefined) {
34
+ document.getElementById("woocommerce_woo-mercado-pago-basic_checkout_credential_description_prod").nextElementSibling.append(cloneSaveButton.cloneNode(true));
35
+ }
36
+
37
+ if (document.getElementById("woocommerce_woo-mercado-pago-basic_checkout_homolog_title") != undefined || document.getElementById("woocommerce_woo-mercado-pago-basic_checkout_options_title") != undefined) {
38
+
39
+ document.getElementById("woocommerce_woo-mercado-pago-basic_checkout_advanced_settings").nextElementSibling.append(cloneSaveButton.cloneNode(true));
40
+ document.getElementById("woocommerce_woo-mercado-pago-basic_checkout_options_subtitle").nextElementSibling.append(cloneSaveButton.cloneNode(true));
41
+ document.getElementById("woocommerce_woo-mercado-pago-basic_checkout_payments_description").nextElementSibling.append(cloneSaveButton.cloneNode(true));
42
+ document.getElementById("woocommerce_woo-mercado-pago-basic_checkout_payments_advanced_description").nextElementSibling.append(cloneSaveButton.cloneNode(true));
43
+
44
+ var collapse_title = document.querySelector("#woocommerce_woo-mercado-pago-basic_checkout_advanced_settings");
45
+ var collapse_table = collapse_title.nextElementSibling;
46
+ collapse_table.style.display = "none";
47
+ collapse_title.style.cursor = "pointer";
48
+
49
+ collapse_title.innerHTML += "<span class='btn-collapsible' id='header_plus' style='display:block'>+</span>\
50
+ <span class='btn-collapsible' id='header_less' style='display:none'>-</span>";
51
+
52
+ var header_plus = document.querySelector("#header_plus");
53
+ var header_less = document.querySelector("#header_less");
54
+
55
+ collapse_title.onclick = function () {
56
+ if (collapse_table.style.display == "none") {
57
+ collapse_table.style.display = "block";
58
+ header_less.style.display = "block";
59
+ header_plus.style.display = "none";
60
+ }
61
+ else {
62
+ collapse_table.style.display = "none";
63
+ header_less.style.display = "none";
64
+ header_plus.style.display = "block";
65
+ }
66
+ }
67
+
68
+ //collpase Configuración Avanzada
69
+ var collapse_title_2 = document.querySelector("#woocommerce_woo-mercado-pago-basic_checkout_payments_advanced_title");
70
+ var collapse_table_2 = document.querySelector("#woocommerce_woo-mercado-pago-basic_checkout_payments_advanced_description").nextElementSibling;
71
+ var collapse_description_2 = document.querySelector("#woocommerce_woo-mercado-pago-basic_checkout_payments_advanced_description");
72
+ collapse_table_2.style.display = "none";
73
+ collapse_description_2.style.display = "none";
74
+ collapse_title_2.style.cursor = "pointer";
75
+
76
+ collapse_title_2.innerHTML += "<span class='btn-collapsible' id='header_plus_2' style='display:block'>+</span>\
77
+ <span class='btn-collapsible' id='header_less_2' style='display:none'>-</span>";
78
+
79
+ var header_plus_2 = document.querySelector("#header_plus_2");
80
+ var header_less_2 = document.querySelector("#header_less_2");
81
+
82
+ collapse_title_2.onclick = function () {
83
+ if (collapse_table_2.style.display == "none") {
84
+ collapse_table_2.style.display = "block";
85
+ collapse_description_2.style.display = "block";
86
+ header_less_2.style.display = "block";
87
+ header_plus_2.style.display = "none";
88
+ }
89
+ else {
90
+ collapse_table_2.style.display = "none";
91
+ collapse_description_2.style.display = "none";
92
+ header_less_2.style.display = "none";
93
+ header_plus_2.style.display = "block";
94
+ }
95
+ }
96
+
97
+ //payment methods
98
+ var tablePayments = document.querySelector("#woocommerce_woo-mercado-pago-basic_checkout_payments_description").nextElementSibling.getAttribute('class');
99
+ var input_payments = document.querySelectorAll('.' + tablePayments + ' td.forminp label');
100
+ for (i = 0; i < input_payments.length; i++) {
101
+ input_payments[i].id = "input_payments_mt";
102
+ }
103
+
104
+ //online payments
105
+ var onlineChecked = "";
106
+ var countOnlineChecked = 0;
107
+ var onlineInputs = document.querySelectorAll(".online_payment_method");
108
+ for (var ion = 0; ion < onlineInputs.length; ion++) {
109
+ var online_payment_translate = onlineInputs[ion].getAttribute("data-translate");
110
+ if (onlineInputs[ion].checked == true) {
111
+ countOnlineChecked += 1;
112
+ }
113
+ }
114
+
115
+ if (countOnlineChecked == onlineInputs.length) {
116
+ onlineChecked = "checked";
117
+ }
118
+
119
+ for (var ion = 0; ion < onlineInputs.length; ion++) {
120
+ if (ion == 0) {
121
+ var checkbox_online_prepend = "<div class='all_checkbox'>\
122
+ <label for='checkmeon' id='input_payments'>\
123
+ <input type='checkbox' name='checkmeon' id='checkmeon' "+ onlineChecked + " onclick='completeOnlineCheckbox()'>\
124
+ "+ online_payment_translate + "\
125
+ </label>\
126
+ </div>";
127
+ onlineInputs[ion].parentElement.insertAdjacentHTML('beforebegin', checkbox_online_prepend);
128
+ break;
129
+ }
130
+ }
131
+
132
+ //debit and prepaid payments
133
+ var debitChecked = "";
134
+ var countDebitChecked = 0;
135
+ var debitInputs = document.querySelectorAll(".debit_payment_method");
136
+ for (var ideb = 0; ideb < debitInputs.length; ideb++) {
137
+ var debit_payment_translate = debitInputs[ideb].getAttribute("data-translate");
138
+ if (debitInputs[ideb].checked == true) {
139
+ countDebitChecked += 1;
140
+ }
141
+ }
142
+
143
+ if (countDebitChecked == debitInputs.length) {
144
+ debitChecked = "checked";
145
+ }
146
+
147
+ for (var ideb = 0; ideb < debitInputs.length; ideb++) {
148
+ if (ideb == 0) {
149
+ var checkbox_debit_prepend = "<div class='all_checkbox'>\
150
+ <label for='checkmedeb' id='input_payments'>\
151
+ <input type='checkbox' name='checkmedeb' id='checkmedeb' "+ debitChecked + " onclick='completeDebitCheckbox()'>\
152
+ "+ debit_payment_translate + "\
153
+ </label>\
154
+ </div>";
155
+ debitInputs[ideb].parentElement.insertAdjacentHTML('beforebegin', checkbox_debit_prepend);
156
+ break;
157
+ }
158
+ }
159
+
160
+ //offline payments configuration form
161
+ var offlineChecked = "";
162
+ var countOfflineChecked = 0;
163
+ var offlineInputs = document.querySelectorAll(".offline_payment_method");
164
+ for (var ioff = 0; ioff < offlineInputs.length; ioff++) {
165
+ var offline_payment_translate = offlineInputs[ioff].getAttribute("data-translate");
166
+ if (offlineInputs[ioff].checked == true) {
167
+ countOfflineChecked += 1;
168
+ }
169
+ }
170
+
171
+ if (countOfflineChecked == offlineInputs.length) {
172
+ offlineChecked = "checked";
173
+ }
174
+
175
+ for (ioff = 0; ioff < offlineInputs.length; ioff++) {
176
+ if (ioff == 0) {
177
+ var checkbox_offline_prepend = "<div class='all_checkbox'>\
178
+ <label for='checkmeoff' id='input_payments' style='margin-bottom: 37px !important;'>\
179
+ <input type='checkbox' name='checkmeoff' id='checkmeoff' "+ offlineChecked + " onclick='completeOfflineCheckbox()'>\
180
+ "+ offline_payment_translate + "\
181
+ </label>\
182
+ </div>";
183
+ offlineInputs[ioff].parentElement.insertAdjacentHTML('beforebegin', checkbox_offline_prepend);
184
+ break;
185
+ }
186
+ }
187
+
188
+ }
189
+
190
+ if (document.querySelector('.homologScroll') != null) {
191
+ document.querySelector('.homologScroll').addEventListener('click', function () {
192
+ document.querySelector('#woocommerce_woo-mercado-pago-basic__mp_access_token_prod').scrollIntoView({
193
+ block: "start",
194
+ behavior: "smooth"
195
+ });
196
+ });
197
+ }
198
+ }
199
+
200
+ //Online payments
201
+ function completeOnlineCheckbox() {
202
+ var onlineCheck = document.getElementById("checkmeon").checked;
203
+ var onlineInputs = document.querySelectorAll(".online_payment_method");
204
+ for (var i = 0; i < onlineInputs.length; i++) {
205
+ if (onlineCheck == true) {
206
+ onlineInputs[i].checked = true;
207
+ }
208
+ else {
209
+ onlineInputs[i].checked = false;
210
+ }
211
+ }
212
+ }
213
+
214
+ //Debit and prepaid payments
215
+ function completeDebitCheckbox() {
216
+ var debitCheck = document.getElementById("checkmedeb").checked;
217
+ var debitInputs = document.querySelectorAll(".debit_payment_method");
218
+ for (var i = 0; i < debitInputs.length; i++) {
219
+ if (debitCheck == true) {
220
+ debitInputs[i].checked = true;
221
+ }
222
+ else {
223
+ debitInputs[i].checked = false;
224
+ }
225
+ }
226
+ }
227
+
228
+ //Offline payments
229
+ function completeOfflineCheckbox() {
230
+ var offlineCheck = document.getElementById("checkmeoff").checked;
231
+ var offlineInputs = document.querySelectorAll(".offline_payment_method");
232
+ for (var i = 0; i < offlineInputs.length; i++) {
233
+ if (offlineCheck == true) {
234
+ offlineInputs[i].checked = true;
235
+ }
236
+ else {
237
+ offlineInputs[i].checked = false;
238
+ }
239
+ }
240
+ }
assets/js/credit-card.js CHANGED
@@ -1,1085 +1,1087 @@
1
- ( function() {
2
-
3
- var MPv1 = {
4
- debug: true,
5
- add_truncated_card: true,
6
- site_id: "",
7
- public_key: "",
8
- coupon_of_discounts: {
9
- discount_action_url: "",
10
- payer_email: "",
11
- default: true,
12
- status: false
13
- },
14
- customer_and_card: {
15
- default: true,
16
- status: true
17
- },
18
- create_token_on: {
19
- event: true, //if true create token on event, if false create on click and ignore others
20
- keyup: false,
21
- paste: true
22
- },
23
- inputs_to_create_discount: [
24
- "couponCode",
25
- "applyCoupon"
26
- ],
27
- inputs_to_create_token: [
28
- "cardNumber",
29
- "cardExpirationMonth",
30
- "cardExpirationYear",
31
- "cardholderName",
32
- "securityCode",
33
- "docType",
34
- "docNumber"
35
- ],
36
- inputs_to_create_token_customer_and_card: [
37
- "paymentMethodSelector",
38
- "securityCode"
39
- ],
40
- selectors: {
41
- // currency
42
- currency_ratio: "#currency_ratio",
43
- // coupom
44
- couponCode: "#couponCode",
45
- applyCoupon: "#applyCoupon",
46
- mpCouponApplyed: "#mpCouponApplyed",
47
- mpCouponError: "#mpCouponError",
48
- campaign_id: "#campaign_id",
49
- campaign: "#campaign",
50
- discount: "#discount",
51
- // customer cards
52
- paymentMethodSelector: "#paymentMethodSelector",
53
- pmCustomerAndCards: "#payment-methods-for-customer-and-cards",
54
- pmListOtherCards: "#payment-methods-list-other-cards",
55
- // card data
56
- mpSecurityCodeCustomerAndCard: "#mp-securityCode-customer-and-card",
57
- cardNumber: "#cardNumber",
58
- cardExpirationMonth: "#cardExpirationMonth",
59
- cardExpirationYear: "#cardExpirationYear",
60
- cardholderName: "#cardholderName",
61
- securityCode: "#securityCode",
62
- docType: "#docType",
63
- docNumber: "#docNumber",
64
- issuer: "#issuer",
65
- installments: "#installments",
66
- // document
67
- mpDoc: ".mp-doc",
68
- mpIssuer: ".mp-issuer",
69
- mpDocType: ".mp-docType",
70
- mpDocNumber: ".mp-docNumber",
71
- // payment method and checkout
72
- paymentMethodId: "#paymentMethodId",
73
- amount: "#amount",
74
- token: "#token",
75
- cardTruncated: "#cardTruncated",
76
- site_id: "#site_id",
77
- CustomerAndCard: "#CustomerAndCard",
78
- box_loading: "#mp-box-loading",
79
- submit: "#submit",
80
- // tax resolution AG 51/2017
81
- boxInstallments: "#mp-box-installments",
82
- boxInstallmentsSelector: "#mp-box-installments-selector",
83
- taxCFT: "#mp-box-input-tax-cft",
84
- taxTEA: "#mp-box-input-tax-tea",
85
- taxTextCFT: "#mp-tax-cft-text",
86
- taxTextTEA: "#mp-tax-tea-text",
87
- // form
88
- form: "#mercadopago-form",
89
- formCoupon: "#mercadopago-form-coupon",
90
- formCustomerAndCard: "#mercadopago-form-customer-and-card",
91
- utilities_fields: "#mercadopago-utilities"
92
- },
93
- text: {
94
- choose: "Choose",
95
- other_bank: "Other Bank",
96
- discount_info1: "You will save",
97
- discount_info2: "with discount from",
98
- discount_info3: "Total of your purchase:",
99
- discount_info4: "Total of your purchase with discount:",
100
- discount_info5: "*Uppon payment approval",
101
- discount_info6: "Terms and Conditions of Use",
102
- coupon_empty: "Please, inform your coupon code",
103
- apply: "Apply",
104
- remove: "Remove"
105
- },
106
- paths: {
107
- loading: "images/loading.gif",
108
- check: "images/check.png",
109
- error: "images/error.png"
110
- }
111
- }
112
-
113
- // === Coupon of Discounts
114
-
115
- MPv1.currencyIdToCurrency = function ( currency_id ) {
116
- if ( currency_id == "ARS" ) {
117
- return "quot;;
118
- } else if ( currency_id == "BRL" ) {
119
- return "Rquot;;
120
- } else if ( currency_id == "COP" ) {
121
- return "quot;;
122
- } else if ( currency_id == "CLP" ) {
123
- return "quot;;
124
- } else if ( currency_id == "MXN" ) {
125
- return "quot;;
126
- } else if ( currency_id == "VEF" ) {
127
- return "Bs";
128
- } else if ( currency_id == "PEN" ) {
129
- return "S/";
130
- } else if ( currency_id == "UYU" ) {
131
- return "$U";
132
- } else {
133
- return "quot;;
134
- }
135
- }
136
-
137
- MPv1.checkCouponEligibility = function () {
138
- if ( document.querySelector( MPv1.selectors.couponCode).value == "" ) {
139
- // Coupon code is empty.
140
- document.querySelector( MPv1.selectors.mpCouponApplyed ).style.display = "none";
141
- document.querySelector( MPv1.selectors.mpCouponError ).style.display = "block";
142
- document.querySelector( MPv1.selectors.mpCouponError ).innerHTML = MPv1.text.coupon_empty;
143
- MPv1.coupon_of_discounts.status = false;
144
- document.querySelector( MPv1.selectors.couponCode ).style.background = null;
145
- document.querySelector( MPv1.selectors.applyCoupon ).value = MPv1.text.apply;
146
- document.querySelector( MPv1.selectors.discount ).value = 0;
147
- MPv1.cardsHandler();
148
- } else if ( MPv1.coupon_of_discounts.status ) {
149
- // We already have a coupon set, so we remove it.
150
- document.querySelector( MPv1.selectors.mpCouponApplyed ).style.display = "none";
151
- document.querySelector( MPv1.selectors.mpCouponError ).style.display = "none";
152
- MPv1.coupon_of_discounts.status = false;
153
- document.querySelector( MPv1.selectors.applyCoupon ).style.background = null;
154
- document.querySelector( MPv1.selectors.applyCoupon ).value = MPv1.text.apply;
155
- document.querySelector( MPv1.selectors.couponCode ).value = "";
156
- document.querySelector( MPv1.selectors.couponCode ).style.background = null;
157
- document.querySelector( MPv1.selectors.discount ).value = 0;
158
- MPv1.cardsHandler();
159
- } else {
160
- // Set loading.
161
- document.querySelector( MPv1.selectors.mpCouponApplyed ).style.display = "none";
162
- document.querySelector( MPv1.selectors.mpCouponError ).style.display = "none";
163
- document.querySelector( MPv1.selectors.couponCode ).style.background = "url(" + MPv1.paths.loading + ") 98% 50% no-repeat #fff";
164
- document.querySelector( MPv1.selectors.applyCoupon ).disabled = true;
165
-
166
- // Check if there are params in the url.
167
- var url = MPv1.coupon_of_discounts.discount_action_url;
168
- var sp = "?";
169
- if ( url.indexOf( "?" ) >= 0 ) {
170
- sp = "&";
171
- }
172
- url += sp + "site_id=" + MPv1.site_id;
173
- url += "&coupon_id=" + document.querySelector( MPv1.selectors.couponCode ).value;
174
- url += "&amount=" + document.querySelector( MPv1.selectors.amount ).value;
175
- url += "&payer=" + MPv1.coupon_of_discounts.payer_email;
176
- //url += "&payer=" + document.getElementById( "billing_email" ).value;
177
-
178
- MPv1.AJAX({
179
- url: url,
180
- method : "GET",
181
- timeout : 5000,
182
- error: function() {
183
- // Request failed.
184
- document.querySelector( MPv1.selectors.mpCouponApplyed ).style.display = "none";
185
- document.querySelector( MPv1.selectors.mpCouponError ).style.display = "none";
186
- MPv1.coupon_of_discounts.status = false;
187
- document.querySelector( MPv1.selectors.applyCoupon ).style.background = null;
188
- document.querySelector( MPv1.selectors.applyCoupon ).value = MPv1.text.apply;
189
- document.querySelector( MPv1.selectors.couponCode ).value = "";
190
- document.querySelector( MPv1.selectors.couponCode ).style.background = null;
191
- document.querySelector( MPv1.selectors.discount ).value = 0;
192
- MPv1.cardsHandler();
193
- },
194
- success : function ( status, response ) {
195
- if ( response.status == 200 ) {
196
- document.querySelector( MPv1.selectors.mpCouponApplyed ).style.display =
197
- "block";
198
- document.querySelector( MPv1.selectors.discount ).value =
199
- response.response.coupon_amount;
200
- document.querySelector( MPv1.selectors.mpCouponApplyed ).innerHTML =
201
- //"<div style='border-style: solid; border-width:thin; " +
202
- //"border-color: #009EE3; padding: 8px 8px 8px 8px; margin-top: 4px;'>" +
203
- MPv1.text.discount_info1 + " <strong>" +
204
- MPv1.currencyIdToCurrency( response.response.currency_id ) + " " +
205
- Math.round( response.response.coupon_amount * 100 ) / 100 +
206
- "</strong> " + MPv1.text.discount_info2 + " " +
207
- response.response.name + ".<br>" + MPv1.text.discount_info3 + " <strong>" +
208
- MPv1.currencyIdToCurrency( response.response.currency_id ) + " " +
209
- Math.round( MPv1.getAmountWithoutDiscount() * 100 ) / 100 +
210
- "</strong><br>" + MPv1.text.discount_info4 + " <strong>" +
211
- MPv1.currencyIdToCurrency( response.response.currency_id ) + " " +
212
- Math.round( MPv1.getAmount() * 100 ) / 100 + "*</strong><br>" +
213
- "<i>" + MPv1.text.discount_info5 + "</i><br>" +
214
- "<a href='https://api.mercadolibre.com/campaigns/" +
215
- response.response.id +
216
- "/terms_and_conditions?format_type=html' target='_blank'>" +
217
- MPv1.text.discount_info6 + "</a>";
218
- document.querySelector( MPv1.selectors.mpCouponError ).style.display =
219
- "none";
220
- MPv1.coupon_of_discounts.status = true;
221
- document.querySelector( MPv1.selectors.couponCode ).style.background =
222
- null;
223
- document.querySelector( MPv1.selectors.couponCode ).style.background =
224
- "url(" + MPv1.paths.check + ") 98% 50% no-repeat #fff";
225
- document.querySelector( MPv1.selectors.applyCoupon ).value =
226
- MPv1.text.remove;
227
- MPv1.cardsHandler();
228
- document.querySelector( MPv1.selectors.campaign_id ).value =
229
- response.response.id;
230
- document.querySelector( MPv1.selectors.campaign ).value =
231
- response.response.name;
232
- } else {
233
- document.querySelector( MPv1.selectors.mpCouponApplyed ).style.display = "none";
234
- document.querySelector( MPv1.selectors.mpCouponError ).style.display = "block";
235
- document.querySelector( MPv1.selectors.mpCouponError ).innerHTML = response.response.message;
236
- MPv1.coupon_of_discounts.status = false;
237
- document.querySelector( MPv1.selectors.couponCode ).style.background = null;
238
- document.querySelector( MPv1.selectors.couponCode ).style.background = "url(" + MPv1.paths.error + ") 98% 50% no-repeat #fff";
239
- document.querySelector( MPv1.selectors.applyCoupon ).value = MPv1.text.apply;
240
- document.querySelector( MPv1.selectors.discount ).value = 0;
241
- MPv1.cardsHandler();
242
- }
243
- document.querySelector( MPv1.selectors.applyCoupon ).disabled = false;
244
- }
245
- });
246
- }
247
- }
248
-
249
- MPv1.getBin = function() {
250
-
251
- var cardSelector = document.querySelector( MPv1.selectors.paymentMethodSelector );
252
-
253
- if (cardSelector && cardSelector[cardSelector.options.selectedIndex].value != "-1") {
254
- return cardSelector[cardSelector.options.selectedIndex]
255
- .getAttribute( "first_six_digits" );
256
- }
257
-
258
- var ccNumber = document.querySelector( MPv1.selectors.cardNumber );
259
- return ccNumber.value.replace( /[ .-]/g, "" ).slice( 0, 6 );
260
-
261
- }
262
-
263
- MPv1.clearOptions = function() {
264
-
265
- var bin = MPv1.getBin();
266
-
267
- if ( bin.length == 0 ) {
268
-
269
- MPv1.hideIssuer();
270
-
271
- var selectorInstallments = document.querySelector( MPv1.selectors.installments ),
272
- fragment = document.createDocumentFragment(),
273
- option = new Option( MPv1.text.choose + "...", "-1" );
274
-
275
- selectorInstallments.options.length = 0;
276
- fragment.appendChild( option );
277
- selectorInstallments.appendChild( fragment );
278
- selectorInstallments.setAttribute( "disabled", "disabled" );
279
-
280
- }
281
-
282
- }
283
-
284
- MPv1.guessingPaymentMethod = function( event ) {
285
-
286
- var bin = MPv1.getBin();
287
- var amount = MPv1.getAmount();
288
-
289
- if ( event.type == "keyup" ) {
290
- if ( bin != null && bin.length == 6 ) {
291
- Mercadopago.getPaymentMethod( {
292
- "bin": bin
293
- }, MPv1.setPaymentMethodInfo );
294
- }
295
- } else {
296
- setTimeout( function() {
297
- if ( bin.length >= 6 ) {
298
- Mercadopago.getPaymentMethod( {
299
- "bin": bin
300
- }, MPv1.setPaymentMethodInfo );
301
- }
302
- }, 100 );
303
- }
304
-
305
- };
306
-
307
- MPv1.setPaymentMethodInfo = function( status, response ) {
308
-
309
- if ( status == 200 ) {
310
-
311
- if ( MPv1.site_id != "MLM" ) {
312
- // Guessing...
313
- document.querySelector( MPv1.selectors.paymentMethodId ).value = response[0].id;
314
- if ( MPv1.customer_and_card.status ) {
315
- document.querySelector( MPv1.selectors.paymentMethodSelector )
316
- .style.background = "url(" + response[0].secure_thumbnail + ") 90% 50% no-repeat #fff";
317
- } else {
318
- document.querySelector( MPv1.selectors.cardNumber ).style.background = "url(" +
319
- response[0].secure_thumbnail + ") 98% 50% no-repeat #fff";
320
- }
321
- }
322
-
323
- // Check if the security code (ex: Tarshop) is required.
324
- var cardConfiguration = response[0].settings;
325
- var bin = MPv1.getBin();
326
- var amount = MPv1.getAmount();
327
-
328
- Mercadopago.getInstallments(
329
- { "bin": bin, "amount": amount },
330
- MPv1.setInstallmentInfo
331
- );
332
-
333
- // Check if the issuer is necessary to pay.
334
- var issuerMandatory = false, additionalInfo = response[0].additional_info_needed;
335
-
336
- for ( var i=0; i<additionalInfo.length; i++ ) {
337
- if ( additionalInfo[i] == "issuer_id" ) {
338
- issuerMandatory = true;
339
- }
340
- };
341
-
342
- if ( issuerMandatory && MPv1.site_id != "MLM" ) {
343
- var payment_method_id = response[0].id;
344
- MPv1.getIssuersPaymentMethod( payment_method_id );
345
- } else {
346
- MPv1.hideIssuer();
347
- }
348
-
349
- }
350
-
351
- }
352
-
353
- MPv1.changePaymetMethodSelector = function() {
354
- var payment_method_id =
355
- document.querySelector( MPv1.selectors.paymentMethodSelector ).value;
356
- MPv1.getIssuersPaymentMethod( payment_method_id );