Skip to content

Commit

Permalink
Corrige Phrase para Exceptions da classe ApiKeyValidator (#50)
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielRanghetti authored and laerte-guimaraes committed May 20, 2019
1 parent bb2b547 commit d21f476
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Model/Config/Backend/ApiKeyValidator.php
Original file line number Diff line number Diff line change
Expand Up @@ -63,15 +63,15 @@ public function beforeSave()
if ($value) {
if (!$apiKey) {
throw new \Magento\Framework\Exception\LocalizedException(
sprintf(__("The api key was not set on the module basic configuration"))
__("The api key was not set on the module basic configuration")
);
}

$data = $this->api->request("merchants/current", "GET");

if (isset($data['merchant']['status']) && $data['merchant']['status'] != 'active') {
throw new \Magento\Framework\Exception\LocalizedException(
sprintf(__("The api key is invalid or the merchant is inactive"))
__("The api key is invalid or the merchant is inactive")
);
}
}
Expand Down

0 comments on commit d21f476

Please sign in to comment.