An open API service indexing awesome lists of open source software.

https://github.com/chanmo/bitpay

Crypto Payment Service
https://github.com/chanmo/bitpay

bitpay cryptopayments ether tron usdt

Last synced: 6 months ago
JSON representation

Crypto Payment Service

Awesome Lists containing this project

README

          

* BitPay

TRON(USDT)支付服务

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

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

** 启动服务

启动TRON API
#+BEGIN_SRC
$ docker run -p 3000:3000 chanmo/tron-api
#+END_SRC

Environment Variable List:
- TRON_API_KEY
- NETWORK: choose one of Nile, or Mainnet

启动BitPay API
#+BEGIN_SRC
$ docker run -p 5000:8000 chanmo/bitpay
#+END_SRC

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

#+BEGIN_SRC
http POST :8000/orders/ user=demo email=demo@demo.com amount=1000000
#+END_SRC

*** List all orders

#+BEGIN_SRC
http :8000/orders/
#+END_SRC

*** Delete an order

#+BEGIN_SRC
http DELETE :8000/orders//
#+END_SRC

*** List all accounts

#+BEGIN_SRC
http :8000/accounts/
#+END_SRC