Mock Server

How to compile

  • Put sample code to {YOUR_GO_PATH}/github.com/cybavo/SOFA_MOCK_SERVER
  • Execute
    • go mod vendor
    • go build ./mockserver.go
    • ./mockserver

Setup configuration

api_server_url="BACKEND_SERVER_URL"

Put wallet API code/secret into mock server

  • Get API code/secret on web control panel
    • API_CODE, API_SECRET, WALLET_ID
  • Put API code/secret to mock server’s database
  • For the read-only API code/secret, use wallet ID 0 to register.
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

Notification Callback URL

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

Withdrawal Authentication Callback URL

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