Java 如何发出3D请求并返回有效负载

Java 如何发出3D请求并返回有效负载,java,3d-secure,Java,3d Secure,我想使用SpringWebFlux使用PAReq值向ACS服务器发出请求。我试过这个: WebClient.Builder builder = WebClient.builder(); WebClient client = builder.build(); client.post().uri("https://securecode.lisa.mastercard.com/acspage/cap") .header("PaReq", "eJxdUdtu6jAQ/BX

我想使用SpringWebFlux使用PAReq值向ACS服务器发出请求。我试过这个:

WebClient.Builder builder = WebClient.builder();
WebClient client = builder.build();
client.post().uri("https://securecode.lisa.mastercard.com/acspage/cap")
                .header("PaReq", "eJxdUdtu6jAQ/BXEB8R2uCRBiyUKB....")
                .accept(MediaType.TEXT_PLAIN)
                .contentType(MediaType.TEXT_PLAIN)
                .retrieve()
                .bodyToMono(String.class).block();
实现用户重定向的正确方法是什么?目前我正在使用服务器端Java代码发出请求?当用户打开从Spring返回的链接时,我应该进行调用并将有效负载返回给用户

用户打开的Spring端点:

@PostMapping(value = "/redirect/to_acquirer/{token}", consumes = { MediaType.APPLICATION_XML_VALUE,
          MediaType.APPLICATION_JSON_VALUE }, produces = { MediaType.APPLICATION_XML_VALUE,
              MediaType.APPLICATION_JSON_VALUE })
  public ModelAndView handleRedirectMessage(@PathVariable("token") String token,
          @RequestBody PaymentTransaction transaction, HttpServletRequest request) throws Exception {

        .......

        // TO DO add here POST with PAReq and redirect the user to the page.
        return new ModelAndView("redirect:" + url); 
}