Refer to here for detailed introduction.
Refer to here for detailed API documentation.
Refer to here for detailed API documentation.
Refer to here for detailed API documentation.
Configure CYBAVO API server URL in mockserver.conf.php
$api_server_url = 'BACKEND_SERVER_URL';
Required version: PHP 7.3.7 or later (with sqlite3 enabled)
Replace the [SOFA_MOCK_SERVER_PHP_PATH] in the following commands to source code directory.
- If you have PHP installed then use following command to start the built-in web server.
- $ cd [SOFA_MOCK_SERVER_PHP_PATH]
- $ php -S 0.0.0.0:8889
- Otherwise use docker to setup mock server.
- $ docker run --name mockserver -d -v [SOFA_MOCK_SERVER_PHP_PATH]:/var/www/html -p 8889:8889 php:7.3.7-fpm
- $ docker exec -it mockserver bash
- $ php -S 0.0.0.0:8889
- 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
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 /v1/mock/wallets/withdrawal/callback handler function in mock server index.php
NOTE: Because the mock server uses a single-threaded PHP built-in web server as underlying server, it cannot process withdrawal authentication callbacks and withdrawal requests at the same time. While using mock server, please do not set the withdrawal authentication callback URL.
Refer to here for curl testing commands.