Download the PHP package signifyd/signifyd-php without Composer

On this page you can find all versions of the php package signifyd/signifyd-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package signifyd-php

:warning: WARNING :warning:

V2 SDK is deprecated Please refer to our V3 API documentation and download the OpenAPI specification linked at the top of the page to generate PHP and other SDKs for the latest version of Signifyd's Antifraud APIs.

Signifyd V2 PHP SDK

This repository contains the PHP SDK client for the deprecated Signifyd V2 API.

Overview

This document will give an overview on the available methods in the Signifyd PHP library. Also examples for this methods will be provided.

Support

For questions or issues please contact our support team. You can submit feedback and suggestions for improvement here.

Examples

If you are looking for a sample code that was tested and works, check out the sdk-examples repository.

Requirements

Installing the SDK

With composer

The Signifyd PHP SDK is available on Packagist. To add it to your project, simply run command below to get the latest version:

If you want you can specify a version by adding it to the command:

Or add the this line under the "require" key in your composer.json:

Change DESIRED_VERSION_HERE by the version description which most fits to your business. To learn more about version numbers check Composer documentation.

https://getcomposer.org/doc/articles/versions.md#writing-version-constraints

After adding the line you must install the Signifyd PHP SDK dependency by running:

Getting Started

There are 3 api classes that each represents the 3 main parts of the API

CASE API Which works with cases which are orders submitted to Signifyd for review. A case contains payment, recipient, product, shipping, and account information.

GUARANTEE API Which works with guarantee which is a financial liability shift that protects online retailers in case of chargebacks. View our product manual to learn more.

WEBHOOKS API Which works with webhooks which are messages sent by SIGNIFYD via HTTP POST to a url you configure on your Notifications page in the SIGNIFYD settings. Webhook messages are sent when certain events occur in the life of an investigation. They allow your application to receive pushed updates about a case, rather than poll SIGNIFYD for status changes.

API Clases

CaseApi

The CaseApi is the class the maps the main case functionality of the Signify API. This class has the methods that work with the Signify investigations (called cases).

There are multiple ways to instantiate the CaseApi class. Usage examples:

Or using the Settings Class

Class methods

All methods accept two type of data as parameters.

The parameter as an array, which means that the constructor of the model will set the values of the class properties based on the data passed to the constructor.

The parameter as an object, which means that after the instanciate of the class you can use the setters to add data to the model.

createCase($case);

Submit an order for fraud review. There are multiple ways for the data to be sent to the createCase method. One way is to send an array with all the data required to the createCase method. This is useful if you know what data needs to be sent.

For more info about the data that can be added please check the CaseModel model.

Another way is to use the setters and getters of the models so you can add data.

An example of a JSON object sent to our API:

This method with return a CaseResponse which will have the caseId property populated. In case of error the CaseResponse will have the property isError set to true and the property errorMessage will have the received error message. Error message can be empty if the request can not be made, but in this case the signifyd_connect.log will have the error logged.

getCase($caseId);

Retrieve details about an individual case by investigation id or case id.

This sends the request to our API Endpoint to get a case. As a parameter for this method you need to send a case id, an optional parameter is the entry.

This method with return a CaseResponse which will have all the properties populated. In case of error the CaseResponse will have the property isError set to true and the property errorMessage will have the received error message. Error message can be empty if the request can not be made, but in this case the signifyd_connect.log will have the error logged.

addFulfillment($fulfillments);

This sends the request to our API Endpoint to add fulfillments for order. One way is to send an array with all the data required to the addFulfillment method.

For more info about the data that can be added please check the Fulfillment model.

This method with return a FulfillmentBulkResponse which will have the objects property populated with Fulfillment model all the properties populated. In case of error the FulfillmentBulkResponse will have the property isError set to true and the property errorMessage will have the received error message. Error message can be empty if the request can not be made, but in this case the signifyd_connect.log will have the error logged.

updatePayment($paymentUpdate);

Update payment data by sending updated information. This sends the request to our API Endpoint to update the payment for an existing case.

For more info about the data that can be added please check the PaymentUpdate model.

This method with return a CaseResponse which will have the properties populated. In case of error the CaseResponse will have the property isError set to true and the property errorMessage will have the received error message. Error message can be empty if the request can not be made, but in this case the signifyd_connect.log will have the error logged.

GuaranteeApi

The GuaranteeApi is the class the maps the main guarantee functionality of the Signify API. This class has the methods that work with guarantees.

There are multiple ways to instantiate the GuaranteeApi class. Usage examples:

Or using the Settings Class

Class methods

All methods accept two type of data as parameters.

The parameter as an array, which means that the constructor of the model will set the values of the class properties based on the data passed to the constructor.

The parameter as an object, which means that after the instanciate of the class you can use the setters to add data to the model.

createGuarantee($guarantee);

Submit a request to guarantee an existing case.

For more info about the data that can be added please check the Guarantee model.

This method with return a GuaranteeResponse which will have the properties populated. In case of error the GuaranteeResponse will have the property isError set to true and the property errorMessage will have the received error message. Error message can be empty if the request can not be made, but in this case the signifyd_connect.log will have the error logged.

cancelGuarantee($guarantee);

A Guarantee can be canceled for orders that no longer require a guarantee.

For more info about the data that can be added please check the Guarantee model.

This method with return a GuaranteeResponse which will have the properties populated. In case of error the GuaranteeResponse will have the property isError set to true and the property errorMessage will have the received error message. Error message can be empty if the request can not be made, but in this case the signifyd_connect.log will have the error logged.

WebhookApi

The WebhookApi is the class the maps the main webhooks functionality of the Signify API. This class has the methods that work with webhooks.

There are multiple ways to instantiate the WebhookApi class. Usage examples:

Or using the Settings Class

Class methods

All methods accept two type of data as parameters.

The parameter as an array, which means that the constructor of the model will set the values of the class properties based on the data passed to the constructor.

The parameter as an object, which means that after the instanciate of the class you can use the setters to add data to the model.

validWebhookRequest($request, $hash, $topic);

Check if a webhook callback is valid.

This is a helper function which does not connect to signifyd. This method with return a boolean true in case of a valid request or false in case of a invalid request.

createWebhooks($webhooks);

Create webhooks in Signifyd.

For more info about the data that can be added please check the Wehbook model.

This method with return a WebhooksBulkResponse which will have the objects property populated with WebhooksResponse with all the properties populated. In case of error the WebhooksBulkResponse will have the property isError set to true and the property errorMessage will have the received error message. Error message can be empty if the request can not be made, but in this case the signifyd_connect.log will have the error logged.

updateWebhooks($webhooks);

Update webhooks in Signifyd.

For more info about the data that can be added please check the Wehbook model.

This method with return a WebhooksBulkResponse which will have the objects property populated with WebhooksResponse with all the properties populated. In case of error the WebhooksBulkResponse will have the property isError set to true and the property errorMessage will have the received error message. Error message can be empty if the request can not be made, but in this case the signifyd_connect.log will have the error logged.

getWebhooks();

Retrive a list of webhooks set in Signifyd.

This method with return a WebhooksBulkResponse which will have the objects property populated with WebhooksResponse with all the properties populated. In case of error the WebhooksBulkResponse will have the property isError set to true and the property errorMessage will have the received error message. Error message can be empty if the request can not be made, but in this case the signifyd_connect.log will have the error logged.

updateWebhook($webhook);

Update a single webhook in Signifyd.

For more info about the data that can be added please check the Wehbook model.

This method with return a WebhooksResponse which will have the properties populated. In case of error the WebhooksResponse will have the property isError set to true and the property errorMessage will have the received error message. Error message can be empty if the request can not be made, but in this case the signifyd_connect.log will have the error logged.

deleteWebhook($webhook);

Delete a webhook from Signifyd.

For more info about the data that can be added please check the Wehbook model.

This method with return a WebhooksResponse which will have the properties populated. In case of error the WebhooksResponse will have the property isError set to true and the property errorMessage will have the received error message. Error message can be empty if the request can not be made, but in this case the signifyd_connect.log will have the error logged.

SDK API Responses

CaseResponse

Case response is the response that is returned when the case api is called

Properties
Name

guaranteeEligible guaranteeDisposition | status | caseId | score | uuid | headline | orderId | orderDate | orderAmount | associatedTeam | reviewDisposition | createdAt | updatedAt | orderOutcome | currency | adjustedScore | testInvestigation | logger | isError | errorMessage |

You can access any value by using the getters methods in the response

FulfillmentBulkResponse

Fulfillment bulk response onse is the response that is returned when the case api addFulfillment method is called

Properties
Name
objects
logger
isError
errorMessage

You can access any value by using the getters methods in the response

GuaranteeResponse

Guarantee response is the returned value when the guarantee api is called

Properties
Name
disposition
reviewedBy
reviewedAt
submittedBy
submittedAt
rereviewCount
guaranteeId
caseId
isError
errorMessage
logger

You can access any value by using the getters methods in the response

WebhooksResponse

Webhoook response is the returned value when the webhook api for update and delete webhook methods are called

Properties
Name
id
eventType
eventDisplayText
url
team
isError
errorMessage
responseArray
logger

You can access any value by using the getters methods in the response

WebhooksBulkResponse

Webhoook bulk response is the returned value when the webhook api for get, create and update webhooks methods are called

Properties
Name
objects
isError
errorMessage
logger

You can access any value by using the getters methods in the response

SDK Settings

Settings

Contains a shipping/billing address

Properties
Name Type Description Notes
apiKey string The api key from Signifyd
apiAddress string The default api url "https://api.signifyd.com/v2/";
validateData string To validate or not the data true;
timeout integer The default timeout for the curl connection 30;
retry boolean Should the SDK retry when it receives know errors false;
SSLVerification boolean Should curl check the ssl certificate false;
consoleOut boolean Should the SDK output the logs to php://stdout false;
logEnabled boolean Should the logs be enabled true;

SDK Models

Address

Contains a shipping/billing address The address object is a container for the address information, for the order that was placed in your store. The address class can be found under namespace "Signifyd\Models", located lib/Models/Address.php.

or

Card

Data related to the card that was used for the purchase and its cardholder The card object is a container for the card information, for the order that was placed in your store. The card class can be found under namespace "Signifyd\Models", located lib/Models/Card.php.

or

CaseModel

Data related to the case The case object is the main container for the case related information that is sent to our API on case creation as a JSON string. The case class can be found under namespace "Signifyd\Models", located lib/Models/CaseModel.php. The case object has as properties other objects from the "Signifyd\Models" namespace, in order to facilitate the creation of a correct object that our API will be able to process without errors.

or

DiscountCode

Any discount codes, coupons, or promotional codes used during checkout to recieve a discount on the order. You can only provide the discount code and the discount amount OR the discount percentage. The discountCode object is the container for discount code related information for the order that was placed in your store. The discountCode class can be found under namespace "Signifyd\Models", located lib/Models/DiscountCode.php. The discountCode object has as properties other objects from the "Signifyd\Models" namespace, in order to facilitate the creation of a correct object that our API will be able to process without errors.

or

Guarantee

Guarantee data The guarantee object is the container for guarantee information that is sent to our API. The guarantee class can be found under namespace "Signifyd\Models", located lib/Models/Guarantee.php. The guarantee object has as properties other objects from the "Signifyd\Models" namespace, in order to facilitate the creation of a correct object that our API will be able to process without errors.

or

PaymentUpdate

Payment update data The paymentUpdate object is a container for the payment update information, for the order that was placed in your store. The paymentUpdate class can be found under namespace "Signifyd\Models", located lib/Models/PaymentUpdate.php.

or

Product

The products purchased in the transaction The product object is a container for the product information, for the order that was placed in your store. The product class can be found under namespace "Signifyd\Models", located lib/Models/Recipient.php.

or

Purchase

Data related to purchase event represented in this Case Creation request. The purchase object is a container for the order information, the order that was placed in your store. The purchase class can be found under namespace "Signifyd\Models", located lib/Models/Purchase.php.

or

Recipient

Data related to person or organization receiving the items purchased. The recipient object is a container for the recipient information, for the order that was placed in your store. The recipient class can be found under namespace "Signifyd\Models", located lib/Models/Recipient.php.

or

Seller

All data related to the seller of the product. This information is optional unless you are operating a marketplace, listing goods on behalf of multiple sellers who each hold a seller account registered with your site (e.g. Ebay). The seller object is a container for the seller information, for the order that was placed in your store. The seller class can be found under namespace "Signifyd\Models", located lib/Models/Seller.php.

or

Shipment

The shipments associated with this purchase. The shipment object is a container for the shipment information, for the order that was placed in your store. The shipment class can be found under namespace "Signifyd\Models", located lib/Models/Shipment.php.

or

Team

or

UserAccount

The userAccount object is a container for the user account information, for the order that was placed in your store. The userAccount class can be found under namespace "Signifyd\Models", located lib/Models/UserAccount.php.

or

Webhook

Wehook data The webhook object is a container for the user account information, for the order that was placed in your store. The webhook class can be found under namespace "Signifyd\Models", located lib/Models/Webhook.php.

or


All versions of signifyd-php with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
monolog/monolog Version >=1.16.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package signifyd/signifyd-php contains the following files

Loading the files please wait ....