kylemassacre-mcc / bank
There is no license information available for the latest version (v1.0.0) of this package.
A bank module for the MCC api
v1.0.0
2016-03-26 14:22 UTC
Requires
- php: >=5.5.9
- laravel/framework: 5.1.*
This package is not auto-updated.
Last update: 2025-01-02 02:02:21 UTC
README
For Laravel 5.1
Installation
Install via cli
php artisan module:install kylemassacre-mcc/bank
Open up app/Providers/AppServiceProvider.php and add in the register method:
$this->app->bind([ ... \Modules\Bank\Providers\BankServiceProvider::class ]);
Run the artisan command:
php artisan vendor:publish --provider="Modules\Bank\Providers\BankServiceProvider"
API Endpoints:
Sample Responses
Successful Withdraw
{ "success": { "message": "You have withdrew $1 from your account", "txn_details": { "amount": "$2", "past_balance": "$5", "new_balance": "$3", "fees": "$1" } } }
Successful Deposit
{ "success": { "message": "You have deposited $1 into your account", "txn_details": { "amount": "$2", "past_balance": "$3", "new_balance": "$4", "fees": "$1" } } }
Invalid Responses
Malformed Amount
{ "message": "422 Unprocessable Entity", "errors": { "amount": [ "You must provide a valid transaction amount", "Your transaction amount must be at least $2" ] }
Not enough funds
{ "message": "You don't have enough funds to put that in your bank", "status_code": 200, }
{ "message": "You don't have enough funds in your Cyber Bank", "status_code": 200, }
No Bank
{ "message": "You must own a Cyber Bank", "status_code": 200, }
Purchase Bank
{ "success": "You have purchased a Bank" }
Can't afford Bank
{ "message": "You do not have $10,000,000 to open an account", "status_code": 200, }
Already Own Bank
{ "message": "You already own a Bank", "status_code": 200, }