ngugijames / metropol
This package is abandoned and no longer maintained.
The author suggests using the https://github.com/deadangroup/metropol-crb package instead.
Metropol CRB(Credit Reference Bureau) API wrapper
v1.1
2017-12-13 09:15 UTC
Requires
- php: >=5.4.0
- guzzlehttp/guzzle: ^6.3
- nesbot/carbon: ^1.22
- psr/log: ^1.0
This package is not auto-updated.
Last update: 2020-04-18 12:25:28 UTC
README
Warning: Abandoned. I no longer have the time to manage this repository. It is likely the Metropol API has changed.
About Metropol-CRB
Metropol CRB(Credit Reference Bureau) API wrapper. This is a simple PHP client to communicate with the Metropol CRB API.
Installation
composer require ngugijames/metropol
composer install
Quick Example
<?php
//get the composer autoloader, if necessary
require_once '../vendor/autoload.php';
use Ngugi\Metropol\Metropol;
$metropolPublicKey='dshdhggdid';
$metropolPrivateKey='UYGSYGA';
$metropol=new Metropol($metropolPublicKey,$metropolPrivateKey);
//verify ID number
$result=$metropol->identityVerification($id_number);
//check deliquency status of an ID number for a loan amount
$result=$metropol->deliquencyStatus($id_number, $loan_amount);
//check credit Info of an ID number for a loan amount
$result=$metropol->creditInfo($id_number, $loan_amount);
//check consumer score of ID number
$result=$metropol->consumerScore($id_number);
All methods return an array. Check the docs folder for sample results
Detailed Example
You can override all the options used when calling the api by calling the setter methods on the Metropol object
<?php
//get the composer autoloader, if necessary
require_once '../vendor/autoload.php';
use Ngugi\Metropol\Metropol;
$metropolPublicKey='dshdhggdid';
$metropolPrivateKey='UYGSYGA';
$metropol=new Metropol($metropolPublicKey,$metropolPrivateKey);
//override all options
$metropol=$metropol->withVersion('2.1')
->withPort(443)
->withPublicApiKey('NEW_PUB-KEY')
->withPrivateKey('NEW-PRIVATE-KEY');
//verify ID number
$result=$metropol->identityVerification($id_number);
//check deliquency status of an ID number for a loan amount
$result=$metropol->deliquencyStatus($id_number, $loan_amount);
//check credit Info of an ID number for a loan amount
$result=$metropol->creditInfo($id_number, $loan_amount);
//check consumer score of ID number
$result=$metropol->consumerScore($id_number);
All methods return an array. Check the docs folder for sample results