Skip to content

payment-offline/payment-offline-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Payment Offline Backend

API Docs

GET /status

returns {"status":"running"} with code 200 if it runs correctly.

POST /charge

request body

{
  money: Integer,
  channel: String
}

Money should be multiplied by 100. For example, if you wanna charge ¥0.01, the money parameter should be 1.

Channel is a enum, which was listed below.

alipay: Alipay mobile
bfb: Baidu pay mobile
wx: Wechat Pay
cnp_u:Pay Inside the app pay(UnionPay)
applepay_upacp:Apple Pay

It returns a JSON object for Ping++ SDK, one thing you have to parsr it is that the order_id, which would later be used in testing the charge status

WebSocket /waiting/:order_id

The websocket would returns {"status":"charged"} if charge successfully.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages