2017 © Pedro Peláez
 

library sift-science

PHP client Sift Science

image

wsw/sift-science

PHP client Sift Science

  • Monday, August 28, 2017
  • by whera
  • Repository
  • 1 Watchers
  • 2 Stars
  • 2,579 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 13 Versions
  • 20 % Grown

The README.md

Sift Science

SDK Sift Science, (*1)

Scrutinizer Code Quality Code Coverage Build Status, (*2)

Installation

Via Composer:, (*3)

composer require wsw/sift-science

Usage

Create new account, (*4)

<?php

use InvalidArgumentException;
use WSW\Email\Email;
use WSW\SiftScience\Credentials;
use WSW\SiftScience\Exceptions\SiftScienceRequestException;
use WSW\SiftScience\Services\CreateAccountService;

try {

    $credentials = new Credentials('apiToken');

    $service = new CreateAccountService($credentials);

    $account = $service->createAccountBuilder();

    $account
        ->setUserId('billy_jones_301')
        ->setSessionId('gigtleqddo84l8cm15qe4il')
        ->setUserEmail(new Email('bill@gmail.com'))
        ->setName('Bill Jones')
        ->setPhone('1-415-555-6040');

    $service->create($account);

} catch (SiftScienceRequestException $e) {
    echo $e->getMessage();

} catch (InvalidArgumentException $e) {
    echo $e->getMessage();

}

Testing

bash $ composer test, (*5)

Security

If you discover any security related issues, please email ronaldo@whera.com.br instead of using the issue tracker., (*6)

Credits

License

The MIT License (MIT). Please see License File for more information., (*7)

The Versions