wsw / sift-science
PHP client Sift Science
Installs: 16 611
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 2
Forks: 0
Open Issues: 0
Requires
- php: >=5.6
- doctrine/collections: ^1.3
- guzzlehttp/guzzle: ^6.3
- league/fractal: ^0.16.0
- wsw/email: ^1.1
- wsw/money: ^1.0
Requires (Dev)
- fzaninotto/faker: ^1.6
- phpunit/phpunit: ^5.7
- rdehnhardt/var-dumper: ^1.1
- sebastian/phpcpd: ^3.0
- squizlabs/php_codesniffer: ^3.0
This package is auto-updated.
Last update: 2024-10-29 04:31:12 UTC
README
SDK Sift Science
Installation
Via Composer:
composer require wsw/sift-science
Usage
Create new account
<?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
$ composer test
Security
If you discover any security related issues, please email ronaldo@whera.com.br instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.