Skip to content

Commit

Permalink
Merge pull request #68 from PluginAndPartners/main
Browse files Browse the repository at this point in the history
Release v4.13.0
  • Loading branch information
cleitonaguiarandrade authored Jan 11, 2023
2 parents c6b9bd9 + e932565 commit 7b3c38c
Show file tree
Hide file tree
Showing 110 changed files with 296 additions and 244 deletions.
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [4.13.0] - 2023-09-01

### Changed
- Changed header authorization to use access token instead of public key

### Fixed
- Fixed decimal value when creating Pro checkout preference
- Updated copyright to 2023

## [4.12.0] - 2022-16-11

### Changed
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
</a>
</p>

# Prestashop 1.6.x & 1.7.x - Mercado Pago Module (v4.12.0)
# Prestashop 1.6.x & 1.7.x - Mercado Pago Module (v4.13.0)

With the official module of Mercado Pago you will have an integration, hundreds of solutions and thousands of sales. Maximize your conversions and make your customers return to your store by increasing their confidence in the shopping experience.

Expand Down
4 changes: 2 additions & 2 deletions controllers/front/custom.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions controllers/front/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions controllers/front/notification.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions controllers/front/pix.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions controllers/front/standard.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
6 changes: 3 additions & 3 deletions controllers/front/standardvalidation.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down Expand Up @@ -54,7 +54,7 @@ public function initContent()
if (isset($payment_ids) && $payment_ids != false && $payment_ids != 'null' && $typeReturn != 'failure') {
$payment_id = explode(',', $payment_ids)[0];
$this->redirectCheck($payment_id);

return;
}

Expand Down
4 changes: 2 additions & 2 deletions controllers/front/ticket.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions controllers/front/walletbutton.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions controllers/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions includes/MPAbstractDB.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
11 changes: 5 additions & 6 deletions includes/MPApi.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down Expand Up @@ -111,9 +111,8 @@ public function getCredentialsWrapper($access_token)
*/
public function getPaymentMethods()
{
$public_key = $this->getPublicKey();
$response = MPRestCli::get('/v1/bifrost/payment-methods', ["Authorization: " . $public_key]);

$access_token = $this->getAccessToken();
$response = MPRestCli::get('/v1/bifrost/payment-methods', ["Authorization: Bearer " . $access_token]);


//in case of failures
Expand All @@ -129,7 +128,7 @@ public function getPaymentMethods()

$payments = array();
foreach ($result as $value) {
// remove on paypay release
//remove on paypay release
if ($value['id'] == 'paypal') {
continue;
}
Expand Down
4 changes: 2 additions & 2 deletions includes/MPLog.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions includes/MPRestCli.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions includes/MPUseful.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions includes/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions includes/module/checkouts/CustomCheckout.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions includes/module/checkouts/PixCheckout.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions includes/module/checkouts/StandardCheckout.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions includes/module/checkouts/TicketCheckout.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
4 changes: 2 additions & 2 deletions includes/module/checkouts/index.php
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?php
/**
* 2007-2022 PrestaShop
* 2007-2023 PrestaShop
*
* NOTICE OF LICENSE
*
Expand All @@ -19,7 +19,7 @@
* needs please refer to http://www.prestashop.com for more information.
*
* @author PrestaShop SA <[email protected]>
* @copyright 2007-2022 PrestaShop SA
* @copyright 2007-2023 PrestaShop SA
* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0)
* International Registered Trademark & Property of PrestaShop SA
*
Expand Down
Loading

0 comments on commit 7b3c38c

Please sign in to comment.