|
37 | 37 | use Swagger\Client\Configuration;
|
38 | 38 | use Swagger\Client\HeaderSelector;
|
39 | 39 | use Swagger\Client\ObjectSerializer;
|
| 40 | +use Swagger\Client\Signature; |
40 | 41 |
|
41 | 42 | /**
|
42 | 43 | * DefaultApi Class Doc Comment
|
@@ -388,19 +389,20 @@ protected function listFinancialEventGroupsRequest($max_results_per_page = '100'
|
388 | 389 | }
|
389 | 390 | }
|
390 | 391 |
|
| 392 | + $query = \GuzzleHttp\Psr7\build_query($queryParams); |
391 | 393 |
|
392 |
| - $defaultHeaders = []; |
393 |
| - if ($this->config->getUserAgent()) { |
394 |
| - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); |
395 |
| - } |
| 394 | + $sign = new SignatureSellingPartner(); |
| 395 | + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), |
| 396 | + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), |
| 397 | + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), |
| 398 | + 'GET', $resourcePath, $query); |
396 | 399 |
|
397 | 400 | $headers = array_merge(
|
398 |
| - $defaultHeaders, |
399 | 401 | $headerParams,
|
400 |
| - $headers |
| 402 | + $headers, |
| 403 | + $headersX |
401 | 404 | );
|
402 | 405 |
|
403 |
| - $query = \GuzzleHttp\Psr7\build_query($queryParams); |
404 | 406 | return new Request(
|
405 | 407 | 'GET',
|
406 | 408 | $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
|
@@ -711,19 +713,20 @@ protected function listFinancialEventsRequest($max_results_per_page = '100', $po
|
711 | 713 | }
|
712 | 714 | }
|
713 | 715 |
|
| 716 | + $query = \GuzzleHttp\Psr7\build_query($queryParams); |
714 | 717 |
|
715 |
| - $defaultHeaders = []; |
716 |
| - if ($this->config->getUserAgent()) { |
717 |
| - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); |
718 |
| - } |
| 718 | + $sign = new SignatureSellingPartner(); |
| 719 | + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), |
| 720 | + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), |
| 721 | + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), |
| 722 | + 'GET', $resourcePath, $query); |
719 | 723 |
|
720 | 724 | $headers = array_merge(
|
721 |
| - $defaultHeaders, |
722 | 725 | $headerParams,
|
723 |
| - $headers |
| 726 | + $headers, |
| 727 | + $headersX |
724 | 728 | );
|
725 | 729 |
|
726 |
| - $query = \GuzzleHttp\Psr7\build_query($queryParams); |
727 | 730 | return new Request(
|
728 | 731 | 'GET',
|
729 | 732 | $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
|
@@ -1035,19 +1038,20 @@ protected function listFinancialEventsByGroupIdRequest($event_group_id, $max_res
|
1035 | 1038 | }
|
1036 | 1039 | }
|
1037 | 1040 |
|
| 1041 | + $query = \GuzzleHttp\Psr7\build_query($queryParams); |
1038 | 1042 |
|
1039 |
| - $defaultHeaders = []; |
1040 |
| - if ($this->config->getUserAgent()) { |
1041 |
| - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); |
1042 |
| - } |
| 1043 | + $sign = new SignatureSellingPartner(); |
| 1044 | + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), |
| 1045 | + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), |
| 1046 | + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), |
| 1047 | + 'GET', $resourcePath, $query); |
1043 | 1048 |
|
1044 | 1049 | $headers = array_merge(
|
1045 |
| - $defaultHeaders, |
1046 | 1050 | $headerParams,
|
1047 |
| - $headers |
| 1051 | + $headers, |
| 1052 | + $headersX |
1048 | 1053 | );
|
1049 | 1054 |
|
1050 |
| - $query = \GuzzleHttp\Psr7\build_query($queryParams); |
1051 | 1055 | return new Request(
|
1052 | 1056 | 'GET',
|
1053 | 1057 | $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
|
@@ -1359,19 +1363,20 @@ protected function listFinancialEventsByOrderIdRequest($order_id, $max_results_p
|
1359 | 1363 | }
|
1360 | 1364 | }
|
1361 | 1365 |
|
| 1366 | + $query = \GuzzleHttp\Psr7\build_query($queryParams); |
1362 | 1367 |
|
1363 |
| - $defaultHeaders = []; |
1364 |
| - if ($this->config->getUserAgent()) { |
1365 |
| - $defaultHeaders['User-Agent'] = $this->config->getUserAgent(); |
1366 |
| - } |
| 1368 | + $sign = new SignatureSellingPartner(); |
| 1369 | + $headersX = $sign->calculateSignature($this->config->getApiKey("accessKey"), |
| 1370 | + $this->config->getApiKey("secretKey"), $this->config->getApiKey("region"), |
| 1371 | + $this->config->getAccessToken(), $this->config->getUserAgent(), str_replace("https://", "", $this->config->getHost()), |
| 1372 | + 'GET', $resourcePath, $query); |
1367 | 1373 |
|
1368 | 1374 | $headers = array_merge(
|
1369 |
| - $defaultHeaders, |
1370 | 1375 | $headerParams,
|
1371 |
| - $headers |
| 1376 | + $headers, |
| 1377 | + $headersX |
1372 | 1378 | );
|
1373 | 1379 |
|
1374 |
| - $query = \GuzzleHttp\Psr7\build_query($queryParams); |
1375 | 1380 | return new Request(
|
1376 | 1381 | 'GET',
|
1377 | 1382 | $this->config->getHost() . $resourcePath . ($query ? "?{$query}" : ''),
|
|
0 commit comments