petflow/signifyd

This package is abandoned and no longer maintained. No replacement package was suggested.

A lightweight library for interacting with the Signifyd REST API.

0.0.2 2014-01-29 17:35 UTC

This package is not auto-updated.

Last update: 2017-01-06 18:07:17 UTC


README

Build Status Coverage Status

Signifyd is a third party solution for detecting fraud in e-commerce transactions, available as a RESTful API. This library is a simple wrapper for their API service, using the Guzzle http library to make requests and handle responses.

For more information about Signifyd and their API, see links below:

Installation

Download this entire repository into your local project folder, and then run the following:

curl -sS https://getcomposer.org/installer | php
php composer.phar install
composer install

Usage

Basic Case Operations

namespace Petflow\Signifyd;
require './vendor/autoload.php';

$api_key = array('key' => 'your-signifyd-api-key-here');

$investigation = new Investigation($api_key);

// fields match exactly to reference: https://www.signifyd.com/docs/api
$data = array(
    'purchase' => array(...),
    'card'     => array(...),
    ...
);

// create a new case
$result = $investigation->post($data);

// retrieve a case
$result = $investigation->get($result['case_id']);

if ($result['success']) {
    $score = $case['response']['adjustedScore'];   
}

Handling Errors

$result = $investigation->post($data);

if (!$result['success']) {
    // unsuccessful
    $reason = $result['reason'];

} else {
    // successful
}

FAQ

What is / where can I get a Signifyd API key?

The API key is used in Basic HTTP authentication to identify who you are to their service. They do not provide a public sandbox, however you may obtain testing keys by contacting them here: https://www.signifyd.com/get-started.