Git Product home page Git Product logo

bitpay's Introduction

BitPay

TRON(USDT)支付服务

用户创建订单时, 系统会为当前订单分配一个可用的钱包地址 (如果无可用地址, 就创建一个新地址). 订单创建时自动设置截止时间(10分钟)

系统会监听Pending状态订单的钱包地址的交易记录, 如果有新的入账操作, 则增加订单记录 当订单记录中的入账总额大于或等于订单金额时, 标记为成功, 并设置钱包为可用 当订单超时时, 设置钱包为可用

启动服务

启动TRON API

$ docker run -p 3000:3000 chanmo/tron-api

Environment Variable List:

  • TRON_API_KEY
  • NETWORK: choose one of Nile, or Mainnet

启动BitPay API

$ docker run -p 5000:8000 chanmo/bitpay

Environment Variable List:

  • TRON_API: The URL of the tron API instance, for example, http://0.0.0.0:3000
  • TRON_USDT: The USDT contract address in TRON.
  • PAYMENT_RESULT_NOTIFY: The URL for receiving the notification of payment status change.

API

Create a payment order

http POST :8000/orders/ user=demo [email protected] amount=1000000

List all orders

http :8000/orders/

Delete an order

http DELETE :8000/orders/<order_number>/

List all accounts

http :8000/accounts/

bitpay's People

Contributors

chanmo avatar

Stargazers

 avatar  avatar

Watchers

 avatar  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.