Skip to content
This repository has been archived by the owner on Aug 28, 2023. It is now read-only.

Commit

Permalink
remove error_log & change de is_null to empty
Browse files Browse the repository at this point in the history
  • Loading branch information
gmatsuoka committed Jun 14, 2018
1 parent eedf1c0 commit 7776822
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 14 deletions.
13 changes: 1 addition & 12 deletions src/MercadoPago/Core/Helper/Data.php
Original file line number Diff line number Diff line change
Expand Up @@ -222,17 +222,6 @@ public function getApiInstance($access_or_client_id = null, $client_secret = nul
$api = new \MercadoPago\Core\Lib\Api($access_or_client_id, $client_secret);
$api->set_platform(self::PLATFORM_STD);
}

// if ($params > 2 || $params < 1) {
// throw new \Magento\Framework\Exception\LocalizedException(__('Invalid arguments. Use CLIENT_ID and CLIENT SECRET, or ACCESS_TOKEN'));
// }
// if ($params == 1) {
// $api = new \MercadoPago\Core\Lib\Api(func_get_arg(0));
// $api->set_platform(self::PLATFORM_OPENPLATFORM);
// } else {
// $api = new \MercadoPago\Core\Lib\Api(func_get_arg(0), func_get_arg(1));
// $api->set_platform(self::PLATFORM_STD);
// }

if ($this->_switcher->getWebsiteId() != 0) {
if ($this->scopeConfig->getValue('payment/mercadopago_standard/sandbox_mode', \Magento\Store\Model\ScopeInterface::SCOPE_WEBSITE, $this->_switcher->getWebsiteId())) {
Expand Down Expand Up @@ -268,7 +257,7 @@ public function getApiInstance($access_or_client_id = null, $client_secret = nul
public function isValidAccessToken($accessToken)
{

if(is_null($accessToken) || $accessToken == ""){
if(empty($accessToken)){
return false;
}

Expand Down
2 changes: 0 additions & 2 deletions src/MercadoPago/Core/Model/Core.php
Original file line number Diff line number Diff line change
Expand Up @@ -569,8 +569,6 @@ public function postPaymentV1($preference)

$this->_coreHelper->log("POST /v1/payments", 'mercadopago-custom.log', $response);


error_log("Resultado: " . json_encode($response));
if ($response['status'] == 200 || $response['status'] == 201) {
return $response;
} else {
Expand Down

0 comments on commit 7776822

Please sign in to comment.