dev-master
9999999-devA bank module for the MCC api
The Requires
- php >=5.5.9
- laravel/framework 5.1.*
by Kyle Ellis
v1.0.0
1.0.0.0A bank module for the MCC api
The Requires
- php >=5.5.9
- laravel/framework 5.1.*
by Kyle Ellis
A bank module for the MCC api
Install via cli
php artisan module:install kylemassacre-mcc/bank
Open up app/Providers/AppServiceProvider.php and add in the register method:, (*1)
$this->app->bind([ ... \Modules\Bank\Providers\BankServiceProvider::class ]);
Run the artisan command:
php artisan vendor:publish --provider="Modules\Bank\Providers\BankServiceProvider"
, (*2)
Method | Endpoint | Route Name |
---|---|---|
GET/HEAD | /api/cyberbank/buy | cyber.buy |
POST | /api/cyberbank/deposit | cyber.deposit |
POST | /api/cyberbank/withdraw | cyber.withdraw |
GET/HEAD | /api/bank/buy | bank.buy |
POST | /api/bank/deposit | bank.deposit |
POST | /api/bank/withdraw | bank.withdraw |
{ "success": { "message": "You have withdrew $1 from your account", "txn_details": { "amount": "$2", "past_balance": "$5", "new_balance": "$3", "fees": "$1" } } }
{ "success": { "message": "You have deposited $1 into your account", "txn_details": { "amount": "$2", "past_balance": "$3", "new_balance": "$4", "fees": "$1" } } }
Malformed Amount, (*3)
{ "message": "422 Unprocessable Entity", "errors": { "amount": [ "You must provide a valid transaction amount", "Your transaction amount must be at least $2" ] } ``` *_Not enough funds_* ```json { "message": "You don't have enough funds to put that in your bank", "status_code": 200, } ``` ```json { "message": "You don't have enough funds in your Cyber Bank", "status_code": 200, } ``` *_No Bank_* ```json { "message": "You must own a Cyber Bank", "status_code": 200, } ``` *_Purchase Bank_* ```json { "success": "You have purchased a Bank" }
Can't afford Bank, (*4)
{ "message": "You do not have $10,000,000 to open an account", "status_code": 200, }
Already Own Bank, (*5)
{ "message": "You already own a Bank", "status_code": 200, }
A bank module for the MCC api
A bank module for the MCC api