mirror of
https://gitee.com/dromara/dax-pay.git
synced 2025-09-07 13:10:44 +00:00
310 lines
15 KiB
Markdown
310 lines
15 KiB
Markdown
|
||
<p align="center">
|
||
<img src="_doc/images/dax-pay.svg" width="45%">
|
||
</p>
|
||
|
||
<p align="center">
|
||
<img src="https://img.shields.io/github/stars/dromara/dax-pay?style=flat&label=Github">
|
||
<img src='https://gitee.com/bootx/dax-pay/badge/star.svg?theme=dark' alt='star'/>
|
||
<img src="https://img.shields.io/badge/Dax%20Pay-2.0.5-success.svg" alt="Build Status"/>
|
||
<img src="https://img.shields.io/badge/Boot%20Platform-1.3.6-success.svg" alt="Build Status"/>
|
||
<img src="https://img.shields.io/badge/Author-Bootx-orange.svg" alt="Build Status"/>
|
||
<img src="https://img.shields.io/badge/Spring%20Boot-2.7.18-blue.svg" alt="Downloads"/>
|
||
<img src="https://img.shields.io/badge/license-Apache%20License%202.0-green.svg"/>
|
||
</p>
|
||
|
||
# Dromara Dax-Pay(开源支付系统)
|
||
## ❗使用须知
|
||
|
||
`DaxPay`是一款基于`Apache License 2.0`协议分发的开源软件,受中华人民共和国相关法律法规的保护和限制,可以在符合[《用户授权使用协议》](用户授权使用协议.txt)和
|
||
[《Apache License 2.0》](LICENSE)开源协议情况下进行免费使用、学习和交流。**在使用前请阅读上述协议,如果不同意请勿进行使用。**
|
||
|
||
## ⚠️多商户版本建议征询
|
||
近期将会开启多商户版本的开发,为了更好的听取大家的建议,特建立一个征集需求建议的issues,欢迎提出各种功能需求和建议,填写地址:[功能和建议填写](https://gitee.com/dromara/dax-pay/issues/I9F3EO)
|
||
|
||
## 🍈项目介绍
|
||
|
||
> DaxPay是一套基于Bootx-Platform脚手架构建的开源支付网关系统,已经对接支付宝、微信支付相关的接口,以及扩展了钱包支付、储值卡支付、现金支付等新的支付方式。
|
||
> 可以独立部署,提供接口供业务系统进行调用,不对原有系统产生影响
|
||
|
||
gateway为开发分支,本地运行请使用master分支进行测试,当前正在进行整个系统的优化重构工作,**请勿在生产环境中使用,请等待生产可用的版本发布**,
|
||
|
||
|
||
## 🧭 特色功能
|
||
- 封装各类支付通道的接口为统一的接口,方便业务系统进行调用,简化对接多种支付方式的复杂度
|
||
- 已对接`微信支付`、`支付宝`和云闪付相关的接口,后续版本将支持`V3`版本的接口
|
||
- 支持支付、退款、对账、分账等支付相关的能力
|
||
- 提供`HTTP`方式接口调用能力,和`Java`版本的`SDK`,方便业务系统进行对接
|
||
- 接口请求和响应数据支持启用签名机制,可根据实际需要进行开关,保证交易安全可靠
|
||
- 提供管理平台,方便运营人员进行管理和操作,不需要懂IT技术也可以轻松使用
|
||
- 提供`聚合支付`、`电脑收银台`和`手机收银台`的演示模块,供开发者参考其实现支付功能的逻辑
|
||
|
||
## 📃 文档和源码地址
|
||
### 文档地址
|
||
在 [Bootx开源文档站](https://bootx.gitee.io/) 下的支付网关(DaxPay)模块下可以进行查阅相关文档,具体链接地址如下:
|
||
[快速指南](https://bootx.gitee.io/daxpay/guides/overview/项目介绍.html)、
|
||
[支付对接](https://bootx.gitee.io/daxpay/gateway/overview/接口清单.html)、
|
||
[操作手册](https://bootx.gitee.io/daxpay/admin/config/平台配置.html)
|
||
|
||
### 项目地址
|
||
|
||
| 项目 | GITEE | GITHUB |
|
||
|---------|---------------------------------------------|-------------------------------------------------|
|
||
| 后端地址 | [GITEE](https://gitee.com/dromara/dax-pay) | [GITHUB](https://github.com/dromara/dax-pay) |
|
||
| Web前端地址 | [GITEE](https://gitee.com/bootx/dax-pay-ui) | [GITHUB](https://github.com/xxm1995/dax-pay-ui) |
|
||
| H5前端地址 | [GITEE](https://gitee.com/bootx/dax-pay-h5) | [GITHUB](https://github.com/xxm1995/dax-pay-h5) |
|
||
|
||
|
||
## 🏬 系统演示
|
||
### 管理平台:
|
||
> 注:演示账号部分功能修改删除权限未开放。
|
||
|
||
地址:https://daxpay.demo.bootx.cn
|
||
|
||
账号:daxpay
|
||
|
||
密码:123456
|
||
|
||
### 网关接口
|
||
> 注:接口平台只开放支付网关相关的接口,不开放系统其他接口。
|
||
|
||
地址: https://daxpay.server.bootx.cn/doc.html
|
||
|
||
账号: daxpay
|
||
|
||
密码: 123456
|
||
|
||
### 收银台演示
|
||
> 请勿大额支付,可以通过后台管理端进行退款
|
||
|
||
电脑收银台地址: https://daxpay.demo.bootx.cn/#/cashier
|
||
|
||
手机收银台地址: https://daxpay.demo.bootx.cn/h5/#/cashier/uniCashier
|
||
|
||
## 🥞 核心技术栈
|
||
| 名称 | 描述 | 版本要求 |
|
||
|-------------|----------|----------------------------|
|
||
| Jdk | Java环境 | 1.8+,11版本可以正常使用,但17+版本暂不支持 |
|
||
| Spring Boot | 开发框架 | 2.7.x |
|
||
| Redis | 分布式缓存 | 5.x版本及以上 |
|
||
| MySQL | 数据库 | 基于5.7.X版本开发,基本支持8.x版本 |
|
||
| Vue | 前端框架 | 3.x |
|
||
|
||
## 🛠️ 业务系统接入
|
||
> 业务系统想接入支付网关的话,不需要集成到业务系统里,只需要单独部署一份支付系统,然后业务系统通过接口调用即可拥有对应的支付能力,
|
||
不会对原业务系统的架构产生影响。如果是Java项目,可以使用SDK简化接入流程, 其他语言可以参照中的说明使用HTTP接口方式接入。
|
||
|
||
### Java客户端SDK
|
||
> SDK版本号与支付网关的版本保持一致,如果需要使用,请在pom.xml中添加如下依赖。SDK使用方式参考[SDK使用说明](https://bootx.gitee.io/daxpay/gateway/overview/SDK使用说明.html)。
|
||
|
||
```xml
|
||
<!-- 支付SDK -->
|
||
<dependency>
|
||
<groupId>cn.bootx.platform</groupId>
|
||
<artifactId>daxpay-single-sdk</artifactId>
|
||
<version>${latest.version}</version>
|
||
</dependency>
|
||
```
|
||
### SDK调用示例
|
||
> 此处以简单支付接口为例,演示业务系统如何调用支付网关进行支付,其他接口的调用方式类似,具体请参考[支付对接](https://bootx.gitee.io/daxpay/gateway/overview/接口清单.html)。
|
||
|
||
```java
|
||
package cn.bootx.platform.daxpay.sdk;
|
||
|
||
import cn.bootx.platform.daxpay.sdk.code.PayChannelEnum;
|
||
import cn.bootx.platform.daxpay.sdk.code.PayWayEnum;
|
||
import cn.bootx.platform.daxpay.sdk.model.PayOrderModel;
|
||
import cn.bootx.platform.daxpay.sdk.net.DaxPayConfig;
|
||
import cn.bootx.platform.daxpay.sdk.net.DaxPayKit;
|
||
import cn.bootx.platform.daxpay.sdk.param.pay.SimplePayParam;
|
||
import cn.bootx.platform.daxpay.sdk.response.DaxPayResult;
|
||
import org.junit.Before;
|
||
import org.junit.Test;
|
||
|
||
/**
|
||
* 简单支付
|
||
* @author xxm
|
||
* @since 2024/2/2
|
||
*/
|
||
public class SimplePayOrderTest {
|
||
|
||
@Before
|
||
public void init() {
|
||
// 初始化支付配置
|
||
DaxPayConfig config = DaxPayConfig.builder()
|
||
.serviceUrl("http://127.0.0.1:9000")
|
||
// 需要跟网关中配置一致
|
||
.signSecret("123456")
|
||
.signType(SignTypeEnum.HMAC_SHA256)
|
||
.build();
|
||
DaxPayKit.initConfig(config);
|
||
}
|
||
|
||
@Test
|
||
public void simplePay() {
|
||
// 简单支付参数
|
||
SimplePayParam param = new SimplePayParam();
|
||
param.setBusinessNo("P0001");
|
||
param.setAmount(1);
|
||
param.setTitle("测试支付宝支付");
|
||
param.setChannel(PayChannelEnum.ALI.getCode());
|
||
param.setPayWay(PayWayEnum.QRCODE.getCode());
|
||
|
||
DaxPayResult<PayOrderModel> execute = DaxPayKit.execute(param, true);
|
||
System.out.println(execute);
|
||
PayOrderModel data = execute.getData();
|
||
System.out.println(data);
|
||
}
|
||
}
|
||
```
|
||
|
||
## 🍎 系统截图
|
||
### 收银台演示
|
||

|
||
### 驾驶舱
|
||

|
||
### H5收银台演示
|
||

|
||
### 支付通道配置
|
||

|
||
## 🛣️ 路线图
|
||
> 当前处于功能开发阶段,部分功能可能会有调整,`V2.1.0`时将作为正式生产可用版本进行发布,之后会保证系统版本非大版本升级时,API接口和数据接口向前兼容
|
||
|
||
[**当前开发进度和任务池**](/_doc/Task.md)
|
||
|
||
[**历史更新记录**](/_doc/ChangeLog.md)
|
||
|
||
## 🥂 Bootx 项目合集
|
||
- Bootx-Platform:单体版脚手架 [Gitee地址](https://gitee.com/bootx/bootx-platform)
|
||
- Bootx-Cloud:微服务版脚手架 [Gitee地址](https://gitee.com/bootx/bootx-cloud)
|
||
- dax-pay:开源支付系统 [Gitee地址](https://gitee.com/bootx/daxpay)
|
||
- mybatis-table-modify:数据表结构管理 [Gitee地址](https://gitee.com/bootx/mybatis-table-modify)
|
||
|
||
## 🥪 关于我们
|
||
|
||
扫码加入QQ交流群
|
||
<p>
|
||
<img src="https://jsd.cdn.zzko.cn/gh/xxm1995/picx-images-hosting@master/connect/微信图片_20240412132238.3rb0hgrf2z.webp" width = "330" height = "500"/>
|
||
</p>
|
||
|
||
|
||
扫码加入钉钉交流群
|
||
<p>
|
||
<img src="https://jsd.cdn.zzko.cn/gh/xxm1995/picx-images-hosting@master/connect/png-(1).7egk526qnp.webp" width = "400" height = "400"/>
|
||
</p>
|
||
|
||
|
||
扫码加入飞书交流群
|
||
<p>
|
||
<img src="https://jsd.cdn.zzko.cn/gh/xxm1995/picx-images-hosting@master/connect/微信图片_20240415124136.231noivcuz.webp" width = "390" height = "500"/>
|
||
</p>
|
||
|
||
|
||
微信扫码加小助手拉群
|
||
<p>
|
||
<img alt="微信图片_20240226144703" height="480" src="https://jsd.cdn.zzko.cn/gh/xxm1995/picx-images-hosting@master/connect/微信图片_20240412152722.231nkeje2o.webp" width="330"/>
|
||
</p>
|
||
|
||
## Star History
|
||
|
||
[](https://starchart.cc/dromara/dax-pay)
|
||
|
||
|
||
## 🍻 鸣谢
|
||
感谢 JetBrains 提供的免费开源 License:
|
||
|
||
[](https://www.jetbrains.com/?from=bootx)
|
||
|
||
感谢其他提供灵感和思路的开源项目
|
||
|
||
[部分参考的开源项目和开源许可列表](./_license/LICENSE.md)
|
||
|
||
|
||
## 🍷License
|
||
|
||
Apache License Version 2.0
|
||
|
||
## 📚 Dromara 成员项目
|
||
|
||
<p align="center">
|
||
<a href="https://gitee.com/dromara/TLog" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/tlog2.png" title="一个轻量级的分布式日志标记追踪神器,10分钟即可接入,自动对日志打标签完成微服务的链路追踪" width="15%">
|
||
</a>
|
||
<a href="https://gitee.com/dromara/liteFlow" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/liteflow.png" title="轻量,快速,稳定,可编排的组件式流程引擎" width="15%">
|
||
</a>
|
||
<a href="https://hutool.cn/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/hutool.jpg" title="小而全的Java工具类库,使Java拥有函数式语言般的优雅,让Java语言也可以“甜甜的”。" width="15%">
|
||
</a>
|
||
<a href="https://sa-token.dev33.cn/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/sa-token.png" title="一个轻量级 java 权限认证框架,让鉴权变得简单、优雅!" width="15%">
|
||
</a>
|
||
<a href="https://gitee.com/dromara/hmily" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/hmily.png" title="高性能一站式分布式事务解决方案。" width="15%">
|
||
</a>
|
||
<a href="https://gitee.com/dromara/Raincat" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/raincat.png" title="强一致性分布式事务解决方案。" width="15%">
|
||
</a>
|
||
</p>
|
||
<p align="center">
|
||
<a href="https://gitee.com/dromara/myth" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/myth.png" title="可靠消息分布式事务解决方案。" width="15%">
|
||
</a>
|
||
<a href="https://cubic.jiagoujishu.com/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/cubic.png" title="一站式问题定位平台,以agent的方式无侵入接入应用,完整集成arthas功能模块,致力于应用级监控,帮助开发人员快速定位问题" width="15%">
|
||
</a>
|
||
<a href="https://maxkey.top/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/maxkey.png" title="业界领先的身份管理和认证产品" width="15%">
|
||
</a>
|
||
<a href="http://forest.dtflyx.com/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/forest-logo.png" title="Forest能够帮助您使用更简单的方式编写Java的HTTP客户端" width="15%">
|
||
</a>
|
||
<a href="https://jpom.io/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/jpom.png" title="一款简而轻的低侵入式在线构建、自动部署、日常运维、项目监控软件" width="15%">
|
||
</a>
|
||
<a href="https://su.usthe.com/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/sureness.png" title="面向 REST API 的高性能认证鉴权框架" width="15%">
|
||
</a>
|
||
</p>
|
||
<p align="center">
|
||
<a href="https://easy-es.cn/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/easy-es2.png" title="傻瓜级ElasticSearch搜索引擎ORM框架" width="15%">
|
||
</a>
|
||
<a href="https://gitee.com/dromara/northstar" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/northstar_logo.png" title="Northstar盈富量化交易平台" width="15%">
|
||
</a>
|
||
<a href="https://hertzbeat.com/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/hertzbeat_brand.jpg" title="易用友好的云监控系统" width="15%">
|
||
</a>
|
||
<a href="https://plugins.sheng90.wang/fast-request/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/fast-request.gif" title="Idea 版 Postman,为简化调试API而生" width="15%">
|
||
</a>
|
||
<a href="https://www.jeesuite.com/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/mendmix.png" title="开源分布式云原生架构一站式解决方案" width="15%">
|
||
</a>
|
||
<a href="https://gitee.com/dromara/koalas-rpc" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/koalas-rpc2.png" title="企业生产级百亿日PV高可用可拓展的RPC框架。" width="15%">
|
||
</a>
|
||
</p>
|
||
<p align="center">
|
||
<a href="https://async.sizegang.cn/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/gobrs-async.png" title="配置极简功能强大的异步任务动态编排框架" width="15%">
|
||
</a>
|
||
<a href="https://dynamictp.cn/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/dynamic-tp.png" title="基于配置中心的轻量级动态可监控线程池" width="15%">
|
||
</a>
|
||
<a href="https://www.x-easypdf.cn" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/x-easypdf.png" title="一个用搭积木的方式构建pdf的框架(基于pdfbox)" width="15%">
|
||
</a>
|
||
<a href="http://dromara.gitee.io/image-combiner" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/image-combiner.png" title="一个专门用于图片合成的工具,没有很复杂的功能,简单实用,却不失强大" width="15%">
|
||
</a>
|
||
<a href="https://www.herodotus.cn/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/dante-cloud2.png" title="Dante-Cloud 是一款企业级微服务架构和服务能力开发平台。" width="15%">
|
||
</a>
|
||
<a href="https://dromara.org/zh/projects/" target="_blank">
|
||
<img src="https://oss.dev33.cn/sa-token/link/dromara.png" title="让每一位开源爱好者,体会到开源的快乐。" width="15%">
|
||
</a>
|
||
</p>
|
||
|