MercadoPagoTransparent - Version 2.7.4

Version Notes

Added mp analytics
Added Failure page setting
Updated readme file
Minor Refactor
Added option to disable showing MP discount in order subtotals
Bug fixing

Download this release

Release Info

Developer MercadoPago
Extension MercadoPagoTransparent
Version 2.7.4
Comparing to
See all releases


Code changes from version 2.6.3 to 2.7.4

Files changed (41) hide show
  1. app/code/community/MercadoPago/Core/Block/Analytics/AfterCheckout.php +16 -0
  2. app/code/community/MercadoPago/Core/Block/Analytics/Checkout.php +19 -0
  3. app/code/community/MercadoPago/Core/Block/Calculator/CalculatorForm.php +10 -0
  4. app/code/community/MercadoPago/Core/Block/Calculator/CalculatorLink.php +9 -9
  5. app/code/community/MercadoPago/Core/Block/Sales/Order/Totals/Discount/Coupon.php +1 -1
  6. app/code/community/MercadoPago/Core/Helper/Data.php +138 -22
  7. app/code/community/MercadoPago/Core/Helper/StatusUpdate.php +34 -0
  8. app/code/community/MercadoPago/Core/Helper/Validate.php +40 -0
  9. app/code/community/MercadoPago/Core/Model/Core.php +21 -1
  10. app/code/community/MercadoPago/Core/Model/Cron/Order.php +1 -1
  11. app/code/community/MercadoPago/Core/Model/Custom/Payment.php +7 -1
  12. app/code/community/MercadoPago/Core/Model/CustomTicket/Payment.php +1 -1
  13. app/code/community/MercadoPago/Core/Model/Observer.php +27 -40
  14. app/code/community/MercadoPago/Core/Model/Source/ListPages.php +1 -1
  15. app/code/community/MercadoPago/Core/Model/Standard/Payment.php +16 -5
  16. app/code/community/MercadoPago/Core/controllers/CheckoutController.php +143 -0
  17. app/code/community/MercadoPago/Core/controllers/NotificationsController.php +10 -2
  18. app/code/community/MercadoPago/Core/controllers/SuccessController.php +0 -77
  19. app/code/community/MercadoPago/Core/etc/config.xml +1 -1
  20. app/code/community/MercadoPago/Core/etc/system.xml +60 -42
  21. app/code/community/MercadoPago/MercadoEnvios/etc/config.xml +1 -1
  22. app/code/community/MercadoPago/OneStepCheckout/etc/config.xml +1 -1
  23. app/design/frontend/base/default/layout/mercadopago.xml +57 -35
  24. app/design/frontend/base/default/template/mercadopago/analytics/after_checkout.phtml +18 -0
  25. app/design/frontend/base/default/template/mercadopago/analytics/checkout.phtml +30 -0
  26. app/design/frontend/base/default/template/mercadopago/calculator/calculatorForm.phtml +6 -1
  27. app/design/frontend/base/default/template/mercadopago/custom/form.phtml +9 -8
  28. app/design/frontend/base/default/template/mercadopago/custom_ticket/form.phtml +18 -11
  29. app/design/frontend/base/default/template/mercadopago/onestepcheckout/custom/form.phtml +4 -6
  30. app/design/frontend/base/default/template/mercadopago/standard/form.phtml +5 -1
  31. app/locale/en_US/MercadoPago_Core.csv +3 -1
  32. app/locale/es_AR/MercadoPago_Core.csv +9 -3
  33. app/locale/es_CL/MercadoPago_Core.csv +4 -1
  34. app/locale/es_CO/MercadoPago_Core.csv +4 -1
  35. app/locale/es_ES/MercadoPago_Core.csv +4 -1
  36. app/locale/es_MX/MercadoPago_Core.csv +4 -1
  37. app/locale/es_VE/MercadoPago_Core.csv +4 -1
  38. app/locale/pt_BR/MercadoPago_Core.csv +4 -1
  39. js/mercadopago/mercadopago.js +9 -2
  40. package.xml +9 -7
  41. skin/frontend/base/default/mercadopago/css/style.css +19 -1
app/code/community/MercadoPago/Core/Block/Analytics/AfterCheckout.php ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MercadoPago_Core_Block_Analytics_AfterCheckout
4
+ extends Mage_Core_Block_Template
5
+ {
6
+
7
+ /**
8
+ * @var $helperData MercadoPago_Core_Helper_Data
9
+ */
10
+ protected $_helperData;
11
+
12
+ protected function getAnalyticsData()
13
+ {
14
+ return Mage::registry('mp_analytics_data');
15
+ }
16
+ }
app/code/community/MercadoPago/Core/Block/Analytics/Checkout.php ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ class MercadoPago_Core_Block_Analytics_Checkout
4
+ extends Mage_Core_Block_Template
5
+ {
6
+
7
+ const CALCULATOR_JS = 'mercadopago/mercadopago_calculator.js';
8
+
9
+ /**
10
+ * @var $helperData MercadoPago_Core_Helper_Data
11
+ */
12
+ protected $_helperData;
13
+
14
+ protected function getAnalyticsData()
15
+ {
16
+ return Mage::helper('mercadopago')->getAnalyticsData();
17
+ }
18
+
19
+ }
app/code/community/MercadoPago/Core/Block/Calculator/CalculatorForm.php CHANGED
@@ -48,6 +48,16 @@ class MercadoPago_Core_Block_Calculator_CalculatorForm
48
  return $this->_helperData->getMercadoPagoPaymentMethods(Mage::getStoreConfig(MercadoPago_Core_Helper_Data::XML_PATH_ACCESS_TOKEN));
49
  }
50
 
 
 
 
 
 
 
 
 
 
 
51
  /**
52
  * return the current value of amount
53
  *
48
  return $this->_helperData->getMercadoPagoPaymentMethods(Mage::getStoreConfig(MercadoPago_Core_Helper_Data::XML_PATH_ACCESS_TOKEN));
49
  }
50
 
51
+ /**
52
+ * Check if current requested URL is secure
53
+ *
54
+ * @return boolean
55
+ */
56
+ public function isCurrentlySecure()
57
+ {
58
+ return Mage::app()->getStore()->isCurrentlySecure();
59
+ }
60
+
61
  /**
62
  * return the current value of amount
63
  *
app/code/community/MercadoPago/Core/Block/Calculator/CalculatorLink.php CHANGED
@@ -33,33 +33,33 @@ class MercadoPago_Core_Block_Calculator_CalculatorLink
33
  }
34
 
35
  /**
36
- * @param $nameLayoutConteiner string
37
  * @return bool
38
  */
39
- protected function isPageToShow($nameLayoutConteiner){
40
 
41
  $valueConfig = $this->_helperData->getPagesToShow();
42
  $pages = explode(',', $valueConfig);
43
 
44
- return in_array($nameLayoutConteiner, $pages);
45
  }
46
 
47
  /**
48
- * @param $nameLayoutConteiner string
49
  * @return bool
50
  */
51
- protected function inPagePDP($nameLayoutConteiner){
52
 
53
- return $nameLayoutConteiner === self::PAGE_PDP;
54
  }
55
 
56
  /**
57
- * @param $nameLayoutConteiner string
58
  * @return bool
59
  */
60
- protected function inPageCheckoutCart($nameLayoutConteiner){
61
 
62
- return $nameLayoutConteiner === self::PAGE_CART;
63
  }
64
 
65
  }
33
  }
34
 
35
  /**
36
+ * @param $nameLayoutContainer string
37
  * @return bool
38
  */
39
+ protected function isPageToShow($nameLayoutContainer){
40
 
41
  $valueConfig = $this->_helperData->getPagesToShow();
42
  $pages = explode(',', $valueConfig);
43
 
44
+ return in_array($nameLayoutContainer, $pages);
45
  }
46
 
47
  /**
48
+ * @param $nameLayoutContainer string
49
  * @return bool
50
  */
51
+ protected function inPagePDP($nameLayoutContainer){
52
 
53
+ return $nameLayoutContainer === self::PAGE_PDP;
54
  }
55
 
56
  /**
57
+ * @param $nameLayoutContainer string
58
  * @return bool
59
  */
60
+ protected function inPageCheckoutCart($nameLayoutContainer){
61
 
62
+ return $nameLayoutContainer === self::PAGE_CART;
63
  }
64
 
65
  }
app/code/community/MercadoPago/Core/Block/Sales/Order/Totals/Discount/Coupon.php CHANGED
@@ -13,7 +13,7 @@ class MercadoPago_Core_Block_Sales_Order_Totals_Discount_Coupon
13
  */
14
  public function initTotals()
15
  {
16
- if ((float)$this->getSource()->getDiscountCouponAmount() == 0) {
17
  return $this;
18
  }
19
  $total = new Varien_Object(array(
13
  */
14
  public function initTotals()
15
  {
16
+ if ((float)$this->getSource()->getDiscountCouponAmount() == 0 || !Mage::getStoreConfigFlag('payment/mercadopago/consider_discount')) {
17
  return $this;
18
  }
19
  $total = new Varien_Object(array(
app/code/community/MercadoPago/Core/Helper/Data.php CHANGED
@@ -22,6 +22,7 @@ class MercadoPago_Core_Helper_Data
22
  const XML_PATH_PUBLIC_KEY = 'payment/mercadopago_custom_checkout/public_key';
23
  const XML_PATH_CLIENT_ID = 'payment/mercadopago_standard/client_id';
24
  const XML_PATH_CLIENT_SECRET = 'payment/mercadopago_standard/client_secret';
 
25
 
26
  const PLATFORM_V1_WHITELABEL = 'v1-whitelabel';
27
  const PLATFORM_DESKTOP = 'Desktop';
@@ -81,13 +82,14 @@ class MercadoPago_Core_Helper_Data
81
  public function isValidAccessToken($accessToken)
82
  {
83
  $mp = Mage::helper('mercadopago')->getApiInstance($accessToken);
84
- try{
85
  $response = $mp->get("/v1/payment_methods");
86
  if ($response['status'] == 401 || $response['status'] == 400) {
87
  return false;
88
  }
 
89
  return true;
90
- } catch (\Exception $e){
91
  return false;
92
  }
93
  }
@@ -119,41 +121,51 @@ class MercadoPago_Core_Helper_Data
119
 
120
  public function setOrderSubtotals($data, $order)
121
  {
 
 
 
122
  if (isset($data['total_paid_amount'])) {
123
- $balance = $this->_getMultiCardValue($data, 'total_paid_amount');
124
  } else {
125
- $balance = $data['transaction_details']['total_paid_amount'];
126
  }
127
- $shippingCost = $this->_getMultiCardValue($data, 'shipping_cost');
128
 
129
- $order->setGrandTotal($balance);
130
- $order->setBaseGrandTotal($balance);
131
- if ($shippingCost > 0) {
132
- $order->setBaseShippingAmount($shippingCost);
133
- $order->setShippingAmount($shippingCost);
134
- }
135
 
136
- $couponAmount = $this->_getMultiCardValue($data, 'coupon_amount');
137
- $transactionAmount = $this->_getMultiCardValue($data, 'transaction_amount');
138
 
139
- if ($couponAmount) {
140
  $order->setDiscountCouponAmount($couponAmount * -1);
141
  $order->setBaseDiscountCouponAmount($couponAmount * -1);
142
- $balance = $balance - ($transactionAmount - $couponAmount + $shippingCost);
143
  } else {
144
- $balance = $balance - $transactionAmount - $shippingCost;
 
 
145
  }
146
 
 
 
 
 
 
 
 
 
 
147
  if (!Mage::getStoreConfigFlag('payment/mercadopago/financing_cost')) {
148
- $order->setGrandTotal($order->getGrandTotal() - $balance);
149
- $order->setBaseGrandTotal($order->getBaseGrandTotal() - $balance);
150
 
151
  return;
 
 
 
152
  }
153
 
154
- if (Zend_Locale_Math::round($balance, 4) > 0) {
155
- $order->setFinanceCostAmount($balance);
156
- $order->setBaseFinanceCostAmount($balance);
157
  }
158
  }
159
 
@@ -194,7 +206,7 @@ class MercadoPago_Core_Helper_Data
194
  public function getSuccessUrl()
195
  {
196
  if (Mage::getStoreConfig('payment/mercadopago/use_successpage_mp')) {
197
- $url = 'mercadopago/success';
198
  } else {
199
  $url = 'checkout/onepage/success';
200
  }
@@ -260,4 +272,108 @@ class MercadoPago_Core_Helper_Data
260
  return $response['response'];
261
  }
262
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
263
  }
22
  const XML_PATH_PUBLIC_KEY = 'payment/mercadopago_custom_checkout/public_key';
23
  const XML_PATH_CLIENT_ID = 'payment/mercadopago_standard/client_id';
24
  const XML_PATH_CLIENT_SECRET = 'payment/mercadopago_standard/client_secret';
25
+ const XML_PATH_USE_SUCCESSPAGE_MP = 'payment/mercadopago/use_successpage_mp';
26
 
27
  const PLATFORM_V1_WHITELABEL = 'v1-whitelabel';
28
  const PLATFORM_DESKTOP = 'Desktop';
82
  public function isValidAccessToken($accessToken)
83
  {
84
  $mp = Mage::helper('mercadopago')->getApiInstance($accessToken);
85
+ try {
86
  $response = $mp->get("/v1/payment_methods");
87
  if ($response['status'] == 401 || $response['status'] == 400) {
88
  return false;
89
  }
90
+
91
  return true;
92
+ } catch (\Exception $e) {
93
  return false;
94
  }
95
  }
121
 
122
  public function setOrderSubtotals($data, $order)
123
  {
124
+ $couponAmount = $this->_getMultiCardValue($data, 'coupon_amount');
125
+ $transactionAmount = $this->_getMultiCardValue($data, 'transaction_amount');
126
+
127
  if (isset($data['total_paid_amount'])) {
128
+ $paidAmount = $this->_getMultiCardValue($data, 'total_paid_amount');
129
  } else {
130
+ $paidAmount = $data['transaction_details']['total_paid_amount'];
131
  }
 
132
 
133
+ $shippingCost = $this->_getMultiCardValue($data, 'shipping_cost');
134
+ $originalAmount = $transactionAmount + $shippingCost;
 
 
 
 
135
 
 
 
136
 
137
+ if ($couponAmount && Mage::getStoreConfigFlag('payment/mercadopago/consider_discount')) {
138
  $order->setDiscountCouponAmount($couponAmount * -1);
139
  $order->setBaseDiscountCouponAmount($couponAmount * -1);
140
+ $financingCost = $paidAmount + $couponAmount - $originalAmount;
141
  } else {
142
+ //if a discount was applied and should not be considered
143
+ $paidAmount += $couponAmount;
144
+ $financingCost = $paidAmount - $originalAmount;
145
  }
146
 
147
+
148
+
149
+
150
+ if ($shippingCost > 0) {
151
+ $order->setBaseShippingAmount($shippingCost);
152
+ $order->setShippingAmount($shippingCost);
153
+ }
154
+
155
+
156
  if (!Mage::getStoreConfigFlag('payment/mercadopago/financing_cost')) {
157
+ $order->setGrandTotal($paidAmount - $financingCost);
158
+ $order->setBaseGrandTotal($paidAmount - $financingCost);
159
 
160
  return;
161
+ } else {
162
+ $order->setGrandTotal($paidAmount);
163
+ $order->setBaseGrandTotal($paidAmount);
164
  }
165
 
166
+ if (Zend_Locale_Math::round($financingCost, 4) > 0) {
167
+ $order->setFinanceCostAmount($financingCost);
168
+ $order->setBaseFinanceCostAmount($financingCost);
169
  }
170
  }
171
 
206
  public function getSuccessUrl()
207
  {
208
  if (Mage::getStoreConfig('payment/mercadopago/use_successpage_mp')) {
209
+ $url = 'mercadopago/checkout/page';
210
  } else {
211
  $url = 'checkout/onepage/success';
212
  }
272
  return $response['response'];
273
  }
274
 
275
+ /**
276
+ * Summary: Get client id from access token.
277
+ * Description: Get client id from access token.
278
+ *
279
+ * @param String $at
280
+ *
281
+ * @return String client id.
282
+ */
283
+ public static function getClientIdFromAccessToken($at)
284
+ {
285
+ $t = explode('-', $at);
286
+ if (count($t) > 0) {
287
+ return $t[1];
288
+ }
289
+
290
+ return '';
291
+ }
292
+
293
+ public function getAnalyticsData($order = null)
294
+ {
295
+ $analyticsData = [];
296
+ if ($order != null && $order->getPayment()->getData('method')) {
297
+ $additionalInfo = $order->getPayment()->getData('additional_information');
298
+ $methodCode = $order->getPayment()->getData('method');
299
+ $analyticsData = [
300
+ 'payment_id' => isset($additionalInfo['payment_id_detail']) ? $order->getPayment()->getData('additional_information')['payment_id_detail'] : '',
301
+ 'payment_type' => 'credit_card',
302
+ 'checkout_type' => 'custom'
303
+ ];
304
+ if ($methodCode == 'mercadopago_custom') {
305
+ $analyticsData['public_key'] = Mage::getStoreConfig('payment/mercadopago_custom/public_key');
306
+ } elseif ($methodCode == 'mercadopago_standard') {
307
+ $analyticsData['analytics_key'] = Mage::getStoreConfig(self::XML_PATH_CLIENT_ID);
308
+ $analyticsData['checkout_type'] = 'basic';
309
+ $analyticsData['payment_type'] = isset($additionalInfo['payment_type_id']) ? $order->getPayment()->getData('additional_information')['payment_type_id'] : 'credit_card';
310
+ } else {
311
+ $analyticsData['analytics_key'] = $this->getClientIdFromAccessToken(Mage::getStoreConfig(self::XML_PATH_ACCESS_TOKEN));
312
+ $analyticsData['payment_type'] = 'ticket';
313
+ }
314
+ } else {
315
+ $analyticsData['platform_version'] = (string)Mage::getConfig()->getModuleConfig("MercadoPago_Core")->version;
316
+ $analyticsData['module_version'] = (string)Mage::getVersion();
317
+ $analyticsData['email'] = Mage::getModel('mercadopago/core')->getEmailCustomer();
318
+ $analyticsData['user_logged'] = Mage::getSingleton('customer/session')->getCustomer()->getId() !== 0 ? 1 : 0;
319
+ $analyticsData['payment_methods'] = implode(',', array_keys(Mage::getSingleton('payment/config')->getActiveMethods()));
320
+
321
+ $analyticsData['custom_analytics_key'] = Mage::getStoreConfig(self::XML_PATH_PUBLIC_KEY);
322
+ $analyticsData['ticket_analytics_key'] = $this->getClientIdFromAccessToken(Mage::getStoreConfig(self::XML_PATH_ACCESS_TOKEN));
323
+ $analyticsData['standard_analytics_key'] = Mage::getStoreConfig(self::XML_PATH_CLIENT_ID);
324
+ }
325
+
326
+ return $analyticsData;
327
+ }
328
+
329
+ public function getPlatformInfo()
330
+ {
331
+ return [
332
+ "platform" => "Magento",
333
+ "platform_version" => (string)Mage::getConfig()->getModuleConfig("MercadoPago_Core")->version,
334
+ "module_version" => (string)Mage::getVersion(),
335
+ "code_version" => phpversion()
336
+ ];
337
+ }
338
+
339
+ public function checkAnalyticsData()
340
+ {
341
+ $clientId = $this->_website->getConfig(MercadoPago_Core_Helper_Data::XML_PATH_CLIENT_ID);
342
+ $clientSecret = $this->_website->getConfig(MercadoPago_Core_Helper_Data::XML_PATH_CLIENT_SECRET);
343
+ if (!empty($clientId) && !empty($clientSecret)) {
344
+ $this->sendAnalyticsData(Mage::helper('mercadopago')->getApiInstance($clientId, $clientSecret));
345
+ } else {
346
+ $accessToken = $this->_website->getConfig(MercadoPago_Core_Helper_Data::XML_PATH_ACCESS_TOKEN);
347
+ if (!empty($accessToken)) {
348
+ $this->sendAnalyticsData(Mage::helper('mercadopago')->getApiInstance($accessToken));
349
+ }
350
+
351
+ }
352
+
353
+ }
354
+
355
+ protected function sendAnalyticsData($api)
356
+ {
357
+ $request = [
358
+ "data" => $this->getPlatformInfo()
359
+ ];
360
+ $fields = [
361
+ 'two_cards' => $this->_website->getConfig('payment/mercadopago_custom/allow_2_cards'),
362
+ 'checkout_basic' => $this->_website->getConfig('payment/mercadopago_standard/active'),
363
+ 'checkout_custom_credit_card' => $this->_website->getConfig('payment/mercadopago_custom/active'),
364
+ 'checkout_custom_ticket' => $this->_website->getConfig('payment/mercadopago_customticket/active'),
365
+ 'mercado_envios' => $this->_website->getConfig('carriers/mercadoenvios/active'),
366
+ 'checkout_custom_credit_card_coupon' => $this->_website->getConfig('payment/mercadopago_custom/coupon_mercadopago'),
367
+ 'checkout_custom_ticket_coupon' => $this->_website->getConfig('payment/mercadopago_customticket/coupon_mercadopago')
368
+ ];
369
+ foreach ($fields as $key => $field) {
370
+ $request['data'][$key] = $field == 1 ? 'true' : 'false';
371
+ }
372
+
373
+ $this->log("Analytics settings request sent /modules/tracking/settings", 'mercadopago_analytics.log', $request);
374
+ $account_settings = $api->post("/modules/tracking/settings", $request['data']);
375
+ $this->log("Analytics settings response", 'mercadopago_analytics.log', $account_settings);
376
+
377
+ }
378
+
379
  }
app/code/community/MercadoPago/Core/Helper/StatusUpdate.php CHANGED
@@ -395,6 +395,18 @@ class MercadoPago_Core_Helper_StatusUpdate
395
  $data['payer_last_name'] = $payment['payer']['last_name'];
396
  $data['payer_email'] = $payment['payer']['email'];
397
 
 
 
 
 
 
 
 
 
 
 
 
 
398
  return $data;
399
  }
400
 
@@ -426,5 +438,27 @@ class MercadoPago_Core_Helper_StatusUpdate
426
  return $data;
427
  }
428
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
429
 
430
  }
395
  $data['payer_last_name'] = $payment['payer']['last_name'];
396
  $data['payer_email'] = $payment['payer']['email'];
397
 
398
+ if (isset($data['payer_identification_type'])) {
399
+ $data['payer_identification_type'] .= " | " . $payment['payer']['identification']['type'];
400
+ } else {
401
+ $data['payer_identification_type'] = $payment['payer']['identification']['type'];
402
+ }
403
+
404
+ if (isset($data['payer_identification_number'])) {
405
+ $data['payer_identification_number'] .= " | " . $payment['payer']['identification']['number'];
406
+ } else {
407
+ $data['payer_identification_number'] = $payment['payer']['identification']['number'];
408
+ }
409
+
410
  return $data;
411
  }
412
 
438
  return $data;
439
  }
440
 
441
+ public function getDataPayments($merchantOrderData, $logFile)
442
+ {
443
+ $data = array();
444
+ foreach ($merchantOrderData['payments'] as $payment) {
445
+ $data = $this->_getFormattedPaymentData($payment['id'], $data, $logFile);
446
+ }
447
+
448
+ return $data;
449
+ }
450
+
451
+ protected function _getFormattedPaymentData($paymentId, $data = [], $logFile)
452
+ {
453
+ $core = Mage::getModel('mercadopago/core');
454
+
455
+ $response = $core->getPayment($paymentId);
456
+ if ($response['status'] == 400 || $response['status'] == 401) {
457
+ return [];
458
+ }
459
+ $payment = $response['response']['collection'];
460
+
461
+ return $this->formatArrayPayment($data, $payment, $logFile);
462
+ }
463
 
464
  }
app/code/community/MercadoPago/Core/Helper/Validate.php ADDED
@@ -0,0 +1,40 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ *
5
+ */
6
+ class MercadoPago_Core_Helper_Validate
7
+ {
8
+ public function validateAccessToken($website)
9
+ {
10
+ $accessToken = $website->getConfig(MercadoPago_Core_Helper_Data::XML_PATH_ACCESS_TOKEN);
11
+ if (!empty($accessToken)) {
12
+ if (!Mage::helper('mercadopago')->isValidAccessToken($accessToken)) {
13
+ Mage::throwException(Mage::helper('mercadopago')->__('Mercado Pago - Custom Checkout: Invalid access token'));
14
+ }
15
+ }
16
+ }
17
+
18
+ public function validateClientCredentials($website)
19
+ {
20
+ $clientId = $website->getConfig(MercadoPago_Core_Helper_Data::XML_PATH_CLIENT_ID);
21
+ $clientSecret = $website->getConfig(MercadoPago_Core_Helper_Data::XML_PATH_CLIENT_SECRET);
22
+ if (!empty($clientId) && !empty($clientSecret)) {
23
+ if (!Mage::helper('mercadopago')->isValidClientCredentials($clientId, $clientSecret)) {
24
+ Mage::throwException(Mage::helper('mercadopago')->__('Mercado Pago - Classic Checkout: Invalid client id or client secret'));
25
+ }
26
+ }
27
+ }
28
+
29
+ public function validateRecurringClientCredentials($website)
30
+ {
31
+ $clientId = $website->getConfig('payment/mercadopago_recurring/client_id');
32
+ $clientSecret = $website->getConfig('payment/mercadopago_recurring/client_secret');
33
+ if (!empty($clientId) && !empty($clientSecret)) {
34
+ if (!Mage::helper('mercadopago')->isValidClientCredentials($clientId, $clientSecret)) {
35
+ Mage::throwException(Mage::helper('mercadopago')->__('Mercado Pago - Recurring Payment Checkout: Invalid client id or client secret'));
36
+ }
37
+ }
38
+ }
39
+
40
+ }
app/code/community/MercadoPago/Core/Model/Core.php CHANGED
@@ -117,6 +117,14 @@ class MercadoPago_Core_Model_Core
117
  }
118
  }
119
 
 
 
 
 
 
 
 
 
120
  return $infoPayments;
121
  }
122
 
@@ -256,6 +264,7 @@ class MercadoPago_Core_Model_Core
256
  $preference = [];
257
 
258
  $preference['notification_url'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) . "mercadopago/notifications/custom";
 
259
  $preference['description'] = Mage::helper('mercadopago')->__("Order # %s in store %s", $orderId, Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, true));
260
  if (isset($paymentInfo['transaction_amount'])) {
261
  $preference['transaction_amount'] = (float)$paymentInfo['transaction_amount'];
@@ -482,14 +491,25 @@ class MercadoPago_Core_Model_Core
482
  'installments',
483
  'statement_descriptor',
484
  'trunc_card',
485
- 'id'
 
 
486
  ];
487
 
488
  $infoPayments = $paymentOrder->getAdditionalInformation();
 
489
  if (!isset($infoPayments['first_payment_id'])) {
490
  $paymentOrder = $this->_addAdditionalInformationToPaymentOrder($data, $additionalFields, $paymentOrder);
491
  }
492
 
 
 
 
 
 
 
 
 
493
  $paymentStatus = $paymentOrder->save();
494
  $helper->log('Update Payment', 'mercadopago.log', $paymentStatus->getData());
495
 
117
  }
118
  }
119
 
120
+ if ($payment->getAdditionalInformation('payer_identification_type') != "") {
121
+ $text = __($payment->getAdditionalInformation('payer_identification_type'). ': '. $payment->getAdditionalInformation('payer_identification_number'));
122
+ $infoPayments[$payment->getAdditionalInformation('payer_identification_type')] = array(
123
+ "text" => $text,
124
+ "value" => $payment->getAdditionalInformation('payer_identification_number')
125
+ );
126
+ }
127
+
128
  return $infoPayments;
129
  }
130
 
264
  $preference = [];
265
 
266
  $preference['notification_url'] = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK) . "mercadopago/notifications/custom";
267
+
268
  $preference['description'] = Mage::helper('mercadopago')->__("Order # %s in store %s", $orderId, Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, true));
269
  if (isset($paymentInfo['transaction_amount'])) {
270
  $preference['transaction_amount'] = (float)$paymentInfo['transaction_amount'];
491
  'installments',
492
  'statement_descriptor',
493
  'trunc_card',
494
+ 'id',
495
+ 'payer_identification_type',
496
+ 'payer_identification_number'
497
  ];
498
 
499
  $infoPayments = $paymentOrder->getAdditionalInformation();
500
+
501
  if (!isset($infoPayments['first_payment_id'])) {
502
  $paymentOrder = $this->_addAdditionalInformationToPaymentOrder($data, $additionalFields, $paymentOrder);
503
  }
504
 
505
+ if (isset($data['id'])) {
506
+ $paymentOrder->setAdditionalInformation('payment_id_detail', $data['id']);
507
+ }
508
+
509
+ if (isset($data['payer_identification_type']) & isset($data['payer_identification_number'])) {
510
+ $paymentOrder->setAdditionalInformation($data['payer_identification_type'], $data['payer_identification_number']);
511
+ }
512
+
513
  $paymentStatus = $paymentOrder->save();
514
  $helper->log('Update Payment', 'mercadopago.log', $paymentStatus->getData());
515
 
app/code/community/MercadoPago/Core/Model/Cron/Order.php CHANGED
@@ -48,7 +48,7 @@ class MercadoPago_Core_Model_Cron_Order
48
  if ($response['status'] == 201 || $response['status'] == 200) {
49
  $merchantOrderData = $response['response'];
50
 
51
- $paymentData = $this->getDataPayments($merchantOrderData);
52
  $statusFinal = $this->_statusHelper->getStatusFinal($paymentData['status'], $merchantOrderData);
53
  $statusDetail = $infoPayments['status_detail'];
54
 
48
  if ($response['status'] == 201 || $response['status'] == 200) {
49
  $merchantOrderData = $response['response'];
50
 
51
+ $paymentData = $this->_statusHelper->getDataPayments($merchantOrderData, self::LOG_FILE);
52
  $statusFinal = $this->_statusHelper->getStatusFinal($paymentData['status'], $merchantOrderData);
53
  $statusDetail = $infoPayments['status_detail'];
54
 
app/code/community/MercadoPago/Core/Model/Custom/Payment.php CHANGED
@@ -75,6 +75,9 @@ class MercadoPago_Core_Model_Custom_Payment
75
  $this->getInfoInstance()->setAdditionalInformation('second_payment_status_detail', $paymentSecondCard['status_detail']);
76
  $this->getInfoInstance()->setAdditionalInformation('total_paid_amount', $paymentFirstCard['transaction_details']['total_paid_amount'] . '|' . $paymentSecondCard['transaction_details']['total_paid_amount']);
77
  $this->getInfoInstance()->setAdditionalInformation('transaction_amount', $paymentFirstCard['transaction_amount'] . '|' . $paymentSecondCard['transaction_amount']);
 
 
 
78
  $stateObject->setState(Mage::helper('mercadopago/statusUpdate')->_getAssignedState('pending_payment'));
79
  $stateObject->setStatus('pending_payment');
80
  $stateObject->setIsNotified(false);
@@ -104,6 +107,9 @@ class MercadoPago_Core_Model_Custom_Payment
104
  $this->getInfoInstance()->setAdditionalInformation('status', $payment['status']);
105
  $this->getInfoInstance()->setAdditionalInformation('payment_id_detail', $payment['id']);
106
  $this->getInfoInstance()->setAdditionalInformation('status_detail', $payment['status_detail']);
 
 
 
107
  $stateObject->setState(Mage::helper('mercadopago/statusUpdate')->_getAssignedState('pending_payment'));
108
  $stateObject->setStatus('pending_payment');
109
  $stateObject->setIsNotified(false);
@@ -336,7 +342,7 @@ class MercadoPago_Core_Model_Custom_Payment
336
 
337
  public function getOrderPlaceRedirectUrl()
338
  {
339
- return Mage::getUrl('mercadopago/success', ['_secure' => true]);
340
  }
341
 
342
  public function getCode()
75
  $this->getInfoInstance()->setAdditionalInformation('second_payment_status_detail', $paymentSecondCard['status_detail']);
76
  $this->getInfoInstance()->setAdditionalInformation('total_paid_amount', $paymentFirstCard['transaction_details']['total_paid_amount'] . '|' . $paymentSecondCard['transaction_details']['total_paid_amount']);
77
  $this->getInfoInstance()->setAdditionalInformation('transaction_amount', $paymentFirstCard['transaction_amount'] . '|' . $paymentSecondCard['transaction_amount']);
78
+ $this->getInfoInstance()->setAdditionalInformation('payer_identification_type', $paymentFirstCard['payer']['identification']['type']. '|' . $paymentSecondCard['payer']['identification']['type']);
79
+ $this->getInfoInstance()->setAdditionalInformation('payer_identification_number', $paymentFirstCard['payer']['identification']['number'] . '|' . $paymentSecondCard['payer']['identification']['number']);
80
+
81
  $stateObject->setState(Mage::helper('mercadopago/statusUpdate')->_getAssignedState('pending_payment'));
82
  $stateObject->setStatus('pending_payment');
83
  $stateObject->setIsNotified(false);
107
  $this->getInfoInstance()->setAdditionalInformation('status', $payment['status']);
108
  $this->getInfoInstance()->setAdditionalInformation('payment_id_detail', $payment['id']);
109
  $this->getInfoInstance()->setAdditionalInformation('status_detail', $payment['status_detail']);
110
+ $this->getInfoInstance()->setAdditionalInformation('payer_identification_type', $payment['payer']['identification']['type']);
111
+ $this->getInfoInstance()->setAdditionalInformation('payer_identification_number', $payment['payer']['identification']['number']);
112
+
113
  $stateObject->setState(Mage::helper('mercadopago/statusUpdate')->_getAssignedState('pending_payment'));
114
  $stateObject->setStatus('pending_payment');
115
  $stateObject->setIsNotified(false);
342
 
343
  public function getOrderPlaceRedirectUrl()
344
  {
345
+ return Mage::getUrl('mercadopago/checkout/page', ['_secure' => true]);
346
  }
347
 
348
  public function getCode()
app/code/community/MercadoPago/Core/Model/CustomTicket/Payment.php CHANGED
@@ -96,7 +96,7 @@ class MercadoPago_Core_Model_CustomTicket_Payment
96
 
97
  public function getOrderPlaceRedirectUrl()
98
  {
99
- return Mage::getUrl('mercadopago/success', ['_secure' => true]);
100
  }
101
 
102
  }
96
 
97
  public function getOrderPlaceRedirectUrl()
98
  {
99
+ return Mage::getUrl('mercadopago/checkout/page', ['_secure' => true]);
100
  }
101
 
102
  }
app/code/community/MercadoPago/Core/Model/Observer.php CHANGED
@@ -48,6 +48,10 @@ class MercadoPago_Core_Model_Observer
48
 
49
  private $available_transparent_credit_cart = ['mla', 'mlb', 'mlm', 'mco', 'mlv', 'mlc', 'mpe'];
50
  private $available_transparent_ticket = ['mla', 'mlb', 'mlm', 'mco', 'mlv', 'mlc', 'mpe'];
 
 
 
 
51
  private $_website;
52
 
53
  const LOG_FILE = 'mercadopago.log';
@@ -61,17 +65,18 @@ class MercadoPago_Core_Model_Observer
61
  {
62
 
63
  $this->_website = Mage::helper('mercadopago')->getAdminSelectedWebsite();
 
64
 
65
- $this->validateAccessToken();
66
-
67
- $this->validateClientCredentials();
68
-
69
- $this->validateRecurringClientCredentials();
70
 
71
  $this->setSponsor();
72
 
73
  $this->availableCheckout();
74
 
 
 
75
  $this->checkBanner('mercadopago_custom');
76
  $this->checkBanner('mercadopago_customticket');
77
  $this->checkBanner('mercadopago_standard');
@@ -144,7 +149,7 @@ class MercadoPago_Core_Model_Observer
144
  'MLC' => 206959756,
145
  'MLV' => 206960619,
146
  'MPE' => 217178514,
147
- 'MPU' => 247028139,
148
  ];
149
  $countryCode = $user['response']['site_id'];
150
 
@@ -160,27 +165,6 @@ class MercadoPago_Core_Model_Observer
160
  Mage::helper('mercadopago')->log("Sponsor saved", self::LOG_FILE, $sponsorId);
161
  }
162
 
163
- protected function validateAccessToken()
164
- {
165
- $accessToken = $this->_website->getConfig(MercadoPago_Core_Helper_Data::XML_PATH_ACCESS_TOKEN);
166
- if (!empty($accessToken)) {
167
- if (!Mage::helper('mercadopago')->isValidAccessToken($accessToken)) {
168
- Mage::throwException(Mage::helper('mercadopago')->__('Mercado Pago - Custom Checkout: Invalid access token'));
169
- }
170
- }
171
- }
172
-
173
- protected function validateClientCredentials()
174
- {
175
- $clientId = $this->_website->getConfig(MercadoPago_Core_Helper_Data::XML_PATH_CLIENT_ID);
176
- $clientSecret = $this->_website->getConfig(MercadoPago_Core_Helper_Data::XML_PATH_CLIENT_SECRET);
177
- if (!empty($clientId) && !empty($clientSecret)) {
178
- if (!Mage::helper('mercadopago')->isValidClientCredentials($clientId, $clientSecret)) {
179
- Mage::throwException(Mage::helper('mercadopago')->__('Mercado Pago - Classic Checkout: Invalid client id or client secret'));
180
- }
181
- }
182
- }
183
-
184
  protected function _saveWebsiteConfig($path, $value)
185
  {
186
  if ($this->_website->getId() == 0) {
@@ -201,10 +185,22 @@ class MercadoPago_Core_Model_Observer
201
  return;
202
  }
203
  $orderStatus = $order->getData('status');
204
- $orderPaymentStatus = $order->getPayment()->getData('additional_information')['status'];
 
 
 
 
 
 
 
 
 
 
 
205
 
206
- $paymentID = $order->getPayment()->getData('additional_information')['payment_id_detail'];
207
 
 
208
  if (!($orderPaymentStatus == null || $paymentID == null)) {
209
 
210
  $isValidBasicData = $this->checkCancelationBasicData($paymentID, $paymentMethod);
@@ -507,20 +503,11 @@ class MercadoPago_Core_Model_Observer
507
  }
508
  }
509
 
510
- protected function validateRecurringClientCredentials()
511
- {
512
- $clientId = Mage::getStoreConfig('payment/mercadopago_recurring/client_id');
513
- $clientSecret = Mage::getStoreConfig('payment/mercadopago_recurring/client_secret');
514
- if (!empty($clientId) && !empty($clientSecret)) {
515
- if (!Mage::helper('mercadopago')->isValidClientCredentials($clientId, $clientSecret)) {
516
- Mage::throwException(Mage::helper('mercadopago')->__('Mercado Pago - Recurring Payment Checkout: Invalid client id or client secret'));
517
- }
518
- }
519
- }
520
-
521
  protected function _isMercadoPago($paymentMethod)
522
  {
523
  return ($paymentMethod == 'mercadopago_standard' || $paymentMethod == 'mercadopago_custom');
524
  }
 
 
525
 
526
  }
48
 
49
  private $available_transparent_credit_cart = ['mla', 'mlb', 'mlm', 'mco', 'mlv', 'mlc', 'mpe'];
50
  private $available_transparent_ticket = ['mla', 'mlb', 'mlm', 'mco', 'mlv', 'mlc', 'mpe'];
51
+
52
+ /**
53
+ * @var
54
+ */
55
  private $_website;
56
 
57
  const LOG_FILE = 'mercadopago.log';
65
  {
66
 
67
  $this->_website = Mage::helper('mercadopago')->getAdminSelectedWebsite();
68
+ $helperValidate = Mage::helper('mercadopago/validate');
69
 
70
+ $helperValidate->validateAccessToken($this->_website);
71
+ $helperValidate->validateClientCredentials($this->_website);
72
+ $helperValidate->validateRecurringClientCredentials($this->_website);
 
 
73
 
74
  $this->setSponsor();
75
 
76
  $this->availableCheckout();
77
 
78
+ Mage::helper('mercadopago')->checkAnalyticsData();
79
+
80
  $this->checkBanner('mercadopago_custom');
81
  $this->checkBanner('mercadopago_customticket');
82
  $this->checkBanner('mercadopago_standard');
149
  'MLC' => 206959756,
150
  'MLV' => 206960619,
151
  'MPE' => 217178514,
152
+ 'MLU' => 247028139,
153
  ];
154
  $countryCode = $user['response']['site_id'];
155
 
165
  Mage::helper('mercadopago')->log("Sponsor saved", self::LOG_FILE, $sponsorId);
166
  }
167
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
168
  protected function _saveWebsiteConfig($path, $value)
169
  {
170
  if ($this->_website->getId() == 0) {
185
  return;
186
  }
187
  $orderStatus = $order->getData('status');
188
+ $additionalInformation = $order->getPayment()->getAdditionalInformation();
189
+
190
+ $orderPaymentStatus = isset($additionalInformation['status']) ? $additionalInformation['status'] : null ;
191
+ $paymentID = isset($additionalInformation['payment_id_detail']) ? $additionalInformation['payment_id_detail'] : null ;
192
+
193
+ $refundAvailable = Mage::getStoreConfig('payment/mercadopago/refund_available');
194
+ if ($refundAvailable & $paymentID == null){
195
+ $this->_getSession()->addWarning(__('The cancellation will be made through Magento. It wasn\'t possible to cancel on MercadoPago'));
196
+ return;
197
+ }
198
+
199
+ $this->_cancellationRequest($orderStatus, $orderPaymentStatus, $paymentID, $paymentMethod);
200
 
201
+ }
202
 
203
+ protected function _cancellationRequest($orderStatus, $orderPaymentStatus, $paymentID, $paymentMethod) {
204
  if (!($orderPaymentStatus == null || $paymentID == null)) {
205
 
206
  $isValidBasicData = $this->checkCancelationBasicData($paymentID, $paymentMethod);
503
  }
504
  }
505
 
 
 
 
 
 
 
 
 
 
 
 
506
  protected function _isMercadoPago($paymentMethod)
507
  {
508
  return ($paymentMethod == 'mercadopago_standard' || $paymentMethod == 'mercadopago_custom');
509
  }
510
+
511
+
512
 
513
  }
app/code/community/MercadoPago/Core/Model/Source/ListPages.php CHANGED
@@ -18,7 +18,7 @@ class MercadoPago_Core_Model_Source_ListPages
18
  {
19
  $pages = [];
20
  $pages[] = ['value' => "product.info.calculator", 'label' => Mage::helper('mercadopago')->__("Product Detail Page")];
21
- $pages[] = ['value' => "checkout.cart.calculator", 'label' => Mage::helper('mercadopago')->__("Basket page")];
22
 
23
  //force order by key
24
  ksort($pages);
18
  {
19
  $pages = [];
20
  $pages[] = ['value' => "product.info.calculator", 'label' => Mage::helper('mercadopago')->__("Product Detail Page")];
21
+ $pages[] = ['value' => "checkout.cart.calculator", 'label' => Mage::helper('mercadopago')->__("Cart page")];
22
 
23
  //force order by key
24
  ksort($pages);
app/code/community/MercadoPago/Core/Model/Standard/Payment.php CHANGED
@@ -194,9 +194,8 @@ class MercadoPago_Core_Model_Standard_Payment
194
  $billingAddress = $order->getBillingAddress()->getData();
195
 
196
  $arr['payer']['date_created'] = date('Y-m-d', $customer->getCreatedAtTimestamp()) . "T" . date('H:i:s', $customer->getCreatedAtTimestamp());
197
- $arr['payer']['email'] = htmlentities($customer->getEmail());
198
- $arr['payer']['first_name'] = htmlentities($customer->getFirstname());
199
- $arr['payer']['last_name'] = htmlentities($customer->getLastname());
200
 
201
  if (isset($payment['additional_information']['doc_number']) && $payment['additional_information']['doc_number'] != "") {
202
  $arr['payer']['identification'] = [
@@ -211,7 +210,7 @@ class MercadoPago_Core_Model_Standard_Payment
211
  "street_number" => ""
212
  ];
213
 
214
- $url = 'mercadopago/success';
215
  $arr['back_urls'] = [
216
  "success" => Mage::getUrl($url),
217
  "pending" => Mage::getUrl($url),
@@ -219,7 +218,7 @@ class MercadoPago_Core_Model_Standard_Payment
219
  ];
220
 
221
  $arr['notification_url'] = Mage::getUrl('mercadopago/notifications/standard');
222
-
223
  $arr['payment_methods']['excluded_payment_methods'] = $this->getExcludedPaymentsMethods();
224
  $installments = $this->getConfigData('installments');
225
  $arr['payment_methods']['installments'] = (int)$installments;
@@ -239,6 +238,18 @@ class MercadoPago_Core_Model_Standard_Payment
239
  return $arr;
240
  }
241
 
 
 
 
 
 
 
 
 
 
 
 
 
242
  protected function getReceiverAddress($shippingAddress)
243
  {
244
  return [
194
  $billingAddress = $order->getBillingAddress()->getData();
195
 
196
  $arr['payer']['date_created'] = date('Y-m-d', $customer->getCreatedAtTimestamp()) . "T" . date('H:i:s', $customer->getCreatedAtTimestamp());
197
+
198
+ $this->_setPayerData($arr['payer'], $customer, $billingAddress);
 
199
 
200
  if (isset($payment['additional_information']['doc_number']) && $payment['additional_information']['doc_number'] != "") {
201
  $arr['payer']['identification'] = [
210
  "street_number" => ""
211
  ];
212
 
213
+ $url = 'mercadopago/checkout/page';
214
  $arr['back_urls'] = [
215
  "success" => Mage::getUrl($url),
216
  "pending" => Mage::getUrl($url),
218
  ];
219
 
220
  $arr['notification_url'] = Mage::getUrl('mercadopago/notifications/standard');
221
+
222
  $arr['payment_methods']['excluded_payment_methods'] = $this->getExcludedPaymentsMethods();
223
  $installments = $this->getConfigData('installments');
224
  $arr['payment_methods']['installments'] = (int)$installments;
238
  return $arr;
239
  }
240
 
241
+ protected function _setPayerData(&$arr, $customer, $billingAddress) {
242
+ if (!$customer->getId()) {
243
+ $arr['payer']['email'] = htmlentities($billingAddress['email']);
244
+ $arr['payer']['first_name'] = htmlentities($billingAddress['firstname']);
245
+ $arr['payer']['last_name'] = htmlentities($billingAddress['lastname']);
246
+ } else {
247
+ $arr['payer']['email'] = htmlentities($customer->getEmail());
248
+ $arr['payer']['first_name'] = htmlentities($customer->getFirstname());
249
+ $arr['payer']['last_name'] = htmlentities($customer->getLastname());
250
+ }
251
+ }
252
+
253
  protected function getReceiverAddress($shippingAddress)
254
  {
255
  return [
app/code/community/MercadoPago/Core/controllers/CheckoutController.php ADDED
@@ -0,0 +1,143 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <?php
2
+
3
+ /**
4
+ * Class MercadoPago_Core_CheckoutController
5
+ */
6
+ class MercadoPago_Core_CheckoutController
7
+ extends Mage_Core_Controller_Front_Action
8
+ {
9
+
10
+ /**
11
+ * @var Mage_Sales_Model_Order
12
+ */
13
+ protected $_order;
14
+
15
+ protected $_statusHelper;
16
+
17
+ protected $_core;
18
+
19
+ const LOG_FILE = 'mercadopago-checkout-redirect.log';
20
+
21
+ const SUCCESS_PAGE_MAGENTO = 'checkout/onepage/success';
22
+
23
+ const FAILURE_PAGE_MAGENTO = 'checkout/onepage/failure';
24
+
25
+
26
+ /**
27
+ * @return Mage_Sales_Model_Order
28
+ */
29
+ protected function getOrder()
30
+ {
31
+ if (empty($this->_order)) {
32
+ $orderIncrementId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
33
+ $this->_order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
34
+ }
35
+
36
+ return $this->_order;
37
+ }
38
+
39
+ protected function _getQuoteId() {
40
+ return Mage::getSingleton('checkout/type_onepage')->getCheckout()->getLastQuoteId();
41
+ }
42
+
43
+ /**
44
+ * Send email of new order
45
+ */
46
+ protected function sendNewOrderMail()
47
+ {
48
+ $order = $this->getOrder();
49
+ if ($order->getCanSendNewEmailFlag() && !$order->getEmailSent()) {
50
+ try {
51
+ $order->sendNewOrderEmail();
52
+ } catch (Exception $e) {
53
+ Mage::logException($e);
54
+ }
55
+ }
56
+ }
57
+
58
+ /**
59
+ * Return handle name depending on payment method
60
+ *
61
+ * @return string
62
+ */
63
+ protected function getCheckoutHandle()
64
+ {
65
+ $order = $this->getOrder();
66
+ $handle = $order->getPayment()->getMethod();
67
+ $handle .= '_success';
68
+
69
+ return $handle;
70
+ }
71
+
72
+ protected function _getTotal($order){
73
+ $total = $order->getBaseGrandTotal();
74
+ if (!$total) {
75
+ $total = $order->getBasePrice() + $order->getBaseShippingAmount();
76
+ }
77
+ $total = number_format($total, 2, '.', '');
78
+ return $total;
79
+ }
80
+
81
+ public function pageAction()
82
+ {
83
+ $this->_statusHelper = Mage::helper('mercadopago/statusUpdate');
84
+ $this->_core = Mage::getModel('mercadopago/core');
85
+
86
+ $this->sendNewOrderMail();
87
+ if (!Mage::getStoreConfig(MercadoPago_Core_Helper_Data::XML_PATH_USE_SUCCESSPAGE_MP)) {
88
+ Mage::getSingleton('checkout/type_onepage')->getCheckout()->setLastSuccessQuoteId($this->_getQuoteId());
89
+
90
+ $order = $this->getOrder();
91
+
92
+ $infoPayment = $this->_core->getInfoPaymentByOrder($order->getIncrementId());
93
+
94
+ $status = null;
95
+
96
+ //checkout Custom Ticket
97
+ if (isset($infoPayment['activation_uri'])){
98
+ if (!empty($infoPayment['payment_id_detail']['value'])){
99
+ $this->_redirect(self::SUCCESS_PAGE_MAGENTO, $this->_request->getParams());
100
+ return;
101
+ }
102
+ else{
103
+ $this->_redirect(self::FAILURE_PAGE_MAGENTO, $this->_request->getParams());
104
+ return;
105
+ }
106
+ }
107
+
108
+ if (empty($infoPayment['status']['value'])){
109
+ //checkout Classic
110
+ $merchantOrderId = Mage::app()->getRequest()->getParam('merchant_order_id');
111
+ $response = $this->_core->getMerchantOrder($merchantOrderId);
112
+
113
+ if ($response['status'] == 201 || $response['status'] == 200) {
114
+ $merchantOrderData = $response['response'];
115
+ $paymentData = $this->_statusHelper->getDataPayments($merchantOrderData, self::LOG_FILE);
116
+ $status = $paymentData['status'];
117
+ }
118
+ } else{
119
+ //checkout Custom Credit Card
120
+ $status = $infoPayment['status']['value'];
121
+ }
122
+
123
+ if ($status == 'approved' || $status == 'pending'){
124
+ $this->_redirect(self::SUCCESS_PAGE_MAGENTO, $this->_request->getParams());
125
+ return;
126
+ } else {
127
+ $this->_redirect(self::FAILURE_PAGE_MAGENTO, $this->_request->getParams());
128
+ return;
129
+ }
130
+
131
+ }
132
+ //set data for mp analytics
133
+ Mage::register('mp_analytics_data', Mage::helper('mercadopago')->getAnalyticsData($this->getOrder()));
134
+ $checkoutTypeHandle = $this->getCheckoutHandle();
135
+ $this->loadLayout(['default', $checkoutTypeHandle]);
136
+
137
+ $this->_initLayoutMessages('core/session');
138
+ Mage::dispatchEvent('checkout_onepage_controller_success_action', array('order_ids' => array($this->getOrder()->getId())));
139
+
140
+ $this->renderLayout();
141
+ }
142
+
143
+ }
app/code/community/MercadoPago/Core/controllers/NotificationsController.php CHANGED
@@ -147,7 +147,10 @@ class MercadoPago_Core_NotificationsController
147
  }
148
  $this->_helper->log('Update Order', self::LOG_FILE);
149
  $this->_statusHelper->setStatusUpdated($payment, $this->_order);
150
- $this->getCore()->updateOrder($this->_order, $payment);
 
 
 
151
  $setStatusResponse = $this->_statusHelper->setStatusOrder($payment);
152
  $this->_setResponse($setStatusResponse['body'], $setStatusResponse['code']);
153
  $this->_helper->log('Http code', self::LOG_FILE, $this->getResponse()->getHttpResponseCode());
@@ -285,6 +288,8 @@ class MercadoPago_Core_NotificationsController
285
 
286
  /**
287
  * @var $profile Mage_Sales_Model_Recurring_Profile
 
 
288
  */
289
  public function recurringAction()
290
  {
@@ -354,7 +359,10 @@ class MercadoPago_Core_NotificationsController
354
  if ($order->getId()) {
355
  $paymentData = Mage::helper('mercadopago')->setPayerInfo($paymentData);
356
  $statusHelper->setStatusUpdated($paymentData, $order);
357
- $this->getCore()->updateOrder($order, $paymentData);
 
 
 
358
  Mage::helper('mercadopago/statusUpdate')->setStatusOrder($paymentData);
359
  $profile->addOrderRelation($order->getId());
360
  }
147
  }
148
  $this->_helper->log('Update Order', self::LOG_FILE);
149
  $this->_statusHelper->setStatusUpdated($payment, $this->_order);
150
+
151
+ $data = $this->_statusHelper->formatArrayPayment($data = [], $payment, self::LOG_FILE);
152
+
153
+ $this->getCore()->updateOrder($this->_order, $data);
154
  $setStatusResponse = $this->_statusHelper->setStatusOrder($payment);
155
  $this->_setResponse($setStatusResponse['body'], $setStatusResponse['code']);
156
  $this->_helper->log('Http code', self::LOG_FILE, $this->getResponse()->getHttpResponseCode());
288
 
289
  /**
290
  * @var $profile Mage_Sales_Model_Recurring_Profile
291
+ *
292
+ * @return Mage_Core_Controller_Varien_Action
293
  */
294
  public function recurringAction()
295
  {
359
  if ($order->getId()) {
360
  $paymentData = Mage::helper('mercadopago')->setPayerInfo($paymentData);
361
  $statusHelper->setStatusUpdated($paymentData, $order);
362
+
363
+ $data = $this->_statusHelper->formatArrayPayment($data = [], $paymentData, self::LOG_FILE);
364
+
365
+ $this->getCore()->updateOrder($order, $data);
366
  Mage::helper('mercadopago/statusUpdate')->setStatusOrder($paymentData);
367
  $profile->addOrderRelation($order->getId());
368
  }
app/code/community/MercadoPago/Core/controllers/SuccessController.php DELETED
@@ -1,77 +0,0 @@
1
- <?php
2
-
3
- /**
4
- * Class MercadoPago_Core_SuccessController
5
- */
6
- class MercadoPago_Core_SuccessController
7
- extends Mage_Core_Controller_Front_Action
8
- {
9
-
10
- /**
11
- * @var Mage_Sales_Model_Order
12
- */
13
- protected $_order;
14
-
15
- /**
16
- * @return Mage_Sales_Model_Order
17
- */
18
- protected function getOrder()
19
- {
20
- if (empty($this->_order)) {
21
- $orderIncrementId = Mage::getSingleton('checkout/session')->getLastRealOrderId();
22
- $this->_order = Mage::getModel('sales/order')->loadByIncrementId($orderIncrementId);
23
- }
24
-
25
- return $this->_order;
26
- }
27
-
28
- protected function _getQuoteId() {
29
- return Mage::getSingleton('checkout/type_onepage')->getCheckout()->getLastQuoteId();
30
- }
31
-
32
- /**
33
- * Send email of new order
34
- */
35
- protected function sendNewOrderMail()
36
- {
37
- $order = $this->getOrder();
38
- if ($order->getCanSendNewEmailFlag() && !$order->getEmailSent()) {
39
- try {
40
- $order->sendNewOrderEmail();
41
- } catch (Exception $e) {
42
- Mage::logException($e);
43
- }
44
- }
45
- }
46
-
47
- /**
48
- * Return handle name depending on payment method
49
- *
50
- * @return string
51
- */
52
- protected function getCheckoutHandle()
53
- {
54
- $order = $this->getOrder();
55
- $handle = $order->getPayment()->getMethod();
56
- $handle .= '_success';
57
-
58
- return $handle;
59
- }
60
-
61
- public function indexAction()
62
- {
63
- $this->sendNewOrderMail();
64
- if (!Mage::getStoreConfig('payment/mercadopago/use_successpage_mp')) {
65
- Mage::getSingleton('checkout/type_onepage')->getCheckout()->setLastSuccessQuoteId($this->_getQuoteId());
66
- $this->_redirect('checkout/onepage/success',$this->_request->getParams());
67
- return;
68
- }
69
- $checkoutTypeHandle = $this->getCheckoutHandle();
70
- $this->loadLayout(['default', $checkoutTypeHandle]);
71
-
72
- $this->_initLayoutMessages('core/session');
73
- Mage::dispatchEvent('checkout_onepage_controller_success_action', array('order_ids' => array($this->getOrder()->getId())));
74
-
75
- $this->renderLayout();
76
- }
77
- }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
app/code/community/MercadoPago/Core/etc/config.xml CHANGED
@@ -18,7 +18,7 @@
18
  <config>
19
  <modules>
20
  <MercadoPago_Core>
21
- <version>2.5.3</version>
22
  </MercadoPago_Core>
23
  </modules>
24
 
18
  <config>
19
  <modules>
20
  <MercadoPago_Core>
21
+ <version>2.7.4</version>
22
  </MercadoPago_Core>
23
  </modules>
24
 
app/code/community/MercadoPago/Core/etc/system.xml CHANGED
@@ -35,7 +35,7 @@
35
  <sort_order>50</sort_order>
36
  <show_in_default>1</show_in_default>
37
  <show_in_website>1</show_in_website>
38
- <show_in_store>1</show_in_store>
39
  </country>
40
  <category_id translate="label">
41
  <label>Category of your store</label>
@@ -67,23 +67,40 @@
67
  <show_in_store>0</show_in_store>
68
  <comment></comment>
69
  </financing_cost>
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
70
  <time_between_verifications translate="label comment">
71
  <label>Time between verifications</label>
72
  <frontend_type>text</frontend_type>
73
  <sort_order>83</sort_order>
74
  <show_in_default>1</show_in_default>
75
- <show_in_website>1</show_in_website>
76
- <show_in_store>1</show_in_store>
77
  </time_between_verifications>
78
  <number_of_hours translate="label comment">
79
  <label>Number of hours</label>
80
  <comment>Try to update all the orders created 'Amount of hours' before time to the moment to execute the cron</comment>
81
- <!--<comment><![CDATA[<strong style="color:red">Warning!</strong> bla bla bla]]></comment>-->
82
  <frontend_type>text</frontend_type>
83
  <sort_order>85</sort_order>
84
  <show_in_default>1</show_in_default>
85
- <show_in_website>1</show_in_website>
86
- <show_in_store>1</show_in_store>
87
  <can_be_empty>0</can_be_empty>
88
  <frontend_class>required-entry validate-digits</frontend_class>
89
  </number_of_hours>
@@ -94,6 +111,7 @@
94
  <sort_order>95</sort_order>
95
  <show_in_default>1</show_in_default>
96
  <show_in_website>1</show_in_website>
 
97
  </heading_order_status>
98
  <order_status_approved translate="label">
99
  <label>Choose the status of approved orders</label>
@@ -103,7 +121,7 @@
103
  <sort_order>100</sort_order>
104
  <show_in_default>1</show_in_default>
105
  <show_in_website>1</show_in_website>
106
- <show_in_store>1</show_in_store>
107
  </order_status_approved>
108
  <order_status_in_process translate="label">
109
  <label>Choose the status when payment is pending</label>
@@ -113,7 +131,7 @@
113
  <sort_order>105</sort_order>
114
  <show_in_default>1</show_in_default>
115
  <show_in_website>1</show_in_website>
116
- <show_in_store>1</show_in_store>
117
  </order_status_in_process>
118
  <order_status_in_mediation translate="label">
119
  <label>Choose the status when client open a mediation</label>
@@ -123,17 +141,17 @@
123
  <sort_order>110</sort_order>
124
  <show_in_default>1</show_in_default>
125
  <show_in_website>1</show_in_website>
126
- <show_in_store>1</show_in_store>
127
  </order_status_in_mediation>
128
  <order_status_rejected translate="label">
129
- <label>Choose the status when payment was reject</label>
130
  <comment>To manage the status available go to System > Order Statuses</comment>
131
  <frontend_type>select</frontend_type>
132
  <source_model>mercadopago/source_order_status</source_model>
133
  <sort_order>115</sort_order>
134
  <show_in_default>1</show_in_default>
135
  <show_in_website>1</show_in_website>
136
- <show_in_store>1</show_in_store>
137
  </order_status_rejected>
138
  <order_status_cancelled translate="label">
139
  <label>Choose the status when payment was canceled</label>
@@ -143,17 +161,17 @@
143
  <sort_order>120</sort_order>
144
  <show_in_default>1</show_in_default>
145
  <show_in_website>1</show_in_website>
146
- <show_in_store>1</show_in_store>
147
  </order_status_cancelled>
148
  <order_status_chargeback translate="label">
149
- <label>Choose the status when payment was chargeback</label>
150
  <comment>To manage the status available go to System > Order Statuses</comment>
151
  <frontend_type>select</frontend_type>
152
  <source_model>mercadopago/source_order_status</source_model>
153
  <sort_order>125</sort_order>
154
  <show_in_default>1</show_in_default>
155
  <show_in_website>1</show_in_website>
156
- <show_in_store>1</show_in_store>
157
  </order_status_chargeback>
158
  <order_status_refunded translate="label">
159
  <label>Choose the status of refunded orders</label>
@@ -163,7 +181,7 @@
163
  <sort_order>130</sort_order>
164
  <show_in_default>1</show_in_default>
165
  <show_in_website>1</show_in_website>
166
- <show_in_store>1</show_in_store>
167
  </order_status_refunded>
168
 
169
  <heading_refund translate="label">
@@ -180,7 +198,7 @@
180
  <sort_order>150</sort_order>
181
  <show_in_default>1</show_in_default>
182
  <show_in_website>1</show_in_website>
183
- <show_in_store>1</show_in_store>
184
  </refund_available>
185
  <maximum_partial_refunds translate="label comment">
186
  <label>Maximum amount of partial refunds on the same order</label>
@@ -188,7 +206,7 @@
188
  <sort_order>155</sort_order>
189
  <show_in_default>1</show_in_default>
190
  <show_in_website>1</show_in_website>
191
- <show_in_store>1</show_in_store>
192
  <frontend_class>validate-number-range number-range-1-20</frontend_class>
193
  <comment>It must be a number between 1 and 20</comment>
194
  </maximum_partial_refunds>
@@ -210,7 +228,7 @@
210
  <sort_order>165</sort_order>
211
  <show_in_default>1</show_in_default>
212
  <show_in_website>1</show_in_website>
213
- <show_in_store>1</show_in_store>
214
  </order_status_partially_refunded>
215
 
216
  <heading_developer translate="label">
@@ -228,7 +246,7 @@
228
  <show_in_default>1</show_in_default>
229
  <show_in_website>1</show_in_website>
230
  <show_in_store>0</show_in_store>
231
- <comment>Enable logs to analise plugin activity</comment>
232
  </logs>
233
  <debug_mode translate="label">
234
  <label>Debug Mode</label>
@@ -241,7 +259,7 @@
241
  <comment>Enable to display actual error messages to frontend users (not recommended on production environment)</comment>
242
  </debug_mode>
243
 
244
- <heading_calculator translate="label">
245
  <label>Payments Calculator</label>
246
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
247
  <sort_order>235</sort_order>
@@ -256,7 +274,7 @@
256
  <show_in_default>1</show_in_default>
257
  <show_in_website>1</show_in_website>
258
  <show_in_store>0</show_in_store>
259
- <comment>if set to YES, Calculator will appear on the selected pages</comment>
260
  </calculalator_available>
261
  <show_in_pages translate="label">
262
  <label>Show Calculator on selected pages</label>
@@ -265,7 +283,7 @@
265
  <sort_order>245</sort_order>
266
  <show_in_default>1</show_in_default>
267
  <show_in_website>1</show_in_website>
268
- <show_in_store>1</show_in_store>
269
  <can_be_empty>1</can_be_empty>
270
  </show_in_pages>
271
  </fields>
@@ -297,11 +315,11 @@
297
  <span>Click to get your Access Token for: </span>
298
  <a href="https://www.mercadopago.com/mla/account/credentials" target="_blank">Argentina</a>
299
  <a href="https://www.mercadopago.com/mlb/account/credentials" target="_blank">Brazil</a><br>
 
300
  <a href="https://www.mercadopago.com/mco/account/credentials" target="_blank">Colombia</a>
301
  <a href="https://www.mercadopago.com/mlm/account/credentials" target="_blank">Mexico</a>
302
- <a href="https://www.mercadopago.com/mlv/account/credentials" target="_blank">Venezuela</a>
303
- <a href="https://www.mercadopago.com/mlc/account/credentials" target="_blank">Chile</a>
304
  <a href="https://www.mercadopago.com/mpe/account/credentials" target="_blank">Peru</a>
 
305
  ]]>
306
  </comment>
307
  </access_token>
@@ -345,7 +363,7 @@
345
  <sort_order>20</sort_order>
346
  <show_in_default>1</show_in_default>
347
  <show_in_website>1</show_in_website>
348
- <show_in_store>0</show_in_store>
349
  </title>
350
  <statement_descriptor translate="label comment">
351
  <label>Statement Descriptor</label>
@@ -379,7 +397,7 @@
379
  <sort_order>70</sort_order>
380
  <show_in_default>1</show_in_default>
381
  <show_in_website>1</show_in_website>
382
- <show_in_store>0</show_in_store>
383
  <frontend_class>validate-number</frontend_class>
384
  </sort_order>
385
  <coupon_mercadopago translate="label">
@@ -397,7 +415,7 @@
397
  <sort_order>90</sort_order>
398
  <show_in_default>1</show_in_default>
399
  <show_in_website>1</show_in_website>
400
- <show_in_store>0</show_in_store>
401
  <comment>Custom message to display in checkout</comment>
402
  </communication>
403
 
@@ -428,7 +446,7 @@
428
  <sort_order>20</sort_order>
429
  <show_in_default>1</show_in_default>
430
  <show_in_website>1</show_in_website>
431
- <show_in_store>0</show_in_store>
432
  </title>
433
  <banner_checkout translate="label">
434
  <label>Banner Checkout</label>
@@ -444,7 +462,7 @@
444
  <sort_order>40</sort_order>
445
  <show_in_default>1</show_in_default>
446
  <show_in_website>1</show_in_website>
447
- <show_in_store>0</show_in_store>
448
  <frontend_class>validate-number</frontend_class>
449
  </sort_order>
450
  <coupon_mercadopago translate="label">
@@ -462,7 +480,7 @@
462
  <sort_order>60</sort_order>
463
  <show_in_default>1</show_in_default>
464
  <show_in_website>1</show_in_website>
465
- <show_in_store>0</show_in_store>
466
  <comment>Custom message to display in checkout</comment>
467
  </communication>
468
 
@@ -519,7 +537,7 @@
519
  <sort_order>20</sort_order>
520
  <show_in_default>1</show_in_default>
521
  <show_in_website>1</show_in_website>
522
- <show_in_store>0</show_in_store>
523
  </title>
524
  <banner_checkout translate="label">
525
  <label>Banner Checkout</label>
@@ -535,7 +553,7 @@
535
  <sort_order>40</sort_order>
536
  <show_in_default>1</show_in_default>
537
  <show_in_website>1</show_in_website>
538
- <show_in_store>0</show_in_store>
539
  <frontend_class>validate-number</frontend_class>
540
  </sort_order>
541
  <type_checkout>
@@ -611,7 +629,7 @@
611
  <sort_order>170</sort_order>
612
  <show_in_default>1</show_in_default>
613
  <show_in_website>1</show_in_website>
614
- <show_in_store>0</show_in_store>
615
  <comment>Custom message to display in checkout</comment>
616
  </communication>
617
  </fields>
@@ -619,14 +637,14 @@
619
  </fields>
620
  </mercadopago_standard_checkout>
621
  <mercadopago_recurring_checkout translate="label" module="mercadopago">
622
- <label>Mercado Pago - Recurring Payments Checkout</label>
623
  <sort_order>200</sort_order>
624
  <show_in_default>1</show_in_default>
625
  <show_in_website>1</show_in_website>
626
  <show_in_store>0</show_in_store>
627
  <fields>
628
  <mercadopago_recurring type="group" translate="label comment">
629
- <label>Checkout Recurring Payments</label>
630
  <frontend_type>text</frontend_type>
631
  <frontend_model>mercadopago/adminhtml_system_config_fieldset_payment</frontend_model>
632
  <show_in_default>1</show_in_default>
@@ -642,7 +660,7 @@
642
  <sort_order>1</sort_order>
643
  <show_in_default>1</show_in_default>
644
  <show_in_website>1</show_in_website>
645
- <show_in_store>1</show_in_store>
646
  <comment>"It is necessary to configure necessary the Credentials 'CLIENT_ID' and 'CLIENT_SECRET' in this section for its proper functioning</comment>
647
  </active>
648
  <client_id translate="label">
@@ -667,7 +685,7 @@
667
  <sort_order>20</sort_order>
668
  <show_in_default>1</show_in_default>
669
  <show_in_website>1</show_in_website>
670
- <show_in_store>0</show_in_store>
671
  </title>
672
  <banner_checkout translate="label">
673
  <label>Banner Checkout</label>
@@ -683,7 +701,7 @@
683
  <sort_order>40</sort_order>
684
  <show_in_default>1</show_in_default>
685
  <show_in_website>1</show_in_website>
686
- <show_in_store>0</show_in_store>
687
  <frontend_class>validate-number</frontend_class>
688
  </sort_order>
689
  <type_checkout>
@@ -721,7 +739,7 @@
721
  <sort_order>40</sort_order>
722
  <show_in_default>1</show_in_default>
723
  <show_in_website>1</show_in_website>
724
- <show_in_store>1</show_in_store>
725
  <comment>Enable to test checkout with real credit cards</comment>
726
  </sandbox_mode>
727
  <iframe_width translate="label">
@@ -730,7 +748,7 @@
730
  <sort_order>100</sort_order>
731
  <show_in_default>1</show_in_default>
732
  <show_in_website>1</show_in_website>
733
- <show_in_store>0</show_in_store>
734
  <frontend_class>validate-number</frontend_class>
735
  </iframe_width>
736
  <iframe_height translate="label">
@@ -739,7 +757,7 @@
739
  <sort_order>110</sort_order>
740
  <show_in_default>1</show_in_default>
741
  <show_in_website>1</show_in_website>
742
- <show_in_store>0</show_in_store>
743
  <frontend_class>validate-number</frontend_class>
744
  </iframe_height>
745
  <communication translate="label">
@@ -748,7 +766,7 @@
748
  <sort_order>170</sort_order>
749
  <show_in_default>1</show_in_default>
750
  <show_in_website>1</show_in_website>
751
- <show_in_store>0</show_in_store>
752
  <comment>Custom message to display in checkout</comment>
753
  </communication>
754
  </fields>
35
  <sort_order>50</sort_order>
36
  <show_in_default>1</show_in_default>
37
  <show_in_website>1</show_in_website>
38
+ <show_in_store>0</show_in_store>
39
  </country>
40
  <category_id translate="label">
41
  <label>Category of your store</label>
67
  <show_in_store>0</show_in_store>
68
  <comment></comment>
69
  </financing_cost>
70
+ <consider_discount translate="label">
71
+ <label>Consider Discounts</label>
72
+ <frontend_type>select</frontend_type>
73
+ <source_model>adminhtml/system_config_source_yesno</source_model>
74
+ <sort_order>80</sort_order>
75
+ <show_in_default>1</show_in_default>
76
+ <show_in_website>0</show_in_website>
77
+ <show_in_store>0</show_in_store>
78
+ <comment>Consider discount of Mercado Pago to invoicing</comment>
79
+ </consider_discount>
80
+ <heading_order_status_cron translate="label">
81
+ <label>Order Status Update - Cron Configuration</label>
82
+ <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
83
+ <sort_order>82</sort_order>
84
+ <show_in_default>1</show_in_default>
85
+ <show_in_website>0</show_in_website>
86
+ </heading_order_status_cron>
87
  <time_between_verifications translate="label comment">
88
  <label>Time between verifications</label>
89
  <frontend_type>text</frontend_type>
90
  <sort_order>83</sort_order>
91
  <show_in_default>1</show_in_default>
92
+ <show_in_website>0</show_in_website>
93
+ <show_in_store>0</show_in_store>
94
  </time_between_verifications>
95
  <number_of_hours translate="label comment">
96
  <label>Number of hours</label>
97
  <comment>Try to update all the orders created 'Amount of hours' before time to the moment to execute the cron</comment>
98
+ <!--<comment><![CDATA[<strong style="color:red">Warning!</strong>]]></comment>-->
99
  <frontend_type>text</frontend_type>
100
  <sort_order>85</sort_order>
101
  <show_in_default>1</show_in_default>
102
+ <show_in_website>0</show_in_website>
103
+ <show_in_store>0</show_in_store>
104
  <can_be_empty>0</can_be_empty>
105
  <frontend_class>required-entry validate-digits</frontend_class>
106
  </number_of_hours>
111
  <sort_order>95</sort_order>
112
  <show_in_default>1</show_in_default>
113
  <show_in_website>1</show_in_website>
114
+ <show_in_store>0</show_in_store>
115
  </heading_order_status>
116
  <order_status_approved translate="label">
117
  <label>Choose the status of approved orders</label>
121
  <sort_order>100</sort_order>
122
  <show_in_default>1</show_in_default>
123
  <show_in_website>1</show_in_website>
124
+ <show_in_store>0</show_in_store>
125
  </order_status_approved>
126
  <order_status_in_process translate="label">
127
  <label>Choose the status when payment is pending</label>
131
  <sort_order>105</sort_order>
132
  <show_in_default>1</show_in_default>
133
  <show_in_website>1</show_in_website>
134
+ <show_in_store>0</show_in_store>
135
  </order_status_in_process>
136
  <order_status_in_mediation translate="label">
137
  <label>Choose the status when client open a mediation</label>
141
  <sort_order>110</sort_order>
142
  <show_in_default>1</show_in_default>
143
  <show_in_website>1</show_in_website>
144
+ <show_in_store>0</show_in_store>
145
  </order_status_in_mediation>
146
  <order_status_rejected translate="label">
147
+ <label>Choose the status when payment was rejected</label>
148
  <comment>To manage the status available go to System > Order Statuses</comment>
149
  <frontend_type>select</frontend_type>
150
  <source_model>mercadopago/source_order_status</source_model>
151
  <sort_order>115</sort_order>
152
  <show_in_default>1</show_in_default>
153
  <show_in_website>1</show_in_website>
154
+ <show_in_store>0</show_in_store>
155
  </order_status_rejected>
156
  <order_status_cancelled translate="label">
157
  <label>Choose the status when payment was canceled</label>
161
  <sort_order>120</sort_order>
162
  <show_in_default>1</show_in_default>
163
  <show_in_website>1</show_in_website>
164
+ <show_in_store>0</show_in_store>
165
  </order_status_cancelled>
166
  <order_status_chargeback translate="label">
167
+ <label>Choose the status when payment was charge back</label>
168
  <comment>To manage the status available go to System > Order Statuses</comment>
169
  <frontend_type>select</frontend_type>
170
  <source_model>mercadopago/source_order_status</source_model>
171
  <sort_order>125</sort_order>
172
  <show_in_default>1</show_in_default>
173
  <show_in_website>1</show_in_website>
174
+ <show_in_store>0</show_in_store>
175
  </order_status_chargeback>
176
  <order_status_refunded translate="label">
177
  <label>Choose the status of refunded orders</label>
181
  <sort_order>130</sort_order>
182
  <show_in_default>1</show_in_default>
183
  <show_in_website>1</show_in_website>
184
+ <show_in_store>0</show_in_store>
185
  </order_status_refunded>
186
 
187
  <heading_refund translate="label">
198
  <sort_order>150</sort_order>
199
  <show_in_default>1</show_in_default>
200
  <show_in_website>1</show_in_website>
201
+ <show_in_store>0</show_in_store>
202
  </refund_available>
203
  <maximum_partial_refunds translate="label comment">
204
  <label>Maximum amount of partial refunds on the same order</label>
206
  <sort_order>155</sort_order>
207
  <show_in_default>1</show_in_default>
208
  <show_in_website>1</show_in_website>
209
+ <show_in_store>0</show_in_store>
210
  <frontend_class>validate-number-range number-range-1-20</frontend_class>
211
  <comment>It must be a number between 1 and 20</comment>
212
  </maximum_partial_refunds>
228
  <sort_order>165</sort_order>
229
  <show_in_default>1</show_in_default>
230
  <show_in_website>1</show_in_website>
231
+ <show_in_store>0</show_in_store>
232
  </order_status_partially_refunded>
233
 
234
  <heading_developer translate="label">
246
  <show_in_default>1</show_in_default>
247
  <show_in_website>1</show_in_website>
248
  <show_in_store>0</show_in_store>
249
+ <comment>Enable logs to analyse plugin activity</comment>
250
  </logs>
251
  <debug_mode translate="label">
252
  <label>Debug Mode</label>
259
  <comment>Enable to display actual error messages to frontend users (not recommended on production environment)</comment>
260
  </debug_mode>
261
 
262
+ <heading_calculator translate="label comment">
263
  <label>Payments Calculator</label>
264
  <frontend_model>adminhtml/system_config_form_field_heading</frontend_model>
265
  <sort_order>235</sort_order>
274
  <show_in_default>1</show_in_default>
275
  <show_in_website>1</show_in_website>
276
  <show_in_store>0</show_in_store>
277
+ <comment>if set to YES, Calculator will appear on the selected pages - Custom checkout credentials (Public Key and Access Token) must be set</comment>
278
  </calculalator_available>
279
  <show_in_pages translate="label">
280
  <label>Show Calculator on selected pages</label>
283
  <sort_order>245</sort_order>
284
  <show_in_default>1</show_in_default>
285
  <show_in_website>1</show_in_website>
286
+ <show_in_store>0</show_in_store>
287
  <can_be_empty>1</can_be_empty>
288
  </show_in_pages>
289
  </fields>
315
  <span>Click to get your Access Token for: </span>
316
  <a href="https://www.mercadopago.com/mla/account/credentials" target="_blank">Argentina</a>
317
  <a href="https://www.mercadopago.com/mlb/account/credentials" target="_blank">Brazil</a><br>
318
+ <a href="https://www.mercadopago.com/mlc/account/credentials" target="_blank">Chile</a>
319
  <a href="https://www.mercadopago.com/mco/account/credentials" target="_blank">Colombia</a>
320
  <a href="https://www.mercadopago.com/mlm/account/credentials" target="_blank">Mexico</a>
 
 
321
  <a href="https://www.mercadopago.com/mpe/account/credentials" target="_blank">Peru</a>
322
+ <a href="https://www.mercadopago.com/mlv/account/credentials" target="_blank">Venezuela</a>
323
  ]]>
324
  </comment>
325
  </access_token>
363
  <sort_order>20</sort_order>
364
  <show_in_default>1</show_in_default>
365
  <show_in_website>1</show_in_website>
366
+ <show_in_store>1</show_in_store>
367
  </title>
368
  <statement_descriptor translate="label comment">
369
  <label>Statement Descriptor</label>
397
  <sort_order>70</sort_order>
398
  <show_in_default>1</show_in_default>
399
  <show_in_website>1</show_in_website>
400
+ <show_in_store>1</show_in_store>
401
  <frontend_class>validate-number</frontend_class>
402
  </sort_order>
403
  <coupon_mercadopago translate="label">
415
  <sort_order>90</sort_order>
416
  <show_in_default>1</show_in_default>
417
  <show_in_website>1</show_in_website>
418
+ <show_in_store>1</show_in_store>
419
  <comment>Custom message to display in checkout</comment>
420
  </communication>
421
 
446
  <sort_order>20</sort_order>
447
  <show_in_default>1</show_in_default>
448
  <show_in_website>1</show_in_website>
449
+ <show_in_store>1</show_in_store>
450
  </title>
451
  <banner_checkout translate="label">
452
  <label>Banner Checkout</label>
462
  <sort_order>40</sort_order>
463
  <show_in_default>1</show_in_default>
464
  <show_in_website>1</show_in_website>
465
+ <show_in_store>1</show_in_store>
466
  <frontend_class>validate-number</frontend_class>
467
  </sort_order>
468
  <coupon_mercadopago translate="label">
480
  <sort_order>60</sort_order>
481
  <show_in_default>1</show_in_default>
482
  <show_in_website>1</show_in_website>
483
+ <show_in_store>1</show_in_store>
484
  <comment>Custom message to display in checkout</comment>
485
  </communication>
486
 
537
  <sort_order>20</sort_order>
538
  <show_in_default>1</show_in_default>
539
  <show_in_website>1</show_in_website>
540
+ <show_in_store>1</show_in_store>
541
  </title>
542
  <banner_checkout translate="label">
543
  <label>Banner Checkout</label>
553
  <sort_order>40</sort_order>
554
  <show_in_default>1</show_in_default>
555
  <show_in_website>1</show_in_website>
556
+ <show_in_store>1</show_in_store>
557
  <frontend_class>validate-number</frontend_class>
558
  </sort_order>
559
  <type_checkout>
629
  <sort_order>170</sort_order>
630
  <show_in_default>1</show_in_default>
631
  <show_in_website>1</show_in_website>
632
+ <show_in_store>1</show_in_store>
633
  <comment>Custom message to display in checkout</comment>
634
  </communication>
635
  </fields>
637
  </fields>
638
  </mercadopago_standard_checkout>
639
  <mercadopago_recurring_checkout translate="label" module="mercadopago">
640
+ <label>Mercado Pago - Recurring Payments</label>
641
  <sort_order>200</sort_order>
642
  <show_in_default>1</show_in_default>
643
  <show_in_website>1</show_in_website>
644
  <show_in_store>0</show_in_store>
645
  <fields>
646
  <mercadopago_recurring type="group" translate="label comment">
647
+ <label>Recurring Payments</label>
648
  <frontend_type>text</frontend_type>
649
  <frontend_model>mercadopago/adminhtml_system_config_fieldset_payment</frontend_model>
650
  <show_in_default>1</show_in_default>
660
  <sort_order>1</sort_order>
661
  <show_in_default>1</show_in_default>
662
  <show_in_website>1</show_in_website>
663
+ <show_in_store>0</show_in_store>
664
  <comment>"It is necessary to configure necessary the Credentials 'CLIENT_ID' and 'CLIENT_SECRET' in this section for its proper functioning</comment>
665
  </active>
666
  <client_id translate="label">
685
  <sort_order>20</sort_order>
686
  <show_in_default>1</show_in_default>
687
  <show_in_website>1</show_in_website>
688
+ <show_in_store>1</show_in_store>
689
  </title>
690
  <banner_checkout translate="label">
691
  <label>Banner Checkout</label>
701
  <sort_order>40</sort_order>
702
  <show_in_default>1</show_in_default>
703
  <show_in_website>1</show_in_website>
704
+ <show_in_store>1</show_in_store>
705
  <frontend_class>validate-number</frontend_class>
706
  </sort_order>
707
  <type_checkout>
739
  <sort_order>40</sort_order>
740
  <show_in_default>1</show_in_default>
741
  <show_in_website>1</show_in_website>
742
+ <show_in_store>0</show_in_store>
743
  <comment>Enable to test checkout with real credit cards</comment>
744
  </sandbox_mode>
745
  <iframe_width translate="label">
748
  <sort_order>100</sort_order>
749
  <show_in_default>1</show_in_default>
750
  <show_in_website>1</show_in_website>
751
+ <show_in_store>1</show_in_store>
752
  <frontend_class>validate-number</frontend_class>
753
  </iframe_width>
754
  <iframe_height translate="label">
757
  <sort_order>110</sort_order>
758
  <show_in_default>1</show_in_default>
759
  <show_in_website>1</show_in_website>
760
+ <show_in_store>1</show_in_store>
761
  <frontend_class>validate-number</frontend_class>
762
  </iframe_height>
763
  <communication translate="label">
766
  <sort_order>170</sort_order>
767
  <show_in_default>1</show_in_default>
768
  <show_in_website>1</show_in_website>
769
+ <show_in_store>1</show_in_store>
770
  <comment>Custom message to display in checkout</comment>
771
  </communication>
772
  </fields>
app/code/community/MercadoPago/MercadoEnvios/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <MercadoPago_MercadoEnvios>
5
- <version>2.5.3</version>
6
  </MercadoPago_MercadoEnvios>
7
  </modules>
8
  <frontend>
2
  <config>
3
  <modules>
4
  <MercadoPago_MercadoEnvios>
5
+ <version>2.7.4</version>
6
  </MercadoPago_MercadoEnvios>
7
  </modules>
8
  <frontend>
app/code/community/MercadoPago/OneStepCheckout/etc/config.xml CHANGED
@@ -2,7 +2,7 @@
2
  <config>
3
  <modules>
4
  <MercadoPago_OneStepCheckout>
5
- <version>2.5.3</version>
6
  </MercadoPago_OneStepCheckout>
7
  </modules>
8
  <global>
2
  <config>
3
  <modules>
4
  <MercadoPago_OneStepCheckout>
5
+ <version>2.7.4</version>
6
  </MercadoPago_OneStepCheckout>
7
  </modules>
8
  <global>
app/design/frontend/base/default/layout/mercadopago.xml CHANGED
@@ -1,7 +1,6 @@
1
  <?xml version="1.0"?>
2
  <layout version="0.1.0">
3
-
4
- <mercadopago_success_index>
5
 
6
  <reference name="head">
7
  <action method="addCss">
@@ -10,116 +9,139 @@
10
  </reference>
11
 
12
  <reference name="root">
13
- <action method="setTemplate"><template>mercadopago/clean.phtml</template></action>
 
 
14
  </reference>
15
 
16
- </mercadopago_success_index>
17
 
18
  <mercadopago_custom_success>
19
  <reference name="content">
20
- <block type="mercadopago/custom_success" name="mercadopago.success" as="success" />
 
21
  </reference>
22
  </mercadopago_custom_success>
23
 
24
  <mercadopago_standard_success>
25
  <reference name="content">
26
- <block type="mercadopago/standard_success" name="mercadopago.success" as="success" />
 
27
  </reference>
28
  </mercadopago_standard_success>
29
 
30
  <mercadopago_customticket_success>
31
  <reference name="content">
32
  <block type="mercadopago/customticket_success" name="mercadopago.success" as="success"/>
 
33
  </reference>
34
  </mercadopago_customticket_success>
35
 
36
  <mercadopago_add_order_total>
37
  <reference name="order_totals">
38
- <block type="mercadopago/sales_order_totals_finance_cost" name="total_finance_cost" />
39
- <block type="mercadopago/sales_order_totals_discount_coupon" name="total_discount_coupon" />
40
  </reference>
41
  </mercadopago_add_order_total>
42
 
43
  <mercadopago_add_invoice_total>
44
  <reference name="invoice_totals">
45
- <block type="mercadopago/sales_order_totals_finance_cost" name="total_finance_cost" />
46
- <block type="mercadopago/sales_order_totals_discount_coupon" name="total_discount_coupon" />
47
  </reference>
48
  </mercadopago_add_invoice_total>
49
 
50
  <mercadopago_add_creditmemo_total>
51
  <reference name="creditmemo_totals">
52
- <block type="mercadopago/sales_order_totals_finance_cost" name="total_finance_cost" />
53
- <block type="mercadopago/sales_order_totals_discount_coupon" name="total_discount_coupon" />
54
  </reference>
55
  </mercadopago_add_creditmemo_total>
56
 
57
  <sales_order_view>
58
- <update handle="mercadopago_add_order_total" />
59
  </sales_order_view>
60
  <sales_order_invoice>
61
- <update handle="mercadopago_add_invoice_total" />
62
  </sales_order_invoice>
63
  <sales_order_creditmemo>
64
- <update handle="mercadopago_add_creditmemo_total" />
65
  </sales_order_creditmemo>
66
  <sales_order_print>
67
- <update handle="mercadopago_add_order_total" />
68
  </sales_order_print>
69
  <sales_order_printinvoice>
70
- <update handle="mercadopago_add_invoice_total" />
71
  </sales_order_printinvoice>
72
  <sales_order_printcreditmemo>
73
- <update handle="mercadopago_add_creditmemo_total" />
74
  </sales_order_printcreditmemo>
75
  <sales_email_order_items>
76
- <update handle="mercadopago_add_order_total" />
77
  </sales_email_order_items>
78
  <sales_email_order_invoice_items>
79
- <update handle="mercadopago_add_invoice_total" />
80
  </sales_email_order_invoice_items>
81
  <sales_email_order_creditmemo_items>
82
- <update handle="mercadopago_add_creditmemo_total" />
83
  </sales_email_order_creditmemo_items>
84
  <sales_guest_view>
85
- <update handle="mercadopago_add_order_total" />
86
  </sales_guest_view>
87
  <sales_guest_invoice>
88
- <update handle="mercadopago_add_invoice_total" />
89
  </sales_guest_invoice>
90
  <sales_guest_creditmemo>
91
- <update handle="mercadopago_add_creditmemo_total" />
92
  </sales_guest_creditmemo>
93
  <sales_guest_print>
94
- <update handle="mercadopago_add_order_total" />
95
  </sales_guest_print>
96
  <sales_guest_printinvoice>
97
- <update handle="mercadopago_add_invoice_total" />
98
  </sales_guest_printinvoice>
99
  <sales_guest_printcreditmemo>
100
- <update handle="mercadopago_add_creditmemo_total" />
101
  </sales_guest_printcreditmemo>
102
 
 
 
 
 
 
 
103
  <checkout_cart_index>
104
  <reference name="head">
105
- <action method="addCss"><stylesheet>mercadopago/css/style.css</stylesheet></action>
106
- <action method="addCss"><stylesheet>mercadopago/css/style-calculator.css</stylesheet></action>
 
 
 
 
107
  </reference>
108
  <reference name="checkout.cart.methods">
109
- <block type="mercadopago/calculator_calculatorLink" name="checkout.cart.calculator" as="calculator" template="mercadopago/calculator/calculatorLink.phtml">
110
- <block type="mercadopago/calculator_calculatorForm" name="mercadopago_calculator_form" template="mercadopago/calculator/calculatorForm.phtml" />
 
 
111
  </block>
112
  </reference>
113
  </checkout_cart_index>
114
 
115
  <catalog_product_view>
116
  <reference name="head">
117
- <action method="addCss"><stylesheet>mercadopago/css/style.css</stylesheet></action>
118
- <action method="addCss"><stylesheet>mercadopago/css/style-calculator.css</stylesheet></action>
 
 
 
 
119
  </reference>
120
  <reference name="product.info.extrahint">
121
- <block type="mercadopago/calculator_calculatorLink" name="product.info.calculator" as="calculator" template="mercadopago/calculator/calculatorLink.phtml">
122
- <block type="mercadopago/calculator_calculatorForm" name="mercadopago_calculator_form" template="mercadopago/calculator/calculatorForm.phtml" />
 
 
123
  </block>
124
  </reference>
125
  </catalog_product_view>
1
  <?xml version="1.0"?>
2
  <layout version="0.1.0">
3
+ <mercadopago_checkout_page>
 
4
 
5
  <reference name="head">
6
  <action method="addCss">
9
  </reference>
10
 
11
  <reference name="root">
12
+ <action method="setTemplate">
13
+ <template>mercadopago/clean.phtml</template>
14
+ </action>
15
  </reference>
16
 
17
+ </mercadopago_checkout_page>
18
 
19
  <mercadopago_custom_success>
20
  <reference name="content">
21
+ <block type="mercadopago/custom_success" name="mercadopago.success" as="success"/>
22
+ <block type="mercadopago/analytics_afterCheckout" name="mercadopago_analytics" as="mercadopago_analytics" template="mercadopago/analytics/after_checkout.phtml"/>
23
  </reference>
24
  </mercadopago_custom_success>
25
 
26
  <mercadopago_standard_success>
27
  <reference name="content">
28
+ <block type="mercadopago/standard_success" name="mercadopago.success" as="success"/>
29
+ <block type="mercadopago/analytics_afterCheckout" name="mercadopago_analytics" as="mercadopago_analytics" template="mercadopago/analytics/after_checkout.phtml"/>
30
  </reference>
31
  </mercadopago_standard_success>
32
 
33
  <mercadopago_customticket_success>
34
  <reference name="content">
35
  <block type="mercadopago/customticket_success" name="mercadopago.success" as="success"/>
36
+ <block type="mercadopago/analytics_afterCheckout" name="mercadopago_analytics" as="mercadopago_analytics" template="mercadopago/analytics/after_checkout.phtml"/>
37
  </reference>
38
  </mercadopago_customticket_success>
39
 
40
  <mercadopago_add_order_total>
41
  <reference name="order_totals">
42
+ <block type="mercadopago/sales_order_totals_finance_cost" name="total_finance_cost"/>
43
+ <block type="mercadopago/sales_order_totals_discount_coupon" name="total_discount_coupon"/>
44
  </reference>
45
  </mercadopago_add_order_total>
46
 
47
  <mercadopago_add_invoice_total>
48
  <reference name="invoice_totals">
49
+ <block type="mercadopago/sales_order_totals_finance_cost" name="total_finance_cost"/>
50
+ <block type="mercadopago/sales_order_totals_discount_coupon" name="total_discount_coupon"/>
51
  </reference>
52
  </mercadopago_add_invoice_total>
53
 
54
  <mercadopago_add_creditmemo_total>
55
  <reference name="creditmemo_totals">
56
+ <block type="mercadopago/sales_order_totals_finance_cost" name="total_finance_cost"/>
57
+ <block type="mercadopago/sales_order_totals_discount_coupon" name="total_discount_coupon"/>
58
  </reference>
59
  </mercadopago_add_creditmemo_total>
60
 
61
  <sales_order_view>
62
+ <update handle="mercadopago_add_order_total"/>
63
  </sales_order_view>
64
  <sales_order_invoice>
65
+ <update handle="mercadopago_add_invoice_total"/>
66
  </sales_order_invoice>
67
  <sales_order_creditmemo>
68
+ <update handle="mercadopago_add_creditmemo_total"/>
69
  </sales_order_creditmemo>
70
  <sales_order_print>
71
+ <update handle="mercadopago_add_order_total"/>
72
  </sales_order_print>
73
  <sales_order_printinvoice>
74
+ <update handle="mercadopago_add_invoice_total"/>
75
  </sales_order_printinvoice>
76
  <sales_order_printcreditmemo>
77
+ <update handle="mercadopago_add_creditmemo_total"/>
78
  </sales_order_printcreditmemo>
79
  <sales_email_order_items>
80
+ <update handle="mercadopago_add_order_total"/>
81
  </sales_email_order_items>
82
  <sales_email_order_invoice_items>
83
+ <update handle="mercadopago_add_invoice_total"/>
84
  </sales_email_order_invoice_items>
85
  <sales_email_order_creditmemo_items>
86
+ <update handle="mercadopago_add_creditmemo_total"/>
87
  </sales_email_order_creditmemo_items>
88
  <sales_guest_view>
89
+ <update handle="mercadopago_add_order_total"/>
90
  </sales_guest_view>
91
  <sales_guest_invoice>
92
+ <update handle="mercadopago_add_invoice_total"/>
93
  </sales_guest_invoice>
94
  <sales_guest_creditmemo>
95
+ <update handle="mercadopago_add_creditmemo_total"/>
96
  </sales_guest_creditmemo>
97
  <sales_guest_print>
98
+ <update handle="mercadopago_add_order_total"/>
99
  </sales_guest_print>
100
  <sales_guest_printinvoice>
101
+ <update handle="mercadopago_add_invoice_total"/>
102
  </sales_guest_printinvoice>
103
  <sales_guest_printcreditmemo>
104
+ <update handle="mercadopago_add_creditmemo_total"/>
105
  </sales_guest_printcreditmemo>
106
 
107
+ <checkout_onepage_index>
108
+ <reference name="content">
109
+ <block type="mercadopago/analytics_checkout" name="mercadopago_analytics" as="mercadopago_analytics" template="mercadopago/analytics/checkout.phtml"/>
110
+ </reference>
111
+ </checkout_onepage_index>
112
+
113
  <checkout_cart_index>
114
  <reference name="head">
115
+ <action method="addCss">
116
+ <stylesheet>mercadopago/css/style.css</stylesheet>
117
+ </action>
118
+ <action method="addCss">
119
+ <stylesheet>mercadopago/css/style-calculator.css</stylesheet>
120
+ </action>
121
  </reference>
122
  <reference name="checkout.cart.methods">
123
+ <block type="mercadopago/calculator_calculatorLink" name="checkout.cart.calculator" as="calculator"
124
+ template="mercadopago/calculator/calculatorLink.phtml">
125
+ <block type="mercadopago/calculator_calculatorForm" name="mercadopago_calculator_form"
126
+ template="mercadopago/calculator/calculatorForm.phtml"/>
127
  </block>
128
  </reference>
129
  </checkout_cart_index>
130
 
131
  <catalog_product_view>
132
  <reference name="head">
133
+ <action method="addCss">
134
+ <stylesheet>mercadopago/css/style.css</stylesheet>
135
+ </action>
136
+ <action method="addCss">
137
+ <stylesheet>mercadopago/css/style-calculator.css</stylesheet>
138
+ </action>
139
  </reference>
140
  <reference name="product.info.extrahint">
141
+ <block type="mercadopago/calculator_calculatorLink" name="product.info.calculator" as="calculator"
142
+ template="mercadopago/calculator/calculatorLink.phtml">
143
+ <block type="mercadopago/calculator_calculatorForm" name="mercadopago_calculator_form"
144
+ template="mercadopago/calculator/calculatorForm.phtml"/>
145
  </block>
146
  </reference>
147
  </catalog_product_view>
app/design/frontend/base/default/template/mercadopago/analytics/after_checkout.phtml ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script type="text/javascript" src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
2
+ <script>
3
+ var data = <?php echo json_encode($this->getAnalyticsData()) ?>;
4
+ if (data != false ) {
5
+ var MA = ModuleAnalytics;
6
+ if (data.public_key !== undefined) {
7
+ MA.setPublicKey(data.public_key);
8
+ MA.setToken(null);
9
+ } else {
10
+ MA.setToken(data.analytics_key);
11
+ MA.setPublicKey(null);
12
+ }
13
+ MA.setPaymentId(data.payment_id.toString());
14
+ MA.setPaymentType(data.payment_type);
15
+ MA.setCheckoutType(data.checkout_type);
16
+ MA.put();
17
+ }
18
+ </script>
app/design/frontend/base/default/template/mercadopago/analytics/checkout.phtml ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ <script type="text/javascript" src="https://secure.mlstatic.com/modules/javascript/analytics.js"></script>
2
+
3
+ <script>
4
+ function sendAnalyticsData(type) {
5
+ var mpanalytics_data = <?php echo json_encode($this->getAnalyticsData());?>;
6
+ if (mpanalytics_data != false) {
7
+ var MA = ModuleAnalytics;
8
+ if (type === 'mercadopago_custom') {
9
+ MA.setPublicKey(mpanalytics_data.custom_analytics_key);
10
+ MA.setToken(null);
11
+ } else if (type === 'mercadopago_customticket') {
12
+ MA.setToken(mpanalytics_data.ticket_analytics_key);
13
+ MA.setPublicKey(null);
14
+ } else {
15
+ MA.setToken(mpanalytics_data.standard_analytics_key);
16
+ MA.setPublicKey(null);
17
+ }
18
+ MA.setPlatform("Magento");
19
+ MA.setPlatformVersion(mpanalytics_data.platform_version);
20
+ MA.setModuleVersion(mpanalytics_data.module_version);
21
+ MA.setPayerEmail(mpanalytics_data.email);
22
+ MA.setUserLogged(mpanalytics_data.user_logged);
23
+
24
+ MA.setInstalledModules(mpanalytics_data.payment_methods);
25
+ MA.post();
26
+ }
27
+ }
28
+
29
+ </script>
30
+
app/design/frontend/base/default/template/mercadopago/calculator/calculatorForm.phtml CHANGED
@@ -5,6 +5,7 @@ const PAYMENT_TYPE_CREDIT_CARD = 'credit_card';
5
 
6
  $list = $this->getPaymentMethods();
7
  $pk = $this->getPublicKey();
 
8
 
9
  ?>
10
  <div id="mercadopago-popup" class="mercadopago-popup" style="display: none;">
@@ -29,7 +30,11 @@ $pk = $this->getPublicKey();
29
  <li id="<?php echo $i['id']; ?>-li">
30
  <label for="<?php echo $i['id']; ?>">
31
  <input id="<?php echo $i['id']; ?>" type="radio" name="paymentMethods" value="<?php echo $i['id']; ?>" />
32
- <img src="<?php echo $i['thumbnail']; ?>" alt="<?php echo $i['id']; ?>"/>
 
 
 
 
33
  </label>
34
  </li>
35
  <?php endif; ?>
5
 
6
  $list = $this->getPaymentMethods();
7
  $pk = $this->getPublicKey();
8
+ $isSecure = $this->isCurrentlySecure();
9
 
10
  ?>
11
  <div id="mercadopago-popup" class="mercadopago-popup" style="display: none;">
30
  <li id="<?php echo $i['id']; ?>-li">
31
  <label for="<?php echo $i['id']; ?>">
32
  <input id="<?php echo $i['id']; ?>" type="radio" name="paymentMethods" value="<?php echo $i['id']; ?>" />
33
+ <?php if ($isSecure): ?>
34
+ <img src="<?php echo $i['secure_thumbnail']; ?>" alt="<?php echo $i['id']; ?>"/>
35
+ <?php else : ?>
36
+ <img src="<?php echo $i['thumbnail']; ?>" alt="<?php echo $i['id']; ?>"/>
37
+ <?php endif; ?>
38
  </label>
39
  </li>
40
  <?php endif; ?>
app/design/frontend/base/default/template/mercadopago/custom/form.phtml CHANGED
@@ -13,11 +13,12 @@ $customer = $this->getCustomerAndCards();
13
  <script type="text/javascript">
14
  MercadoPagoCustom.enableLog(<?php echo $logEnabled?>);
15
  MercadoPagoCustom.getInstance().init();
 
16
  </script>
17
 
18
  <link rel="stylesheet" href="<?php echo $this->getSkinUrl('mercadopago/css/style.css'); ?>?nocache=<?php echo rand(); ?>"/>
19
 
20
- <fieldset>
21
  <div id="mercadopago_checkout_custom">
22
  <div id="mercadopago-loading">
23
  <img src="<?php echo $this->getSkinUrl('mercadopago/images/loading.gif'); ?>" alt="loading"/>
@@ -167,13 +168,6 @@ $customer = $this->getCustomerAndCards();
167
  </div>
168
 
169
  <div class="banner_custom">
170
- <?php if ($this->getMethod()->getConfigData('communication') != ""): ?>
171
- <p class="communication banner_checkout_mp"><?php echo $this->getMethod()->getConfigData('communication') ?></p>
172
- <?php endif; ?>
173
- <?php if ($this->getMethod()->getConfigData('banner_checkout') != ""): ?>
174
- <img src="<?php echo $this->getMethod()->getConfigData('banner_checkout'); ?>" class="banner_checkout_mp"/>
175
- <?php endif; ?>
176
-
177
  <input type="hidden" class="total_amount" name="total_amount" value="<?php echo $grant_total; ?>"/>
178
  <input type="hidden" class="amount" name="amount" value="<?php echo $grant_total; ?>"/>
179
  <input type="hidden" class="mercadopago-discount-amount" name="mercadopago-discount-amount" value="0"/>
@@ -190,4 +184,11 @@ $customer = $this->getCustomerAndCards();
190
  </div>
191
  </ul>
192
  </div>
 
 
 
 
 
 
 
193
  </fieldset>
13
  <script type="text/javascript">
14
  MercadoPagoCustom.enableLog(<?php echo $logEnabled?>);
15
  MercadoPagoCustom.getInstance().init();
16
+ sendAnalyticsData("<?php echo $_code ?>");
17
  </script>
18
 
19
  <link rel="stylesheet" href="<?php echo $this->getSkinUrl('mercadopago/css/style.css'); ?>?nocache=<?php echo rand(); ?>"/>
20
 
21
+ <fieldset class="container-form-list">
22
  <div id="mercadopago_checkout_custom">
23
  <div id="mercadopago-loading">
24
  <img src="<?php echo $this->getSkinUrl('mercadopago/images/loading.gif'); ?>" alt="loading"/>
168
  </div>
169
 
170
  <div class="banner_custom">
 
 
 
 
 
 
 
171
  <input type="hidden" class="total_amount" name="total_amount" value="<?php echo $grant_total; ?>"/>
172
  <input type="hidden" class="amount" name="amount" value="<?php echo $grant_total; ?>"/>
173
  <input type="hidden" class="mercadopago-discount-amount" name="mercadopago-discount-amount" value="0"/>
184
  </div>
185
  </ul>
186
  </div>
187
+
188
+ <?php if ($this->getMethod()->getConfigData('communication') != ""): ?>
189
+ <p class="communication"><?php echo $this->getMethod()->getConfigData('communication') ?></p>
190
+ <?php endif; ?>
191
+ <?php if($this->getMethod()->getConfigData('banner_checkout') != ""): ?>
192
+ <img src="<?php echo $this->getMethod()->getConfigData('banner_checkout'); ?>" class="banner_checkout_mp"/>
193
+ <?php endif;?>
194
  </fieldset>
app/design/frontend/base/default/template/mercadopago/custom_ticket/form.phtml CHANGED
@@ -7,8 +7,10 @@ $base_url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_LINK, true);
7
  $route = $this->getRequest()->getRequestedRouteName();
8
 
9
  ?>
10
-
11
- <fieldset class="form-list">
 
 
12
  <link rel="stylesheet" href="<?php echo $this->getSkinUrl('mercadopago/css/style.css'); ?>?nocache=<?php echo rand(); ?>"/>
13
 
14
  <div id="mercadopago_checkout_custom_ticket">
@@ -26,18 +28,24 @@ $route = $this->getRequest()->getRequestedRouteName();
26
  endif;
27
  ?>
28
  </li>
29
- <br/>
30
- <li class="mercadopago-discount-options">
31
  <?php $optionsTicket = $this->getTicketsOptions(); ?>
32
  <?php if (count($optionsTicket) == 1): ?>
33
  <input type="hidden" name="payment[<?php echo $_code; ?>][payment_method_ticket]" type="text" value="<?php echo $optionsTicket[0]['id']; ?>" id="payment_method_ticket"/>
34
  <?php else: ?>
35
- <?php foreach ($optionsTicket as $ticket): ?>
36
- <br/>
37
- <input type="radio" name="payment[<?php echo $_code; ?>][payment_method_ticket]" class="optionsTicketMp validate-one-required-by-name" value="<?php echo $ticket['id']; ?>">
38
- <img src="<?php echo $ticket['secure_thumbnail']; ?>">
39
- <label class="mercadopago-ticket-label"> (<?php echo $ticket['name']; ?>)</label><br/>
40
- <?php endforeach; ?>
 
 
 
 
 
 
 
41
  <?php endif; ?>
42
 
43
  <input type="hidden" class="total_amount" name="total_amount" value="<?php echo $grant_total; ?>"/>
@@ -54,7 +62,6 @@ $route = $this->getRequest()->getRequestedRouteName();
54
 
55
  </ul>
56
  </div>
57
- <br/>
58
  <?php if ($this->getMethod()->getConfigData('communication') != ""): ?>
59
  <p class="communication"><?php echo $this->getMethod()->getConfigData('communication') ?></p>
60
  <?php endif; ?>
7
  $route = $this->getRequest()->getRequestedRouteName();
8
 
9
  ?>
10
+ <script type="text/javascript">
11
+ sendAnalyticsData("<?php echo $_code ?>");
12
+ </script>
13
+ <fieldset class="conteiner-form-list">
14
  <link rel="stylesheet" href="<?php echo $this->getSkinUrl('mercadopago/css/style.css'); ?>?nocache=<?php echo rand(); ?>"/>
15
 
16
  <div id="mercadopago_checkout_custom_ticket">
28
  endif;
29
  ?>
30
  </li>
31
+ <li class="mercadopago-ticket-options">
 
32
  <?php $optionsTicket = $this->getTicketsOptions(); ?>
33
  <?php if (count($optionsTicket) == 1): ?>
34
  <input type="hidden" name="payment[<?php echo $_code; ?>][payment_method_ticket]" type="text" value="<?php echo $optionsTicket[0]['id']; ?>" id="payment_method_ticket"/>
35
  <?php else: ?>
36
+ <ul>
37
+ <?php foreach ($optionsTicket as $ticket): ?>
38
+ <li class="mercadopago-ticket-option">
39
+ <input type="radio" name="payment[<?php echo $_code; ?>][payment_method_ticket]" class="optionsTicketMp validate-one-required-by-name" value="<?php echo $ticket['id']; ?>">
40
+ <label class="mercadopago-ticket-label">
41
+ <img src="<?php echo $ticket['secure_thumbnail']; ?>" alt="<?php echo $ticket['name']; ?>">
42
+ (<?php echo $ticket['name']; ?>)
43
+ <!--<span class="mercadopago-ticket-label-img"><img src="--><?php //echo $ticket['secure_thumbnail']; ?><!--" alt="--><?php //echo $ticket['name']; ?><!--"> </span>-->
44
+ <!--<span class="mercadopago-ticket-label-description">(--><?php //echo $ticket['name']; ?><!--)</span>-->
45
+ </label>
46
+ </li>
47
+ <?php endforeach; ?>
48
+ </ul>
49
  <?php endif; ?>
50
 
51
  <input type="hidden" class="total_amount" name="total_amount" value="<?php echo $grant_total; ?>"/>
62
 
63
  </ul>
64
  </div>
 
65
  <?php if ($this->getMethod()->getConfigData('communication') != ""): ?>
66
  <p class="communication"><?php echo $this->getMethod()->getConfigData('communication') ?></p>
67
  <?php endif; ?>
app/design/frontend/base/default/template/mercadopago/onestepcheckout/custom/form.phtml CHANGED
@@ -27,7 +27,7 @@ $customer = $this->getCustomerAndCards();
27
  </script>
28
  <link rel="stylesheet" href="<?php echo $this->getSkinUrl('mercadopago/css/style.css'); ?>?nocache=<?php echo rand(); ?>"/>
29
 
30
- <fieldset>
31
  <div id="mercadopago_checkout_custom">
32
  <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
33
 
@@ -192,11 +192,6 @@ $customer = $this->getCustomerAndCards();
192
  </li>
193
 
194
  <li>
195
-
196
- <?php if ($this->getMethod()->getConfigData('banner_checkout') != ""): ?>
197
- <img src="<?php echo $this->getMethod()->getConfigData('banner_checkout'); ?>" class="banner_checkout_mp"/>
198
- <?php endif; ?>
199
-
200
  <input type="hidden" class="total_amount" name="total_amount" value="<?php echo $grant_total; ?>"/>
201
  <input type="hidden" class="amount" name="amount" value="<?php echo $grant_total; ?>"/>
202
  <input type="hidden" class="mercadopago-discount-amount" name="mercadopago-discount-amount" value="0"/>
@@ -214,4 +209,7 @@ $customer = $this->getCustomerAndCards();
214
  </li>
215
  </ul>
216
  </div>
 
 
 
217
  </fieldset>
27
  </script>
28
  <link rel="stylesheet" href="<?php echo $this->getSkinUrl('mercadopago/css/style.css'); ?>?nocache=<?php echo rand(); ?>"/>
29
 
30
+ <fieldset class="container-form-list">
31
  <div id="mercadopago_checkout_custom">
32
  <ul class="form-list" id="payment_form_<?php echo $_code ?>" style="display:none;">
33
 
192
  </li>
193
 
194
  <li>
 
 
 
 
 
195
  <input type="hidden" class="total_amount" name="total_amount" value="<?php echo $grant_total; ?>"/>
196
  <input type="hidden" class="amount" name="amount" value="<?php echo $grant_total; ?>"/>
197
  <input type="hidden" class="mercadopago-discount-amount" name="mercadopago-discount-amount" value="0"/>
209
  </li>
210
  </ul>
211
  </div>
212
+ <?php if ($this->getMethod()->getConfigData('banner_checkout') != ""): ?>
213
+ <img src="<?php echo $this->getMethod()->getConfigData('banner_checkout'); ?>" class="banner_checkout_mp"/>
214
+ <?php endif; ?>
215
  </fieldset>
app/design/frontend/base/default/template/mercadopago/standard/form.phtml CHANGED
@@ -1,5 +1,9 @@
 
1
 
2
- <fieldset class="form-list">
 
 
 
3
  <!--<link rel="stylesheet" href="<?php echo $this->getSkinUrl('mercadopago/css/style.css'); ?>" /> -->
4
 
5
  <?php $_code = $this->getMethodCode(); ?>
1
+ <?php $_code = $this->getMethodCode(); ?>
2
 
3
+ <script type="text/javascript">
4
+ sendAnalyticsData("<?php echo $_code ?>");
5
+ </script>
6
+ <fieldset class="conteiner-form-list">
7
  <!--<link rel="stylesheet" href="<?php echo $this->getSkinUrl('mercadopago/css/style.css'); ?>" /> -->
8
 
9
  <?php $_code = $this->getMethodCode(); ?>
app/locale/en_US/MercadoPago_Core.csv CHANGED
@@ -203,4 +203,6 @@
203
  "Failed to update the recurring profile by Mercado Pago","Failed to update the recurring profile by Mercado Pago"
204
  "Recurring Profile updated by Mercado Pago","Recurring Profile updated by Mercado Pago"
205
  "Mercado Pago - Recurring Payment Checkout: Invalid client id or client secret","Mercado Pago - Recurring Payment Checkout: Invalid client id or client secret"
206
- "This payment method is used only for recurring profiles.","This payment method is used only for recurring profiles."
 
 
203
  "Failed to update the recurring profile by Mercado Pago","Failed to update the recurring profile by Mercado Pago"
204
  "Recurring Profile updated by Mercado Pago","Recurring Profile updated by Mercado Pago"
205
  "Mercado Pago - Recurring Payment Checkout: Invalid client id or client secret","Mercado Pago - Recurring Payment Checkout: Invalid client id or client secret"
206
+ "This payment method is used only for recurring profiles.","This payment method is used only for recurring profiles."
207
+ "Consider Discounts","Consider Discounts"
208
+ "Consider discount of Mercado Pago to invoicing","Consider discount of Mercado Pago to invoicing"
app/locale/es_AR/MercadoPago_Core.csv CHANGED
@@ -37,6 +37,8 @@
37
  "Category of your store","Categoria de la tienda"
38
 
39
  "Calculate Financing Cost", "Calcular el costo de financiamiento"
 
 
40
  "Order Status Options","Opciones de estado de los pedidos"
41
  "Choose the status of approved orders","Elija el estado de los pedidos para pagos Aprobados"
42
  "Choose the status of refunded orders","Elija el estado de los pedidos para pagos Devueltos"
@@ -336,11 +338,12 @@ Es un requisito que usted cuente con un certificado SSL, y que el formulario de
336
  "This payment method is used only for recurring profiles.","Este método de pago es usado solo para perfiles recurrentes"
337
  "Payment information", "Información de pago"
338
 
339
-
340
  "Payments Calculator","Calculador de Cuotas"
341
  "Enable Mercado Pago Installments Calculator","Habilitar Calculadora de Cuotas de Mercado Pago"
342
- "if set to YES, Calculator will appear on the selected pages","Si está configuración se setea en YES, la calculadora aparecerá en las páginas seleccionadas"
343
  "Show Calculator on selected pages", "Mostrar calculadora en las siguientes páginas seleccionadas"
 
 
344
 
345
  "Calculate your payments ", "Calculá tus Cuotas"
346
  "with ", "con "
@@ -379,6 +382,9 @@ Es un requisito que usted cuente con un certificado SSL, y que el formulario de
379
  "Close","Cerrar"
380
  "Configure","Configurar"
381
 
 
382
  "Time between verifications","Tiempo entre verificaciones"
383
  "Amount of hours","Cantidad de horas"
384
- "Try to update all the orders created "amount of hours" before time to the moment to execute the cron","Verifica e intenta actualizar todas las ordenes creadas 'cantidad de horas' antes de la hora en la que se ejecuta el cron"
 
 
37
  "Category of your store","Categoria de la tienda"
38
 
39
  "Calculate Financing Cost", "Calcular el costo de financiamiento"
40
+ "Consider Discounts","Considerar descuentos"
41
+ "Consider discount of Mercado Pago to invoicing","Considerar descuento de Mercado Pago en la facturación"
42
  "Order Status Options","Opciones de estado de los pedidos"
43
  "Choose the status of approved orders","Elija el estado de los pedidos para pagos Aprobados"
44
  "Choose the status of refunded orders","Elija el estado de los pedidos para pagos Devueltos"
338
  "This payment method is used only for recurring profiles.","Este método de pago es usado solo para perfiles recurrentes"
339
  "Payment information", "Información de pago"
340
 
 
341
  "Payments Calculator","Calculador de Cuotas"
342
  "Enable Mercado Pago Installments Calculator","Habilitar Calculadora de Cuotas de Mercado Pago"
343
+ "if set to YES, Calculator will appear on the selected pages - Custom checkout credentials (Public Key and Access Token) must be set","Si está configuración se setea en YES, la calculadora aparecerá en las páginas seleccionadas - Se deben establecer las credenciales 'Public Key' y 'Access Token' dentro de la configuración 'Custom Checkout'"
344
  "Show Calculator on selected pages", "Mostrar calculadora en las siguientes páginas seleccionadas"
345
+ "Cart page","Pagina del carrito"
346
+ "Product Detail Page","PDP"
347
 
348
  "Calculate your payments ", "Calculá tus Cuotas"
349
  "with ", "con "
382
  "Close","Cerrar"
383
  "Configure","Configurar"
384
 
385
+ "Order Status Update - Cron Configuration","Chequeo del estado de las Ordenes - Configuración del Cron"
386
  "Time between verifications","Tiempo entre verificaciones"
387
  "Amount of hours","Cantidad de horas"
388
+ "Try to update all the orders created "amount of hours" before time to the moment to execute the cron","Verifica e intenta actualizar todas las ordenes creadas 'cantidad de horas' antes de la hora en la que se ejecuta el cron"
389
+
390
+ "The cancellation will be made through Magento. It wasn't possible to cancel on MercadoPago","La cancelación se realizó a través de Magento. No fue posible cancelarla en MercadoPago"
app/locale/es_CL/MercadoPago_Core.csv CHANGED
@@ -124,4 +124,7 @@
124
 
125
  "Use Mercado Pago success page","Usar succes page de Mercado Pago"
126
  "If set this config with NO, magento success page will be used","Si esta configuración se setea en NO, se usará la success page de Magento"
127
- "MercadoEnvíos - Please enable a shipping method at least","MercadoEnvíos - Por favor habilita un método de envío al menos"
 
 
 
124
 
125
  "Use Mercado Pago success page","Usar succes page de Mercado Pago"
126
  "If set this config with NO, magento success page will be used","Si esta configuración se setea en NO, se usará la success page de Magento"
127
+ "MercadoEnvíos - Please enable a shipping method at least","MercadoEnvíos - Por favor habilita un método de envío al menos"
128
+
129
+ "Consider Discounts","Considerar descuentos"
130
+ "Consider discount of Mercado Pago to invoicing","Considerar descuento de Mercado Pago en la facturación"
app/locale/es_CO/MercadoPago_Core.csv CHANGED
@@ -136,4 +136,7 @@
136
 
137
  "Use Mercado Pago success page","Usar succes page de Mercado Pago"
138
  "If set this config with NO, magento success page will be used","Si esta configuración se setea en NO, se usará la success page de Magento"
139
- "MercadoEnvíos - Please enable a shipping method at least","MercadoEnvíos - Por favor habilita un método de envío al menos"
 
 
 
136
 
137
  "Use Mercado Pago success page","Usar succes page de Mercado Pago"
138
  "If set this config with NO, magento success page will be used","Si esta configuración se setea en NO, se usará la success page de Magento"
139
+ "MercadoEnvíos - Please enable a shipping method at least","MercadoEnvíos - Por favor habilita un método de envío al menos"
140
+
141
+ "Consider Discounts","Considerar descuentos"
142
+ "Consider discount of Mercado Pago to invoicing","Considerar descuento de Mercado Pago en la facturación"
app/locale/es_ES/MercadoPago_Core.csv CHANGED
@@ -131,4 +131,7 @@
131
 
132
  "Use Mercado Pago success page","Usar succes page de Mercado Pago"
133
  "If set this config with NO, magento success page will be used","Si esta configuración se setea en NO, se usará la success page de Magento"
134
- "MercadoEnvíos - Please enable a shipping method at least","MercadoEnvíos - Por favor habilita un método de envío al menos"
 
 
 
131
 
132
  "Use Mercado Pago success page","Usar succes page de Mercado Pago"
133
  "If set this config with NO, magento success page will be used","Si esta configuración se setea en NO, se usará la success page de Magento"
134
+ "MercadoEnvíos - Please enable a shipping method at least","MercadoEnvíos - Por favor habilita un método de envío al menos"
135
+
136
+ "Consider Discounts","Considerar descuentos"
137
+ "Consider discount of Mercado Pago to invoicing","Considerar descuento de Mercado Pago en la facturación"
app/locale/es_MX/MercadoPago_Core.csv CHANGED
@@ -137,4 +137,7 @@
137
 
138
  "Use Mercado Pago success page","Usar succes page de Mercado Pago"
139
  "If set this config with NO, magento success page will be used","Si esta configuración se setea en NO, se usará la success page de Magento"
140
- "MercadoEnvíos - Please enable a shipping method at least","MercadoEnvíos - Por favor habilita un método de envío al menos"
 
 
 
137
 
138
  "Use Mercado Pago success page","Usar succes page de Mercado Pago"
139
  "If set this config with NO, magento success page will be used","Si esta configuración se setea en NO, se usará la success page de Magento"
140
+ "MercadoEnvíos - Please enable a shipping method at least","MercadoEnvíos - Por favor habilita un método de envío al menos"
141
+
142
+ "Consider Discounts","Considerar descuentos"
143
+ "Consider discount of Mercado Pago to invoicing","Considerar descuento de Mercado Pago en la facturación"
app/locale/es_VE/MercadoPago_Core.csv CHANGED
@@ -138,4 +138,7 @@
138
 
139
  "Use Mercado Pago success page","Usar succes page de Mercado Pago"
140
  "If set this config with NO, magento success page will be used","Si esta configuración se setea en NO, se usará la success page de Magento"
141
- "MercadoEnvíos - Please enable a shipping method at least","MercadoEnvíos - Por favor habilita un método de envío al menos"
 
 
 
138
 
139
  "Use Mercado Pago success page","Usar succes page de Mercado Pago"
140
  "If set this config with NO, magento success page will be used","Si esta configuración se setea en NO, se usará la success page de Magento"
141
+ "MercadoEnvíos - Please enable a shipping method at least","MercadoEnvíos - Por favor habilita un método de envío al menos"
142
+
143
+ "Consider Discounts","Considerar descuentos"
144
+ "Consider discount of Mercado Pago to invoicing","Considerar descuento de Mercado Pago en la facturación"
app/locale/pt_BR/MercadoPago_Core.csv CHANGED
@@ -204,4 +204,7 @@
204
  <a href="https://www.mercadopago.com.ar/developers/solutions/payments/custom-checkout/appliance-requirements/" target="_blank">Ver mais</a>"
205
  "Use Mercado Pago success page","Use página de sucesso Mercado Pago"
206
  "If set this config with NO, magento success page will be used","Se definir essa configuração com NO, página de sucesso magento será usado"
207
- "MercadoEnvíos - Please enable a shipping method at least","MercadoEnvíos - Ative um método de envio pelo menos."
 
 
 
204
  <a href="https://www.mercadopago.com.ar/developers/solutions/payments/custom-checkout/appliance-requirements/" target="_blank">Ver mais</a>"
205
  "Use Mercado Pago success page","Use página de sucesso Mercado Pago"
206
  "If set this config with NO, magento success page will be used","Se definir essa configuração com NO, página de sucesso magento será usado"
207
+ "MercadoEnvíos - Please enable a shipping method at least","MercadoEnvíos - Ative um método de envio pelo menos."
208
+
209
+ "Consider Discounts","Considerar desconto"
210
+ "Consider discount of Mercado Pago to invoicing","Considere o desconto do Mercado Pago para faturamento"
js/mercadopago/mercadopago.js CHANGED
@@ -1390,7 +1390,8 @@ var MercadoPagoCustom = (function () {
1390
 
1391
  var option = new Option(messageChoose + "... ", '');
1392
  payerCosts = response[0].payer_costs;
1393
- var hasCftInfo = payerCosts[0]['labels'].length > 0;
 
1394
  if (!hasCftInfo) {
1395
  TinyJ('.tea-info-first-card').hide();
1396
  TinyJ('.cft-info-first-card').hide();
@@ -1445,8 +1446,14 @@ var MercadoPagoCustom = (function () {
1445
  option = new Option(payerCosts[i].recommended_message || payerCosts[i].installments, payerCosts[i].installments);
1446
  selectorInstallments.appendChild(option);
1447
  TinyJ(option).attribute(self.constants.cost, payerCosts[i].total_amount);
 
1448
  if (hasCftInfo) {
1449
- var finance = payerCosts[i]['labels'][0].split('|');
 
 
 
 
 
1450
  TinyJ(option).attribute('cft', finance[0].replace('_', ': '));
1451
  TinyJ(option).attribute('tea', finance[1].replace('_', ': '));
1452
  }
1390
 
1391
  var option = new Option(messageChoose + "... ", '');
1392
  payerCosts = response[0].payer_costs;
1393
+ var hasCftInfo = payerCosts[0]['labels'].length > 0 && payerCosts[0]['labels'][0].indexOf('CFT') > -1;
1394
+
1395
  if (!hasCftInfo) {
1396
  TinyJ('.tea-info-first-card').hide();
1397
  TinyJ('.cft-info-first-card').hide();
1446
  option = new Option(payerCosts[i].recommended_message || payerCosts[i].installments, payerCosts[i].installments);
1447
  selectorInstallments.appendChild(option);
1448
  TinyJ(option).attribute(self.constants.cost, payerCosts[i].total_amount);
1449
+
1450
  if (hasCftInfo) {
1451
+ var financeValues = payerCosts[i]['labels'].find(
1452
+ function(str) {
1453
+ return str.indexOf('CFT') > -1;
1454
+ }
1455
+ );
1456
+ var finance = financeValues.split('|');
1457
  TinyJ(option).attribute('cft', finance[0].replace('_', ': '));
1458
  TinyJ(option).attribute('tea', finance[1].replace('_', ': '));
1459
  }
package.xml CHANGED
@@ -1,7 +1,7 @@
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>MercadoPagoTransparent</name>
4
- <version>2.6.3</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
@@ -159,14 +159,16 @@
159
  &lt;/ol&gt;&#xD;
160
  &lt;/p&gt;&#xD;
161
  </description>
162
- <notes>Added Uruguay support&#xD;
163
- Added cron for order status updates&#xD;
164
- Added translations&#xD;
 
 
165
  Bug fixing</notes>
166
  <authors><author><name>MercadoPago</name><user>MercadoPago</user><email>developer@mercadopago.com.br</email></author></authors>
167
- <date>2017-03-16</date>
168
- <time>21:30:31</time>
169
- <contents><target name="magecommunity"><dir name="MercadoPago"><dir><dir name="Core"><dir name="Block"><file name="AbstractForm.php" hash="37bbd650b14574dee9f1296bf67ffd10"/><file name="AbstractSuccess.php" hash="6aa920d8b886d22410f50b9625847699"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Payment.php" hash="5ecbfb51b488a3e3211dfaec5d8c0efe"/></dir></dir></dir></dir><dir name="Calculator"><file name="CalculatorForm.php" hash="bf36b45b88a3689fe9cbc4a8eee8f282"/><file name="CalculatorLink.php" hash="9b44aa734910d9207a290a8039f4870d"/></dir><dir name="Custom"><file name="Form.php" hash="733c5dccf752493b9fe24938433ff9fd"/><file name="Info.php" hash="51771218b04b7a41d83adec76e393311"/><file name="Success.php" hash="2ab918e6b2415018d780b1a58d5b6d04"/></dir><dir name="Customticket"><file name="Form.php" hash="84fdf10e464cebbc89f5204f15d68f94"/><file name="Info.php" hash="f23e8a204e431e95a7bb0e9b409c1df4"/><file name="Success.php" hash="325fc24f1c0d220a95abe238ec583ee5"/></dir><file name="Discount.php" hash="a17b7f08dd57c31d27e57b3acbe03188"/><dir name="Recurring"><file name="Form.php" hash="92fd8e52f8cf52ea40d7a500d16c0286"/><file name="Info.php" hash="bad1e825f1dccbabf8802539fcbd180c"/><file name="Pay.php" hash="33d1cb94bd944f11cf9c8e217086057b"/><file name="Success.php" hash="e069c3c6be1bf2f15b5192dee0d95e44"/></dir><dir name="Sales"><dir name="Order"><dir name="Totals"><dir name="Discount"><file name="Coupon.php" hash="4bd99d8954d154971b8b51b4318b5b1c"/></dir><dir name="Finance"><file name="Cost.php" hash="7cf8b32dfb95d965b7f2c14973267311"/></dir></dir></dir></dir><dir name="Standard"><file name="Form.php" hash="e6845e293d0c0ca1a6ac04acf79edd1e"/><file name="Info.php" hash="db81d01579b66fbd8251883967768320"/><file name="Pay.php" hash="8ebb3cd8ef5df082343cfe33eadf17e0"/><file name="Success.php" hash="409dd3e16db4ebd5bd22599b7271062c"/></dir></dir><dir name="Helper"><file name="Data.php" hash="e33e668cf38d57171725aa185eb398d7"/><dir name="Message"><file name="Abstract.php" hash="1f4f37e4a2cd0d1a18dff6f3e96ca84d"/></dir><file name="Response.php" hash="3b4cb87e25993ba952b100751aadd9ce"/><file name="StatusDetailMessage.php" hash="f56549a427452d4e67351274032885db"/><file name="StatusMessage.php" hash="3a7860b8dc843f8f9620852113fc5093"/><file name="StatusOrderMessage.php" hash="f17c394be7b8a795ee05342109c93fe4"/><file name="StatusUpdate.php" hash="a0b4d72ac37cf1da6daf2d24cbe79393"/></dir><dir name="Model"><dir name="Api"><file name="Exception.php" hash="8093747fa6e2244c3f59a188911d47c3"/><dir name="V0"><file name="Exception.php" hash="026642775cab4873176aaf28493a9159"/></dir><dir name="V1"><file name="Exception.php" hash="022c7e5ff52d04a91990bdb230f97e73"/></dir></dir><file name="Core.php" hash="894bac0d79687f448f82304d1c062e47"/><dir name="Cron"><file name="Order.php" hash="04693bdab8260f8f038bb72540a711d1"/></dir><dir name="Custom"><dir name="Finance"><dir name="Cost"><file name="Creditmemo.php" hash="4e75bb8d2c34e9758a27d9e9db3f6b36"/><file name="Invoice.php" hash="d8123b798f25c119739b9ac16817619c"/></dir><file name="Cost.php" hash="9fab08c5253d19b4106ef9070580f42e"/></dir><file name="Payment.php" hash="617b6475f10a870160a07e97c0555352"/></dir><file name="CustomPayment.php" hash="bc92b4a75716d1fab5c30ae2240c127d"/><dir name="CustomTicket"><file name="Payment.php" hash="648402a89b301774f5864c703884f8d9"/></dir><dir name="Discount"><dir name="Coupon"><file name="Creditmemo.php" hash="87dc7aaac390633ddf87c27e3d097130"/><file name="Invoice.php" hash="a586d210a2b8b57a8dffe9fdb69b5363"/></dir><file name="Coupon.php" hash="54d8cbfb2fd73db87fbe3f93e483a8d8"/></dir><file name="Observer.php" hash="edbf09cc1ee2b63bf9bc2d21aed02ad6"/><dir name="Recurring"><file name="Payment.php" hash="372ffa6bec87328e9642602e1ee062da"/></dir><dir name="Source"><file name="CategoryId.php" hash="5728ee8c2bb1f41e10103c4ff4b939cb"/><file name="Country.php" hash="d55e621726633f3c765192c51da55e44"/><file name="Installments.php" hash="7c7efe8ef187ff1e2ab00bf7dbcc8cab"/><file name="ListPages.php" hash="6bbef05a62beb54573065d61a5efa60e"/><dir name="Order"><file name="Status.php" hash="a367d9b6bfe1e35268f04f0257612725"/></dir><file name="PaymentMethods.php" hash="d799c877f358c2218e0a65a085c0427b"/><file name="TypeCheckout.php" hash="36496d11ce7fbb1d87f27eb705525b61"/></dir><dir name="Standard"><file name="Payment.php" hash="7d324b53cf5a6abdde78d5f2bb27e270"/></dir></dir><dir name="controllers"><file name="ApiController.php" hash="2901e45bb90b472bc81b0353c4acb824"/><file name="CalculatorPaymentController.php" hash="87ff9536177530e294abf4b9853735bf"/><file name="NotificationsController.php" hash="fe0fcc8339b4dc01856a0adcb8f51b39"/><file name="PayController.php" hash="bfa751fb97ffd2d81bbffcc564d7cd0c"/><file name="RecurringPaymentController.php" hash="14baee15f6cec92db59075d49ba534e5"/><file name="SuccessController.php" hash="e11c8e7e02bf70319de810914eb30383"/></dir><dir name="etc"><file name="config.xml" hash="69b1dbe9a2e5172a75a361434d62fa52"/><file name="jstranslator.xml" hash="75f60813a72e33e999a15a02dc7e152e"/><file name="system.xml" hash="a9163aa3e81d9f2f6e2fc327f92bc78f"/></dir><dir name="sql"><dir name="mercadopago_setup"><file name="install-2.1.0.php" hash="12ecf80fa3ceaf2e4065bda76cf07a4d"/><file name="upgrade-2.1.0-2.1.1.php" hash="abf330b2171e90fc25f0cfe668bd051d"/><file name="upgrade-2.1.1-2.1.2.php" hash="805656e780e56feb6567c6c310bd9b7b"/></dir></dir></dir><dir name="MercadoEnvios"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Carrier.php" hash="f8a32cf354e44f90e7ce9e64017438f9"/><file name="Mapping.php" hash="b00a1ff552b99b744d29365570b33257"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="CarrierData.php" hash="4532a9efcec29f1106569e4a63ab2a1b"/><file name="Data.php" hash="6b997724247f93ed51031254e5884989"/><file name="ItemData.php" hash="ec05bfdc7839e3d1af6089fd0ec17e83"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="Attribute"><dir name="Validation"><file name="Mapping.php" hash="7e405906299a7b94cc286f68357207a1"/></dir></dir><dir name="Source"><dir name="Shipping"><file name="FreeMethod.php" hash="e8740f8d1b3a67c8cee79b77e40cf7db"/><file name="Method.php" hash="f0dde5407e7b8efb31c6e71065138800"/><dir name="Print"><file name="Mode.php" hash="70f65b1c619863cbabe81086a13d1896"/></dir></dir></dir></dir><file name="Observer.php" hash="988d72c51b8d1ea2d1b17452e7926f32"/><dir name="Shipping"><dir name="Carrier"><file name="MercadoEnvios.php" hash="ffa13a64f24cb02ff52512b6b3212e3d"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="680fc0737ab4d89658e1084e9431878e"/><file name="system.xml" hash="dd4d92f75a34954cdf13b5913f438a33"/></dir></dir><dir name="OneStepCheckout"><dir name="Block"><dir name="Custom"><file name="Form.php" hash="34033d6813650d77c75c8c3e9a9cd88a"/></dir><dir name="Customticket"><file name="Form.php" hash="9deffc44f4ae97765ba02a4885dbe7e5"/></dir></dir><dir name="Helper"><file name="Data.php" hash="c0a0af8a83dc71a0ccf1a5f1a3235c8a"/></dir><dir name="Model"><file name="Observer.php" hash="2cfb65eada297e55f59cc490507bd4e3"/></dir><dir name="etc"><file name="config.xml" hash="e2d9d8157b6eff3760cde5f83d5acc05"/><file name="system.xml" hash="5dc985a1a6219700248e59678a6c7ba8"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mercadopago.xml" hash="3c49e00ad8174bde8e10eb7ac4a72348"/></dir><dir name="template"><dir name="mercadopago"><file name="array_dropdown.phtml" hash="84c83c98f33de9530517adeb391011ab"/><dir name="custom"><file name="info.phtml" hash="c1a6c2f8725f5e3c49acefdce87d6ba3"/></dir><dir name="custom_ticket"><file name="info.phtml" hash="1c9a896cbd7d2539c2d142fa579f2d90"/></dir><dir name="standard"><file name="info.phtml" hash="c1a6c2f8725f5e3c49acefdce87d6ba3"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mercadopago.xml" hash="7fd9a20a48223f10708543c59a4d7eb7"/></dir><dir name="template"><dir name="mercadopago"><dir name="calculator"><file name="calculatorForm.phtml" hash="f534542c9235cec5bb3480594fac4ed8"/><file name="calculatorLink.phtml" hash="3e99a37084c7252faedf6e6ec0a7e37d"/></dir><file name="clean.phtml" hash="fc92035839e69f52192eb9c3063a6864"/><dir name="custom"><file name="form.phtml" hash="981b6663132d79c32c2cc02dd33d650d"/><file name="info.phtml" hash="70a72da32d8d0a952bb6bf3e21df1100"/><file name="secondCard.phtml" hash="7ec27b4a932891162c7a010a94d6389f"/><file name="success.phtml" hash="aad02aca4abe256e3c628580b0e7642c"/></dir><dir name="custom_ticket"><file name="form.phtml" hash="ffee68c42d8bdfdd983466c504ec57f5"/><file name="info.phtml" hash="ab580075fca55962463cbb17628b736d"/><file name="success.phtml" hash="17a8e81b84431e61bbf2d5d45740da91"/></dir><file name="discount.phtml" hash="310ed2fcc7620c97002e4af155c5aecc"/><dir name="onestepcheckout"><dir name="custom"><file name="form.phtml" hash="b5b363ae0814816a6c7a416d9ed7dd16"/></dir></dir><dir name="standard"><file name="form.phtml" hash="d5ea2d68325978b7c559599c47bb4237"/><file name="info.phtml" hash="70a72da32d8d0a952bb6bf3e21df1100"/><file name="pay.phtml" hash="3e3b83363e355778b98908847a56ab28"/><file name="success.phtml" hash="07a248b28e8465861d2b6ab7e43cbf45"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="MercadoPago_Core.csv" hash="2b70b9e9af320dc6fab96edee71283e7"/></dir><dir name="es_AR"><file name="MercadoPago_Core.csv" hash="8a188e51bbb2aba4f4c5901858680f5d"/></dir><dir name="es_CL"><file name="MercadoPago_Core.csv" hash="9410f5fd291807b737f302627ee4f149"/></dir><dir name="es_CO"><file name="MercadoPago_Core.csv" hash="6f2937031991436f3653df27e8cd0241"/></dir><dir name="es_ES"><file name="MercadoPago_Core.csv" hash="9d8b8df4d5507352910c69032d392844"/></dir><dir name="es_MX"><file name="MercadoPago_Core.csv" hash="446c5a20320c5f562bb81d0b31088cfb"/></dir><dir name="es_VE"><file name="MercadoPago_Core.csv" hash="db3ca60c5518afcfaaf8c7c630d15f12"/></dir><dir name="pt_BR"><file name="MercadoPago_Core.csv" hash="d96a1558aace434cd42e0594bc697e6f"/></dir></target><target name="mageweb"><dir name="js"><dir name="mercadopago"><file name="jquery-1.11.0.min.js" hash="52d16e147b5346147d0f3269cd4d0f80"/><file name="mercadopago.js" hash="56fbba55012372b29d6052d8a70234d4"/><file name="mercadopago_calculator.js" hash="05c76965e58be631fb3a1f5ffe25bdde"/><file name="mercadopago_osc.js" hash="190e0d2aaf0e0957be4a1ea8cc68b1b5"/><file name="tiny.min.js" hash="71bce92ef942b0ac15683f94e1f3e3a5"/><file name="tinyJ.js" hash="3318ec214b9a21fe954ce5675de013f3"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="mercadopago"><dir name="images"><file name="cards.jpg" hash="53b06cbec7b20d95cdcaaf3b49bd2aa5"/><file name="logo.png" hash="460a0815c67a23da265f42c8bab0842a"/><file name="mercadoenvios.png" hash="006cd6ddfa8e5a19354942f79b659b5e"/></dir><file name="styles.css" hash="cac25e698c010f73dc3af01ef3377320"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="mercadopago"><dir name="css"><file name="style-calculator.css" hash="bf0ceced0fe34d9394b779fff081d86c"/><file name="style-success.css" hash="6e7b8fd0bf1b17a5804b5466e9cd4b89"/><file name="style.css" hash="bb9daeef706eb11a0e8e49eabe03a563"/></dir><dir name="images"><file name="loading.gif" hash="5c43434f066c2fbc4714c768b8f83853"/><file name="logo.png" hash="460a0815c67a23da265f42c8bab0842a"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="MercadoPago"><dir name="Lib"><file name="Api.php" hash="7149abfb4a2e07522fd99d2a3934c894"/><file name="RestClient.php" hash="13d49937d6ba8b7e245179c74a762940"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MercadoPago_Core.xml" hash="0770f2e1dd0110c2c13a330d3411fd68"/><file name="MercadoPago_MercadoEnvios.xml" hash="f7e8607c78d8b39075eb8f7700691a44"/><file name="MercadoPago_OneStepCheckout.xml" hash="9e05c392d8f00c9604ac9ad748977489"/></dir></target></contents>
170
  <compatible/>
171
  <dependencies><required><php><min>5.4.0</min><max>5.5.37</max></php></required></dependencies>
172
  </package>
1
  <?xml version="1.0"?>
2
  <package>
3
  <name>MercadoPagoTransparent</name>
4
+ <version>2.7.4</version>
5
  <stability>stable</stability>
6
  <license>OSL</license>
7
  <channel>community</channel>
159
  &lt;/ol&gt;&#xD;
160
  &lt;/p&gt;&#xD;
161
  </description>
162
+ <notes>Added mp analytics&#xD;
163
+ Added Failure page setting&#xD;
164
+ Updated readme file&#xD;
165
+ Minor Refactor&#xD;
166
+ Added option to disable showing MP discount in order subtotals&#xD;
167
  Bug fixing</notes>
168
  <authors><author><name>MercadoPago</name><user>MercadoPago</user><email>developer@mercadopago.com.br</email></author></authors>
169
+ <date>2017-05-26</date>
170
+ <time>22:01:08</time>
171
+ <contents><target name="magecommunity"><dir name="MercadoPago"><dir><dir name="Core"><dir name="Block"><file name="AbstractForm.php" hash="37bbd650b14574dee9f1296bf67ffd10"/><file name="AbstractSuccess.php" hash="6aa920d8b886d22410f50b9625847699"/><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Payment.php" hash="5ecbfb51b488a3e3211dfaec5d8c0efe"/></dir></dir></dir></dir><dir name="Analytics"><file name="AfterCheckout.php" hash="450b2a0f3cea4504a93f9c52ebf21659"/><file name="Checkout.php" hash="e77bd0dd16bdc91d63dc49525645f436"/></dir><dir name="Calculator"><file name="CalculatorForm.php" hash="18025dc69fd9aae6226b22f551f7220c"/><file name="CalculatorLink.php" hash="bd5c57db8de7e29c3b9ff89be5b0a08d"/></dir><dir name="Custom"><file name="Form.php" hash="733c5dccf752493b9fe24938433ff9fd"/><file name="Info.php" hash="51771218b04b7a41d83adec76e393311"/><file name="Success.php" hash="2ab918e6b2415018d780b1a58d5b6d04"/></dir><dir name="Customticket"><file name="Form.php" hash="84fdf10e464cebbc89f5204f15d68f94"/><file name="Info.php" hash="f23e8a204e431e95a7bb0e9b409c1df4"/><file name="Success.php" hash="325fc24f1c0d220a95abe238ec583ee5"/></dir><file name="Discount.php" hash="a17b7f08dd57c31d27e57b3acbe03188"/><dir name="Recurring"><file name="Form.php" hash="92fd8e52f8cf52ea40d7a500d16c0286"/><file name="Info.php" hash="bad1e825f1dccbabf8802539fcbd180c"/><file name="Pay.php" hash="33d1cb94bd944f11cf9c8e217086057b"/><file name="Success.php" hash="e069c3c6be1bf2f15b5192dee0d95e44"/></dir><dir name="Sales"><dir name="Order"><dir name="Totals"><dir name="Discount"><file name="Coupon.php" hash="a2d6ce9b14d91481e55dbcac1bb111e7"/></dir><dir name="Finance"><file name="Cost.php" hash="7cf8b32dfb95d965b7f2c14973267311"/></dir></dir></dir></dir><dir name="Standard"><file name="Form.php" hash="e6845e293d0c0ca1a6ac04acf79edd1e"/><file name="Info.php" hash="db81d01579b66fbd8251883967768320"/><file name="Pay.php" hash="8ebb3cd8ef5df082343cfe33eadf17e0"/><file name="Success.php" hash="409dd3e16db4ebd5bd22599b7271062c"/></dir></dir><dir name="Helper"><file name="Data.php" hash="4bc78d1b6f70b5a7e177ce9ed2f8e536"/><dir name="Message"><file name="Abstract.php" hash="1f4f37e4a2cd0d1a18dff6f3e96ca84d"/></dir><file name="Response.php" hash="3b4cb87e25993ba952b100751aadd9ce"/><file name="StatusDetailMessage.php" hash="f56549a427452d4e67351274032885db"/><file name="StatusMessage.php" hash="3a7860b8dc843f8f9620852113fc5093"/><file name="StatusOrderMessage.php" hash="f17c394be7b8a795ee05342109c93fe4"/><file name="StatusUpdate.php" hash="646c4f57215a0b3e04ebfc833040e775"/><file name="Validate.php" hash="fbd97ce0c5db7fd7fe0e088610792198"/></dir><dir name="Model"><dir name="Api"><file name="Exception.php" hash="8093747fa6e2244c3f59a188911d47c3"/><dir name="V0"><file name="Exception.php" hash="026642775cab4873176aaf28493a9159"/></dir><dir name="V1"><file name="Exception.php" hash="022c7e5ff52d04a91990bdb230f97e73"/></dir></dir><file name="Core.php" hash="f8df8d24d945571169b4357b5eb07946"/><dir name="Cron"><file name="Order.php" hash="afa501b5c0b2962fd3dd2a5c1e724e3f"/></dir><dir name="Custom"><dir name="Finance"><dir name="Cost"><file name="Creditmemo.php" hash="4e75bb8d2c34e9758a27d9e9db3f6b36"/><file name="Invoice.php" hash="d8123b798f25c119739b9ac16817619c"/></dir><file name="Cost.php" hash="9fab08c5253d19b4106ef9070580f42e"/></dir><file name="Payment.php" hash="788712afd6508e5d29b489b6727ed89a"/></dir><file name="CustomPayment.php" hash="bc92b4a75716d1fab5c30ae2240c127d"/><dir name="CustomTicket"><file name="Payment.php" hash="f5f26b99096cdd7cb24e8eee7f098f3d"/></dir><dir name="Discount"><dir name="Coupon"><file name="Creditmemo.php" hash="87dc7aaac390633ddf87c27e3d097130"/><file name="Invoice.php" hash="a586d210a2b8b57a8dffe9fdb69b5363"/></dir><file name="Coupon.php" hash="54d8cbfb2fd73db87fbe3f93e483a8d8"/></dir><file name="Observer.php" hash="a2454b8b82a3a4e55f27e4faccfde9b0"/><dir name="Recurring"><file name="Payment.php" hash="372ffa6bec87328e9642602e1ee062da"/></dir><dir name="Source"><file name="CategoryId.php" hash="5728ee8c2bb1f41e10103c4ff4b939cb"/><file name="Country.php" hash="d55e621726633f3c765192c51da55e44"/><file name="Installments.php" hash="7c7efe8ef187ff1e2ab00bf7dbcc8cab"/><file name="ListPages.php" hash="b0d645e6f98b1c5f1c93d6e32abb5d22"/><dir name="Order"><file name="Status.php" hash="a367d9b6bfe1e35268f04f0257612725"/></dir><file name="PaymentMethods.php" hash="d799c877f358c2218e0a65a085c0427b"/><file name="TypeCheckout.php" hash="36496d11ce7fbb1d87f27eb705525b61"/></dir><dir name="Standard"><file name="Payment.php" hash="70d35ce0883cba3dae742e30239116e0"/></dir></dir><dir name="controllers"><file name="ApiController.php" hash="2901e45bb90b472bc81b0353c4acb824"/><file name="CalculatorPaymentController.php" hash="87ff9536177530e294abf4b9853735bf"/><file name="CheckoutController.php" hash="4b44aa159a1d7441bc1ae574c57777b8"/><file name="NotificationsController.php" hash="82e6def69dc0e0ebf4816b0245e7334a"/><file name="PayController.php" hash="bfa751fb97ffd2d81bbffcc564d7cd0c"/><file name="RecurringPaymentController.php" hash="14baee15f6cec92db59075d49ba534e5"/></dir><dir name="etc"><file name="config.xml" hash="56ba80f9e7c3dc9b400d527be4995e4e"/><file name="jstranslator.xml" hash="75f60813a72e33e999a15a02dc7e152e"/><file name="system.xml" hash="c177c939b8e6353ae2e1993509f0582d"/></dir><dir name="sql"><dir name="mercadopago_setup"><file name="install-2.1.0.php" hash="12ecf80fa3ceaf2e4065bda76cf07a4d"/><file name="upgrade-2.1.0-2.1.1.php" hash="abf330b2171e90fc25f0cfe668bd051d"/><file name="upgrade-2.1.1-2.1.2.php" hash="805656e780e56feb6567c6c310bd9b7b"/></dir></dir></dir><dir name="MercadoEnvios"><dir name="Block"><dir name="Adminhtml"><dir name="System"><dir name="Config"><dir name="Fieldset"><file name="Carrier.php" hash="f8a32cf354e44f90e7ce9e64017438f9"/><file name="Mapping.php" hash="b00a1ff552b99b744d29365570b33257"/></dir></dir></dir></dir></dir><dir name="Helper"><file name="CarrierData.php" hash="4532a9efcec29f1106569e4a63ab2a1b"/><file name="Data.php" hash="6b997724247f93ed51031254e5884989"/><file name="ItemData.php" hash="ec05bfdc7839e3d1af6089fd0ec17e83"/></dir><dir name="Model"><dir name="Adminhtml"><dir name="Attribute"><dir name="Validation"><file name="Mapping.php" hash="7e405906299a7b94cc286f68357207a1"/></dir></dir><dir name="Source"><dir name="Shipping"><file name="FreeMethod.php" hash="e8740f8d1b3a67c8cee79b77e40cf7db"/><file name="Method.php" hash="f0dde5407e7b8efb31c6e71065138800"/><dir name="Print"><file name="Mode.php" hash="70f65b1c619863cbabe81086a13d1896"/></dir></dir></dir></dir><file name="Observer.php" hash="988d72c51b8d1ea2d1b17452e7926f32"/><dir name="Shipping"><dir name="Carrier"><file name="MercadoEnvios.php" hash="ffa13a64f24cb02ff52512b6b3212e3d"/></dir></dir></dir><dir name="etc"><file name="config.xml" hash="a63e11caacbff0d1be6f3fb449e0f0cb"/><file name="system.xml" hash="dd4d92f75a34954cdf13b5913f438a33"/></dir></dir><dir name="OneStepCheckout"><dir name="Block"><dir name="Custom"><file name="Form.php" hash="34033d6813650d77c75c8c3e9a9cd88a"/></dir><dir name="Customticket"><file name="Form.php" hash="9deffc44f4ae97765ba02a4885dbe7e5"/></dir></dir><dir name="Helper"><file name="Data.php" hash="c0a0af8a83dc71a0ccf1a5f1a3235c8a"/></dir><dir name="Model"><file name="Observer.php" hash="2cfb65eada297e55f59cc490507bd4e3"/></dir><dir name="etc"><file name="config.xml" hash="8832b6ac1594d06133f886fa068ea016"/><file name="system.xml" hash="5dc985a1a6219700248e59678a6c7ba8"/></dir></dir></dir></dir></target><target name="magedesign"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="layout"><file name="mercadopago.xml" hash="3c49e00ad8174bde8e10eb7ac4a72348"/></dir><dir name="template"><dir name="mercadopago"><file name="array_dropdown.phtml" hash="84c83c98f33de9530517adeb391011ab"/><dir name="custom"><file name="info.phtml" hash="c1a6c2f8725f5e3c49acefdce87d6ba3"/></dir><dir name="custom_ticket"><file name="info.phtml" hash="1c9a896cbd7d2539c2d142fa579f2d90"/></dir><dir name="standard"><file name="info.phtml" hash="c1a6c2f8725f5e3c49acefdce87d6ba3"/></dir></dir></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="layout"><file name="mercadopago.xml" hash="e8dbd718ecae013346cc430d45fb3fe3"/></dir><dir name="template"><dir name="mercadopago"><dir name="analytics"><file name="after_checkout.phtml" hash="beed5dbde3abdb4f54a1b714c73172d5"/><file name="checkout.phtml" hash="43131db04ee760c48c4e28111b644a47"/></dir><dir name="calculator"><file name="calculatorForm.phtml" hash="8be6dcb0ab4e0ea1a68c9d6b5579da13"/><file name="calculatorLink.phtml" hash="3e99a37084c7252faedf6e6ec0a7e37d"/></dir><file name="clean.phtml" hash="fc92035839e69f52192eb9c3063a6864"/><dir name="custom"><file name="form.phtml" hash="88c9c43238417b809169633433eeeb01"/><file name="info.phtml" hash="70a72da32d8d0a952bb6bf3e21df1100"/><file name="secondCard.phtml" hash="7ec27b4a932891162c7a010a94d6389f"/><file name="success.phtml" hash="aad02aca4abe256e3c628580b0e7642c"/></dir><dir name="custom_ticket"><file name="form.phtml" hash="9f7149cc1646fd7c849c5f6142800849"/><file name="info.phtml" hash="ab580075fca55962463cbb17628b736d"/><file name="success.phtml" hash="17a8e81b84431e61bbf2d5d45740da91"/></dir><file name="discount.phtml" hash="310ed2fcc7620c97002e4af155c5aecc"/><dir name="onestepcheckout"><dir name="custom"><file name="form.phtml" hash="9f92472b8dac93417a1fa995e9d14171"/></dir></dir><dir name="standard"><file name="form.phtml" hash="4250cbf8b4416ed2996956645556b84a"/><file name="info.phtml" hash="70a72da32d8d0a952bb6bf3e21df1100"/><file name="pay.phtml" hash="3e3b83363e355778b98908847a56ab28"/><file name="success.phtml" hash="07a248b28e8465861d2b6ab7e43cbf45"/></dir></dir></dir></dir></dir></dir></target><target name="magelocale"><dir name="en_US"><file name="MercadoPago_Core.csv" hash="3b4e9d379ad74ebf0d047cfce18e6314"/></dir><dir name="es_AR"><file name="MercadoPago_Core.csv" hash="884b9da5e2f00731e0eb1cfe5c567adf"/></dir><dir name="es_CL"><file name="MercadoPago_Core.csv" hash="3bad45438b3470bbf554ea99bd59df1c"/></dir><dir name="es_CO"><file name="MercadoPago_Core.csv" hash="3ebaf8f04ca58d7b1bf95818ba7f4108"/></dir><dir name="es_ES"><file name="MercadoPago_Core.csv" hash="50a9d4b198689cf8d48772e9b69a7d7d"/></dir><dir name="es_MX"><file name="MercadoPago_Core.csv" hash="124f4eb06508f77d6d2633ed3aa71a91"/></dir><dir name="es_VE"><file name="MercadoPago_Core.csv" hash="9adc7b82ad3f4b0806a07262b087bcc0"/></dir><dir name="pt_BR"><file name="MercadoPago_Core.csv" hash="97e678d6d2305b85fbef672cbd2d3ad5"/></dir></target><target name="mageweb"><dir name="js"><dir name="mercadopago"><file name="jquery-1.11.0.min.js" hash="52d16e147b5346147d0f3269cd4d0f80"/><file name="mercadopago.js" hash="b30b2f4260ed66840f60405e9e4f0757"/><file name="mercadopago_calculator.js" hash="05c76965e58be631fb3a1f5ffe25bdde"/><file name="mercadopago_osc.js" hash="190e0d2aaf0e0957be4a1ea8cc68b1b5"/><file name="tiny.min.js" hash="71bce92ef942b0ac15683f94e1f3e3a5"/><file name="tinyJ.js" hash="3318ec214b9a21fe954ce5675de013f3"/></dir></dir></target><target name="mageskin"><dir name="adminhtml"><dir name="default"><dir name="default"><dir name="mercadopago"><dir name="images"><file name="cards.jpg" hash="53b06cbec7b20d95cdcaaf3b49bd2aa5"/><file name="logo.png" hash="460a0815c67a23da265f42c8bab0842a"/><file name="mercadoenvios.png" hash="006cd6ddfa8e5a19354942f79b659b5e"/></dir><file name="styles.css" hash="cac25e698c010f73dc3af01ef3377320"/></dir></dir></dir></dir><dir name="frontend"><dir name="base"><dir name="default"><dir name="mercadopago"><dir name="css"><file name="style-calculator.css" hash="bf0ceced0fe34d9394b779fff081d86c"/><file name="style-success.css" hash="6e7b8fd0bf1b17a5804b5466e9cd4b89"/><file name="style.css" hash="d47817e60756a817545c483c7584825a"/></dir><dir name="images"><file name="loading.gif" hash="5c43434f066c2fbc4714c768b8f83853"/><file name="logo.png" hash="460a0815c67a23da265f42c8bab0842a"/></dir></dir></dir></dir></dir></target><target name="magelib"><dir name="MercadoPago"><dir name="Lib"><file name="Api.php" hash="7149abfb4a2e07522fd99d2a3934c894"/><file name="RestClient.php" hash="13d49937d6ba8b7e245179c74a762940"/></dir></dir></target><target name="mageetc"><dir name="modules"><file name="MercadoPago_Core.xml" hash="0770f2e1dd0110c2c13a330d3411fd68"/><file name="MercadoPago_MercadoEnvios.xml" hash="f7e8607c78d8b39075eb8f7700691a44"/><file name="MercadoPago_OneStepCheckout.xml" hash="9e05c392d8f00c9604ac9ad748977489"/></dir></target></contents>
172
  <compatible/>
173
  <dependencies><required><php><min>5.4.0</min><max>5.5.37</max></php></required></dependencies>
174
  </package>
skin/frontend/base/default/mercadopago/css/style.css CHANGED
@@ -453,7 +453,7 @@
453
  }
454
 
455
  .banner_checkout_mp {
456
- margin: 21px 0 -8px;
457
  max-width:100%;
458
  max-height:100%;
459
  }
@@ -505,3 +505,21 @@
505
  display: inline-block;
506
  vertical-align: middle;
507
  }
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
453
  }
454
 
455
  .banner_checkout_mp {
456
+ /*margin: 21px 0 -8px;*/
457
  max-width:100%;
458
  max-height:100%;
459
  }
505
  display: inline-block;
506
  vertical-align: middle;
507
  }
508
+
509
+ .sp-methods dd .container-form-list{
510
+ padding: 0;
511
+ border-bottom: 1px solid #f4f4f4;
512
+ padding-bottom: 10px;
513
+ }
514
+
515
+ .container-form-list #mercadopago_checkout_custom_ticket .form-mercadopago{
516
+ margin: 20px;
517
+ }
518
+
519
+ .mercadopago-ticket-options .mercadopago-ticket-option{
520
+ padding: 10px 1px;
521
+ }
522
+
523
+ .mercadopago-ticket-label img{
524
+ margin-right: 10px;
525
+ }