Skip to content

Commit

Permalink
Merge pull request #124 from Orange-Co/feature/payment
Browse files Browse the repository at this point in the history
chore: change exchange to postForEntity
  • Loading branch information
Kang1221 authored Oct 15, 2024
2 parents 13e0c60 + 93dc641 commit dcf5423
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/main/java/co/orange/ddanzi/service/PaymentService.java
Original file line number Diff line number Diff line change
Expand Up @@ -176,10 +176,11 @@ public String getPortOneAccessToken(){
.build();

HttpEntity<PortOneTokenRequestDto> entity = new HttpEntity<>(requestBody, headers);

log.info("Access Key: {}", accessKey); // 확인 용도
log.info("Access Secret: {}", accessSecret);
RestTemplate restTemplate = new RestTemplate();
try {
ResponseEntity<PortOneTokenResponseDto> response = restTemplate.exchange(url, HttpMethod.POST, entity, PortOneTokenResponseDto.class);
ResponseEntity<PortOneTokenResponseDto> response = restTemplate.postForEntity(url, entity, PortOneTokenResponseDto.class);
log.info("포트원 Access key Get 성공");
return response.getBody().getResponse().getAccess_token();
} catch (HttpClientErrorException e) {
Expand Down

0 comments on commit dcf5423

Please sign in to comment.