Skip to content

Commit

Permalink
Merge pull request #188 from 1jeongg/feature/payment-type-wj
Browse files Browse the repository at this point in the history
결제 amount 타입 변경
  • Loading branch information
chaee813 authored Nov 11, 2023
2 parents b49e565 + 11a8f0c commit cd615e3
Showing 1 changed file with 1 addition and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,6 @@ private void tossPayApprove(PaymentRequest.ApproveDTO requestDTO){
// 토스페이먼츠 승인 api 요청
String basicToken = "Basic " + Base64.getEncoder().encodeToString((secretKey + ":").getBytes());

Map<String, String> parameters = new HashMap<>();
parameters.put("paymentKey", requestDTO.paymentKey());
parameters.put("orderId", requestDTO.orderId());
parameters.put("amount", requestDTO.amount().toString());

WebClient webClient =
WebClient
.builder()
Expand All @@ -94,7 +89,7 @@ private void tossPayApprove(PaymentRequest.ApproveDTO requestDTO){
headers.add(HttpHeaders.AUTHORIZATION, basicToken);
headers.add(HttpHeaders.CONTENT_TYPE, MediaType.APPLICATION_JSON_VALUE);
})
.bodyValue(parameters)
.bodyValue(requestDTO)
.retrieve()
.bodyToMono(TossPaymentResponse.TosspayDTO.class)
.onErrorResume(e -> {
Expand Down

0 comments on commit cd615e3

Please sign in to comment.