Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Ruby Interface to Maxmind's minFraud service

branch: master

This branch is 0 commits ahead and 0 commits behind master

Version bump

latest commit c6c05aff7c
Tinu Cleatus authored
Octocat-spinner-32 examples - Tests written May 16, 2009
Octocat-spinner-32 lib Added conversion to string (fixes bug with recent releases of Ruby) September 30, 2011
Octocat-spinner-32 test Fixed tests February 10, 2010
Octocat-spinner-32 .document Initial commit to maxmind. May 15, 2009
Octocat-spinner-32 .gitignore Git ignore rbenv dotfiles December 10, 2013
Octocat-spinner-32 LICENSE Initial commit to maxmind. May 15, 2009
Octocat-spinner-32 README.markdown Fixed readme February 10, 2010
Octocat-spinner-32 Rakefile Updated gemspec February 10, 2010
Octocat-spinner-32 VERSION Version bump December 10, 2013
Octocat-spinner-32 hackedunit-maxmind.gemspec Version bump December 10, 2013
README.markdown

maxmind

Interfaces with Maxmind's minFraud anti-fraud service.

Installation

sudo gem install hackedunit-maxmind --source=http://gemcutter.org

Dependencies

Usage

Minimum Required

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

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

response = Maxmind::Response.new(request.query)

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'
request = Maxmind::Request.new('LICENSE_KEY',
    :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 = Maxmind::Response.new(request.query)

Thorough

require 'maxmind'
request = Maxmind::Request.new('LICENSE_KEY',
    :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',
    :requested_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 = Maxmind::Response.new(request.query)

Also see examples/example.rb

Reference

minFraud API Reference

Copyright

Copyright (c) 2009 Adam. See LICENSE for details.

Something went wrong with that request. Please try again.