Download the PHP package maxmind/minfraud without Composer

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

MaxMind minFraud Factors, Insights, Score PHP API

Description

This package provides an API for the MaxMind minFraud Score, Insights, and Factors web services.

Install via Composer

We recommend installing this package with Composer.

Download Composer

To download Composer, run in the root directory of your project:

You should now have the file composer.phar in your project directory.

Install Dependencies

Run in your project root:

You should now have the files composer.json and composer.lock as well as the directory vendor in your project directory. If you use a version control system, composer.json should be added to it.

Require Autoloader

After installing the dependencies, you need to require the Composer autoloader from your code:

Install via Phar

Although we strongly recommend using Composer, we also provide a phar archive containing most of the dependencies for this API. The latest phar archive is available on our releases page.

Install Dependencies

Please note that you must have the PHP cURL extension installed to use this archive. For Debian based distributions, this can typically be found in the the php-curl package. For other operating systems, please consult the relevant documentation. After installing the extension you may need to restart your web server.

If you are missing this extension, you will see errors like the following:

Require Package

To use the archive, just require it from your script:

API Documentation

More detailed API documentation is available on our GitHub Page under the "API" tab.

Usage

This library provides access to both the minFraud (Score, Insights and Factors) and Report Transaction APIs.

minFraud API

To use the minFraud API, create a new \MaxMind\MinFraud object. The constructor takes your MaxMind account ID, license key, and an optional options array as arguments. This object is immutable. See the API documentation for the possible options.

For instance, to use the Sandbox web service instead of the production web service, you can provide the host option:

Build up the request using the ->with* methods as shown below. Each method call returns a new object. The previous object is not modified.

If there is a validation error in the data passed to a ->with* method, a \MaxMind\Exception will be thrown. This validation can be disabled by setting validateInput to false in the options array for \MaxMind\MinFraud, but it is recommended that you keep it on at least through development as it will help ensure that you are sending valid data to the web service.

After creating the request object, send a Score request by calling ->score(), an Insights request by calling ->insights(), or a Factors request by calling ->factors(). If the request succeeds, a model object will be returned for the endpoint. If the request fails, an exception will be thrown.

See the API documentation for more details.

minFraud Exceptions

All externally visible exceptions are in the \MaxMind\Exception namespace. The possible exceptions are:

minFraud Example

Report Transactions API

MaxMind encourages the use of this API as data received through this channel is used to continually improve the accuracy of our fraud detection algorithms.

To use the Report Transactions API, create a new \MaxMind\MinFraud\ReportTransaction object. The constructor takes your MaxMind account ID, license key, and an optional options array as arguments. This object is immutable. You then send one or more reports using the ->report method as shown below.

If there is a validation error in the data passed to the ->report method, a \MaxMind\Exception will be thrown. This validation can be disabled by setting validateInput to false in the options array for \MaxMind\MinFraud\ReportTransaction, but it is recommended that you keep it on at least through development as it will help ensure that you are sending valid data to the web service.

If the report is successful, nothing is returned. If the report fails, an exception with be thrown.

See the API documentation for more details.

Report Transaction Exceptions

All externally visible exceptions are in the \MaxMind\Exception namespace. The possible exceptions are:

Report Transaction Example

Support

Please report all issues with this code using the GitHub issue tracker.

If you are having an issue with the minFraud service that is not specific to the client API, please see our support page.

Requirements

This code requires PHP 8.1 or greater. Older versions of PHP are not supported.

There are several other dependencies as defined in the composer.json file.

Contributing

Patches and pull requests are encouraged. All code should follow the PSR-2 style guidelines. Please include unit tests whenever possible.

Versioning

This API uses Semantic Versioning.

Copyright and License

This software is Copyright (c) 2015-2024 by MaxMind, Inc.

This is free software, licensed under the Apache License, Version 2.0.


All versions of minfraud with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
ext-json Version *
geoip2/geoip2 Version ^v3.0.0
maxmind/web-service-common Version ^0.9.0
respect/validation Version ^2.2.4
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 maxmind/minfraud contains the following files

Loading the files please wait ....