Block Payment is a simple app to make bitcoin payments to a group of people. It is used as an exercice to understand bitcoin.
The app can send small amounts of satoshis to a group of people, and check if the users have sent the amount back.
Block Payment is developped with the wallet service Block.io, the PHP Framework Laravel, Bootstrap, and SQLite.
Execute composer composer update
Create the file /config/api.php, and add
return [
// ...
// Block.io API
'blockio' => [
'apiKey' => 'xxxx-xxxx-xxxx-xxxx',
'pin' => 'xxxxx',
],
// ...
];
Create the database sqlite file, touch database/database.sqlite
To create tables, execute php artisan migrate
You have to start a payment, then give the 4 letters code to users.
Users have to add the code to add their address.
For the exercice, users have to use a new bitcoin address that will never be used again, so they can add their private key if their are not sure to remeber it.
Use the artisan command php artisan payment:send payment_code
In the exercice, users have to send the amount back. This script is to check their balance which should be equal to 0.
Use the artisan command php artisan payment:check payment_code