Code Monkey home page Code Monkey logo

usdt-payment-gateway's Introduction

Upay (USDT Payment Gateway)

license GPLV3 version v1.1.2

🇺🇸 English version

项目简介

UPay(全称:USDT Payment Gateway)是一个由PHP语言编写的USDT收款代付系统,支持私有化部署,支持TRC20ERC20网络。

UPay 使用 GPLv3 开源协议!

项目特点

  • 支持私有化部署
  • 多钱包地址轮询,提高订单并发率
  • 支持商户添加自己钱包地址,直接收款
  • 异步队列响应,优雅及高性能
  • 支持 USDT 风控系统
  • 强大的后台财务管理系统

安装与运行程序

  1. Linux 服务器安装宝塔

    宝塔安装

    环境:php7.4 + Apache(nginx) + mysql>=5.7

  2. 安装 gmp 扩展

    Step1:apt install libgmp-dev

    Step2:在宝塔面板,软件商店 -> php7.4 -> 安装拓展 -> 找到 gmp 并安装

  3. 配置数据库

    在根目录下找到ddl.sql文件,进入mysql中执行sql文件初始化数据库,在.env中配置数据库连接参数

  4. 配置 redis

    通过宝塔面板安装redis,在.env中配置redis连接参数

  5. 网站根目录指向public

  6. 修改runtime权限为 777

  7. 重启 Apache(nginx)

  8. .env文件中填入infurasecret

  9. .env文件中填入TRC20ERC20充值地址

  10. 测试商户后台入口:

    • 地址:网址/merchant
    • 账号:测试商户
    • 密码:123456
  11. 添加计划任务

    统计任务设置为每天凌晨1点执行,其他任务设置每一分钟执行一次

    任务参见下表:

执行定时任务

在宝塔面板的计划任务中添加以下6个任务,建议定时任务的时间间隔为1分钟

  1. 处理订单 #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH cd /www/wwwroot/根目录; su -c "php think deal_order" -s /bin/sh www

  2. 处理代付 #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH cd /www/wwwroot/根目录; su -c "php think deal_withdraw" -s /bin/sh www

  3. 订单通知 #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH cd /www/wwwroot/根目录; su -c "php think order_notify" -s /bin/sh www

  4. 代付通知 #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH cd /www/wwwroot/根目录; su -c "php think withdraw_notify" -s /bin/sh www

  5. 统计 #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH cd /www/wwwroot/根目录; su -c "php think statistics" -s /bin/sh www

  6. 处理充值 #!/bin/bash PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin:~/bin export PATH cd /www/wwwroot/根目录; su -c "php think deal_recharge" -s /bin/sh www

开源申明

  • UPay 为开源的产品,仅用于学习交流使用!
  • 不可用于任何违反中华人民共和国(含**省)或使用者所在地区法律法规的用途;
  • 项目中所涉及区块链代币均为学习用途,作者并不赞成区块链所繁衍出代币的金融属性;
  • 亦不鼓励和支持任何"挖矿","炒币","虚拟币ICO"等非法行为;
  • 虚拟币市场行为不受监管要求和控制,投资交易需谨慎,仅供学习区块链知识。

项目演示

https://app.upay.ink/payment/index?id=joz4QnND

联系我们

https://t.me/UPay_ink (不提供开源项目技术支持)

https://upay.ink

usdt-payment-gateway's People

Contributors

upay-usdt avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.