Download the PHP package inspetor/inspetor-php without Composer
On this page you can find all versions of the php package inspetor/inspetor-php. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package inspetor-php
Description
Inspetor is a product developed to help your company to avoid fraudulent transactions. This repository contains the PHP SDK for you to integrate into your company's PHP services, which will allow Inspetor to analyze user patterns and prevent fraudulent transactions. This README file, along with our generalized integration documentation are here to help you to integrate the Inspetor PHP library into your product with few easy steps.
Setup Guide
This is the step-by-step Inspetor integration:
Composer & Packagist
We recommend using Composer to add the Inspetor SDK to your PHP project's dependencies. The Inspetor SDK is available on Packagist, or directly on GitHub.
You can add the Inspetor SDK to your Composer-managed PHP project as follows:
Following this command, the Inspetor SDK should be listed in your composer.json 'require' block and the package source files should be present in your vendor folder.
SDK setup
To instantiate the Inspetor client object within your project, you'll need to perform some minimal configuration. We suggest adding a similar block to your application configuration:
We suggest creating an Inspetor
class in which to instantiate you InspetorClient
, then provide the instantiated client object to your various internal clients. This will ensure that your InspetorClient
object has been properly configured prior to being called:
Using the Inspetor client
Detailed method information and language-specific examples are all available in the Inspetor integration documentation. There you will find definitions, examples, and references for fundamental Inspetor entities. But just to get you started, we'll provide a practical example for interacting with our SDK below.
Let's imagine that you want to put a tracker in your "create transaction" flow to send analytic information to Inspetor at sale creation time. As you may have guessed (if you've read the docs), you'll be calling the inspetorSaleCreation
method.
Naturally, the inspetorSaleCreation
method requires certain characteristics of the sale creation to be send to Inspetor for analysis. Those attributes are captured in a model (specifically, the InspetorSale model). You can find more general information on Inspetor's concept of models here.
Here's an example of how you would integrate this into your code base:
Note that we are using an auxiliar function inspetorSaleBuilder to build the Sale Model. This is not strictly necessary, but we imagine you will find such a practice preferable.
Support
Feel free to reach out to the Inspetor team if you encounter any problems during your integration.