diff --git a/README.md b/README.md
index 8e75b60..9b0d526 100644
--- a/README.md
+++ b/README.md
@@ -242,12 +242,3 @@ During the sandbox mode tests, you can operate over HTTP, but for homologation y
* **Choose the status when payment was chargeback**: Sets up the order status when payments are chargeback.
* **Choose the status when payment was canceled**: Sets up the order status when payments are canceled.
* **Choose the status when payment was reject**: Sets up the order status when payments are rejected.
-
-
-##Social##
-
-Follow our facebook group and watch our videos
-
diff --git a/README_es.md b/README_es.md
index c71237a..7f66df0 100644
--- a/README_es.md
+++ b/README_es.md
@@ -241,13 +241,3 @@ Puedes obtener tu **Public Key** y **Access Token**, dependiendo de tu país, en
* **Elige el status para ordenes canceladas**: Setea el status de la orden cuando los pagos son cancelados.
* **Elige el status para ordenes rechazadas**: Setea el status de la orden cuando los pagos son rechazados.
-
-
-## social ##
-
-Sigue nuestro grupo de facebook y mira nuestros videos
-
-
diff --git a/README_pt.md b/README_pt.md
index 65b1abb..99a07aa 100644
--- a/README_pt.md
+++ b/README_pt.md
@@ -205,12 +205,4 @@ Para obter seu **Access Token**, acesse o link abaixo de acordo com o seu país:
* Mexico: https://www.mercadopago.com/mlm/account/credentials
* Venezuela: https://www.mercadopago.com/mlv/account/credentials
* Uruguai: https://www.mercadopago.com/mlu/account/credentials
-
-
-##Social##
-
-Você pode participar do nosso grupo no facebook e assistir nossos vídeos no youtube
-
+
\ No newline at end of file
diff --git a/mercadopago/mercadopago.php b/mercadopago/mercadopago.php
index 9835336..f27f38f 100755
--- a/mercadopago/mercadopago.php
+++ b/mercadopago/mercadopago.php
@@ -3,7 +3,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
-* @version 2.1.0
+* @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com
@@ -690,7 +690,7 @@ function makePreferenceV1($cart, $order, $payment_method){
$payment['description'] = $this->vendor->vendor_store_name . " - " . $order['details']['BT']->virtuemart_order_id;
- $payment['transaction_amount'] = (float) number_format($cart->cartPrices['billTotal'], 2);
+ $payment['transaction_amount'] = (float) number_format($cart->cartPrices['billTotal'], 2, '.', '');
$payment['external_reference'] = $order['details']['BT']->virtuemart_order_id;
diff --git a/mercadopago/mercadopago.xml b/mercadopago/mercadopago.xml
index 4c909bd..e5f7e35 100755
--- a/mercadopago/mercadopago.xml
+++ b/mercadopago/mercadopago.xml
@@ -7,7 +7,7 @@
https://mercadopago.com
Copyright (C) 2004-2016 Mercado Pago. All rights reserved.
http://www.gnu.org/licenses/gpl-2.0.html GNU/GPL
- 2.1.0
+ 2.2.0
Mercado Pago
diff --git a/mercadopago/mercadopago/fields/getmercadopago.php b/mercadopago/mercadopago/fields/getmercadopago.php
index 79064a7..a08c65c 100644
--- a/mercadopago/mercadopago/fields/getmercadopago.php
+++ b/mercadopago/mercadopago/fields/getmercadopago.php
@@ -3,7 +3,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
- * @version 2.1.0
+ * @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com
@@ -25,7 +25,7 @@ protected function getInput() {
$html = ' ';
$html .= ' ';
$html .= ' ';
- $html .= ' Module Version: 2.1.0 ';
+ $html .= ' Module Version: 2.2.0 ';
return $html;
}
diff --git a/mercadopago/mercadopago/fields/getmercadopagocategories.php b/mercadopago/mercadopago/fields/getmercadopagocategories.php
index 7c70642..2090516 100644
--- a/mercadopago/mercadopago/fields/getmercadopagocategories.php
+++ b/mercadopago/mercadopago/fields/getmercadopagocategories.php
@@ -3,7 +3,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
- * @version 2.1.0
+ * @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com
diff --git a/mercadopago/mercadopago/fields/getmercadopagocredentialscountry.php b/mercadopago/mercadopago/fields/getmercadopagocredentialscountry.php
index f12f142..0068dda 100644
--- a/mercadopago/mercadopago/fields/getmercadopagocredentialscountry.php
+++ b/mercadopago/mercadopago/fields/getmercadopagocredentialscountry.php
@@ -3,7 +3,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
- * @version 2.1.0
+ * @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com
diff --git a/mercadopago/mercadopago/fields/getmercadopagocredentialscustom.php b/mercadopago/mercadopago/fields/getmercadopagocredentialscustom.php
index f079d27..3264169 100644
--- a/mercadopago/mercadopago/fields/getmercadopagocredentialscustom.php
+++ b/mercadopago/mercadopago/fields/getmercadopagocredentialscustom.php
@@ -3,7 +3,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
- * @version 2.1.0
+ * @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com
diff --git a/mercadopago/mercadopago/fields/getmercadopagopaymentmethods.php b/mercadopago/mercadopago/fields/getmercadopagopaymentmethods.php
index 13e6df7..31d916f 100644
--- a/mercadopago/mercadopago/fields/getmercadopagopaymentmethods.php
+++ b/mercadopago/mercadopago/fields/getmercadopagopaymentmethods.php
@@ -3,7 +3,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
- * @version 2.1.0
+ * @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com
diff --git a/mercadopago/mercadopago/helpers/mercadopago.php b/mercadopago/mercadopago/helpers/mercadopago.php
index f74acef..f393c7e 100644
--- a/mercadopago/mercadopago/helpers/mercadopago.php
+++ b/mercadopago/mercadopago/helpers/mercadopago.php
@@ -3,7 +3,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
- * @version 2.1.0
+ * @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com
diff --git a/mercadopago/mercadopago/lib/mercadopago.php b/mercadopago/mercadopago/lib/mercadopago.php
index 6ea85c8..48b94da 100644
--- a/mercadopago/mercadopago/lib/mercadopago.php
+++ b/mercadopago/mercadopago/lib/mercadopago.php
@@ -99,28 +99,6 @@ public function get_merchant_order($id) {
return $merchant_order;
}
- /**
- * Get information for specific payment
- * @param int $id
- * @return array(json)
- */
- public function get_payment($id) {
- $uri_prefix = $this->sandbox ? "/sandbox" : "";
-
- $request = array(
- "uri" => $uri_prefix."/collections/notifications/{$id}",
- "params" => array(
- "access_token" => $this->get_access_token()
- )
- );
-
- $payment_info = MPRestClient::get($request);
- return $payment_info;
- }
- public function get_payment_info($id) {
- return $this->get_payment($id);
- }
-
/**
* Get information for specific authorized payment
* @param id
@@ -138,46 +116,6 @@ public function get_authorized_payment($id) {
return $authorized_payment_info;
}
- /**
- * Refund accredited payment
- * @param int $id
- * @return array(json)
- */
- public function refund_payment($id) {
- $request = array(
- "uri" => "/collections/{$id}",
- "params" => array(
- "access_token" => $this->get_access_token()
- ),
- "data" => array(
- "status" => "refunded"
- )
- );
-
- $response = MPRestClient::put($request);
- return $response;
- }
-
- /**
- * Cancel pending payment
- * @param int $id
- * @return array(json)
- */
- public function cancel_payment($id) {
- $request = array(
- "uri" => "/collections/{$id}",
- "params" => array(
- "access_token" => $this->get_access_token()
- ),
- "data" => array(
- "status" => "cancelled"
- )
- );
-
- $response = MPRestClient::put($request);
- return $response;
- }
-
/**
* Cancel preapproval payment
* @param int $id
@@ -198,30 +136,6 @@ public function cancel_preapproval_payment($id) {
return $response;
}
- /**
- * Search payments according to filters, with pagination
- * @param array $filters
- * @param int $offset
- * @param int $limit
- * @return array(json)
- */
- public function search_payment($filters, $offset = 0, $limit = 0) {
- $filters["offset"] = $offset;
- $filters["limit"] = $limit;
-
- $uri_prefix = $this->sandbox ? "/sandbox" : "";
-
- $request = array(
- "uri" => $uri_prefix."/collections/search",
- "params" => array_merge ($filters, array(
- "access_token" => $this->get_access_token()
- ))
- );
-
- $collection_result = MPRestClient::get($request);
- return $collection_result;
- }
-
/**
* Create a checkout preference
* @param array $preference
@@ -556,6 +470,11 @@ public function delete($request, $params = null) {
class MPRestClient {
static $check_loop = 0;
const API_BASE_URL = "https://api.mercadopago.com";
+
+ /**
+ *Product Id
+ */
+ const PRODUCT_ID = "BC32CJBU643001OI39C0";
private static function build_request($request) {
if (!extension_loaded ("curl")) {
@@ -572,6 +491,12 @@ private static function build_request($request) {
// Set headers
$headers = array("accept: application/json");
+
+ //set x_product_id
+ if($request["method"] == 'POST'){
+ $header_opt[] = "x-product-id: " . self::PRODUCT_ID;
+ }
+
$json_content = true;
$form_content = false;
$default_content_type = true;
diff --git a/mercadopago/mercadopago/tmpl/mercadopago_checkout_custom.php b/mercadopago/mercadopago/tmpl/mercadopago_checkout_custom.php
index 7585d17..4dbffba 100644
--- a/mercadopago/mercadopago/tmpl/mercadopago_checkout_custom.php
+++ b/mercadopago/mercadopago/tmpl/mercadopago_checkout_custom.php
@@ -6,7 +6,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
- * @version 2.1.0
+ * @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com
diff --git a/mercadopago/mercadopago/tmpl/mercadopago_checkout_custom_ticket.php b/mercadopago/mercadopago/tmpl/mercadopago_checkout_custom_ticket.php
index f2d4358..c9feddb 100644
--- a/mercadopago/mercadopago/tmpl/mercadopago_checkout_custom_ticket.php
+++ b/mercadopago/mercadopago/tmpl/mercadopago_checkout_custom_ticket.php
@@ -6,7 +6,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
- * @version 2.1.0
+ * @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com
diff --git a/mercadopago/mercadopago/tmpl/mercadopago_checkout_standard.php b/mercadopago/mercadopago/tmpl/mercadopago_checkout_standard.php
index 9c9cab7..12f6cb3 100644
--- a/mercadopago/mercadopago/tmpl/mercadopago_checkout_standard.php
+++ b/mercadopago/mercadopago/tmpl/mercadopago_checkout_standard.php
@@ -6,7 +6,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
- * @version 2.1.0
+ * @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com
diff --git a/mercadopago/mercadopago/tmpl/mercadopago_checkout_standard_flow.php b/mercadopago/mercadopago/tmpl/mercadopago_checkout_standard_flow.php
index 0f2770c..9fa3a94 100644
--- a/mercadopago/mercadopago/tmpl/mercadopago_checkout_standard_flow.php
+++ b/mercadopago/mercadopago/tmpl/mercadopago_checkout_standard_flow.php
@@ -6,7 +6,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
- * @version 2.1.0
+ * @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com
diff --git a/mercadopago/mercadopago/tmpl/mercadopago_response_custom.php b/mercadopago/mercadopago/tmpl/mercadopago_response_custom.php
index 7c3c754..ec6b4b3 100644
--- a/mercadopago/mercadopago/tmpl/mercadopago_response_custom.php
+++ b/mercadopago/mercadopago/tmpl/mercadopago_response_custom.php
@@ -6,7 +6,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
- * @version 2.1.0
+ * @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com
diff --git a/mercadopago/mercadopago/tmpl/mercadopago_response_custom_ticket.php b/mercadopago/mercadopago/tmpl/mercadopago_response_custom_ticket.php
index c5a3484..d039104 100644
--- a/mercadopago/mercadopago/tmpl/mercadopago_response_custom_ticket.php
+++ b/mercadopago/mercadopago/tmpl/mercadopago_response_custom_ticket.php
@@ -6,7 +6,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
- * @version 2.1.0
+ * @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com
diff --git a/mercadopago/mercadopago/tmpl/mercadopago_response_standard.php b/mercadopago/mercadopago/tmpl/mercadopago_response_standard.php
index e50d91a..1ab43c5 100644
--- a/mercadopago/mercadopago/tmpl/mercadopago_response_standard.php
+++ b/mercadopago/mercadopago/tmpl/mercadopago_response_standard.php
@@ -6,7 +6,7 @@
* Mercado Pago plugin
*
* @author Developers Mercado Pago
- * @version 2.1.0
+ * @version 2.2.0
* @package VirtueMart
* @subpackage payment
* @link https://www.mercadopago.com