Version Description
2016/06/21 =
Added support for
notification_url.
Download this release
Release Info
| Developer | claudiosanches |
| Plugin | |
| Version | 2.0.3 |
| Comparing to | |
| See all releases | |
Code changes from version 2.0.1 to 2.0.3
- includes/class-wc-mercadopago-gateway.php +19 -5
- readme.txt +16 -98
- woocommerce-mercadopago.php +3 -3
includes/class-wc-mercadopago-gateway.php
CHANGED
|
@@ -188,19 +188,32 @@ class WC_MercadoPago_Gateway extends WC_Payment_Gateway {
|
|
| 188 |
);
|
| 189 |
}
|
| 190 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 191 |
/**
|
| 192 |
* Generate the payment arguments.
|
| 193 |
*
|
| 194 |
-
* @param
|
| 195 |
*
|
| 196 |
-
* @return array
|
| 197 |
*/
|
| 198 |
public function get_payment_args( $order ) {
|
| 199 |
-
|
| 200 |
$args = array(
|
| 201 |
'back_urls' => array(
|
| 202 |
'success' => esc_url( $this->get_return_url( $order ) ),
|
| 203 |
-
'failure' =>
|
| 204 |
'pending' => esc_url( $this->get_return_url( $order ) )
|
| 205 |
),
|
| 206 |
'payer' => array(
|
|
@@ -216,7 +229,8 @@ class WC_MercadoPago_Gateway extends WC_Payment_Gateway {
|
|
| 216 |
'currency_id' => get_woocommerce_currency(),
|
| 217 |
// 'picture_url' => 'https://www.mercadopago.com/org-img/MP3/home/logomp3.gif'
|
| 218 |
)
|
| 219 |
-
)
|
|
|
|
| 220 |
);
|
| 221 |
|
| 222 |
// Cart Contents.
|
| 188 |
);
|
| 189 |
}
|
| 190 |
|
| 191 |
+
/**
|
| 192 |
+
* Get order cancel URL.
|
| 193 |
+
*
|
| 194 |
+
* @param WC_Order $order
|
| 195 |
+
* @return string
|
| 196 |
+
*/
|
| 197 |
+
protected function get_order_cancel_url( $order ) {
|
| 198 |
+
if ( method_exists( $order, 'get_cancel_order_url_raw' ) ) {
|
| 199 |
+
return $order->get_cancel_order_url_raw();
|
| 200 |
+
}
|
| 201 |
+
|
| 202 |
+
return str_replace( array( '&', '&' ), '&', $order->get_cancel_order_url() );
|
| 203 |
+
}
|
| 204 |
+
|
| 205 |
/**
|
| 206 |
* Generate the payment arguments.
|
| 207 |
*
|
| 208 |
+
* @param WC_Order $order Order data.
|
| 209 |
*
|
| 210 |
+
* @return array Payment arguments.
|
| 211 |
*/
|
| 212 |
public function get_payment_args( $order ) {
|
|
|
|
| 213 |
$args = array(
|
| 214 |
'back_urls' => array(
|
| 215 |
'success' => esc_url( $this->get_return_url( $order ) ),
|
| 216 |
+
'failure' => $this->get_order_cancel_url( $order ),
|
| 217 |
'pending' => esc_url( $this->get_return_url( $order ) )
|
| 218 |
),
|
| 219 |
'payer' => array(
|
| 229 |
'currency_id' => get_woocommerce_currency(),
|
| 230 |
// 'picture_url' => 'https://www.mercadopago.com/org-img/MP3/home/logomp3.gif'
|
| 231 |
)
|
| 232 |
+
),
|
| 233 |
+
'notification_url' => WC()->api_request_url( 'WC_MercadoPago_Gateway' )
|
| 234 |
);
|
| 235 |
|
| 236 |
// Cart Contents.
|
readme.txt
CHANGED
|
@@ -2,9 +2,9 @@
|
|
| 2 |
Contributors: claudiosanches
|
| 3 |
Donate link: http://claudiosmweb.com/doacoes/
|
| 4 |
Tags: woocommerce, mercadopago, payment
|
| 5 |
-
Requires at least:
|
| 6 |
-
Tested up to: 4.
|
| 7 |
-
Stable tag: 2.0.
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
|
@@ -22,10 +22,6 @@ Please notice that WooCommerce must be installed and active.
|
|
| 22 |
|
| 23 |
You can contribute to the source code in our [GitHub](https://github.com/claudiosmweb/woocommerce-mercadopago) page.
|
| 24 |
|
| 25 |
-
= Translate =
|
| 26 |
-
|
| 27 |
-
Translate this plugin in [Transifex](https://www.transifex.com/projects/p/woocommerce-mercadopago/).
|
| 28 |
-
|
| 29 |
### Descrição em Português: ###
|
| 30 |
|
| 31 |
Adicione o MercadoPago como método de pagamento em sua loja WooCommerce.
|
|
@@ -38,7 +34,7 @@ Este plugin foi feito baseado na [documentação oficial do MercadoPago](http://
|
|
| 38 |
|
| 39 |
= Compatibilidade =
|
| 40 |
|
| 41 |
-
Compatível
|
| 42 |
|
| 43 |
= Instalação: =
|
| 44 |
|
|
@@ -52,14 +48,10 @@ Você pode esclarecer suas dúvidas usando:
|
|
| 52 |
* Criando um tópico no [fórum de ajuda do WordPress](http://wordpress.org/support/plugin/woocommerce-mercadopago) (apenas em inglês).
|
| 53 |
* Ou entre em contato com os desenvolvedores do plugin em nossa [página](http://claudiosmweb.com/plugins/mercadopago-para-woocommerce/).
|
| 54 |
|
| 55 |
-
=
|
| 56 |
|
| 57 |
Você pode contribuir com código-fonte em nossa página no [GitHub](https://github.com/claudiosmweb/woocommerce-mercadopago).
|
| 58 |
|
| 59 |
-
= Traduzir =
|
| 60 |
-
|
| 61 |
-
Traduza este plugin no [Transifex](https://www.transifex.com/projects/p/woocommerce-mercadopago/)
|
| 62 |
-
|
| 63 |
== Installation ==
|
| 64 |
|
| 65 |
* Upload plugin files to your plugins folder, or install using WordPress built-in Add New Plugin installer;
|
|
@@ -209,6 +201,14 @@ Entre em contato [clicando aqui](http://claudiosmweb.com/plugins/mercadopago-par
|
|
| 209 |
|
| 210 |
== Changelog ==
|
| 211 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 212 |
= 2.0.1 - 2015/03/12 =
|
| 213 |
|
| 214 |
* Removed the SSL verification for the new MercadoPago standards.
|
|
@@ -221,91 +221,9 @@ Entre em contato [clicando aqui](http://claudiosmweb.com/plugins/mercadopago-par
|
|
| 221 |
* Corrigida as strings de tradução.
|
| 222 |
* Corrigido o link de cancelamento.
|
| 223 |
|
| 224 |
-
= 1.9.0 - 2014/05/17 =
|
| 225 |
-
|
| 226 |
-
* Improved the plugin classes.
|
| 227 |
-
|
| 228 |
-
= 1.8.1 - 2013/12/17 =
|
| 229 |
-
|
| 230 |
-
* Corrigido os parametros da conexão (cURL) que podiam gerar erro (`SSL connection timeout`) em alguns servidores.
|
| 231 |
-
|
| 232 |
-
= 1.8.0 - 2013/12/04 =
|
| 233 |
-
|
| 234 |
-
* Corrigido padrões de código.
|
| 235 |
-
* Removida compatibilidade com versões 1.6.x ou inferiores do WooCommerce.
|
| 236 |
-
* Adicionada compatibilidade com WooCommerce 2.1 ou superior.
|
| 237 |
-
|
| 238 |
-
= 1.7.0 - 2013/11/03 =
|
| 239 |
-
|
| 240 |
-
* Corrigido o textdomain para suportar o padrão do WordPress 3.7.
|
| 241 |
-
* Corrigida verificação que testa se o plugin esta pronto para funcionar ou não (créditos para daigo75).
|
| 242 |
-
* Adicionada compatibilidade com o plugin Currency Switcher for WooCommerce (créditos para daigo75).
|
| 243 |
-
|
| 244 |
-
= 1.6.0 - 2013/07/26 =
|
| 245 |
-
|
| 246 |
-
* Melhoria nas mensagens de status do pedido.
|
| 247 |
-
* Melhoria no código do plugin.
|
| 248 |
-
|
| 249 |
-
= 1.5.0 - 2013/07/26 =
|
| 250 |
-
|
| 251 |
-
* Adicionada tradução para es_ES por [Marcelo Pedra](http://profiles.wordpress.org/kent-brockman)
|
| 252 |
-
* Adicionado o filtro `woocommerce_mercadopago_icon` para a modificação do ícone durante o checkout.
|
| 253 |
-
* Adicionado parâmetro $order no filtro `woocommerce_mercadopago_args`.
|
| 254 |
-
* Melhorias no código.
|
| 255 |
-
|
| 256 |
-
= 1.4.0 - 2013/07/17 =
|
| 257 |
-
|
| 258 |
-
* Melhoria no código.
|
| 259 |
-
* Adicionada opção para pagamento direto ou por janela modal.
|
| 260 |
-
* Adicionada opção de sandbox.
|
| 261 |
-
* Adicionada compatibilidade com o WooCommerce 2.1 ou superior.
|
| 262 |
-
* Atualização das traduções em pt_BR e es_AR.
|
| 263 |
-
|
| 264 |
-
= 1.3.0 - 2013/04/07 =
|
| 265 |
-
|
| 266 |
-
* Correção do retorno automático de dados na versão 2.0.0 ou superior do WooCommerce.
|
| 267 |
-
* Atualização das traduções em pt_BR e es_AR.
|
| 268 |
-
|
| 269 |
-
= 1.2.3 - 2013/03/11 =
|
| 270 |
-
|
| 271 |
-
* Adicionada compatibilidade com as moedas: `MXN`, `USD` e `VEF`.
|
| 272 |
-
|
| 273 |
-
= 1.2.2 - 2013/03/06 =
|
| 274 |
-
|
| 275 |
-
* Corrigida a compatibilidade com WooCommerce 2.0.0 ou mais recente.
|
| 276 |
-
|
| 277 |
-
= 1.2.1 - 2013/02/08 =
|
| 278 |
-
|
| 279 |
-
* Corrigido o hook responsavel por salvar as opções para a versão 2.0 RC do WooCommerce.
|
| 280 |
-
|
| 281 |
-
= 1.2.0 - 2012/12/01 =
|
| 282 |
-
|
| 283 |
-
* Adicionada tradução para es_AR por [Gustavo Coronel](http://profiles.wordpress.org/gcoronel/)
|
| 284 |
-
|
| 285 |
-
= 1.1.1 - 2012/11/30 =
|
| 286 |
-
|
| 287 |
-
* Correção dos logs de erro.
|
| 288 |
-
|
| 289 |
-
= 1.1.0 - 2012/11/30 =
|
| 290 |
-
|
| 291 |
-
* Adicionada opção para logs de erro.
|
| 292 |
-
|
| 293 |
-
= 1.0.0 =
|
| 294 |
-
|
| 295 |
-
* Versão Inicial.
|
| 296 |
-
|
| 297 |
== Upgrade Notice ==
|
| 298 |
|
| 299 |
-
= 2.0.
|
| 300 |
-
|
| 301 |
-
* Removed the SSL verification for the new MercadoPago standards.
|
| 302 |
-
|
| 303 |
-
== License ==
|
| 304 |
-
|
| 305 |
-
WooCommerce MercadoPago is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published
|
| 306 |
-
by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
|
| 307 |
-
|
| 308 |
-
WooCommerce MercadoPago is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
|
| 309 |
-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
|
| 310 |
|
| 311 |
-
|
|
|
| 2 |
Contributors: claudiosanches
|
| 3 |
Donate link: http://claudiosmweb.com/doacoes/
|
| 4 |
Tags: woocommerce, mercadopago, payment
|
| 5 |
+
Requires at least: 4.0
|
| 6 |
+
Tested up to: 4.5
|
| 7 |
+
Stable tag: 2.0.3
|
| 8 |
License: GPLv2 or later
|
| 9 |
License URI: http://www.gnu.org/licenses/gpl-2.0.html
|
| 10 |
|
| 22 |
|
| 23 |
You can contribute to the source code in our [GitHub](https://github.com/claudiosmweb/woocommerce-mercadopago) page.
|
| 24 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 25 |
### Descrição em Português: ###
|
| 26 |
|
| 27 |
Adicione o MercadoPago como método de pagamento em sua loja WooCommerce.
|
| 34 |
|
| 35 |
= Compatibilidade =
|
| 36 |
|
| 37 |
+
Compatível desde a versão 2.1.x até 2.6.x do WooCommerce.
|
| 38 |
|
| 39 |
= Instalação: =
|
| 40 |
|
| 48 |
* Criando um tópico no [fórum de ajuda do WordPress](http://wordpress.org/support/plugin/woocommerce-mercadopago) (apenas em inglês).
|
| 49 |
* Ou entre em contato com os desenvolvedores do plugin em nossa [página](http://claudiosmweb.com/plugins/mercadopago-para-woocommerce/).
|
| 50 |
|
| 51 |
+
= Colaborar =
|
| 52 |
|
| 53 |
Você pode contribuir com código-fonte em nossa página no [GitHub](https://github.com/claudiosmweb/woocommerce-mercadopago).
|
| 54 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 55 |
== Installation ==
|
| 56 |
|
| 57 |
* Upload plugin files to your plugins folder, or install using WordPress built-in Add New Plugin installer;
|
| 201 |
|
| 202 |
== Changelog ==
|
| 203 |
|
| 204 |
+
= 2.0.3 - 2016/06/21 =
|
| 205 |
+
|
| 206 |
+
* Added support for `notification_url`.
|
| 207 |
+
|
| 208 |
+
= 2.0.2 - 2016/06/21 =
|
| 209 |
+
|
| 210 |
+
* Fixed support for WooCommerce 2.6.
|
| 211 |
+
|
| 212 |
= 2.0.1 - 2015/03/12 =
|
| 213 |
|
| 214 |
* Removed the SSL verification for the new MercadoPago standards.
|
| 221 |
* Corrigida as strings de tradução.
|
| 222 |
* Corrigido o link de cancelamento.
|
| 223 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 224 |
== Upgrade Notice ==
|
| 225 |
|
| 226 |
+
= 2.0.3 =
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 227 |
|
| 228 |
+
* Fixed support for WooCommerce 2.6.
|
| 229 |
+
* Added support for `notification_url`.
|
woocommerce-mercadopago.php
CHANGED
|
@@ -3,9 +3,9 @@
|
|
| 3 |
* Plugin Name: WooCommerce MercadoPago
|
| 4 |
* Plugin URI: https://github.com/claudiosmweb/woocommerce-mercadopago
|
| 5 |
* Description: MercadoPago gateway for Woocommerce.
|
| 6 |
-
* Author:
|
| 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.
|
| 3 |
* Plugin Name: WooCommerce MercadoPago
|
| 4 |
* Plugin URI: https://github.com/claudiosmweb/woocommerce-mercadopago
|
| 5 |
* Description: MercadoPago gateway for Woocommerce.
|
| 6 |
+
* Author: Claudio Sanches
|
| 7 |
* Author URI: http://claudiosmweb.com/
|
| 8 |
+
* Version: 2.0.3
|
| 9 |
* License: GPLv2 or later
|
| 10 |
* Text Domain: woocommerce-mercadopago
|
| 11 |
* Domain Path: /languages/
|
| 27 |
*
|
| 28 |
* @var string
|
| 29 |
*/
|
| 30 |
+
const VERSION = '2.0.3';
|
| 31 |
|
| 32 |
/**
|
| 33 |
* Instance of this class.
|
