49 Star 528 Fork 192

dromara / dax-pay

Create your Gitee Account
Explore and code with more than 12 million developers,Free private repositories !:)
Sign up
Clone or Download
contribute
Sync branch
Cancel
Notice: Creating folder will generate an empty file .keep, because not support in Git
Loading...
README
Apache-2.0

star Build Status Build Status Downloads

Dromara Dax-Pay(开源支付系统-单商户版)

❗使用须知

DaxPay是一款基于Apache License 2.0协议分发的开源软件,受中华人民共和国相关法律法规的保护和限制,可以在符合《用户授权使用协议》《Apache License 2.0》开源协议情况下进行免费使用、学习和交流。在使用前请阅读上述协议,如果不同意请勿进行使用。

⚠️多商户版本建议征询

近期将会开启多商户版本的开发,为了更好的听取大家的建议,特建立一个征集需求建议的issues,欢迎提出各种功能需求和建议,填写地址:功能和建议填写

🍈项目介绍

DaxPay是一套开源支付网关系统,已经对接支付宝、微信支付、云闪付相关的接口。可以独立部署,提供接口供业务系统进行调用,不对原有系统产生影响

🧭 特色功能

  • 封装各类支付通道的接口为统一的接口,方便业务系统进行调用,简化对接多种支付方式的复杂度
  • 已对接微信支付支付宝云闪付相关的接口,后续版本将支持V3版本的接口
  • 支持支付、退款、对账、分账等支付相关的能力
  • 提供HTTP方式接口调用能力,和Java版本的SDK,方便业务系统进行对接
  • 接口请求和响应数据支持启用签名机制,保证交易安全可靠
  • 提供管理平台,方便运营人员进行管理和操作,不需要懂IT技术也可以轻松使用
  • 提供聚合支付电脑收银台手机收银台的演示模块,供开发者参考其实现支付功能的逻辑

📃 文档和源码地址

文档地址

DaxPay文档站 下的支付网关(DaxPay)模块下可以进行查阅相关文档,具体链接地址如下: 快速指南支付对接操作手册

项目地址

项目 GITEE GITHUB
后端地址 GITEE GITHUB
Web前端地址 GITEE GITHUB
H5前端地址 GITEE GITHUB

🏬 系统演示

管理平台:

注:演示账号部分功能修改删除权限未开放。

地址: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使用说明

 <!-- 支付SDK -->
<dependency>
    <groupId>cn.daxpay.single</groupId>
    <artifactId>daxpay-single-sdk</artifactId>
    <version>${latest.version}</version>
</dependency>

SDK调用示例

此处以支付接口为例,演示业务系统如何调用支付网关进行支付,其他接口的调用方式类似,具体请参考支付对接

/**
 * 统一支付接口
 * @author xxm
 * @since 2024/2/5
 */
public class PayOrderTest {

    @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 pay() {
        PayParam param = new PayParam();
        param.setClientIp("127.0.0.1");
        param.setBizOrderNo("P0004");
        param.setTitle("测试接口支付");
        param.setChannel(PayChannelEnum.ALI.getCode());

        DaxPayResult<PayModel> execute = DaxPayKit.execute(param);
        System.out.println(execute);
        System.out.println(execute.getData());
    }
}

🍎 系统截图

收银台演示

微信截图_20240326141126

驾驶舱

QQ截图20240326141912

H5收银台演示

h5

支付通道配置

微信截图_20240326142208

🛣️ 路线图

gateway为开发分支,本地运行请使用master分支进行测试,当前正在进行整个系统的优化重构工作,各种功能都会有可能调整, V2.1.0时将作为正式生产可用版本进行发布,之后会保证系统版本非大版本升级时,API接口和数据接口向前兼容。 请勿在生产环境中使用,请等待生产可用的版本发布。如在使用,需要自己来保证应用的安全

  • 支持支付宝和微信V3版本接口
  • 支持撤销、转账等更多支付接口
  • 增加微信通知、钉钉通知、飞书通知能力
  • 支持服务商模式,以及一些间连通道,如通联支付、易宝支付等,更好适应小微收单场景

当前开发进度和任务池

历史更新记录

🥪 关于我们

扫码加入QQ交流群

交流一群

交流二群

扫码加入钉钉交流群

扫码加入飞书交流群

微信扫码加小助手拉群

微信图片_20240226144703

Star History

Stargazers over time

🍻 鸣谢

感谢 JetBrains 提供的免费开源 License:

JetBrains

感谢其他提供灵感和思路的开源项目

部分参考的开源项目和开源许可列表

🍷License

Apache License Version 2.0

Apache License Version 2.0, January 2004 http://www.apache.org/licenses/ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 1. Definitions. "License" shall mean the terms and conditions for use, reproduction, and distribution as defined by Sections 1 through 9 of this document. "Licensor" shall mean the copyright owner or entity authorized by the copyright owner that is granting the License. "Legal Entity" shall mean the union of the acting entity and all other entities that control, are controlled by, or are under common control with that entity. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. "You" (or "Your") shall mean an individual or Legal Entity exercising permissions granted by this License. "Source" form shall mean the preferred form for making modifications, including but not limited to software source code, documentation source, and configuration files. "Object" form shall mean any form resulting from mechanical transformation or translation of a Source form, including but not limited to compiled object code, generated documentation, and conversions to other media types. "Work" shall mean the work of authorship, whether in Source or Object form, made available under the License, as indicated by a copyright notice that is included in or attached to the work (an example is provided in the Appendix below). "Derivative Works" shall mean any work, whether in Source or Object form, that is based on (or derived from) the Work and for which the editorial revisions, annotations, elaborations, or other modifications represent, as a whole, an original work of authorship. For the purposes of this License, Derivative Works shall not include works that remain separable from, or merely link (or bind by name) to the interfaces of, the Work and Derivative Works thereof. "Contribution" shall mean any work of authorship, including the original version of the Work and any modifications or additions to that Work or Derivative Works thereof, that is intentionally submitted to Licensor for inclusion in the Work by the copyright owner or by an individual or Legal Entity authorized to submit on behalf of the copyright owner. For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to the Licensor or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, the Licensor for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by the copyright owner as "Not a Contribution." "Contributor" shall mean Licensor and any individual or Legal Entity on behalf of whom a Contribution has been received by Licensor and subsequently incorporated within the Work. 2. Grant of Copyright License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form. 3. Grant of Patent License. Subject to the terms and conditions of this License, each Contributor hereby grants to You a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by such Contributor that are necessarily infringed by their Contribution(s) alone or by combination of their Contribution(s) with the Work to which such Contribution(s) was submitted. If You institute patent litigation against any entity (including a cross-claim or counterclaim in a lawsuit) alleging that the Work or a Contribution incorporated within the Work constitutes direct or contributory patent infringement, then any patent licenses granted to You under this License for that Work shall terminate as of the date such litigation is filed. 4. Redistribution. You may reproduce and distribute copies of the Work or Derivative Works thereof in any medium, with or without modifications, and in Source or Object form, provided that You meet the following conditions: (a) You must give any other recipients of the Work or Derivative Works a copy of this License; and (b) You must cause any modified files to carry prominent notices stating that You changed the files; and (c) You must retain, in the Source form of any Derivative Works that You distribute, all copyright, patent, trademark, and attribution notices from the Source form of the Work, excluding those notices that do not pertain to any part of the Derivative Works; and (d) If the Work includes a "NOTICE" text file as part of its distribution, then any Derivative Works that You distribute must include a readable copy of the attribution notices contained within such NOTICE file, excluding those notices that do not pertain to any part of the Derivative Works, in at least one of the following places: within a NOTICE text file distributed as part of the Derivative Works; within the Source form or documentation, if provided along with the Derivative Works; or, within a display generated by the Derivative Works, if and wherever such third-party notices normally appear. The contents of the NOTICE file are for informational purposes only and do not modify the License. You may add Your own attribution notices within Derivative Works that You distribute, alongside or as an addendum to the NOTICE text from the Work, provided that such additional attribution notices cannot be construed as modifying the License. You may add Your own copyright statement to Your modifications and may provide additional or different license terms and conditions for use, reproduction, or distribution of Your modifications, or for any such Derivative Works as a whole, provided Your use, reproduction, and distribution of the Work otherwise complies with the conditions stated in this License. 5. Submission of Contributions. Unless You explicitly state otherwise, any Contribution intentionally submitted for inclusion in the Work by You to the Licensor shall be under the terms and conditions of this License, without any additional terms or conditions. Notwithstanding the above, nothing herein shall supersede or modify the terms of any separate license agreement you may have executed with Licensor regarding such Contributions. 6. Trademarks. This License does not grant permission to use the trade names, trademarks, service marks, or product names of the Licensor, except as required for reasonable and customary use in describing the origin of the Work and reproducing the content of the NOTICE file. 7. Disclaimer of Warranty. Unless required by applicable law or agreed to in writing, Licensor provides the Work (and each Contributor provides its Contributions) on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. You are solely responsible for determining the appropriateness of using or redistributing the Work and assume any risks associated with Your exercise of permissions under this License. 8. Limitation of Liability. In no event and under no legal theory, whether in tort (including negligence), contract, or otherwise, unless required by applicable law (such as deliberate and grossly negligent acts) or agreed to in writing, shall any Contributor be liable to You for damages, including any direct, indirect, special, incidental, or consequential damages of any character arising as a result of this License or out of the use or inability to use the Work (including but not limited to damages for loss of goodwill, work stoppage, computer failure or malfunction, or any and all other commercial damages or losses), even if such Contributor has been advised of the possibility of such damages. 9. Accepting Warranty or Additional Liability. While redistributing the Work or Derivative Works thereof, You may choose to offer, and charge a fee for, acceptance of support, warranty, indemnity, or other liability obligations and/or rights consistent with this License. However, in accepting such obligations, You may act only on Your own behalf and on Your sole responsibility, not on behalf of any other Contributor, and only if You agree to indemnify, defend, and hold each Contributor harmless for any liability incurred by, or claims asserted against, such Contributor by reason of your accepting any such warranty or additional liability. END OF TERMS AND CONDITIONS APPENDIX: How to apply the Apache License to your work. To apply the Apache License to your work, attach the following boilerplate notice, with the fields enclosed by brackets "[]" replaced with your own identifying information. (Don't include the brackets!) The text should be enclosed in the appropriate comment syntax for the file format. We also recommend that a file or class name and description of purpose be included on the same "printed page" as the copyright notice for easier identification within third-party archives. Copyright (c) 2022 济南易杯光年软件技术有限公司 Authors. All Rights Reserved. Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

About

DaxPay是一款免费开源的支付系统,支持支付宝、微信、云闪付等通道,提供收单、退款、聚合支付、对账、分账等功能。通过HTTP方式进行调用,不与其他系统产生耦合关联,提供可视化界面进行管理。 expand collapse
Java
Apache-2.0
Cancel

Contributors

All

Activities

Load More
can not load any more
Java
1
https://gitee.com/dromara/dax-pay.git
git@gitee.com:dromara/dax-pay.git
dromara
dax-pay
dax-pay
gateway

Search

53164aa7 5694891 3bd8fe86 5694891