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

Commit 19bd9c7

Browse files
committed
Release ccfd-api-php 1.50
1 parent 0027f35 commit 19bd9c7

File tree

4 files changed

+10
-11
lines changed

4 files changed

+10
-11
lines changed

Changes

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
Revision history for MaxMind CreditCardFraudDetection PHP API
2+
1.50 March 13th 2012
3+
- Check countryMatch instead of score. Score is not avail as of
4+
minfraud_version 1.3 and might be empty. ( Boris Zentner )
25
1.49 Februar 19th 2009
36
- Add minfraud3.maxmind.com to the server list ( Boris Zentner )
47
1.48 October 3th 2008

CreditCardFraudDetection.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,10 +61,10 @@ function CreditCardFraudDetection() {
6161

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

7070
function filter_field($key, $value) {

Example.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@
5151
// $ccfs->isSecure = 0;
5252

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

5656
// uncomment to turn on debugging
5757
// $ccfs->debug = 1;

HTTPBase.php

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,8 @@ function HTTPBase() {
3939
$this->isSecure = 0;
4040
$this->debug = 0;
4141
$this->timeout = 0;
42-
$this->check_field = "score";
42+
// use countryMatch to validate the results. It is avail in all minfraud answeres
43+
$this->check_field = "countryMatch";
4344
$this->wsIpaddrRefreshTimeout = 18000;
4445
$this->wsIpaddrCacheFile = $this->_getTempDir()."/maxmind.ws.cache";
4546
if ($this->debug == 1) {
@@ -391,15 +392,10 @@ function querySingleServer($server) {
391392
//hash named outputstr
392393
$this->outputstr[$key] = $value;
393394
}
394-
//check if outputstr has the score if outputstr does not have
395-
//the score return 0
396-
if ($this->outputstr[$this->check_field] == "") {
395+
//one other way to do it
396+
if (!array_key_exists($this->check_field,$this->outputstr)) {
397397
return 0;
398398
}
399-
//one other way to do it
400-
//if (!array_key_exists("score",$this->outputstr)) {
401-
// return 0;
402-
//}
403399
return 1;
404400
}
405401

0 commit comments

Comments
 (0)