Skip to content

Commit

Permalink
Merge pull request #133 from pagarme/release/1.2.0
Browse files Browse the repository at this point in the history
Release/1.2.0
  • Loading branch information
fabiano-mallmann authored Jan 10, 2023
2 parents 1cb5a44 + 4d66270 commit f197297
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 12 deletions.
4 changes: 2 additions & 2 deletions Controller/Customer/Remove.php
Original file line number Diff line number Diff line change
Expand Up @@ -163,10 +163,10 @@ private function deleteCoreCard($coreCardId, $baseException)
}

/**
* @return \MundiAPILib\MundiAPIClient
* @return \PagarmeCoreApiLib\PagarmeCoreApiClient
*/
private function getApi()
{
return new \MundiAPILib\MundiAPIClient($this->config->getSecretKey(), '');
return new \PagarmeCoreApiLib\PagarmeCoreApiClient($this->config->getSecretKey(), '');
}
}
2 changes: 0 additions & 2 deletions Gateway/Transaction/Billet/Command/AuthorizeCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@

use Pagarme\Pagarme\Gateway\Transaction\Base\Command\AbstractApiCommand;

use MundiAPILib\Models\CreateOrderRequest;

class AuthorizeCommand extends AbstractApiCommand
{
/**
Expand Down
8 changes: 4 additions & 4 deletions Helper/CustomerUpdatePagarmeHelper.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
namespace Pagarme\Pagarme\Helper;

use Magento\Customer\Api\CustomerRepositoryInterface;
use MundiAPILib\Controllers;
use MundiAPILib\Models\UpdateCustomerRequest;
use PagarmeCoreApiLib\Controllers;
use PagarmeCoreApiLib\Models\UpdateCustomerRequest;
use Pagarme\Pagarme\Gateway\Transaction\Base\Config\Config;

class CustomerUpdatePagarmeHelper
Expand Down Expand Up @@ -70,11 +70,11 @@ public function getCustomers()
}

/**
* @return \MundiAPILib\MundiAPIClient
* @return \PagarmeCoreApiLib\PagarmeCoreApiClient
*/
public function getApi()
{
return new \MundiAPILib\MundiAPIClient($this->config->getSecretKey(), '');
return new \PagarmeCoreApiLib\PagarmeCoreApiClient($this->config->getSecretKey(), '');
}

}
6 changes: 5 additions & 1 deletion Observer/AdminCustomerBeforeSave.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,16 @@ public function execute(EventObserver $observer)
$event = $observer->getEvent();
$platformCustomer = new Magento2PlatformCustomerDecorator($event->getCustomer());

if (empty($platformCustomer->getPagarmeId())) {
return $this;
}

$customerService = new CustomerService();
try {
$customerService->updateCustomerAtPagarme($platformCustomer);
} catch (\Exception $exception) {
$log = new LogService('CustomerService');
$log->info($exception->getResponseBody());
$log->info($exception->getMessage());

if ($exception->getCode() == 404) {
$log->info(
Expand Down
6 changes: 3 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "pagarme/pagarme-magento2-module",
"license": "MIT",
"version": "1.1.7",
"version": "1.2.0",
"type": "magento2-module",
"description": "Magento 2 Module Pagar.me",
"require": {
"php": "~7.1",
"mundipagg/mundiapi": "^3.0",
"pagarme/ecommerce-module-core": "~1.1.5"
"pagarme/pagarmecoreapi": "^5.7",
"pagarme/ecommerce-module-core": "~1.2.0"
},
"require-dev": {
"phpunit/phpunit": "4.1.0",
Expand Down

0 comments on commit f197297

Please sign in to comment.