Download the PHP package siftscience/sift-php without Composer

On this page you can find all versions of the php package siftscience/sift-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 sift-php

Sift Bindings CircleCI

Installation

With Composer

  1. Add siftscience/sift-php as a composer dependency

  2. Now SiftClient will be autoloaded into your project.

Manually

  1. Download the latest release.

  2. Extract into a folder in your project root named "sift-php".

  3. Include SiftClient in your project like this:

Usage

Track an event

To learn more about the Events API visit our developer docs.

Optional Params

Here's an example that sends a $transaction event to Sift.

Label a user as good/bad

Unlabel a user

Get a user's score

Get the status of a workflow run

Get the latest decisions for a user

Get the latest decisions for an order

Get the latest decisions for a session

List of configured Decisions

Optional Params

Apply decision to a user

Apply decision to an order

Apply decision to a session

Creates a new webhook with a specified URL.

Retrieves a webhook when given an ID.

List All Webhooks

Update a Webhook

Deletes a webhook when given an ID.

Contributing

Run the tests from the project root with PHPUnit like this:

Updating Packagist

  1. Update composer.json to reflect the new version, as well as any new requirements then merge changes into master.

  2. Create a new release with the version number and use it as the description. Packagist will automatically deploy a new package via the configured webhook.

HTTP connection pooling

You can substantially improve the performance of SiftClient by using HTTP connection pooling. Because standard PHP/fastcgi deployments don't have a mechanism for persisting connections between requests, the easiest way to pool connections is by routing requests through a proxy like Apache httpd or nginx.

Apache httpd

nginx

For Debian-based distributions, the certificate file is /etc/ssl/certs/ca-certificates.crt

Then, instantiate SiftClient to route requests through the proxy:

Integration testing app

For testing the app with real calls it is possible to run the integration testing app, it makes calls to almost all our public endpoints to make sure the library integrates well. At the moment, the app is run on every merge to master

How to run it locally

  1. Add env variable ACCOUNT_ID with the valid account id
  2. Add env variable API_KEY with the valid Api Key associated from the account
  3. Run the following under the project root folder

License

MIT


All versions of sift-php with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
ext-json Version *
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 siftscience/sift-php contains the following files

Loading the files please wait ....