Version Description
Download this release
Release Info
| Developer | mercadopago |
| Plugin | |
| Version | 3.0.17 |
| Comparing to | |
| See all releases | |
Code changes from version 3.0.16 to 3.0.17
- i18n/languages/woocommerce-mercadopago-es_AR.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_CL.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_CO.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_ES.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_MX.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_PE.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_UY.mo +0 -0
- i18n/languages/woocommerce-mercadopago-es_VE.mo +0 -0
- i18n/languages/woocommerce-mercadopago-pt_BR.mo +0 -0
- includes/WC_WooMercadoPago_BasicGateway.php +0 -0
- includes/WC_WooMercadoPago_CustomGateway.php +0 -0
- includes/WC_WooMercadoPago_PSEGateway.php +0 -0
- includes/WC_WooMercadoPago_SubscriptionGateway.php +0 -0
- includes/WC_WooMercadoPago_TicketGateway.php +0 -0
- includes/admin/class-wc-mercadoenvios-admin-orders.php +0 -0
- includes/sdk/lib/cacert.pem +0 -0
- includes/sdk/lib/mercadopago.php +6 -56
- includes/shipment/abstract-wc-mercadoenvios-shipping.php +0 -0
- includes/shipment/class-wc-mercadoenvios-package.php +0 -0
- includes/shipment/class-wc-mercadoenvios-shipping-express.php +0 -0
- includes/shipment/class-wc-mercadoenvios-shipping-normal.php +0 -0
- readme.txt +6 -1
- templates/mp_main_settings.php +0 -0
- templates/pse/pse-form.php +0 -0
- templates/woocommerce-altas.html +0 -0
- woocommerce-mercadopago.php +11 -6
i18n/languages/woocommerce-mercadopago-es_AR.mo
CHANGED
|
File without changes
|
i18n/languages/woocommerce-mercadopago-es_CL.mo
CHANGED
|
File without changes
|
i18n/languages/woocommerce-mercadopago-es_CO.mo
CHANGED
|
File without changes
|
i18n/languages/woocommerce-mercadopago-es_ES.mo
CHANGED
|
File without changes
|
i18n/languages/woocommerce-mercadopago-es_MX.mo
CHANGED
|
File without changes
|
i18n/languages/woocommerce-mercadopago-es_PE.mo
CHANGED
|
File without changes
|
i18n/languages/woocommerce-mercadopago-es_UY.mo
CHANGED
|
File without changes
|
i18n/languages/woocommerce-mercadopago-es_VE.mo
CHANGED
|
File without changes
|
i18n/languages/woocommerce-mercadopago-pt_BR.mo
CHANGED
|
File without changes
|
includes/WC_WooMercadoPago_BasicGateway.php
CHANGED
|
File without changes
|
includes/WC_WooMercadoPago_CustomGateway.php
CHANGED
|
File without changes
|
includes/WC_WooMercadoPago_PSEGateway.php
CHANGED
|
File without changes
|
includes/WC_WooMercadoPago_SubscriptionGateway.php
CHANGED
|
File without changes
|
includes/WC_WooMercadoPago_TicketGateway.php
CHANGED
|
File without changes
|
includes/admin/class-wc-mercadoenvios-admin-orders.php
CHANGED
|
File without changes
|
includes/sdk/lib/cacert.pem
CHANGED
|
File without changes
|
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.
|
| 16 |
private $client_id;
|
| 17 |
private $client_secret;
|
| 18 |
private $ll_access_token;
|
|
@@ -310,55 +310,6 @@ class MP {
|
|
| 310 |
|
| 311 |
//=== CHECKOUT AUXILIARY FUNCTIONS ===
|
| 312 |
|
| 313 |
-
/**
|
| 314 |
-
* Summary: Get information for specific payment.
|
| 315 |
-
* Description: Get information for specific payment.
|
| 316 |
-
* @param int $id
|
| 317 |
-
* @return array( json )
|
| 318 |
-
*/
|
| 319 |
-
public function get_payment_info( $id ) {
|
| 320 |
-
|
| 321 |
-
$uri_prefix = $this->sandbox ? '/sandbox' : '';
|
| 322 |
-
|
| 323 |
-
$request = array(
|
| 324 |
-
'uri' => $uri_prefix.'/collections/notifications/{$id}',
|
| 325 |
-
'params' => array(
|
| 326 |
-
'access_token' => $this->get_access_token()
|
| 327 |
-
)
|
| 328 |
-
);
|
| 329 |
-
|
| 330 |
-
$payment_info = MPRestClient::get( $request, $this->version );
|
| 331 |
-
return $payment_info;
|
| 332 |
-
|
| 333 |
-
}
|
| 334 |
-
|
| 335 |
-
/**
|
| 336 |
-
* Summary: Search payments according to filters, with pagination.
|
| 337 |
-
* Description: Search payments according to filters, with pagination.
|
| 338 |
-
* @param array $filters
|
| 339 |
-
* @param int $offset
|
| 340 |
-
* @param int $limit
|
| 341 |
-
* @return array( json )
|
| 342 |
-
*/
|
| 343 |
-
public function search_payment( $filters, $offset = 0, $limit = 0 ) {
|
| 344 |
-
|
| 345 |
-
$filters['offset'] = $offset;
|
| 346 |
-
$filters['limit'] = $limit;
|
| 347 |
-
|
| 348 |
-
$uri_prefix = $this->sandbox ? '/sandbox' : '';
|
| 349 |
-
|
| 350 |
-
$request = array(
|
| 351 |
-
'uri' => $uri_prefix . '/collections/search',
|
| 352 |
-
'params' => array_merge ( $filters, array(
|
| 353 |
-
'access_token' => $this->get_access_token()
|
| 354 |
-
) )
|
| 355 |
-
);
|
| 356 |
-
|
| 357 |
-
$collection_result = MPRestClient::get( $request, $this->version );
|
| 358 |
-
return $collection_result;
|
| 359 |
-
|
| 360 |
-
}
|
| 361 |
-
|
| 362 |
/**
|
| 363 |
* Summary: Get information for specific authorized payment.
|
| 364 |
* Description: Get information for specific authorized payment.
|
|
@@ -564,14 +515,13 @@ class MP {
|
|
| 564 |
public function refund_payment( $id ) {
|
| 565 |
|
| 566 |
$request = array(
|
| 567 |
-
'uri' => '/
|
| 568 |
'params' => array(
|
| 569 |
'access_token' => $this->get_access_token()
|
| 570 |
-
)
|
| 571 |
-
'data' => '{"status":"refunded"}'
|
| 572 |
);
|
| 573 |
|
| 574 |
-
$response = MPRestClient::
|
| 575 |
return $response;
|
| 576 |
|
| 577 |
}
|
|
@@ -585,7 +535,7 @@ class MP {
|
|
| 585 |
public function partial_refund_payment( $id, $amount, $reason, $external_reference ) {
|
| 586 |
|
| 587 |
$request = array(
|
| 588 |
-
'uri' => '/
|
| 589 |
'data' => array(
|
| 590 |
'amount' => $amount,
|
| 591 |
'metadata' => array(
|
|
@@ -609,7 +559,7 @@ class MP {
|
|
| 609 |
public function cancel_payment( $id ) {
|
| 610 |
|
| 611 |
$request = array(
|
| 612 |
-
'uri' => '/
|
| 613 |
'params' => array(
|
| 614 |
'access_token' => $this->get_access_token()
|
| 615 |
),
|
| 12 |
|
| 13 |
class MP {
|
| 14 |
|
| 15 |
+
private $version = '3.0.17';
|
| 16 |
private $client_id;
|
| 17 |
private $client_secret;
|
| 18 |
private $ll_access_token;
|
| 310 |
|
| 311 |
//=== CHECKOUT AUXILIARY FUNCTIONS ===
|
| 312 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 313 |
/**
|
| 314 |
* Summary: Get information for specific authorized payment.
|
| 315 |
* Description: Get information for specific authorized payment.
|
| 515 |
public function refund_payment( $id ) {
|
| 516 |
|
| 517 |
$request = array(
|
| 518 |
+
'uri' => '/v1/payments/' . $id. '/refunds',
|
| 519 |
'params' => array(
|
| 520 |
'access_token' => $this->get_access_token()
|
| 521 |
+
)
|
|
|
|
| 522 |
);
|
| 523 |
|
| 524 |
+
$response = MPRestClient::post( $request, $this->version );
|
| 525 |
return $response;
|
| 526 |
|
| 527 |
}
|
| 535 |
public function partial_refund_payment( $id, $amount, $reason, $external_reference ) {
|
| 536 |
|
| 537 |
$request = array(
|
| 538 |
+
'uri' => '/v1/payments/' . $id . '/refunds?access_token=' . $this->get_access_token(),
|
| 539 |
'data' => array(
|
| 540 |
'amount' => $amount,
|
| 541 |
'metadata' => array(
|
| 559 |
public function cancel_payment( $id ) {
|
| 560 |
|
| 561 |
$request = array(
|
| 562 |
+
'uri' => '/v1/payments/' . $id,
|
| 563 |
'params' => array(
|
| 564 |
'access_token' => $this->get_access_token()
|
| 565 |
),
|
includes/shipment/abstract-wc-mercadoenvios-shipping.php
CHANGED
|
File without changes
|
includes/shipment/class-wc-mercadoenvios-package.php
CHANGED
|
File without changes
|
includes/shipment/class-wc-mercadoenvios-shipping-express.php
CHANGED
|
File without changes
|
includes/shipment/class-wc-mercadoenvios-shipping-normal.php
CHANGED
|
File without changes
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Tags: ecommerce, mercadopago, woocommerce
|
|
| 4 |
Requires at least: 4.9.7
|
| 5 |
Tested up to: 4.9.7
|
| 6 |
Requires PHP: 5.6
|
| 7 |
-
Stable tag: 3.0.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -215,6 +215,11 @@ Features: LatAm Basic Checkout support. Great for merchants who want to get goin
|
|
| 215 |
|
| 216 |
== Changelog ==
|
| 217 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 218 |
= v3.0.16 (20/07/2018) =
|
| 219 |
* Feature MCO
|
| 220 |
- Adding PSE gateway for Colombia
|
| 4 |
Requires at least: 4.9.7
|
| 5 |
Tested up to: 4.9.7
|
| 6 |
Requires PHP: 5.6
|
| 7 |
+
Stable tag: 3.0.17
|
| 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.17 (07/08/2018) =
|
| 219 |
+
* Feature All
|
| 220 |
+
- Adding X Product ID
|
| 221 |
+
- Migration from v0 (collections) to v1
|
| 222 |
+
|
| 223 |
= v3.0.16 (20/07/2018) =
|
| 224 |
* Feature MCO
|
| 225 |
- Adding PSE gateway for Colombia
|
templates/mp_main_settings.php
CHANGED
|
File without changes
|
templates/pse/pse-form.php
CHANGED
|
File without changes
|
templates/woocommerce-altas.html
CHANGED
|
File without changes
|
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.
|
| 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.
|
| 110 |
const MIN_PHP = 5.6;
|
| 111 |
|
| 112 |
// Arrays to hold configurations for LatAm environment.
|
|
@@ -961,14 +961,19 @@ if ( ! class_exists( 'WC_Woo_Mercado_Pago_Module' ) ) :
|
|
| 961 |
'<img width="14" height="14" src="' . plugins_url( 'assets/images/error.png', __FILE__ ) . '"> ' .
|
| 962 |
__( 'You don\'t have WooCommerce installed and enabled.', 'woocommerce-mercadopago' );
|
| 963 |
// Creating PHP version message.
|
| 964 |
-
|
| 965 |
-
|
| 966 |
-
|
| 967 |
-
|
|
|
|
|
|
|
|
|
|
| 968 |
sprintf(
|
| 969 |
__( 'Your PHP version do not support this module. You have %s, minimal required is %s.', 'woocommerce-mercadopago' ),
|
| 970 |
phpversion(), WC_Woo_Mercado_Pago_Module::MIN_PHP
|
| 971 |
);
|
|
|
|
|
|
|
| 972 |
// Check cURL.
|
| 973 |
$curl_message = in_array( 'curl', get_loaded_extensions() ) ?
|
| 974 |
'<img width="14" height="14" src="' . plugins_url( 'assets/images/check.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.17
|
| 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.17';
|
| 110 |
const MIN_PHP = 5.6;
|
| 111 |
|
| 112 |
// Arrays to hold configurations for LatAm environment.
|
| 961 |
'<img width="14" height="14" src="' . plugins_url( 'assets/images/error.png', __FILE__ ) . '"> ' .
|
| 962 |
__( 'You don\'t have WooCommerce installed and enabled.', 'woocommerce-mercadopago' );
|
| 963 |
// Creating PHP version message.
|
| 964 |
+
|
| 965 |
+
// Check for PHP version and throw notice.
|
| 966 |
+
$min_php_message = '<img width="14" height="14" src="' . plugins_url( 'assets/images/check.png', __FILE__ ) . '"> ' .
|
| 967 |
+
__( 'Your PHP version is OK.', 'woocommerce-mercadopago' );
|
| 968 |
+
|
| 969 |
+
if ( version_compare( PHP_VERSION, WC_Woo_Mercado_Pago_Module::MIN_PHP, '<=' ) ) {
|
| 970 |
+
$min_php_message = '<img width="14" height="14" src="' . plugins_url( 'assets/images/warning.png', __FILE__ ) . '"> ' .
|
| 971 |
sprintf(
|
| 972 |
__( 'Your PHP version do not support this module. You have %s, minimal required is %s.', 'woocommerce-mercadopago' ),
|
| 973 |
phpversion(), WC_Woo_Mercado_Pago_Module::MIN_PHP
|
| 974 |
);
|
| 975 |
+
}
|
| 976 |
+
|
| 977 |
// Check cURL.
|
| 978 |
$curl_message = in_array( 'curl', get_loaded_extensions() ) ?
|
| 979 |
'<img width="14" height="14" src="' . plugins_url( 'assets/images/check.png', __FILE__ ) . '"> ' .
|
