Skip to content

Commit 089a33d

Browse files
committed
wip
1 parent 80d56ba commit 089a33d

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

src/Service/TdsTokenService.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,13 @@ private function getNxToken($accountId)
6767
{
6868
try {
6969
$url = 'https://hubapi.pagar.me/v2/management/tds-token';
70+
$environment = $this->config->getIsSandboxMode() ? 'test' : 'live';
7071

7172
$response = wp_remote_post($url, [
7273
'headers' => [
7374
'Authorization' => 'Basic ' . base64_encode($this->config->getSecretKey() . ':'),
7475
'Content-Type' => 'application/json',
76+
'X-Hub-Environment' => $environment
7577
],
7678
/**
7779
* O payload pede `merchant_id`, mas recebe o account id — é o que

0 commit comments

Comments
 (0)