文章目录
- 支付宝开放平台官网
- 创建demo实例分析
- 效果图
- 实例代码
- AlipayConfig
- PaymentController
- OrderService OrderServiceImpl
- applicationContext-alipay.xml
支付宝开放平台官网
用自己手机支付宝扫码登录 根据页面提示填写自己真实信息 进去之后
东西主要用的就在这里
sdk 在 点文档 找到 下面的开发工具
创建demo实例分析
弄新版的 里面有对应java代码 复制来 修改处都换成自己的
import com.alipay.easysdk.factory.Factory;
import com.alipay.easysdk.factory.Factory.Payment;
import com.alipay.easysdk.kernel.Config;
import com.alipay.easysdk.kernel.util.ResponseChecker;
import com.alipay.easysdk.payment.facetoface.models.AlipayTradePrecreateResponse;public class Main {public static void main(String[] args) throws Exception {// 1. 设置参数(全局只需设置一次)Factory.setOptions(getOptions());try {// 2. 发起API调用(以创建当面付收款二维码为例)AlipayTradePrecreateResponse response = Payment.FaceToFace().preCreate("Apple iPhone11 128G", "2234567890", "5799.00");// 3. 处理响应或异常if (ResponseChecker.success(response)) {System.out.println("调用成功");} else {System.err.println("调用失败,原因:" + response.msg + "," + response.subMsg);}} catch (Exception e) {System.err.println("调用遭遇异常,原因:" + e.getMessage());throw new RuntimeException(e.getMessage(), e);}}private static Config getOptions() {Config config = new Config();config.protocol = "https";config.gatewayHost = "openapi.alipay.com";config.signType = "RSA2";config.appId = "<-- 请填写您的AppId,例如:2019091767145019 -->";// 为避免私钥随源码泄露,推荐从文件中读取私钥字符串而不是写入源码中config.merchantPrivateKey = "<-- 请填写您的应用私钥,例如:MIIEvQIBADANB ... ... -->";//注:证书文件路径支持设置为文件系统中的路径或CLASS_PATH中的路径,优先从文件系统中加载,加载失败后会继续尝试从CLASS_PATH中加载config.merchantCertPath = "<-- 请填写您的应用公钥证书文件路径,例如:/foo/appCertPublicKey_2019051064521003.crt -->";config.alipayCertPath = "<-- 请填写您的支付宝公钥证书文件路径,例如:/foo/alipayCertPublicKey_RSA2.crt -->";config.alipayRootCertPath = "<-- 请填写您的支付宝根证书文件路径,例如:/foo/alipayRootCert.crt -->";//注:如果采用非证书模式,则无需赋值上面的三个证书路径,改为赋值如下的支付宝公钥字符串即可// config.alipayPublicKey = "<-- 请填写您的支付宝公钥,例如:MIIBIjANBg... -->";//可设置异步通知接收服务地址(可选)config.notifyUrl = "<-- 请填写您的支付类接口异步通知接收服务地址,例如:https://www.test.com/callback -->";//可设置AES密钥,调用AES加解密相关接口时需要(可选)config.encryptKey = "<-- 请填写您的AES密钥,例如:aa4BtZ4tspm2wnXLb1ThQA== -->";return config;}
}
里面需要更换的地方 都有提示
下面是第一次用的是时候(总结来说就是 使用工具 生成密钥 复制生成的公钥填到RSA2公钥中 生个应用公钥 支付宝公钥(将来要用的就是 工具生成的私钥 支付宝公钥))
弄过的话想换 就是更换应用公钥 会自动生成 保存即可
下载好工具后打开
还需要证书 按下面网址往下滑找到公钥证书方式教程
公钥证书方式
全选了 这里好像没验证过 应该没关系放弃了
上面失败了 从来
这次上传好了
放弃上面了
插件地址
重启IDEA
下面弄错了选择第二个 QuickStart
提供下面3处内容
运行时说没有授权码 下面尝试弄授权码
下面失败
下面先去注册个小程序 没什么用里面没得授权码啥的
https://github.com/alipay/alipay-intellij-plugin/releases
效果图
实例代码
给出部分
AlipayConfig
package cn.itrip.trade.config;/*** 支付宝手机网站接入配置信息* @author hduser**/
public class AlipayConfig {/*** 商户appid*/private String appID;/*** 私钥 pkcs8格式的*/private String rsaPrivateKey;/*** 服务器异步通知页面路径 需http://或者https://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问*/private String notifyUrl;/*** 页面跳转同步通知页面路径 需http://或者https://格式的完整路径,不能加?id=123这类自定义参数,必须外网可以正常访问 商户可以自定义同步跳转地址*/private String returnUrl;/*** 请求网关地址*/private String url;/*** 编码*/private String charset;/*** 返回格式*/private String format;/*** 支付宝公钥*/private String alipayPublicKey;/*** 日志记录目录*/private String logPath;/*** RSA2*/private String signType;///支付结果显示/*** 支付成功跳转页面*/private String paymentSuccessUrl;/*** 支付失败跳转页面*/private String paymentFailureUrl;///支付结果显示public String getAppID() {return appID;}public void setAppID(String appID) {this.appID = appID;}public String getRsaPrivateKey() {return rsaPrivateKey;}public void setRsaPrivateKey(String rsaPrivateKey) {this.rsaPrivateKey = rsaPrivateKey;}public String getNotifyUrl() {return notifyUrl;}public void setNotifyUrl(String notifyUrl) {this.notifyUrl = notifyUrl;}public String getReturnUrl() {return returnUrl;}public void setReturnUrl(String returnUrl) {this.returnUrl = returnUrl;}public String getUrl() {return url;}public void setUrl(String url) {this.url = url;}public String getCharset() {return charset;}public void setCharset(String charset) {this.charset = charset;}public String getFormat() {return format;}public void setFormat(String format) {this.format = format;}public String getAlipayPublicKey() {return alipayPublicKey;}public void setAlipayPublicKey(String alipayPublicKey) {this.alipayPublicKey = alipayPublicKey;}public String getLogPath() {return logPath;}public void setLogPath(String logPath) {this.logPath = logPath;}public String getSignType() {return signType;}public void setSignType(String signType) {this.signType = signType;}public String getPaymentSuccessUrl() {return paymentSuccessUrl;}public void setPaymentSuccessUrl(String paymentSuccessUrl) {this.paymentSuccessUrl = paymentSuccessUrl;}public String getPaymentFailureUrl() {return paymentFailureUrl;}public void setPaymentFailureUrl(String paymentFailureUrl) {this.paymentFailureUrl = paymentFailureUrl;}
}
PaymentController
package cn.itrip.trade.controller;import cn.itrip.util.common.EmptyUtils;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Map;import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;import org.apache.log4j.Logger;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;import springfox.documentation.annotations.ApiIgnore;import com.alipay.api.AlipayApiException;
import com.alipay.api.AlipayClient;
import com.alipay.api.DefaultAlipayClient;
import com.alipay.api.domain.AlipayTradeWapPayModel;
import com.alipay.api.internal.util.AlipaySignature;
import com.alipay.api.request.AlipayTradeWapPayRequest;import cn.itrip.beans.pojo.ItripHotelOrder;
import cn.itrip.trade.config.AlipayConfig;
import cn.itrip.trade.service.OrderService;/*** 支付处理控制器** @author hduser**/
@Controller
@RequestMapping("/api")
public class PaymentController {private Logger logger=Logger.getLogger(PaymentController.class);@Resourceprivate AlipayConfig alipayConfig;@Resourceprivate OrderService orderService;/*** 确认订单信息** @param id* 订单ID* @return*/@ApiIgnore@RequestMapping(value = "/prepay/{orderNo}", method = RequestMethod.GET)public String prePay(@PathVariable String orderNo, ModelMap model) {try {ItripHotelOrder order = orderService.loadItripHotelOrder(orderNo);if (!EmptyUtils.isEmpty(order)) {model.addAttribute("hotelName", order.getHotelName());model.addAttribute("roomId", order.getRoomId());model.addAttribute("count", order.getCount());model.addAttribute("payAmount", order.getPayAmount());return "pay";}elsereturn "notfound";} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();return "error";}}/*** 向支付宝提交支付请求** @param WIDout_trade_no* 商户订单号,商户网站订单系统中唯一订单号,必填* @param WIDsubject* 订单名称,必填* @param WIDtotal_amount* 付款金额,必填*/@ApiOperation(value = "订单支付", httpMethod = "POST", protocols = "HTTP", produces = "application/xml", consumes="application/x-www-form-urlencoded",response = String.class, notes = "客户端提交订单支付请求,对该API的返回结果不用处理,浏览器将自动跳转至支付宝。<br><b>请使用普通表单提交,不能使用ajax异步提交。</b>") @RequestMapping(value = "/pay", method = RequestMethod.POST,produces="application/xml", consumes="application/x-www-form-urlencoded")public void pay(@ApiParam(name="WIDout_trade_no",value="订单编号",required=true)@RequestParam String WIDout_trade_no, @ApiParam(name="WIDsubject",value="订单名称",required=true)@RequestParam String WIDsubject,@ApiParam(name="WIDtotal_amount",value="订单金额",required=true)@RequestParam String WIDtotal_amount, HttpServletResponse response) {// 超时时间 可空String timeout_express = "2m";// 销售产品码 必填String product_code = "QUICK_WAP_PAY";/**********************/// SDK 公共请求类,包含公共请求参数,以及封装了签名与验签,开发者无需关注签名与验签// 调用RSA签名方式AlipayClient client = new DefaultAlipayClient(alipayConfig.getUrl(),alipayConfig.getAppID(), alipayConfig.getRsaPrivateKey(),alipayConfig.getFormat(), alipayConfig.getCharset(),alipayConfig.getAlipayPublicKey(), alipayConfig.getSignType());AlipayTradeWapPayRequest alipay_request = new AlipayTradeWapPayRequest();// 封装请求支付信息AlipayTradeWapPayModel model = new AlipayTradeWapPayModel();model.setOutTradeNo(WIDout_trade_no);model.setSubject(WIDsubject);model.setTotalAmount(WIDtotal_amount);model.setTimeoutExpress(timeout_express);model.setProductCode(product_code);alipay_request.setBizModel(model);// 设置异步通知地址alipay_request.setNotifyUrl(alipayConfig.getNotifyUrl());// 设置同步地址alipay_request.setReturnUrl(alipayConfig.getReturnUrl());// form表单生产String form = "";try {// 调用SDK生成表单form = client.pageExecute(alipay_request).getBody();System.out.println(form);response.setContentType("text/html;charset="+ alipayConfig.getCharset());response.getWriter().write(form);// 直接将完整的表单html输出到页面response.getWriter().flush();response.getWriter().close();} catch (AlipayApiException e) {// TODO Auto-generated catch blocke.printStackTrace();} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();}}/*** 导步通知,跟踪支付状态变更*/@ApiIgnore@RequestMapping(value = "/notify", method = RequestMethod.POST)public void trackPaymentStatus(HttpServletRequest request,HttpServletResponse response) {try {// 获取支付宝POST过来反馈信息Map<String, String> params = new HashMap<String, String>();Map requestParams = request.getParameterMap();for (Iterator iter = requestParams.keySet().iterator(); iter.hasNext();) {String name = (String) iter.next();String[] values = (String[]) requestParams.get(name);String valueStr = "";for (int i = 0; i < values.length; i++) {valueStr = (i == values.length - 1) ? valueStr + values[i]: valueStr + values[i] + ",";}// 乱码解决,这段代码在出现乱码时使用。如果mysign和sign不相等也可以使用这段代码转化// valueStr = new String(valueStr.getBytes("ISO-8859-1"), "gbk");params.put(name, valueStr);}// 获取支付宝的通知返回参数,可参考技术文档中页面跳转同步通知参数列表(以下仅供参考)//// 商户订单号String out_trade_no = new String(request.getParameter("out_trade_no").getBytes("ISO-8859-1"), "UTF-8");// 支付宝交易号String trade_no = new String(request.getParameter("trade_no").getBytes("ISO-8859-1"), "UTF-8");// 交易状态String trade_status = new String(request.getParameter("trade_status").getBytes("ISO-8859-1"), "UTF-8");// 获取支付宝的通知返回参数,可参考技术文档中页面跳转同步通知参数列表(以上仅供参考)//// 计算得出通知验证结果// boolean AlipaySignature.rsaCheckV1(Map<String, String> params, String// publicKey, String charset, String sign_type)boolean verify_result = AlipaySignature.rsaCheckV1(params,alipayConfig.getAlipayPublicKey(), alipayConfig.getCharset(), "RSA2");if (verify_result) {// 验证成功// // 请在这里加上商户的业务逻辑程序代码 //即时到账普通版,那么这时的交易状态值为: TRADE_FINISHED;如果是即时到账高级版,此时的交易状态值就为:TRADE_SUCCESS //收到TRADE_FINISHED请求后,这笔订单就结束了,支付宝不会再主动请求商户网站了;收到TRADE_SUCCESS请求后,后续一定还有至少一条通知记录,即TRADE_FINISHED。if (trade_status.equals("TRADE_FINISHED")) {// 判断该笔订单是否在商户网站中已经做过处理// 如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序// 请务必判断请求时的total_fee、seller_id与通知时获取的total_fee、seller_id为一致的// 如果有做过处理,不执行商户的业务程序if(!orderService.processed(out_trade_no)){orderService.paySuccess(out_trade_no, 2,trade_no);}logger.info("订单:"+out_trade_no+" 交易完成");// 注意:// 如果签约的是可退款协议,退款日期超过可退款期限后(如三个月可退款),支付宝系统发送该交易状态通知// 如果没有签约可退款协议,那么付款完成后,支付宝系统发送该交易状态通知。} else if (trade_status.equals("TRADE_SUCCESS")) {// 判断该笔订单是否在商户网站中已经做过处理// 如果没有做过处理,根据订单号(out_trade_no)在商户网站的订单系统中查到该笔订单的详细,并执行商户的业务程序// 请务必判断请求时的total_fee、seller_id与通知时获取的total_fee、seller_id为一致的// 如果有做过处理,不执行商户的业务程序if(!orderService.processed(out_trade_no)){orderService.paySuccess(out_trade_no, 2,trade_no);}logger.info("订单:"+out_trade_no+" 交易成功");// 注意:// 如果签约的是可退款协议,那么付款完成后,支付宝系统发送该交易状态通知。}response.getWriter().println("success"); // 请不要修改或删除// } else {// 验证失败orderService.payFailed(out_trade_no, 1,trade_no);response.getWriter().println("fail");}} catch (UnsupportedEncodingException e) {// TODO Auto-generated catch blocke.printStackTrace();logger.error(e.getMessage()); } catch (AlipayApiException e) {// TODO Auto-generated catch blocke.printStackTrace();logger.error(e.getMessage());} catch (IOException e) {// TODO Auto-generated catch blocke.printStackTrace();logger.error(e.getMessage());} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();logger.error(e.getMessage());}}/*** 支付宝页面跳转同步通知页面*/@ApiIgnore@RequestMapping(value = "/return", method = RequestMethod.GET)public void callback(HttpServletRequest request,HttpServletResponse response) {try {//获取支付宝GET过来反馈信息Map<String,String> params = new HashMap<String,String>();Map requestParams = request.getParameterMap();for (Iterator iter = requestParams.keySet().iterator(); iter.hasNext();) {String name = (String) iter.next();String[] values = (String[]) requestParams.get(name);String valueStr = "";for (int i = 0; i < values.length; i++) {valueStr = (i == values.length - 1) ? valueStr + values[i]: valueStr + values[i] + ",";}//乱码解决,这段代码在出现乱码时使用。如果mysign和sign不相等也可以使用这段代码转化valueStr = new String(valueStr.getBytes("ISO-8859-1"), "utf-8");params.put(name, valueStr);}//获取支付宝的通知返回参数,可参考技术文档中页面跳转同步通知参数列表(以下仅供参考)////商户订单号String out_trade_no = new String(request.getParameter("out_trade_no").getBytes("ISO-8859-1"),"UTF-8");//支付宝交易号String trade_no = new String(request.getParameter("trade_no").getBytes("ISO-8859-1"),"UTF-8");//获取支付宝的通知返回参数,可参考技术文档中页面跳转同步通知参数列表(以上仅供参考)////计算得出通知验证结果//boolean AlipaySignature.rsaCheckV1(Map<String, String> params, String publicKey, String charset, String sign_type)boolean verify_result = AlipaySignature.rsaCheckV1(params, alipayConfig.getAlipayPublicKey(), alipayConfig.getCharset(), "RSA2");if(verify_result){//验证成功 String id=orderService.loadItripHotelOrder(out_trade_no).getId().toString();//提示支付成功response.sendRedirect(String.format(alipayConfig.getPaymentSuccessUrl(), out_trade_no,id));}else{ //提示支付失败response.sendRedirect(alipayConfig.getPaymentFailureUrl());}} catch (UnsupportedEncodingException e) {// TODO Auto-generated catch blocke.printStackTrace();logger.error(e.getMessage());} catch (AlipayApiException e) {// TODO Auto-generated catch blocke.printStackTrace();logger.error(e.getMessage());} catch (Exception e) {// TODO Auto-generated catch blocke.printStackTrace();logger.error(e.getMessage());}}
}
OrderService OrderServiceImpl
package cn.itrip.trade.service;import cn.itrip.beans.pojo.ItripHotelOrder;/*** 订单支付处理接口* @author hduser**/
public interface OrderService {/*** 加载酒店订单* @param String orderNo* @return* @throws Exception */ public ItripHotelOrder loadItripHotelOrder(String orderNo) throws Exception;/*** 判断该订单是否已被处理过(被更新为已支付状态)* @param orderNo* @return* @throws Exception */public boolean processed(String orderNo) throws Exception;/*** 支付成功* @param String 订单编号* @param payType 支付方式:1:支付宝 2:微信 3:到店付* @param tradeNo 支付平台返回的交易码* @throws Exception */ public void paySuccess(String orderNo, int payType, String tradeNo) throws Exception;/*** 支付失败* @param String 订单编号* @param payType 支付方式:1:支付宝 2:微信 3:到店付* @param tradeNo 支付平台返回的交易码* @throws Exception */ public void payFailed(String orderNo, int payType, String tradeNo) throws Exception;
}package cn.itrip.trade.service;import java.io.BufferedReader;
import java.net.InetSocketAddress;
import java.net.Proxy;
import java.net.URL;
import java.net.URLConnection;
import java.util.HashMap;
import java.util.List;
import java.util.Map;import javax.annotation.Resource;import cn.itrip.util.common.EmptyUtils;
import cn.itrip.util.common.SystemConfig;
import org.apache.log4j.Logger;
import org.springframework.stereotype.Service;import cn.itrip.beans.pojo.ItripHotelOrder;
import cn.itrip.beans.pojo.ItripTradeEnds;import cn.itrip.dao.hotelorder.ItripHotelOrderMapper;
import cn.itrip.dao.tradeends.ItripTradeEndsMapper;/*** 订单支付处理实现* @author hduser**/
@Service("orderService")
public class OrderServiceImpl implements OrderService {private Logger logger=Logger.getLogger(OrderServiceImpl.class);@Resourceprivate ItripHotelOrderMapper itripHotelOrderMapper;@Resourceprivate ItripTradeEndsMapper itripTradeEndsMapper;@Resourceprivate SystemConfig systemConfig;@Overridepublic ItripHotelOrder loadItripHotelOrder(String orderNo) throws Exception {// TODO Auto-generated method stublogger.debug("加载订单:"+orderNo);Map<String, Object> param=new HashMap();param.put("orderNo", orderNo);List<ItripHotelOrder> orders=itripHotelOrderMapper.getItripHotelOrderListByMap(param);if(orders.size()==1){return orders.get(0);}elsereturn null;}@Overridepublic void paySuccess(String orderNo, int payType,String tradeNo) throws Exception {// TODO Auto-generated method stub//更新订单状态、支付宝交易号logger.debug("订单支付成功:"+orderNo);ItripHotelOrder itripHotelOrder=this.loadItripHotelOrder(orderNo);itripHotelOrder.setOrderStatus(2);//支付成功itripHotelOrder.setPayType(payType);itripHotelOrder.setTradeNo(tradeNo);//交易号(如支付宝交易号)itripHotelOrderMapper.updateItripHotelOrder(itripHotelOrder);//增加订单后续待处理记录ItripTradeEnds itripTradeEnds=new ItripTradeEnds();itripTradeEnds.setId(itripHotelOrder.getId());itripTradeEnds.setOrderNo(itripHotelOrder.getOrderNo());itripTradeEndsMapper.insertItripTradeEnds(itripTradeEnds);//通知业务模块后续处理sendGet(systemConfig.getTradeEndsUrl(),"orderNo="+orderNo);}@Overridepublic void payFailed(String orderNo, int payType,String tradeNo) throws Exception {// TODO Auto-generated method stublogger.debug("订单支付失败:"+orderNo);ItripHotelOrder itripHotelOrder=this.loadItripHotelOrder(orderNo);itripHotelOrder.setOrderStatus(1);//支付状态:已取消itripHotelOrder.setPayType(payType);itripHotelOrder.setTradeNo(tradeNo);//交易号(如支付宝交易号)itripHotelOrderMapper.updateItripHotelOrder(itripHotelOrder);}@Overridepublic boolean processed(String orderNo) throws Exception {// TODO Auto-generated method stubItripHotelOrder itripHotelOrder=this.loadItripHotelOrder(orderNo);return itripHotelOrder.getOrderStatus().equals(2)&&!EmptyUtils.isEmpty(itripHotelOrder.getTradeNo());}/*** 向指定URL发送GET方法的请求* * @param url* 发送请求的URL* @param param* 请求参数,请求参数应该是 name1=value1&name2=value2 的形式。* */@SuppressWarnings("unused")public void sendGet(String url, String param) {String result = "";BufferedReader in = null;try {String urlNameString = url + "?" + param;URL realUrl = new URL(urlNameString);// 打开和URL之间的连接URLConnection connection;if(systemConfig.getTradeUseProxy()){//代理环境Proxy proxy = new Proxy(Proxy.Type.HTTP,new InetSocketAddress(systemConfig.getTradeProxyHost(), systemConfig.getTradeProxyPort())); connection= realUrl.openConnection(proxy);}else{connection= realUrl.openConnection();}// 设置通用的请求属性connection.setRequestProperty("accept", "*/*");connection.setRequestProperty("connection", "Keep-Alive");connection.setRequestProperty("user-agent","Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1;SV1)");// 建立实际的连接connection.connect(); System.out.println(connection.getContentLength());} catch (Exception e) {logger.error("发送GET请求出现异常!" + e); e.printStackTrace();}}
}
applicationContext-alipay.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:aop="http://www.springframework.org/schema/aop"xmlns:p="http://www.springframework.org/schema/p" xmlns:tx="http://www.springframework.org/schema/tx"xmlns:context="http://www.springframework.org/schema/context" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsdhttp://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsdhttp://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsdhttp://www.springframework.org/schema/contexthttp://www.springframework.org/schema/context/spring-context.xsd"><!-- 支付宝手机网站支付 --><bean class="cn.itrip.trade.config.AlipayConfig"><property name="appID" value="2016102300742807"/><property name="rsaPrivateKey" value="输入你的公钥"/><property name="notifyUrl" value="http://ailvxing123.cn1.utools.club/trade/api/notify"/>
<!-- <property name="returnUrl" value="http://itrip.test.com/trade/api/return"/>--><property name="returnUrl" value="http://ailvxing123.cn1.utools.club/trade/api/notify"/><property name="url" value="https://openapi.alipaydev.com/gateway.do"/><property name="charset" value="UTF-8"/><property name="format" value="json"/><property name="alipayPublicKey" value="对应自己的"/><property name="logPath" value="/logs"/><property name="signType" value="RSA2"/><!-- <property name="paymentSuccessUrl" value="/itriptrade/success.jsp"/> -->
<!-- <property name="paymentSuccessUrl" value="http://itrip.test.com/index.html#/orderpaystate?orderNo=%s&id=%s"/>--><property name="paymentSuccessUrl" value="http://localhost:8082/index.html#/orderpaystate?orderNo=%s&id=%s"/>
<!-- <property name="paymentFailureUrl" value="http://itrip.test.com/index.html#/orderpaystate?orderNo=%s&id=%s&state=0"/>--><property name="paymentFailureUrl" value="http://localhost:8082/index.html#/orderpaystate?orderNo=%s&id=%s&state=0"/></bean>
</beans>