Skip to content

CYBAVO/sofa_mock_server_javascript

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

42 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Table of contents

Get Started

Refer to here for detailed introduction.

Deposit Wallet API

Refer to here for detailed API documentation.

Withdraw Wallet API

Refer to here for detailed API documentation.

Query API

Refer to here for detailed API documentation.

Mock Server

How to compile

Required version: node v10.19.0 or later (npm v6.13.4 or later)

  • Commands
    • $ npm install
    • $ npm start

Setup configuration

Configure CYBAVO API server URL in mockserver.conf.json

"api_server_url": "BACKEND_SERVER_URL"

Put wallet API code/secret into mock server

  • Get API code/secret on web console
    • API-CODE, API-SECRET, WALLET-ID
  • Put API code/secret to mock server's database
curl -X POST -H "Content-Type: application/json" -d '{"api_code":"API-CODE","api_secret":"API-SECRET"}' \
http://localhost:8889/v1/mock/wallets/{WALLET-ID}/apitoken

Register mock server callback URL

Operate on web admin console

Notification Callback URL

http://localhost:8889/v1/mock/wallets/callback

Withdrawal Authentication Callback URL

http://localhost:8889/v1/mock/wallets/withdrawal/callback

The withdrawal authentication callback URL once set, every withrawal request will callback this URL to get authentication to proceed withdrawal request.

Refer to /callback handler in mock server wallets.js

cURL Testing Commands

Refer to here for curl testing commands.

Other Language Versions

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages