This repository was archived by the owner on Jun 3, 2022. It is now read-only.
File tree Expand file tree Collapse file tree 4 files changed +10
-11
lines changed Expand file tree Collapse file tree 4 files changed +10
-11
lines changed Original file line number Diff line number Diff line change 1
1
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 )
2
5
1.49 Februar 19th 2009
3
6
- Add minfraud3.maxmind.com to the server list ( Boris Zentner )
4
7
1.48 October 3th 2008
Original file line number Diff line number Diff line change @@ -61,10 +61,10 @@ function CreditCardFraudDetection() {
61
61
62
62
//set the url of the web service
63
63
$ this ->url = "app/ccv2r " ;
64
- $ this ->check_field = "score " ;
64
+ $ this ->check_field = "countryMatch " ;
65
65
$ this ->server = array ("minfraud3.maxmind.com " , "minfraud1.maxmind.com " , "minfraud2.maxmind.com " );
66
66
$ this ->numservers = count ($ this ->server );
67
- $ this ->API_VERSION = 'PHP/1.49 ' ;
67
+ $ this ->API_VERSION = 'PHP/1.50 ' ;
68
68
}
69
69
70
70
function filter_field ($ key , $ value ) {
Original file line number Diff line number Diff line change 51
51
// $ccfs->isSecure = 0;
52
52
53
53
// set the timeout to be five seconds
54
- $ ccfs ->timeout = 5 ;
54
+ $ ccfs ->timeout = 10 ;
55
55
56
56
// uncomment to turn on debugging
57
57
// $ccfs->debug = 1;
Original file line number Diff line number Diff line change @@ -39,7 +39,8 @@ function HTTPBase() {
39
39
$ this ->isSecure = 0 ;
40
40
$ this ->debug = 0 ;
41
41
$ 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 " ;
43
44
$ this ->wsIpaddrRefreshTimeout = 18000 ;
44
45
$ this ->wsIpaddrCacheFile = $ this ->_getTempDir ()."/maxmind.ws.cache " ;
45
46
if ($ this ->debug == 1 ) {
@@ -391,15 +392,10 @@ function querySingleServer($server) {
391
392
//hash named outputstr
392
393
$ this ->outputstr [$ key ] = $ value ;
393
394
}
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 )) {
397
397
return 0 ;
398
398
}
399
- //one other way to do it
400
- //if (!array_key_exists("score",$this->outputstr)) {
401
- // return 0;
402
- //}
403
399
return 1 ;
404
400
}
405
401
You can’t perform that action at this time.
0 commit comments