Version Description
Download this release
Release Info
| Developer | mercadopago |
| Plugin | |
| Version | 6.0.2 |
| Comparing to | |
| See all releases | |
Code changes from version 6.0.1 to 6.0.2
includes/module/config/class-wc-woomercadopago-constants.php
CHANGED
|
@@ -21,7 +21,7 @@ class WC_WooMercadoPago_Constants {
|
|
| 21 |
const PRODUCT_ID_DESKTOP = 'BT7OF5FEOO6G01NJK3QG';
|
| 22 |
const PRODUCT_ID_MOBILE = 'BT7OFH09QS3001K5A0H0';
|
| 23 |
const PLATAFORM_ID = 'bo2hnr2ic4p001kbgpt0';
|
| 24 |
-
const VERSION = '6.0.
|
| 25 |
const MIN_PHP = 5.6;
|
| 26 |
const API_MP_BASE_URL = 'https://api.mercadopago.com';
|
| 27 |
const DATE_EXPIRATION = 3;
|
| 21 |
const PRODUCT_ID_DESKTOP = 'BT7OF5FEOO6G01NJK3QG';
|
| 22 |
const PRODUCT_ID_MOBILE = 'BT7OFH09QS3001K5A0H0';
|
| 23 |
const PLATAFORM_ID = 'bo2hnr2ic4p001kbgpt0';
|
| 24 |
+
const VERSION = '6.0.2';
|
| 25 |
const MIN_PHP = 5.6;
|
| 26 |
const API_MP_BASE_URL = 'https://api.mercadopago.com';
|
| 27 |
const DATE_EXPIRATION = 3;
|
includes/notification/class-wc-woomercadopago-notification-ipn.php
CHANGED
|
@@ -43,7 +43,13 @@ class WC_WooMercadoPago_Notification_IPN extends WC_WooMercadoPago_Notification_
|
|
| 43 |
|
| 44 |
$access_token = $this->mp->get_access_token();
|
| 45 |
if ( 'merchant_order' === $data['topic'] ) {
|
| 46 |
-
$
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 47 |
|
| 48 |
if ( is_wp_error( $ipn_info ) || ( 200 !== $ipn_info['status'] && 201 !== $ipn_info['status'] ) ) {
|
| 49 |
$this->log->write_log( __FUNCTION__, ' IPN merchant_order not found ' . wp_json_encode( $ipn_info, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE ) );
|
| 43 |
|
| 44 |
$access_token = $this->mp->get_access_token();
|
| 45 |
if ( 'merchant_order' === $data['topic'] ) {
|
| 46 |
+
$merchant_order_id = preg_replace( '/[^\d]/', '', $data['id'] );
|
| 47 |
+
|
| 48 |
+
$ipn_info = $this->mp->get(
|
| 49 |
+
'/merchant_orders/' . $merchant_order_id,
|
| 50 |
+
array( 'Authorization' => 'Bearer ' . $access_token ),
|
| 51 |
+
false
|
| 52 |
+
);
|
| 53 |
|
| 54 |
if ( is_wp_error( $ipn_info ) || ( 200 !== $ipn_info['status'] && 201 !== $ipn_info['status'] ) ) {
|
| 55 |
$this->log->write_log( __FUNCTION__, ' IPN merchant_order not found ' . wp_json_encode( $ipn_info, JSON_PRETTY_PRINT | JSON_UNESCAPED_UNICODE ) );
|
includes/notification/class-wc-woomercadopago-notification-webhook.php
CHANGED
|
@@ -63,8 +63,14 @@ class WC_WooMercadoPago_Notification_Webhook extends WC_WooMercadoPago_Notificat
|
|
| 63 |
}
|
| 64 |
} else {
|
| 65 |
if ( 'payment' === $data['type'] ) {
|
|
|
|
| 66 |
$access_token = $this->mp->get_access_token();
|
| 67 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 68 |
|
| 69 |
if ( ! is_wp_error( $payment_info ) && ( 200 === $payment_info['status'] || 201 === $payment_info['status'] ) ) {
|
| 70 |
if ( $payment_info['response'] ) {
|
| 63 |
}
|
| 64 |
} else {
|
| 65 |
if ( 'payment' === $data['type'] ) {
|
| 66 |
+
$payment_id = preg_replace( '/[^\d]/', '', $data['data_id'] );
|
| 67 |
$access_token = $this->mp->get_access_token();
|
| 68 |
+
|
| 69 |
+
$payment_info = $this->mp->get(
|
| 70 |
+
'/v1/payments/' . $payment_id,
|
| 71 |
+
array( 'Authorization' => 'Bearer ' . $access_token ),
|
| 72 |
+
false
|
| 73 |
+
);
|
| 74 |
|
| 75 |
if ( ! is_wp_error( $payment_info ) && ( 200 === $payment_info['status'] || 201 === $payment_info['status'] ) ) {
|
| 76 |
if ( $payment_info['response'] ) {
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Tags: ecommerce, mercadopago, woocommerce
|
|
| 4 |
Requires at least: 4.9.10
|
| 5 |
Tested up to: 5.9
|
| 6 |
Requires PHP: 5.6
|
| 7 |
-
Stable tag: 6.0.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -136,6 +136,10 @@ Check out our <a href="https://www.mercadopago.com.br/developers/pt/plugins_sdks
|
|
| 136 |
|
| 137 |
== Changelog ==
|
| 138 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 139 |
= v6.0.1 (27/06/2022) =
|
| 140 |
* Bug fixes
|
| 141 |
- Added validation to invalid length on cardNumber to not clear or remove fields
|
| 4 |
Requires at least: 4.9.10
|
| 5 |
Tested up to: 5.9
|
| 6 |
Requires PHP: 5.6
|
| 7 |
+
Stable tag: 6.0.2
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: https://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 136 |
|
| 137 |
== Changelog ==
|
| 138 |
|
| 139 |
+
= v6.0.2 (13/07/2022) =
|
| 140 |
+
* Features
|
| 141 |
+
- Added preg_replace for notification external params
|
| 142 |
+
|
| 143 |
= v6.0.1 (27/06/2022) =
|
| 144 |
* Bug fixes
|
| 145 |
- Added validation to invalid length on cardNumber to not clear or remove fields
|
woocommerce-mercadopago.php
CHANGED
|
@@ -3,7 +3,7 @@
|
|
| 3 |
* Plugin Name: Mercado Pago payments for WooCommerce
|
| 4 |
* Plugin URI: https://github.com/mercadopago/cart-woocommerce
|
| 5 |
* Description: Configure the payment options and accept payments with cards, ticket and money of Mercado Pago account.
|
| 6 |
-
* Version: 6.0.
|
| 7 |
* Author: Mercado Pago
|
| 8 |
* Author URI: https://developers.mercadopago.com/
|
| 9 |
* Text Domain: woocommerce-mercadopago
|
| 3 |
* Plugin Name: Mercado Pago payments for WooCommerce
|
| 4 |
* Plugin URI: https://github.com/mercadopago/cart-woocommerce
|
| 5 |
* Description: Configure the payment options and accept payments with cards, ticket and money of Mercado Pago account.
|
| 6 |
+
* Version: 6.0.2
|
| 7 |
* Author: Mercado Pago
|
| 8 |
* Author URI: https://developers.mercadopago.com/
|
| 9 |
* Text Domain: woocommerce-mercadopago
|
