# tool-payment
**Repository Path**: bingyu/tool-payment
## Basic Information
- **Project Name**: tool-payment
- **Description**: 支付,微信,支付宝
- **Primary Language**: Java
- **License**: Not specified
- **Default Branch**: master
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 1
- **Forks**: 0
- **Created**: 2017-04-02
- **Last Updated**: 2020-12-19
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
一、支付
使用步骤
1.配置controller
2.实现接口
NotifyService支付回调
PayOrderService 支付订单Service
3.调用方法
一、调用方法
Map param = new HashMap();
param.put("workid", );//订单id
param.put("money", );//支付金额,单位分
param.put("userid", );//用户id
param.put("openid", );//openid
param.put("product", "weixin");//支付工具
param.put("device", "pc");//
param.put("preurl", "http://localhost:8080/xx/xx/");//回调前缀
this.payService.createOrder(param, request);
二、调用链接
pay/{product}/notview/dopay 处理不需要跳转订单(如微信公众号等移动端支付)
参数说明
product:支付工具,微信、支付宝等
device:pc
workid:订单id
money:支付金额,单位分
openid:openid
userid:用户id
4.回调链接 /notify/{product}/{device}
5.配置文件 payment.properties
二、退款
Map param = new HashMap();
param.put("product", "weixin");支付工具
param.put("workid", id);//订单id
param.put("userid", user.getId());//操作人
paymentService.refundOrder(param, request);