接入支付宝 联调修改
This commit is contained in:
@@ -35,12 +35,14 @@ public class AliPayController {
|
||||
|
||||
@ApiOperation("统一收单下单并支付页面接口的调用")
|
||||
@PostMapping("/trade/page/pay/{productId}")
|
||||
public Response<String> tradePagePay(@PathVariable Long productId){
|
||||
public Response<String> tradePagePay(@PathVariable Long productId,@RequestParam String returnUrl){
|
||||
|
||||
System.out.println(productId + " " + returnUrl);
|
||||
|
||||
log.info("统一收单下单并支付页面接口的调用");
|
||||
//支付宝开放平台接受 request 请求对象后
|
||||
// 会为开发者生成一个html 形式的 form表单,包含自动提交的脚本
|
||||
String formStr = aliPayService.tradeCreate(productId);
|
||||
String formStr = aliPayService.tradeCreate(productId, returnUrl);
|
||||
//我们将form表单字符串返回给前端程序,之后前端将会调用自动提交脚本,进行表单的提交
|
||||
//此时,表单会自动提交到action属性所指向的支付宝开放平台中,从而为用户展示一个支付页面
|
||||
return Response.success(formStr);
|
||||
|
||||
Reference in New Issue
Block a user