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
- Host: GitHub
- URL: https://github.com/chanmo/bitpay
- Owner: ChanMo
- License: mit
- Created: 2023-07-05T10:06:00.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-07-10T09:01:25.000Z (about 2 years ago)
- Last Synced: 2025-03-28T20:35:52.641Z (6 months ago)
- Topics: bitpay, cryptopayments, ether, tron, usdt
- Language: Python
- Homepage:
- Size: 44.9 KB
- Stars: 3
- Watchers: 2
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.org
- License: LICENSE
Awesome Lists containing this project
README
* BitPay
TRON(USDT)支付服务
用户创建订单时, 系统会为当前订单分配一个可用的钱包地址 (如果无可用地址, 就创建一个新地址).
订单创建时自动设置截止时间(10分钟)系统会监听Pending状态订单的钱包地址的交易记录, 如果有新的入账操作, 则增加订单记录
当订单记录中的入账总额大于或等于订单金额时, 标记为成功, 并设置钱包为可用
当订单超时时, 设置钱包为可用** 启动服务
启动TRON API
#+BEGIN_SRC
$ docker run -p 3000:3000 chanmo/tron-api
#+END_SRCEnvironment Variable List:
- TRON_API_KEY
- NETWORK: choose one of Nile, or Mainnet启动BitPay API
#+BEGIN_SRC
$ docker run -p 5000:8000 chanmo/bitpay
#+END_SRCEnvironment 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