接入支付宝 联调修改
This commit is contained in:
@@ -3,7 +3,7 @@ package com.ai.da.service;
|
||||
import java.util.Map;
|
||||
|
||||
public interface AliPayService {
|
||||
String tradeCreate(Long productId);
|
||||
String tradeCreate(Long productId,String returnUrl);
|
||||
|
||||
void processOrder(Map<String, String> params);
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public String tradeCreate(Long productId) {
|
||||
public String tradeCreate(Long productId, String returnUrl) {
|
||||
|
||||
try {
|
||||
//生成订单
|
||||
@@ -60,10 +60,11 @@ public class AliPayServiceImpl implements AliPayService {
|
||||
//调用支付宝接口
|
||||
AlipayTradePagePayRequest request = new AlipayTradePagePayRequest();
|
||||
//配置需要的公共请求参数
|
||||
//支付完成后,支付宝向谷粒学院发起异步通知的地址
|
||||
//支付完成后,支付宝发起异步通知的地址
|
||||
request.setNotifyUrl(config.getProperty("alipay.notify-url"));
|
||||
//支付完成后,我们想让页面跳转回谷粒学院的页面,配置returnUrl
|
||||
request.setReturnUrl(config.getProperty("alipay.return-url"));
|
||||
//支付完成后,我们想让页面跳转回aida的页面,配置returnUrl
|
||||
// request.setReturnUrl(config.getProperty("alipay.return-url"));
|
||||
request.setReturnUrl(returnUrl);
|
||||
|
||||
//组装当前业务方法的请求参数
|
||||
JSONObject bizContent = new JSONObject();
|
||||
|
||||
Reference in New Issue
Block a user