我正在致力于第三方支付整合Adyen在Hybris,在一个成功的三维安全验证,发卡者重定向购物者到我们的网站。在本例中,我将收到对我在returnURl中指定的URL的HTTP调用,在我的示例中是https://localhost:9002/test/en/EUR/payment/submitResponse。
从发卡者到我们的URL的HTTP调用包括以下参数:
请求头:
Content-Type: application/x-www-form-urlencoded
Origin: https://test.test.com
Referer: https://test.test.com/hpp/3d/authenticate.shtml
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML,
like Gecko) Chrome/83.0.4103.116 Safari/537.36
Form Data->
MD: SomeString
PaRes: SomeString主计长注:
@Controller
@RequestMapping(value = "/payment") 方法:
@ResponseBody
@RequestMapping(value = "/submitResponse", method = RequestMethod.POST)
public Map<String, Object> submitResponse(final HttpServletRequest request) {
Map<String, Object> responseMap = new HashMap<>();
responseMap.put("Key", "hello im submitted");
return responseMap;
}我检查了来自Adyen的POST请求的头,并找到了表单数据:
md="SomeString"
Pares="someString"然而,我得到了以下例外:
WARN [hybrisHTTP34] [DefaultHandlerExceptionResolver] Resolved exception caused by handler execution: org.springframework.web.HttpRequestMethodNotSupportedException: Request method 'POST' not supported在浏览器控制台中:
Failed to load resource: the server responded with a status of 405 ()发布于 2020-07-15 10:24:19
谢谢您的回复,我把CSRF令牌传递给Adyen请求,它开始工作了。
https://stackoverflow.com/questions/62799695
复制相似问题