- Create a config.php file, open it and copy the content of the config.example.php into it, then put your api token. You can create and copy it using the follow comand:
$ cp config.example.php config.php- Open a terminal and run the following command to serve the application (you can also use local server like xampp, nginx etc. to serve this):
$ php -S 127.0.0.1:8000- To be able to receive notification on local server you will need ngrok. Serve the ngrok as follow:
$ ngrok http 8000- Then copy the url generated by ngrok in the terminal and input it in te callback url field in the api dashboard:
ngrok by @inconshreveable (Ctrl+C to quit)
Session Status online
Version 2.3.40
Region United States (us)
Web Interface http://127.0.0.1:4040
Forwarding http://cf00-105-112-29-174.ngrok.io -> http://localhost:5000
Forwarding https://cf00-105-112-29-174.ngrok.io -> http://localhost:5000
Connections ttl opn rt1 rt5 p50 p90
17 0 0.00 0.00 0.02 2.07
contain a form for users to input amount
contains the logic to create payment address and when the address is successfully created, it will redirect to payment.php
display the payment information and receive notification for payment. On this page user will copy the bitcoin address generated to make a payment to, and also receive payment notification data sent by blockchain.