code review 支付宝 wap 的逻辑

This commit is contained in:
YunaiV
2021-11-04 08:47:41 +08:00
parent a1105ffdc7
commit 6cadafb3f1
8 changed files with 19 additions and 12 deletions

View File

@ -79,13 +79,14 @@ public class PayOrderController {
@PostMapping(value = "/notify/alipay-wap/{channelId}", consumes = MediaType.APPLICATION_FORM_URLENCODED_VALUE)
@ApiOperation("支付宝wap页面回调")
public String notifyAliPayWapPayOrder(@PathVariable("channelId") Long channelId,
@RequestParam Map<String, String> params,
@RequestBody String originData) throws Exception {
@RequestParam Map<String, String> params,
@RequestBody String originData) throws Exception {
//TODO @jason 校验 是否支付宝调用。 使用 支付宝publickey payclient 或许加一个校验方法
payOrderCoreService.notifyPayOrder(channelId, PayChannelEnum.ALIPAY_WAP.getCode(), NotifyDataDTO.builder().params(params).origData(originData).build());
return "success";
}
// TODO @jason 如果有些字段不注释,可以删除哈。不然 IDEA 会报警
/**
* https://opendocs.alipay.com/open/203/105285#%E5%89%8D%E5%8F%B0%E5%9B%9E%E8%B7%B3%E5%8F%82%E6%95%B0%E8%AF%B4%E6%98%8E
* @param channelId

View File

@ -14,6 +14,7 @@
<div id="dynamic_form"></div>
</body>
<script>
// TODO @jasoncopy 过来后,有些注释要改过来哈
let shopOrderId = undefined;
let payOrderId = undefined;
let server = 'http://127.0.0.1:28080';