Skip to content
This repository has been archived by the owner on Jun 3, 2022. It is now read-only.

Commit

Permalink
Release ccfd-api-php 1.50
Browse files Browse the repository at this point in the history
  • Loading branch information
borisz committed Apr 17, 2012
1 parent 0027f35 commit 19bd9c7
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 11 deletions.
3 changes: 3 additions & 0 deletions Changes
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
Revision history for MaxMind CreditCardFraudDetection PHP API
1.50 March 13th 2012
- Check countryMatch instead of score. Score is not avail as of
minfraud_version 1.3 and might be empty. ( Boris Zentner )
1.49 Februar 19th 2009
- Add minfraud3.maxmind.com to the server list ( Boris Zentner )
1.48 October 3th 2008
Expand Down
4 changes: 2 additions & 2 deletions CreditCardFraudDetection.php
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ function CreditCardFraudDetection() {

//set the url of the web service
$this->url = "app/ccv2r";
$this->check_field = "score";
$this->check_field = "countryMatch";
$this->server = array("minfraud3.maxmind.com", "minfraud1.maxmind.com", "minfraud2.maxmind.com");
$this->numservers = count($this->server);
$this->API_VERSION = 'PHP/1.49';
$this->API_VERSION = 'PHP/1.50';
}

function filter_field($key, $value) {
Expand Down
2 changes: 1 addition & 1 deletion Example.php
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
// $ccfs->isSecure = 0;

// set the timeout to be five seconds
$ccfs->timeout = 5;
$ccfs->timeout = 10;

// uncomment to turn on debugging
// $ccfs->debug = 1;
Expand Down
12 changes: 4 additions & 8 deletions HTTPBase.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ function HTTPBase() {
$this->isSecure = 0;
$this->debug = 0;
$this->timeout = 0;
$this->check_field = "score";
// use countryMatch to validate the results. It is avail in all minfraud answeres
$this->check_field = "countryMatch";
$this->wsIpaddrRefreshTimeout = 18000;
$this->wsIpaddrCacheFile = $this->_getTempDir()."/maxmind.ws.cache";
if ($this->debug == 1) {
Expand Down Expand Up @@ -391,15 +392,10 @@ function querySingleServer($server) {
//hash named outputstr
$this->outputstr[$key] = $value;
}
//check if outputstr has the score if outputstr does not have
//the score return 0
if ($this->outputstr[$this->check_field] == "") {
//one other way to do it
if (!array_key_exists($this->check_field,$this->outputstr)) {
return 0;
}
//one other way to do it
//if (!array_key_exists("score",$this->outputstr)) {
// return 0;
//}
return 1;
}

Expand Down

0 comments on commit 19bd9c7

Please sign in to comment.