WooCommerce MercadoPago - Version 3.0.14

Version Description

Download this release

Release Info

Developer mercadopago
Plugin Icon 128x128 WooCommerce MercadoPago
Version 3.0.14
Comparing to
See all releases

Code changes from version 3.0.13 to 3.0.14

i18n/languages/woocommerce-mercadopago-es_AR.mo CHANGED
Binary file
i18n/languages/woocommerce-mercadopago-es_AR.po CHANGED
@@ -1068,3 +1068,12 @@ msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
 
 
 
 
 
 
 
 
 
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
1071
+
1072
+ msgid "Do not save my card"
1073
+ msgstr "No guardar mi tarjeta"
1074
+
1075
+ msgid "Custom banner for checkout"
1076
+ msgstr "Customización de banner para checkout"
1077
+
1078
+ msgid "Inform the URL of your banner image. Let blank to use Mercado Pago default."
1079
+ msgstr "Informe la URL de su imagen de banner. Dejar en blanco para usar el valor predeterminado de Mercado Pago."
i18n/languages/woocommerce-mercadopago-es_CL.mo CHANGED
Binary file
i18n/languages/woocommerce-mercadopago-es_CL.po CHANGED
@@ -1068,3 +1068,12 @@ msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
 
 
 
 
 
 
 
 
 
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
1071
+
1072
+ msgid "Do not save my card"
1073
+ msgstr "No guardar mi tarjeta"
1074
+
1075
+ msgid "Custom banner for checkout"
1076
+ msgstr "Customización de banner para checkout"
1077
+
1078
+ msgid "Inform the URL of your banner image. Let blank to use Mercado Pago default."
1079
+ msgstr "Informe la URL de su imagen de banner. Dejar en blanco para usar el valor predeterminado de Mercado Pago."
i18n/languages/woocommerce-mercadopago-es_CO.mo CHANGED
Binary file
i18n/languages/woocommerce-mercadopago-es_CO.po CHANGED
@@ -1068,3 +1068,12 @@ msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
 
 
 
 
 
 
 
 
 
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
1071
+
1072
+ msgid "Do not save my card"
1073
+ msgstr "No guardar mi tarjeta"
1074
+
1075
+ msgid "Custom banner for checkout"
1076
+ msgstr "Customización de banner para checkout"
1077
+
1078
+ msgid "Inform the URL of your banner image. Let blank to use Mercado Pago default."
1079
+ msgstr "Informe la URL de su imagen de banner. Dejar en blanco para usar el valor predeterminado de Mercado Pago."
i18n/languages/woocommerce-mercadopago-es_ES.mo CHANGED
Binary file
i18n/languages/woocommerce-mercadopago-es_ES.po CHANGED
@@ -1068,3 +1068,12 @@ msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
 
 
 
 
 
 
 
 
 
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
1071
+
1072
+ msgid "Do not save my card"
1073
+ msgstr "No guardar mi tarjeta"
1074
+
1075
+ msgid "Custom banner for checkout"
1076
+ msgstr "Customización de banner para checkout"
1077
+
1078
+ msgid "Inform the URL of your banner image. Let blank to use Mercado Pago default."
1079
+ msgstr "Informe la URL de su imagen de banner. Dejar en blanco para usar el valor predeterminado de Mercado Pago."
i18n/languages/woocommerce-mercadopago-es_MX.mo CHANGED
Binary file
i18n/languages/woocommerce-mercadopago-es_MX.po CHANGED
@@ -1068,3 +1068,12 @@ msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
 
 
 
 
 
 
 
 
 
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
1071
+
1072
+ msgid "Do not save my card"
1073
+ msgstr "No guardar mi tarjeta"
1074
+
1075
+ msgid "Custom banner for checkout"
1076
+ msgstr "Customización de banner para checkout"
1077
+
1078
+ msgid "Inform the URL of your banner image. Let blank to use Mercado Pago default."
1079
+ msgstr "Informe la URL de su imagen de banner. Dejar en blanco para usar el valor predeterminado de Mercado Pago."
i18n/languages/woocommerce-mercadopago-es_PE.mo CHANGED
Binary file
i18n/languages/woocommerce-mercadopago-es_PE.po CHANGED
@@ -1068,3 +1068,12 @@ msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
 
 
 
 
 
 
 
 
 
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
1071
+
1072
+ msgid "Do not save my card"
1073
+ msgstr "No guardar mi tarjeta"
1074
+
1075
+ msgid "Custom banner for checkout"
1076
+ msgstr "Customización de banner para checkout"
1077
+
1078
+ msgid "Inform the URL of your banner image. Let blank to use Mercado Pago default."
1079
+ msgstr "Informe la URL de su imagen de banner. Dejar en blanco para usar el valor predeterminado de Mercado Pago."
i18n/languages/woocommerce-mercadopago-es_UY.mo CHANGED
Binary file
i18n/languages/woocommerce-mercadopago-es_UY.po CHANGED
@@ -1068,3 +1068,12 @@ msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
 
 
 
 
 
 
 
 
 
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
1071
+
1072
+ msgid "Do not save my card"
1073
+ msgstr "No guardar mi tarjeta"
1074
+
1075
+ msgid "Custom banner for checkout"
1076
+ msgstr "Customización de banner para checkout"
1077
+
1078
+ msgid "Inform the URL of your banner image. Let blank to use Mercado Pago default."
1079
+ msgstr "Informe la URL de su imagen de banner. Dejar en blanco para usar el valor predeterminado de Mercado Pago."
i18n/languages/woocommerce-mercadopago-es_VE.mo CHANGED
Binary file
i18n/languages/woocommerce-mercadopago-es_VE.po CHANGED
@@ -1068,3 +1068,12 @@ msgstr "Coloque la cantidad de días (de 1 a 30) hasta la expiración del ticket
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
 
 
 
 
 
 
 
 
 
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Tarifa de"
1071
+
1072
+ msgid "Do not save my card"
1073
+ msgstr "No guardar mi tarjeta"
1074
+
1075
+ msgid "Custom banner for checkout"
1076
+ msgstr "Customización de banner para checkout"
1077
+
1078
+ msgid "Inform the URL of your banner image. Let blank to use Mercado Pago default."
1079
+ msgstr "Informe la URL de su imagen de banner. Dejar en blanco para usar el valor predeterminado de Mercado Pago."
i18n/languages/woocommerce-mercadopago-pt_BR.mo CHANGED
Binary file
i18n/languages/woocommerce-mercadopago-pt_BR.po CHANGED
@@ -1068,3 +1068,12 @@ msgstr "Coloca um número de dias (1 a 30) para a validade do boleto."
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Taxa de"
 
 
 
 
 
 
 
 
 
1068
 
1069
  msgid "Fee of"
1070
  msgstr "Taxa de"
1071
+
1072
+ msgid "Do not save my card"
1073
+ msgstr "Não salvar meu cartão"
1074
+
1075
+ msgid "Custom banner for checkout"
1076
+ msgstr "Customização de banner para o checkout"
1077
+
1078
+ msgid "Inform the URL of your banner image. Let blank to use Mercado Pago default."
1079
+ msgstr "Informe a URL da imagem do banner. Deixe em branco para usar o padrão do Mercado Pago."
i18n/languages/woocommerce-mercadopago.pot CHANGED
@@ -1068,3 +1068,12 @@ msgstr ""
1068
 
1069
  msgid "Fee of"
1070
  msgstr ""
 
 
 
 
 
 
 
 
 
1068
 
1069
  msgid "Fee of"
1070
  msgstr ""
1071
+
1072
+ msgid "Do not save my card"
1073
+ msgstr ""
1074
+
1075
+ msgid "Custom banner for checkout"
1076
+ msgstr ""
1077
+
1078
+ msgid "Inform the URL of your banner image. Let blank to use Mercado Pago default."
1079
+ msgstr ""
includes/WC_WooMercadoPago_BasicGateway.php CHANGED
@@ -311,7 +311,12 @@ class WC_WooMercadoPago_BasicGateway extends WC_Payment_Gateway {
311
  'title' => __( 'Discount/Fee by Gateway', 'woocommerce-mercadopago' ),
312
  'type' => 'number',
313
  'description' => __( 'Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts.', 'woocommerce-mercadopago' ),
314
- 'default' => '0'
 
 
 
 
 
315
  ),
316
  'two_cards_mode' => array(
317
  'title' => __( 'Two Cards Mode', 'woocommerce-mercadopago' ),
@@ -652,6 +657,11 @@ class WC_WooMercadoPago_BasicGateway extends WC_Payment_Gateway {
652
 
653
  $order = wc_get_order( $order_id );
654
  $url = $this->create_url( $order );
 
 
 
 
 
655
 
656
  if ( 'modal' == $this->method && $url ) {
657
 
@@ -665,7 +675,7 @@ class WC_WooMercadoPago_BasicGateway extends WC_Payment_Gateway {
665
  <script type="text/javascript">
666
  (function() { $MPC.openCheckout({ url: "' . esc_url( $url ) . '", mode: "modal" }); })();
667
  </script>';
668
- $html .= '<img width="468" height="60" src="' . $this->site_data['checkout_banner'] . '">';
669
  $html .= '<p></p><p>' . wordwrap(
670
  __( 'Thank you for your order. Please, proceed with your payment clicking in the bellow button.', 'woocommerce-mercadopago' ),
671
  60, '<br>'
@@ -683,7 +693,7 @@ class WC_WooMercadoPago_BasicGateway extends WC_Payment_Gateway {
683
  $this->write_log( __FUNCTION__, 'embedding Mercado Pago iframe.' );
684
 
685
  // ===== The checkout is made by rendering Mercado Pago form within a iframe =====
686
- $html = '<img width="468" height="60" src="' . $this->site_data['checkout_banner'] . '">';
687
  $html .= '<p></p><p>' . wordwrap(
688
  __( 'Thank you for your order. Proceed with your payment completing the following information.', 'woocommerce-mercadopago' ),
689
  60, '<br>'
311
  'title' => __( 'Discount/Fee by Gateway', 'woocommerce-mercadopago' ),
312
  'type' => 'number',
313
  'description' => __( 'Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts.', 'woocommerce-mercadopago' ),
314
+ 'default' => '0',
315
+ 'custom_attributes' => array(
316
+ 'step' => '0.01',
317
+ 'min' => '-99',
318
+ 'max' => '99'
319
+ )
320
  ),
321
  'two_cards_mode' => array(
322
  'title' => __( 'Two Cards Mode', 'woocommerce-mercadopago' ),
657
 
658
  $order = wc_get_order( $order_id );
659
  $url = $this->create_url( $order );
660
+
661
+ $banner_url = get_option( '_mp_custom_banner' );
662
+ if ( ! isset( $banner_url ) || empty( $banner_url ) ) {
663
+ $banner_url = $this->site_data['checkout_banner'];
664
+ }
665
 
666
  if ( 'modal' == $this->method && $url ) {
667
 
675
  <script type="text/javascript">
676
  (function() { $MPC.openCheckout({ url: "' . esc_url( $url ) . '", mode: "modal" }); })();
677
  </script>';
678
+ $html .= '<img width="468" height="60" src="' . $banner_url . '">';
679
  $html .= '<p></p><p>' . wordwrap(
680
  __( 'Thank you for your order. Please, proceed with your payment clicking in the bellow button.', 'woocommerce-mercadopago' ),
681
  60, '<br>'
693
  $this->write_log( __FUNCTION__, 'embedding Mercado Pago iframe.' );
694
 
695
  // ===== The checkout is made by rendering Mercado Pago form within a iframe =====
696
+ $html = '<img width="468" height="60" src="' . $banner_url . '">';
697
  $html .= '<p></p><p>' . wordwrap(
698
  __( 'Thank you for your order. Proceed with your payment completing the following information.', 'woocommerce-mercadopago' ),
699
  60, '<br>'
includes/WC_WooMercadoPago_CustomGateway.php CHANGED
@@ -207,7 +207,12 @@ class WC_WooMercadoPago_CustomGateway extends WC_Payment_Gateway {
207
  'title' => __( 'Discount/Fee by Gateway', 'woocommerce-mercadopago' ),
208
  'type' => 'number',
209
  'description' => __( 'Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts.', 'woocommerce-mercadopago' ),
210
- 'default' => '0'
 
 
 
 
 
211
  )
212
  );
213
 
@@ -492,6 +497,11 @@ class WC_WooMercadoPago_CustomGateway extends WC_Payment_Gateway {
492
  $currency_ratio = WC_Woo_Mercado_Pago_Module::get_conversion_rate( $this->site_data['currency'] );
493
  $currency_ratio = $currency_ratio > 0 ? $currency_ratio : 1;
494
  }
 
 
 
 
 
495
 
496
  $parameters = array(
497
  'amount' => $amount,
@@ -503,7 +513,7 @@ class WC_WooMercadoPago_CustomGateway extends WC_Payment_Gateway {
503
  'payer_email' => $logged_user_email,
504
  // ===
505
  'images_path' => plugins_url( 'assets/images/', plugin_dir_path( __FILE__ ) ),
506
- 'banner_path' => $this->site_data['checkout_banner_custom'],
507
  'customer_cards' => isset( $customer ) ? ( isset( $customer['cards'] ) ? $customer['cards'] : array() ) : array(),
508
  'customerId' => isset( $customer ) ? ( isset( $customer['id'] ) ? $customer['id'] : null ) : null,
509
  'currency_ratio' => $currency_ratio,
@@ -553,6 +563,22 @@ class WC_WooMercadoPago_CustomGateway extends WC_Payment_Gateway {
553
  isset( $custom_checkout['installments'] ) && ! empty( $custom_checkout['installments'] ) &&
554
  $custom_checkout['installments'] != -1 ) {
555
  $response = $this->create_url( $order, $custom_checkout );
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
556
  if ( array_key_exists( 'status', $response ) ) {
557
  switch ( $response['status'] ) {
558
  case 'approved':
@@ -1295,7 +1321,14 @@ class WC_WooMercadoPago_CustomGateway extends WC_Payment_Gateway {
1295
  $order->add_order_note(
1296
  'Mercado Pago: ' . __( 'Payment approved.', 'woocommerce-mercadopago' )
1297
  );
1298
- $this->check_and_save_customer_card( $data );
 
 
 
 
 
 
 
1299
  $order->payment_complete();
1300
  $order->update_status(
1301
  WC_Woo_Mercado_Pago_Module::get_wc_status_for_mp_status( 'approved' )
207
  'title' => __( 'Discount/Fee by Gateway', 'woocommerce-mercadopago' ),
208
  'type' => 'number',
209
  'description' => __( 'Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts.', 'woocommerce-mercadopago' ),
210
+ 'default' => '0',
211
+ 'custom_attributes' => array(
212
+ 'step' => '0.01',
213
+ 'min' => '-99',
214
+ 'max' => '99'
215
+ )
216
  )
217
  );
218
 
497
  $currency_ratio = WC_Woo_Mercado_Pago_Module::get_conversion_rate( $this->site_data['currency'] );
498
  $currency_ratio = $currency_ratio > 0 ? $currency_ratio : 1;
499
  }
500
+
501
+ $banner_url = get_option( '_mp_custom_banner' );
502
+ if ( ! isset( $banner_url ) || empty( $banner_url ) ) {
503
+ $banner_url = $this->site_data['checkout_banner_custom'];
504
+ }
505
 
506
  $parameters = array(
507
  'amount' => $amount,
513
  'payer_email' => $logged_user_email,
514
  // ===
515
  'images_path' => plugins_url( 'assets/images/', plugin_dir_path( __FILE__ ) ),
516
+ 'banner_path' => $banner_url,
517
  'customer_cards' => isset( $customer ) ? ( isset( $customer['cards'] ) ? $customer['cards'] : array() ) : array(),
518
  'customerId' => isset( $customer ) ? ( isset( $customer['id'] ) ? $customer['id'] : null ) : null,
519
  'currency_ratio' => $currency_ratio,
563
  isset( $custom_checkout['installments'] ) && ! empty( $custom_checkout['installments'] ) &&
564
  $custom_checkout['installments'] != -1 ) {
565
  $response = $this->create_url( $order, $custom_checkout );
566
+ // Check for card save.
567
+ if ( method_exists( $order, 'update_meta_data' ) ) {
568
+ if ( isset( $custom_checkout['doNotSaveCard'] ) ) {
569
+ $order->update_meta_data( '_save_card', 'no' );
570
+ } else {
571
+ $order->update_meta_data( '_save_card', 'yes' );
572
+ }
573
+ $order->save();
574
+ } else {
575
+ if ( isset( $custom_checkout['doNotSaveCard'] ) ) {
576
+ update_post_meta( $order_id, '_save_card', 'no' );
577
+ } else {
578
+ update_post_meta( $order_id, '_save_card', 'yes' );
579
+ }
580
+ }
581
+ // Switch on response.
582
  if ( array_key_exists( 'status', $response ) ) {
583
  switch ( $response['status'] ) {
584
  case 'approved':
1321
  $order->add_order_note(
1322
  'Mercado Pago: ' . __( 'Payment approved.', 'woocommerce-mercadopago' )
1323
  );
1324
+ // Check if we can save the customer card.
1325
+ $save_card = ( method_exists( $order, 'get_meta' ) ) ?
1326
+ $order->get_meta( '_save_card' ) :
1327
+ get_post_meta( $order->id, '_save_card', true );
1328
+ if ( $save_card === 'yes' ) {
1329
+ $this->write_log( __FUNCTION__, 'Saving customer card: ' . json_encode( $data['card'], JSON_PRETTY_PRINT ) );
1330
+ $this->check_and_save_customer_card( $data );
1331
+ }
1332
  $order->payment_complete();
1333
  $order->update_status(
1334
  WC_Woo_Mercado_Pago_Module::get_wc_status_for_mp_status( 'approved' )
includes/WC_WooMercadoPago_SubscriptionGateway.php CHANGED
@@ -304,7 +304,12 @@ class WC_WooMercadoPago_SubscriptionGateway extends WC_Payment_Gateway {
304
  'title' => __( 'Discount/Fee by Gateway', 'woocommerce-mercadopago' ),
305
  'type' => 'number',
306
  'description' => __( 'Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts.', 'woocommerce-mercadopago' ),
307
- 'default' => '0'
 
 
 
 
 
308
  )
309
  );
310
 
@@ -547,6 +552,11 @@ class WC_WooMercadoPago_SubscriptionGateway extends WC_Payment_Gateway {
547
 
548
  $order = wc_get_order( $order_id );
549
  $url = $this->create_url( $order );
 
 
 
 
 
550
 
551
  if ( 'modal' == $this->method && $url ) {
552
 
@@ -560,7 +570,7 @@ class WC_WooMercadoPago_SubscriptionGateway extends WC_Payment_Gateway {
560
  <script type="text/javascript">
561
  (function() { $MPC.openCheckout({ url: "' . esc_url( $url ) . '", mode: "modal" }); })();
562
  </script>';
563
- $html = '<img width="468" height="60" src="' . $this->site_data['checkout_banner'] . '">';
564
  $html = '<p></p><p>' . wordwrap(
565
  __( 'Thank you for your order. Please, proceed with your payment clicking in the bellow button.', 'woocommerce-mercadopago' ),
566
  60, '<br>'
@@ -578,7 +588,7 @@ class WC_WooMercadoPago_SubscriptionGateway extends WC_Payment_Gateway {
578
  $this->write_log( __FUNCTION__, 'embedding Mercado Pago iframe.' );
579
 
580
  // ===== The checkout is made by rendering Mercado Pago form within a iframe =====
581
- $html = '<img width="468" height="60" src="' . $this->site_data['checkout_banner'] . '">';
582
  $html = '<p></p><p>' . wordwrap(
583
  __( 'Thank you for your order. Proceed with your payment completing the following information.', 'woocommerce-mercadopago' ),
584
  60, '<br>'
304
  'title' => __( 'Discount/Fee by Gateway', 'woocommerce-mercadopago' ),
305
  'type' => 'number',
306
  'description' => __( 'Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts.', 'woocommerce-mercadopago' ),
307
+ 'default' => '0',
308
+ 'custom_attributes' => array(
309
+ 'step' => '0.01',
310
+ 'min' => '-99',
311
+ 'max' => '99'
312
+ )
313
  )
314
  );
315
 
552
 
553
  $order = wc_get_order( $order_id );
554
  $url = $this->create_url( $order );
555
+
556
+ $banner_url = get_option( '_mp_custom_banner' );
557
+ if ( ! isset( $banner_url ) || empty( $banner_url ) ) {
558
+ $banner_url = $this->site_data['checkout_banner'];
559
+ }
560
 
561
  if ( 'modal' == $this->method && $url ) {
562
 
570
  <script type="text/javascript">
571
  (function() { $MPC.openCheckout({ url: "' . esc_url( $url ) . '", mode: "modal" }); })();
572
  </script>';
573
+ $html = '<img width="468" height="60" src="' . $banner_url . '">';
574
  $html = '<p></p><p>' . wordwrap(
575
  __( 'Thank you for your order. Please, proceed with your payment clicking in the bellow button.', 'woocommerce-mercadopago' ),
576
  60, '<br>'
588
  $this->write_log( __FUNCTION__, 'embedding Mercado Pago iframe.' );
589
 
590
  // ===== The checkout is made by rendering Mercado Pago form within a iframe =====
591
+ $html = '<img width="468" height="60" src="' . $banner_url . '">';
592
  $html = '<p></p><p>' . wordwrap(
593
  __( 'Thank you for your order. Proceed with your payment completing the following information.', 'woocommerce-mercadopago' ),
594
  60, '<br>'
includes/WC_WooMercadoPago_TicketGateway.php CHANGED
@@ -215,7 +215,12 @@ class WC_WooMercadoPago_TicketGateway extends WC_Payment_Gateway {
215
  'title' => __( 'Discount/Fee by Gateway', 'woocommerce-mercadopago' ),
216
  'type' => 'number',
217
  'description' => __( 'Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts.', 'woocommerce-mercadopago' ),
218
- 'default' => '0'
 
 
 
 
 
219
  )
220
  );
221
 
215
  'title' => __( 'Discount/Fee by Gateway', 'woocommerce-mercadopago' ),
216
  'type' => 'number',
217
  'description' => __( 'Give a percentual (-99 to 99) discount or fee for your customers if they use this payment gateway. Use negative for fees, positive for discounts.', 'woocommerce-mercadopago' ),
218
+ 'default' => '0',
219
+ 'custom_attributes' => array(
220
+ 'step' => '0.01',
221
+ 'min' => '-99',
222
+ 'max' => '99'
223
+ )
224
  )
225
  );
226
 
includes/sdk/lib/mercadopago.php CHANGED
@@ -12,7 +12,7 @@ $GLOBALS['LIB_LOCATION'] = dirname( __FILE__ );
12
 
13
  class MP {
14
 
15
- private $version = '3.0.13';
16
  private $client_id;
17
  private $client_secret;
18
  private $ll_access_token;
12
 
13
  class MP {
14
 
15
+ private $version = '3.0.14';
16
  private $client_id;
17
  private $client_secret;
18
  private $ll_access_token;
readme.txt CHANGED
@@ -4,7 +4,7 @@ Tags: ecommerce, mercadopago, woocommerce
4
  Requires at least: 4.8
5
  Tested up to: 4.8
6
  Requires PHP: 5.6
7
- Stable tag: 3.0.13
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
@@ -215,6 +215,12 @@ Features: LatAm Basic Checkout support. Great for merchants who want to get goin
215
 
216
  == Changelog ==
217
 
 
 
 
 
 
 
218
  = v3.0.13 (01/03/2018) =
219
  * Bug fixes
220
  - Fixed a bug in modal window for Basic Checkout.
4
  Requires at least: 4.8
5
  Tested up to: 4.8
6
  Requires PHP: 5.6
7
+ Stable tag: 3.0.14
8
  License: GPLv2 or later
9
  License URI: https://www.gnu.org/licenses/gpl-2.0.html
10
 
215
 
216
  == Changelog ==
217
 
218
+ = v3.0.14 (13/03/2018) =
219
+ * Improvements
220
+ - Discount and fee by gateway accepts two leading zeros after decimal point;
221
+ - Customers now have the option to not save their credit cards;
222
+ - Checkout banner is now customizable.
223
+
224
  = v3.0.13 (01/03/2018) =
225
  * Bug fixes
226
  - Fixed a bug in modal window for Basic Checkout.
templates/credit-card/payment-form.php CHANGED
@@ -279,6 +279,13 @@ if ( 'Twenty Seventeen' == $theme->name || 'Twenty Seventeen' == $theme->parent_
279
  <div id="mp-tax-cft-text"></div>
280
  </div>
281
  </div>
 
 
 
 
 
 
 
282
 
283
  <div class="mp-box-inputs mp-line" style="padding:0px 12px 0px 12px;">
284
  <!-- NOT DELETE LOADING-->
279
  <div id="mp-tax-cft-text"></div>
280
  </div>
281
  </div>
282
+
283
+ <div style="padding:0px 12px 0px 12px;">
284
+ <label for="saveCard" class="show_if_simple tips" style="display: inline;">
285
+ <input type="checkbox" name="mercadopago_custom[doNotSaveCard]" id="doNotSaveCard" value="yes">
286
+ <?php echo esc_html__( 'Do not save my card', 'woocommerce-mercadopago' ); ?>
287
+ </label>
288
+ </div>
289
 
290
  <div class="mp-box-inputs mp-line" style="padding:0px 12px 0px 12px;">
291
  <!-- NOT DELETE LOADING-->
templates/mp_main_settings.php CHANGED
@@ -299,6 +299,17 @@
299
  </p>
300
  </td>
301
  </tr>
 
 
 
 
 
 
 
 
 
 
 
302
  <tr>
303
  <th scope="row"><label><?php echo __( 'Custom URL for IPN', 'woocommerce-mercadopago' ); ?></label></th>
304
  <td>
299
  </p>
300
  </td>
301
  </tr>
302
+ <tr>
303
+ <th scope="row"><label><?php echo __( 'Custom banner for checkout', 'woocommerce-mercadopago' ); ?></label></th>
304
+ <td>
305
+ <input name="custom_banner" type="text" id="custom_banner" aria-describedby="tagline-description" value="<?php echo $custom_banner; ?>" class="regular-text"/>
306
+ <p class="description" id="tagline-description">
307
+ <?php echo esc_html(
308
+ __( 'Inform the URL of your banner image. Let blank to use Mercado Pago default.', 'woocommerce-mercadopago' )
309
+ ); ?>
310
+ </p>
311
+ </td>
312
+ </tr>
313
  <tr>
314
  <th scope="row"><label><?php echo __( 'Custom URL for IPN', 'woocommerce-mercadopago' ); ?></label></th>
315
  <td>
woocommerce-mercadopago.php CHANGED
@@ -3,7 +3,7 @@
3
  * Plugin Name: WooCommerce MercadoPago
4
  * Plugin URI: https://github.com/mercadopago/cart-woocommerce
5
  * Description: This is the <strong>oficial</strong> module of Mercado Pago for WooCommerce plugin. This module enables WooCommerce to use Mercado Pago as a payment Gateway for purchases made in your e-commerce store.
6
- * Version: 3.0.13
7
  * Author: Mercado Pago
8
  * Author URI: https://www.mercadopago.com.br/developers/
9
  * Text Domain: woocommerce-mercadopago
@@ -106,7 +106,7 @@ if ( ! class_exists( 'WC_Woo_Mercado_Pago_Module' ) ) :
106
  // ============================================================
107
 
108
  // General constants.
109
- const VERSION = '3.0.13';
110
  const MIN_PHP = 5.6;
111
 
112
  // Arrays to hold configurations for LatAm environment.
@@ -1018,6 +1018,11 @@ if ( ! class_exists( 'WC_Woo_Mercado_Pago_Module' ) ) :
1018
  } else {
1019
  update_option( '_mp_store_identificator', '', true );
1020
  }
 
 
 
 
 
1021
  if ( isset( $_POST['custom_domain'] ) ) {
1022
  update_option( '_mp_custom_domain', $_POST['custom_domain'], true );
1023
  } else {
@@ -1113,6 +1118,8 @@ if ( ! class_exists( 'WC_Woo_Mercado_Pago_Module' ) ) :
1113
  // Store identification.
1114
  $store_identificator = get_option( '_mp_store_identificator', 'WC-' );
1115
  // Custom domain for IPN.
 
 
1116
  $custom_domain = get_option( '_mp_custom_domain', '' );
1117
  if ( ! empty( $custom_domain ) && filter_var( $custom_domain, FILTER_VALIDATE_URL ) === FALSE ) {
1118
  $custom_domain_message = '<img width="14" height="14" src="' . plugins_url( 'assets/images/warning.png', __FILE__ ) . '"> ' .
3
  * Plugin Name: WooCommerce MercadoPago
4
  * Plugin URI: https://github.com/mercadopago/cart-woocommerce
5
  * Description: This is the <strong>oficial</strong> module of Mercado Pago for WooCommerce plugin. This module enables WooCommerce to use Mercado Pago as a payment Gateway for purchases made in your e-commerce store.
6
+ * Version: 3.0.14
7
  * Author: Mercado Pago
8
  * Author URI: https://www.mercadopago.com.br/developers/
9
  * Text Domain: woocommerce-mercadopago
106
  // ============================================================
107
 
108
  // General constants.
109
+ const VERSION = '3.0.14';
110
  const MIN_PHP = 5.6;
111
 
112
  // Arrays to hold configurations for LatAm environment.
1018
  } else {
1019
  update_option( '_mp_store_identificator', '', true );
1020
  }
1021
+ if ( isset( $_POST['custom_banner'] ) ) {
1022
+ update_option( '_mp_custom_banner', $_POST['custom_banner'], true );
1023
+ } else {
1024
+ update_option( '_mp_custom_banner', '', true );
1025
+ }
1026
  if ( isset( $_POST['custom_domain'] ) ) {
1027
  update_option( '_mp_custom_domain', $_POST['custom_domain'], true );
1028
  } else {
1118
  // Store identification.
1119
  $store_identificator = get_option( '_mp_store_identificator', 'WC-' );
1120
  // Custom domain for IPN.
1121
+ $custom_banner = get_option( '_mp_custom_banner', '' );
1122
+ // Custom domain for IPN.
1123
  $custom_domain = get_option( '_mp_custom_domain', '' );
1124
  if ( ! empty( $custom_domain ) && filter_var( $custom_domain, FILTER_VALIDATE_URL ) === FALSE ) {
1125
  $custom_domain_message = '<img width="14" height="14" src="' . plugins_url( 'assets/images/warning.png', __FILE__ ) . '"> ' .