Is a fintech solution that makes it easy for you to easily manage M-Pesa PayBills/Till Numbers just within the same system. It centralizes all your funds in one portal, which gives you accessibility, manageability, and flexibility of all your fund's collections easily.
#
Easy Money Manager
## Introduction
This library handles all the PAM - PayBill Account Manager API's,that are then linked to Safaricom M-pesa Portals.
## Installing
The recommended way to install pam-php-sdk is through
Composer.
```bash
# Install package via composer
composer require shiftechafrica/pam-php-sdk
```
Next, run the Composer command to install the latest stable version of *shiftechafrica/pam-php-sdk*:
```bash
# Update package via composer
composer update shiftechafrica/pam-php-sdk --lock
```
After installing, the package will be auto discovered, But if need you may run:
```bash
# run for auto discovery
composer dump-autoload
```
Then run this, to get the *config/pam.php* for your own configurations:
```bash
# run this to get the configuration file at config/pam.php
php artisan vendor:publish --provider="PAM\PAMServiceProvider"
```
A *config/.php* file will be created, follow the example below to define your own configurations.
```dotenv
# set your account secret key api token
PAM_API_TOKEN=check_on_api_profile
PAM_APP_SHORTCODE_SECRET_KEY=check_on_the_app_pay_bill
```
## Usage
Follow the steps below on how to use the pam-php-sdk:
#### How to use the Library
How to use the pam-php-sdk to initiate different levels of *api's*
```php
use PAM\API\B2C;
use PAM\API\PayLoad;
use PAM\API\RegC2bUrl;
use PAM\API\ShortCode;
use PAM\API\App;
use PAM\API\STKPush;
use PAM\API\Balance;
/**
* Fetch all your shortcodes
*/
(new ShortCode())->index();
/**
* Get details of one shortcode
* by passing the id
*/
(new ShortCode())->show('id');
/**
* Fetch all your apps
*/
(new App())->index();
/**
* Get details of one app
* by passing the id
*/
(new App())->show('id');
/**
* Fetch max index();
/**
* Get details of one payload
* by passing the id
*/
(new PayLoad())->show('id');
/**
* get the validate shortcode
* @return mixed
*/
(new ShortCode())->validate([
"ConsumerKey" => "",
"ConsumerSecret" => "",
"Environment" => "" // sandbox …