Bank Account API
bankapp/
├── application/
├── composer.json
├── composer.lock
├── public/
│ ├── .htaccess
│ └── index.php
└── vendor/
└── codeigniter/
└── framework/
└── system/
...
└── schema/
git clone https://github.com/PaulKish/bankapp.git bankapp
composer install
to install dependenciesapplication/config/database.php
to correspond to your db user/password
$ cd /path/to/bankapp
$ bin/server.sh
On Windows you can run
cd /path/to/bankapp/public
php -S localhost:8000
Or if you have gitbash on Windows
$ cd /path/to/bankapp
sh bin\server.sh
Or copy the folder your WAMP/XAMPP webroot dir then access it from:
`http://localhost/bankapp/public
$ cd /path/to/bankapp/application/tests
$ phpunit
<?php $_POST['amount'] ?>
should contain a numeric value<?php $_POST['amount'] ?>
should contain a numeric value
{
"version": "0.1",
"links": [
{
"href": "/balance",
"method": "GET"
},
{
"href": "/withdraw",
"method": "POST"
},
{
"href": "/deposit",
"method": "POST"
}
],
"status": "Success",
"message": "Ok"
}
"account": {
"balance": 30000
},
"transaction": {
"type": "Deposit",
"amount": "30000",
"date": "2017-03-08"
}