Version Description
2016/10/24 =
Open MercadoPago Modal when the page load.
Changed notification_url to avoid payment notification issues.
Download this release
Release Info
| Developer | claudiosanches |
| Plugin | |
| Version | 2.0.8 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.7 to 2.0.8
- includes/class-wc-mercadopago-gateway.php +5 -4
- languages/woocommerce-mercadopago.pot +24 -24
- readme.txt +9 -3
- woocommerce-mercadopago.php +2 -2
includes/class-wc-mercadopago-gateway.php
CHANGED
|
@@ -211,7 +211,7 @@ class WC_MercadoPago_Gateway extends WC_Payment_Gateway {
|
|
| 211 |
'back_urls' => array(
|
| 212 |
'success' => $this->get_return_url( $order ),
|
| 213 |
'failure' => $this->get_order_cancel_url( $order ),
|
| 214 |
-
'pending' => $this->get_return_url( $order )
|
| 215 |
),
|
| 216 |
'payer' => array(
|
| 217 |
'name' => $order->billing_first_name,
|
|
@@ -227,7 +227,7 @@ class WC_MercadoPago_Gateway extends WC_Payment_Gateway {
|
|
| 227 |
// 'picture_url' => 'https://www.mercadopago.com/org-img/MP3/home/logomp3.gif'
|
| 228 |
)
|
| 229 |
),
|
| 230 |
-
'notification_url' => WC()->api_request_url( 'WC_MercadoPago_Gateway' )
|
| 231 |
);
|
| 232 |
|
| 233 |
// Cart Contents.
|
|
@@ -327,10 +327,11 @@ class WC_MercadoPago_Gateway extends WC_Payment_Gateway {
|
|
| 327 |
// Display checkout.
|
| 328 |
$html = '<p>' . __( 'Thank you for your order, please click the button below to pay with MercadoPago.', 'woocommerce-mercadopago' ) . '</p>';
|
| 329 |
|
| 330 |
-
$html .= '<a id="submit-payment" href="' . $url . '" name="MP-Checkout" class="button alt" mp-mode="modal">' . __( 'Pay via MercadoPago', 'woocommerce-mercadopago' ) . '</a> <a class="button cancel" href="' . esc_url( $order->get_cancel_order_url() ) . '">' . __( 'Cancel order & restore cart', 'woocommerce-mercadopago' ) . '</a>';
|
| 331 |
|
| 332 |
// Add MercadoPago JS.
|
| 333 |
-
$html .= '<script type="text/javascript"
|
|
|
|
| 334 |
|
| 335 |
return $html;
|
| 336 |
} else {
|
| 211 |
'back_urls' => array(
|
| 212 |
'success' => $this->get_return_url( $order ),
|
| 213 |
'failure' => $this->get_order_cancel_url( $order ),
|
| 214 |
+
'pending' => $this->get_return_url( $order ),
|
| 215 |
),
|
| 216 |
'payer' => array(
|
| 217 |
'name' => $order->billing_first_name,
|
| 227 |
// 'picture_url' => 'https://www.mercadopago.com/org-img/MP3/home/logomp3.gif'
|
| 228 |
)
|
| 229 |
),
|
| 230 |
+
'notification_url' => str_replace( 'https:', 'http:', WC()->api_request_url( 'WC_MercadoPago_Gateway' ) ),
|
| 231 |
);
|
| 232 |
|
| 233 |
// Cart Contents.
|
| 327 |
// Display checkout.
|
| 328 |
$html = '<p>' . __( 'Thank you for your order, please click the button below to pay with MercadoPago.', 'woocommerce-mercadopago' ) . '</p>';
|
| 329 |
|
| 330 |
+
$html .= '<a id="submit-payment" href="' . esc_url( $url ) . '" name="MP-Checkout" class="button alt" mp-mode="modal">' . __( 'Pay via MercadoPago', 'woocommerce-mercadopago' ) . '</a> <a class="button cancel" href="' . esc_url( $order->get_cancel_order_url() ) . '">' . __( 'Cancel order & restore cart', 'woocommerce-mercadopago' ) . '</a>';
|
| 331 |
|
| 332 |
// Add MercadoPago JS.
|
| 333 |
+
$html .= '<script type="text/javascript" src="//secure.mlstatic.com/mptools/render.js"></script>';
|
| 334 |
+
$html .= '<script type="text/javascript">(function() { $MPC.openCheckout({ url: "' . esc_url( $url ) . '", mode: "modal" }); })();</script>';
|
| 335 |
|
| 336 |
return $html;
|
| 337 |
} else {
|
languages/woocommerce-mercadopago.pot
CHANGED
|
@@ -2,10 +2,10 @@
|
|
| 2 |
# This file is distributed under the GPLv2 or later.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
-
"Project-Id-Version: WooCommerce MercadoPago 2.0.
|
| 6 |
"Report-Msgid-Bugs-To: "
|
| 7 |
"http://wordpress.org/support/plugin/woocommerce-mercadopago/\n"
|
| 8 |
-
"POT-Creation-Date: 2016-10-
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
|
@@ -172,84 +172,84 @@ msgstr ""
|
|
| 172 |
msgid "Cancel order & restore cart"
|
| 173 |
msgstr ""
|
| 174 |
|
| 175 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 176 |
msgid ""
|
| 177 |
"An error has occurred while processing your payment, please try again. Or "
|
| 178 |
"contact us for assistance."
|
| 179 |
msgstr ""
|
| 180 |
|
| 181 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 182 |
msgid "Click to try again"
|
| 183 |
msgstr ""
|
| 184 |
|
| 185 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 186 |
msgid "Missing notification params."
|
| 187 |
msgstr ""
|
| 188 |
|
| 189 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 190 |
msgid "MercadoPago Notification Handler"
|
| 191 |
msgstr ""
|
| 192 |
|
| 193 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 194 |
msgid "MercadoPago Transaction ID"
|
| 195 |
msgstr ""
|
| 196 |
|
| 197 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 198 |
msgid "Payer email"
|
| 199 |
msgstr ""
|
| 200 |
|
| 201 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 202 |
msgid "Payment type"
|
| 203 |
msgstr ""
|
| 204 |
|
| 205 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 206 |
msgid "MercadoPago: Payment approved."
|
| 207 |
msgstr ""
|
| 208 |
|
| 209 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 210 |
msgid "MercadoPago: The user has not completed the payment process yet."
|
| 211 |
msgstr ""
|
| 212 |
|
| 213 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 214 |
msgid "MercadoPago: Payment under review."
|
| 215 |
msgstr ""
|
| 216 |
|
| 217 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 218 |
msgid "MercadoPago: The payment was declined. The user can try again."
|
| 219 |
msgstr ""
|
| 220 |
|
| 221 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 222 |
msgid "MercadoPago: The payment was returned to the user."
|
| 223 |
msgstr ""
|
| 224 |
|
| 225 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 226 |
msgid "MercadoPago: Payment canceled."
|
| 227 |
msgstr ""
|
| 228 |
|
| 229 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 230 |
msgid "MercadoPago: It started a dispute for payment."
|
| 231 |
msgstr ""
|
| 232 |
|
| 233 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 234 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 235 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 236 |
msgid "MercadoPago Disabled"
|
| 237 |
msgstr ""
|
| 238 |
|
| 239 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 240 |
msgid "You should inform your Client_id. %s"
|
| 241 |
msgstr ""
|
| 242 |
|
| 243 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 244 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 245 |
msgid "Click here to configure!"
|
| 246 |
msgstr ""
|
| 247 |
|
| 248 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 249 |
msgid "You should inform your Client_secret. %s"
|
| 250 |
msgstr ""
|
| 251 |
|
| 252 |
-
#: includes/class-wc-mercadopago-gateway.php:
|
| 253 |
msgid ""
|
| 254 |
"Currency <code>%s</code> is not supported. Please make sure that you use "
|
| 255 |
"one of the following supported currencies: ARS, BRL, COP, MXN, USD or VEF."
|
| 2 |
# This file is distributed under the GPLv2 or later.
|
| 3 |
msgid ""
|
| 4 |
msgstr ""
|
| 5 |
+
"Project-Id-Version: WooCommerce MercadoPago 2.0.8\n"
|
| 6 |
"Report-Msgid-Bugs-To: "
|
| 7 |
"http://wordpress.org/support/plugin/woocommerce-mercadopago/\n"
|
| 8 |
+
"POT-Creation-Date: 2016-10-25 01:01:58+00:00\n"
|
| 9 |
"MIME-Version: 1.0\n"
|
| 10 |
"Content-Type: text/plain; charset=utf-8\n"
|
| 11 |
"Content-Transfer-Encoding: 8bit\n"
|
| 172 |
msgid "Cancel order & restore cart"
|
| 173 |
msgstr ""
|
| 174 |
|
| 175 |
+
#: includes/class-wc-mercadopago-gateway.php:339
|
| 176 |
msgid ""
|
| 177 |
"An error has occurred while processing your payment, please try again. Or "
|
| 178 |
"contact us for assistance."
|
| 179 |
msgstr ""
|
| 180 |
|
| 181 |
+
#: includes/class-wc-mercadopago-gateway.php:341
|
| 182 |
msgid "Click to try again"
|
| 183 |
msgstr ""
|
| 184 |
|
| 185 |
+
#: includes/class-wc-mercadopago-gateway.php:523
|
| 186 |
msgid "Missing notification params."
|
| 187 |
msgstr ""
|
| 188 |
|
| 189 |
+
#: includes/class-wc-mercadopago-gateway.php:523
|
| 190 |
msgid "MercadoPago Notification Handler"
|
| 191 |
msgstr ""
|
| 192 |
|
| 193 |
+
#: includes/class-wc-mercadopago-gateway.php:557
|
| 194 |
msgid "MercadoPago Transaction ID"
|
| 195 |
msgstr ""
|
| 196 |
|
| 197 |
+
#: includes/class-wc-mercadopago-gateway.php:564
|
| 198 |
msgid "Payer email"
|
| 199 |
msgstr ""
|
| 200 |
|
| 201 |
+
#: includes/class-wc-mercadopago-gateway.php:571
|
| 202 |
msgid "Payment type"
|
| 203 |
msgstr ""
|
| 204 |
|
| 205 |
+
#: includes/class-wc-mercadopago-gateway.php:577
|
| 206 |
msgid "MercadoPago: Payment approved."
|
| 207 |
msgstr ""
|
| 208 |
|
| 209 |
+
#: includes/class-wc-mercadopago-gateway.php:582
|
| 210 |
msgid "MercadoPago: The user has not completed the payment process yet."
|
| 211 |
msgstr ""
|
| 212 |
|
| 213 |
+
#: includes/class-wc-mercadopago-gateway.php:586
|
| 214 |
msgid "MercadoPago: Payment under review."
|
| 215 |
msgstr ""
|
| 216 |
|
| 217 |
+
#: includes/class-wc-mercadopago-gateway.php:590
|
| 218 |
msgid "MercadoPago: The payment was declined. The user can try again."
|
| 219 |
msgstr ""
|
| 220 |
|
| 221 |
+
#: includes/class-wc-mercadopago-gateway.php:594
|
| 222 |
msgid "MercadoPago: The payment was returned to the user."
|
| 223 |
msgstr ""
|
| 224 |
|
| 225 |
+
#: includes/class-wc-mercadopago-gateway.php:598
|
| 226 |
msgid "MercadoPago: Payment canceled."
|
| 227 |
msgstr ""
|
| 228 |
|
| 229 |
+
#: includes/class-wc-mercadopago-gateway.php:602
|
| 230 |
msgid "MercadoPago: It started a dispute for payment."
|
| 231 |
msgstr ""
|
| 232 |
|
| 233 |
+
#: includes/class-wc-mercadopago-gateway.php:633
|
| 234 |
+
#: includes/class-wc-mercadopago-gateway.php:642
|
| 235 |
+
#: includes/class-wc-mercadopago-gateway.php:651
|
| 236 |
msgid "MercadoPago Disabled"
|
| 237 |
msgstr ""
|
| 238 |
|
| 239 |
+
#: includes/class-wc-mercadopago-gateway.php:633
|
| 240 |
msgid "You should inform your Client_id. %s"
|
| 241 |
msgstr ""
|
| 242 |
|
| 243 |
+
#: includes/class-wc-mercadopago-gateway.php:633
|
| 244 |
+
#: includes/class-wc-mercadopago-gateway.php:642
|
| 245 |
msgid "Click here to configure!"
|
| 246 |
msgstr ""
|
| 247 |
|
| 248 |
+
#: includes/class-wc-mercadopago-gateway.php:642
|
| 249 |
msgid "You should inform your Client_secret. %s"
|
| 250 |
msgstr ""
|
| 251 |
|
| 252 |
+
#: includes/class-wc-mercadopago-gateway.php:651
|
| 253 |
msgid ""
|
| 254 |
"Currency <code>%s</code> is not supported. Please make sure that you use "
|
| 255 |
"one of the following supported currencies: ARS, BRL, COP, MXN, USD or VEF."
|
readme.txt
CHANGED
|
@@ -4,7 +4,7 @@ Donate link: http://claudiosmweb.com/doacoes/
|
|
| 4 |
Tags: woocommerce, mercadopago, payment
|
| 5 |
Requires at least: 4.0
|
| 6 |
Tested up to: 4.6
|
| 7 |
-
Stable tag: 2.0.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -201,6 +201,11 @@ Entre em contato [clicando aqui](http://claudiosmweb.com/plugins/mercadopago-par
|
|
| 201 |
|
| 202 |
== Changelog ==
|
| 203 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 204 |
= 2.0.7 - 2016/10/21 =
|
| 205 |
|
| 206 |
* Improve MercadoPago Modal z-index to avoid issues with any theme.
|
|
@@ -240,6 +245,7 @@ Entre em contato [clicando aqui](http://claudiosmweb.com/plugins/mercadopago-par
|
|
| 240 |
|
| 241 |
== Upgrade Notice ==
|
| 242 |
|
| 243 |
-
= 2.0.
|
| 244 |
|
| 245 |
-
*
|
|
|
| 4 |
Tags: woocommerce, mercadopago, payment
|
| 5 |
Requires at least: 4.0
|
| 6 |
Tested up to: 4.6
|
| 7 |
+
Stable tag: 2.0.8
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 201 |
|
| 202 |
== Changelog ==
|
| 203 |
|
| 204 |
+
= 2.0.8 - 2016/10/24 =
|
| 205 |
+
|
| 206 |
+
* Open MercadoPago Modal when the page load.
|
| 207 |
+
* Changed notification_url to avoid payment notification issues.
|
| 208 |
+
|
| 209 |
= 2.0.7 - 2016/10/21 =
|
| 210 |
|
| 211 |
* Improve MercadoPago Modal z-index to avoid issues with any theme.
|
| 245 |
|
| 246 |
== Upgrade Notice ==
|
| 247 |
|
| 248 |
+
= 2.0.8 =
|
| 249 |
|
| 250 |
+
* Open MercadoPago Modal when the page load.
|
| 251 |
+
* Changed notification_url to avoid payment notification issues.
|
woocommerce-mercadopago.php
CHANGED
|
@@ -5,7 +5,7 @@
|
|
| 5 |
* Description: MercadoPago gateway for Woocommerce.
|
| 6 |
* Author: Claudio Sanches
|
| 7 |
* Author URI: http://claudiosmweb.com/
|
| 8 |
-
* Version: 2.0.
|
| 9 |
* License: GPLv2 or later
|
| 10 |
* Text Domain: woocommerce-mercadopago
|
| 11 |
* Domain Path: /languages/
|
|
@@ -27,7 +27,7 @@ class WC_MercadoPago {
|
|
| 27 |
*
|
| 28 |
* @var string
|
| 29 |
*/
|
| 30 |
-
const VERSION = '2.0.
|
| 31 |
|
| 32 |
/**
|
| 33 |
* Instance of this class.
|
| 5 |
* Description: MercadoPago gateway for Woocommerce.
|
| 6 |
* Author: Claudio Sanches
|
| 7 |
* Author URI: http://claudiosmweb.com/
|
| 8 |
+
* Version: 2.0.8
|
| 9 |
* License: GPLv2 or later
|
| 10 |
* Text Domain: woocommerce-mercadopago
|
| 11 |
* Domain Path: /languages/
|
| 27 |
*
|
| 28 |
* @var string
|
| 29 |
*/
|
| 30 |
+
const VERSION = '2.0.8';
|
| 31 |
|
| 32 |
/**
|
| 33 |
* Instance of this class.
|
