Important facts about commercial licenses

  • Licenses are perpetual. They do not expire and do not need to be renewed.
  • Licenses can be upgraded. You can upgrade to a more expensive license later paying only the difference in cost.
  • Pay attention to the distribution type - Hosted (sites / servers), binary (applications) or source (includes all the others). Choose according to your needs (more below).
  • All licenses allow commercial use unless otherwise indicated.
  • Read the full license by clicking on the icon.
  • Read more about licenses in our handy license guide.
$19

Hosted License

1 site, unlimited servers No source distribution
$69

Developer License

5 projects Source and binary distribution
You need to log-in or create an account
  • Create an account
  • Log-in
  • Please use your real name.
  • Account activation link will be sent to this address.
  • Minimum 8 characters

Clicking this button confirms you read and agreed to the terms of use and privacy policy.

  • Released: Aug 8, 2012
    Last Update: Aug 12, 2012
  • Language: PHP
  • Category: Ecommerce
  • Time / costs savings: 6h / $360 *

Maxmind Minfraud API Wrapper

Maxmind Minfraud API Wrapper
Developed by Lionite, Released Aug 8, 2012

Prevent online payment fraud using the Maxmind Minfraud service. This component provides an API wrapper for PHP that handles most of the manual process and integrates with the PHP Paypal API class.

PHP

Tags: fraud , paypal

Online payment fraud is a common and painful problem for eCommerce services and websites. The good news is that fraud can minimized and prevented using user data that is readily available before processing a transaction.

This class provides an API wrapper for the Maxmind Minfraud service for estimating the chance of fraud, and also automates some of the data gathering:

  • Finds potential proxy addresses using a list of known proxy headers
  • Hashes and splits domain of provided Email address
  • Adds various environment parameters if they are available
  • Communicates with the Minfraud service and formats the response as an easy to use associative array (instead of a query string)
  • Integrates with the PHP Paypal API component and provides methods to accept data directly from it.

Bundle: If you need Paypal integration with PHP as well, checkout the bundle of this component and the PHP Paypal API class component.

Back to top

How it works

There are several indicators of possible fraud that are readily accessible:

  • User location (via geolocation) - distance between user location and billing location indicates possible fraud. In addition, several countries are considered high-risk for online payments.
  • Email address - free Email service address (such as Gmail, Hotmail and so forth) are much more likely to be used in fraud than private domain names.
  • Usage of a proxy - proxies are used to camouflage the indicators in the previous point, by attempting to disguise the real location of the user. It is not always easy to detect proxies, but Maxmind has a large database of known proxies and high-risk proxies to match against.
  • Credit-card security checks - such as AVS and CVC. Failure of those checks is a high risk of fraud.

For more in depth information, you should definitely read 8 steps to preventing online fraud (I am the author of that article).

Using the information gathered and by comparing to historical fraud data, Maxmind calculates a Risk Score that indicates the chance of fraud (from 0.01 to 100).

Back to top

Usage

API Key

In order to use the service, you must obtain an API key from Maxmind.

Usage

Include the class, and call one of the testing methods, according to your needs.

include_once('Minfraud.php');
$minfraud = new Lionite_Minfraud();
$result = $minfraud - check($data);

Where $data includes the information you collect from your credit-card form or Paypal.

This class integrates with the PHP Paypal API class, and provides two methods for it.

For Express Checkout (transactions and recurring profiles):

include_once('Minfraud.php');
$minfraud = new Lionite_Minfraud();
$result = $minfraud - checkExpressCheckout($data);

Where $data is the information returned from getCheckoutDetails()

For Direct Payment:

include_once('../library/Lionite/Minfraud.php');
$minfraud = new Lionite_Minfraud();
$result = $minfraud - checkDirectPayment($data);

Where $data is the information submitted by the example form included in the component. You can add / modify some of the parameters if you have somewhat different field names.

SSL Certificate

The component includes the Mozilla SSL certificate used to authenticate the endpoint (Maxmind's service in this case). You can always obtain the latest version at the official cURL site.

The certificate is located inside the /Cert folder in the library folder. If you put the certificate in a different location, you need to adjust the $_SSLcertificate variable inside the class.

User Reviews

No reviews have been submitted yet.

Questions & Comments


Or enter your name and Email
No comments have been posted yet.
You must be logged-in to vote. Log-in to your account or register now.