GithubHelp home page GithubHelp logo

pomaxa / metropol-crb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from deadangroup/metropol-crb

0.0 1.0 0.0 18 KB

Metropol CRB(Credit Reference Bureau) API wrapper.

Home Page: http://www.metropol.co.ke/

PHP 100.00%

metropol-crb's Introduction

Metropol CRB

Warning: Abandoned. I no longer have the time to manage this repository. It is likely the Metropol API has changed.

Build Status Latest Stable Version Daily Downloads License

About Metropol-CRB

Metropol CRB(Credit Reference Bureau) API wrapper. This is a simple PHP client to communicate with the Metropol CRB API.

http://metropol.co.ke/

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

metropol-crb's People

Contributors

ngugijames avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.