Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php |
— | — | @@ -231,7 +231,7 @@ |
232 | 232 | global $wgOut, $wgLang, $wgWikipediaForeverTheme; |
233 | 233 | |
234 | 234 | // save contrib tracking id early to track abondonment |
235 | | - if ( $data[ 'numAttempt' ] == 0 ) { |
| 235 | + if ( $data[ 'numAttempt' ] == '0' ) { |
236 | 236 | if ( !$tracked = $this->fnPayflowSaveContributionTracking( $data ) ) { |
237 | 237 | $when = time(); |
238 | 238 | wfDebugLog( 'payflowpro_gateway', 'Unable to save data to the contribution_tracking table ' . $when ); |
— | — | @@ -477,7 +477,7 @@ |
478 | 478 | */ |
479 | 479 | public function fnPayflowDisplayForm( $data, &$error ) { |
480 | 480 | global $wgOut; |
481 | | - $form = $this->fnpayflowGenerateFormBody( &$data, &$error ); |
| 481 | + $form = $this->fnPayflowGenerateFormBody( &$data, &$error ); |
482 | 482 | $form .= $this->fnPayflowGenerateFormSubmit( &$data, &$error ); |
483 | 483 | $wgOut->addHTML( $form ); |
484 | 484 | } |
Index: trunk/extensions/DonationInterface/payflowpro_gateway/extras/minfraud/minfraud.php |
— | — | @@ -18,6 +18,7 @@ |
19 | 19 | |
20 | 20 | $dir = dirname( __FILE__ ) . "/"; |
21 | 21 | require_once( $dir . "../extras.php" ); |
| 22 | +require_once( $dir . "../../includes/countryCodes.inc" ); |
22 | 23 | class PayflowProGateway_Extras_MinFraud extends PayflowProGateway_Extras { |
23 | 24 | |
24 | 25 | /** |
— | — | @@ -175,6 +176,9 @@ |
176 | 177 | // user's user agent |
177 | 178 | $minfraud_hash[ "user_agent" ] = $_SERVER[ 'HTTP_USER_AGENT' ]; |
178 | 179 | |
| 180 | + // fetch the array of country codes |
| 181 | + $country_codes = countryCodes(); |
| 182 | + |
179 | 183 | // loop through the map and add pertinent values from $data to the hash |
180 | 184 | foreach ( $map as $key => $value ) { |
181 | 185 | |
— | — | @@ -186,6 +190,9 @@ |
187 | 191 | case "bin": // get just the first 6 digits from CC# |
188 | 192 | $newdata[ $value ] = substr( $data[ $value ], 0, 6 ); |
189 | 193 | break; |
| 194 | + case "country": |
| 195 | + $newdata[ $value ] = $country_codes[ $data[ $value ]]; |
| 196 | + break; |
190 | 197 | default: |
191 | 198 | $newdata[ $value ] = $data[ $value ]; |
192 | 199 | } |