Skip to content

Commit

Permalink
Merge pull request #32 from bayonetio/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
ilugobayo authored Jan 13, 2022
2 parents d4dd62e + dc50843 commit e3b4777
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
5 changes: 3 additions & 2 deletions Model/Config/Backend/KeyValidation.php
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function __construct(
public function beforeSave()
{
$invalidBayonet = [ 12, 13, 15 ];
$invalidJS = [ 12, 15, 16];
$invalidJS = [ 12, 15, 16 ];
$apiKey = $this->getValue();
$label = $this->translateKeyLabel($this->getData('field_config/label'));
$fieldId = $this->getData('field_config/id');
Expand Down Expand Up @@ -96,7 +96,8 @@ public function beforeSave()
$requestBody['auth']['jsKey'] = $apiKey;
$response = $this->requestHelper->deviceFingerprint($requestBody);

if (isset($response->reasonCode) && (int)$response->reasonCode === 51) {
if (isset($response->reasonCode) && (int)$response->reasonCode === 51 ||
isset($response->reasonCode) && (int)$response->reasonCode === 0) {
$this->setValue(($this->getValue()));
parent::beforeSave();
} elseif (isset($response->reasonCode) && (int)$response->reasonCode === 12) {
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"magento/framework": "100.1.*|101.0.*|102.0.*|103.0.*"
},
"type": "magento2-module",
"version": "1.1.0",
"version": "1.1.1",
"license": [
"OSL-3.0",
"AFL-3.0"
Expand Down

0 comments on commit e3b4777

Please sign in to comment.