Get to know analyze_order_risk
analyze_order_risk makes use of MaxMind to determine how risky it may be to accept a given credit card as valid payment for an order.
analyze_order_risk expects to be called with an associative array of parameters including the following keys:
- ip – The IP address the order advertises as its origin.
- city - The city the order advertises as its origin.
- state – The state/province/territory the order advertises as its origin.
- zip – The postal code the order advertises as its origin.
- country – The country the order advertises as its origin.
- ccNum – The first seven digits of the credit card number used.
- [forwardedFor] – The IP address reported in the HTTP header of the request as the origin of the request.
$params = array( 'ip' => "22.214.171.124", 'city' => "Los Angeles", 'state' => "CA", 'zip' => "92865", 'country' => "US", 'email' => "firstname.lastname@example.org", 'ccNum' => "5105105" );
Array ( [status] => 1 [data] => Array ( [errors] => [maxmind] => Array ( [distance] => 44 [countryMatch] => Yes [countryCode] => US [freeMail] => Yes [anonymousProxy] => No [score] => 2.52 [binMatch] => Yes [binCountry] => US [err] => [proxyScore] => 0.00 [ip_region] => CA [ip_city] => Los Angeles [ip_latitude] => 34.0438 [ip_longitude] => -118.2512 [binName] => [ip_isp] => Nobis Technology Group, LLC [ip_org] => Ubiquity Server Solutions Los Angeles [binNameMatch] => NA [binPhoneMatch] => NA [binPhone] => [custPhoneInBillingLoc] => NotFound [highRiskCountry] => No [queriesRemaining] => 43325 [cityPostalMatch] => No [shipCityPostalMatch] => [maxmindID] => DJPPACAI [carderEmail] => No [riskScore] => 35.86 [explanation] => This order is slightly risky, and we suggest that you review it manually, especially for B2B transactions. The order is slightly riskier because the e-mail domain, yahoo.com, is acquiring Tumblr and this makes me sad. )