scorecardio/scorecardio-php

There is no license information available for the latest version (dev-master) of this package.

PHP package for accessing scorecardio

dev-master 2020-03-04 15:35 UTC

This package is not auto-updated.

Last update: 2024-09-27 05:27:11 UTC


README

This Scorecardio PHP library provides convenient access to the Scorecardio API from applications written in PHP language.

requirements

PHP 5.6.0 and later

Composer

You can install the package via Composer. Run the following command:

composer require scorecardio/scorecardio-php

Getting Started

Simple usage looks like:

$scorecard = new \Scorecardio\Scorecard('4eC39HqLyjWDarjtT1zdp7dc');

$result = $scorecard->executePublishedScorecard('Partner name', 'Scorecard name', [
            'work_contract' => 'yes',
            'nationality' => 'Netherlands',
            'date_of_birth' => '21-11-1990',
            'marital_status' => 'single',
            'number_of_current_loans' => 0,
            'number_of_past_loans' => 1,
            'loan_defaults' => 0
        ]);

Want to execute a specific scorecard version:

$scorecard = new \Scorecardio\Scorecard('4eC39HqLyjWDarjtT1zdp7dc');

$result = $scorecard->executeScorecardVersion('Partner name', 'Scorecard name', 3, [
            'work_contract' => 'yes',
            'nationality' => 'Netherlands',
            'date_of_birth' => '21-11-1990',
            'marital_status' => 'single',
            'number_of_current_loans' => 0,
            'number_of_past_loans' => 1,
            'loan_defaults' => 0
        ]);

Or fetch a previous scoring again:

$scoring = new \Scorecardio\Scoring('4eC39HqLyjWDarjtT1zdp7dc');

$result = $scoring->fetchScoring('72983022-84df-4d67-8809-c97648f2b59e');