Skip to content

Commit

Permalink
Fix: sts token error & EurekaPaymentGateway localization field config…
Browse files Browse the repository at this point in the history
…uration
  • Loading branch information
BeBlood committed Sep 1, 2020
1 parent 33c85c2 commit 1ce7524
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Gateway/Client/EurekaPaymentGatewayClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -199,7 +199,7 @@ public function getSTSToken(string $username, string $password)
throw new \UnexpectedValueException('The STS token request failed.');
}

$token = (new Crawler((string) $tokenResponse))->filterXPath('//issueresult')->text();
$token = (new Crawler((string) $tokenResponse->getBody()))->filterXPath('//issueresult')->text();

if (null !== $this->cache) {
$item = $this->cache->getItem($this->getSTSTokenHash($username));
Expand Down Expand Up @@ -400,9 +400,9 @@ private function resolveLocalizationOptions($localizationOptions): array
->setRequired([
'Country',
'Currency',
'Language',
])
->setDefaults([
'Language' => 'FR',
'DecimalPosition' => 2,
])
->setAllowedTypes('Country', ['string'])
Expand Down
2 changes: 1 addition & 1 deletion Gateway/EurekaPaymentGateway.php
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ private function requestScoringToken(
'Country' => $transaction->getMetadata('Customer.Country'),
'Currency' => $transaction->getCurrencyCode(),
'DecimalPosition' => $transaction->getMetadata('Order.DecimalPosition'),
'Language' => $transaction->getMetadata('Customer.Country'),
'Language' => $transaction->getMetadata('Customer.Language'),
],
'SecurityContext' => [
'TokenId' => $this->eurekaPaymentGatewayClient->getSTSToken(
Expand Down

0 comments on commit 1ce7524

Please sign in to comment.