Skip to content

SynergiTech/creditsafe-connect

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

40 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creditsafe API

Tests

composer require synergitech/creditsafe-connect

Usage

Setting up Client

$config = [
    'username'  =>  'username',
    'password'  =>  'password'
];

$creditsafe = new \SynergiTech\Creditsafe\Client($config);

Access countries and their codes

$creditsafe->countries()->access();

Search criteria using country code

$creditsafe->companies()->searchCriteria(['countries' => 'GB']);

Company search pagination

$search = $creditsafe->companies()->search(['countries' => 'GB', 'name' => 'GOOGLE UK LIMITED']);
$search->setPageSize(100);
foreach ($search as $result) {
    $company = $result->get();
}

Get Custom report data options

$creditsafe->()->reportCustomData()->get('DE');

Get company report

$creditsafe->companies()->get('GB001-0-03977902');

Change report language

$creditsafe->companies()->get('GB001-0-03977902', 'FR');

Adding reason code as extra parameter needed for German reports

$creditsafe->companies()->get('GB001-0-03977902', 'DE', ['customData' => 'de_reason_code::1']);

Running tests

vendor/bin/phpunit tests