<aside>
๊ฒฐ์ ๊ฐ ์๋ฃ๋๋ฉด ์์ฒญํ ์๋ฒ(์์ ์ ์๋ฒ)์ ๊ฒฐ์ ์๋ฃ ์๋ต์ด ๊ฐ์ ์์ ์ ํด๋ผ์ด์ธํธ์ ์๋ต
PlantifyPaymentServiceClient
@FeignClient(name = "plantify-payment-service", url = "${}")
public interface PlantifyPaymentServiceClient {
@PostMapping("/v1/pay/payment")
ResponseEntity<String> payment(@RequestBody TransactionRequest request);
@GetMapping("/v1/auth/users/seacrh")
ResponseEntity<Long> getUserId(@RequestParam String username);
@GetMapping("/v1/pay/settlements/external")
ResponseEntity<ExternalSettlementResponse> getSettlementByOrderId(@RequestParam String orderId)
}
TransactionRequest
public record TransactionRequest(
Long userId,
Long sellerId,
String orderName,
Long amount,
String redirectUri
) {
}
ExternalSettlementResponse
public record ExternalSettlementResponse(
String orderId,
String orderName,
LocalDateTime createdAt,
Long amount
)