Skip to content

Commit

Permalink
Merge pull request #148 from paynl/feature/PLUG-2769
Browse files Browse the repository at this point in the history
PLUG-2769 - Trim credential fields
  • Loading branch information
woutse authored Nov 2, 2023
2 parents f006547 + d14864d commit 7b38e90
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
8 changes: 4 additions & 4 deletions Block/Adminhtml/Render/Credentials.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,10 +88,10 @@ public function checkCredentials()
$scopeId = $websiteId;
}

$tokencode = $this->scopeConfig->getValue('payment/paynl/tokencode', $scope, $scopeId);
$apiToken = $this->scopeConfig->getValue('payment/paynl/apitoken_encrypted', $scope, $scopeId);
$serviceId = $this->scopeConfig->getValue('payment/paynl/serviceid', $scope, $scopeId);
$gateway = $this->scopeConfig->getValue('payment/paynl/failover_gateway', $scope, $scopeId);
$tokencode = trim((string) $this->scopeConfig->getValue('payment/paynl/tokencode', $scope, $scopeId));
$apiToken = trim((string) $this->scopeConfig->getValue('payment/paynl/apitoken_encrypted', $scope, $scopeId));
$serviceId = trim((string) $this->scopeConfig->getValue('payment/paynl/serviceid', $scope, $scopeId));
$gateway = trim((string) $this->scopeConfig->getValue('payment/paynl/failover_gateway', $scope, $scopeId));

$error = '';
$status = 1;
Expand Down
8 changes: 4 additions & 4 deletions Model/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -403,31 +403,31 @@ public function configureSDK($useGateway = false)
*/
public function getApiToken()
{
return $this->store->getConfig('payment/paynl/apitoken_encrypted');
return trim((string)$this->store->getConfig('payment/paynl/apitoken_encrypted'));
}

/**
* @return string
*/
public function getTokencode()
{
return $this->store->getConfig('payment/paynl/tokencode');
return trim((string)$this->store->getConfig('payment/paynl/tokencode'));
}

/**
* @return string
*/
public function getServiceId()
{
return $this->store->getConfig('payment/paynl/serviceid');
return trim((string)$this->store->getConfig('payment/paynl/serviceid'));
}

/**
* @return string
*/
public function getFailoverGateway()
{
return $this->store->getConfig('payment/paynl/failover_gateway');
return trim((string)$this->store->getConfig('payment/paynl/failover_gateway'));
}

/**
Expand Down

0 comments on commit 7b38e90

Please sign in to comment.