Project

maxmind-rb

0.01
No commit activity in last 3 years
No release in over 3 years
A wrapper around MaxMind's minFraud anti-fraud service. http://www.maxmind.com/app/ccv_overview
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

matchy
>= 0

Runtime

 Project Readme

maxmind-rb

A wrapper around MaxMind's minFraud anti-fraud service.

Installation

sudo gem install maxmind-rb

Dependencies

  • active_support
  • shoulda (used in tests only)
  • matchy (used in tests only)

Usage

Minimum Required

These are the only required fields to acquire a response from MaxMind.

require 'maxmind'
Maxmind.license_key = 'LICENSE_KEY'
request = Maxmind::Request.new(
  :client_ip => '24.24.24.24',
  :city => 'New York',
  :region	=> 'NY',
  :postal	=> '11434',
  :country => 'US'
)
	
  response = request.process!

Recommended

For increased accuracy, these are the recommended fields to submit to MaxMind. The additional fields here are optional and can be all or none.

require 'maxmind'
Maxmind.license_key = 'LICENSE_KEY'
request = Maxmind::Request.new(
	  :client_ip => '24.24.24.24',
	  :city => 'New York',
	  :region	=> 'NY',
	  :postal	=> '11434',
	  :country => 'US',
	  :domain => 'yahoo.com',
  :bin => '549099',
  :forwarded_ip => '24.24.24.25',
  :email => 'test@test.com',
  :username => 'test_carder_username',
  :password => 'test_carder_password'
)

  response = request.process!

Thorough

This is every field available.

require 'maxmind'
Maxmind.license_key = 'LICENSE_KEY'
request = Maxmind::Request.new(
  :client_ip => '24.24.24.24',
  :city => 'New York',
  :region	=> 'NY',
  :postal	=> '11434',
  :country => 'US',
  :domain => 'yahoo.com',
  :bin => '549099',
  :forwarded_ip => '24.24.24.25',
  :email => 'test@test.com',
  :username => 'test_carder_username',
  :password => 'test_carder_password'
  :bin_name => 'MBNA America Bank',
  :bin_phone => '800-421-2110',
  :cust_phone => '212-242',
  :request_type => 'premium',
  :shipping_address => '145-50 157th Street',
  :shipping_city => 'Jamaica',
  :shipping_region => 'NY',
  :shipping_postal => '11434',
  :shipping_country => 'US',
  :transaction_id => '1234',
  :session_id => 'abcd9876',
  :user_agent => 'Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_5_5; en-us) AppleWebKit/525.18 (KHTML, like Gecko) Version/3.1.2 Safari/525.20.1',
  :accept_language => 'en-us'
)
	
  response = request.process!

Also see examples/example.rb

Reference

minFraud API Reference

Copyright

Copyright (c) 2009 Adam. Copyright (c) 2010 t.e.morgan. See LICENSE for details.