r76989 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76988‎ | r76989 | r76990 >
Date:00:50, 19 November 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
Updated wfDebugLogging to include order id to match up log entries to particular trxns
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/extras/recaptcha/recaptcha-php/recaptchalib.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
@@ -157,9 +157,9 @@
158158 $this->fnPayflowDisplayForm( $data, $this->errors );
159159 } else { // The submitted form data is valid, so process it
160160 // allow any external validators to have their way with the data
161 - wfDebugLog( 'payflowpro_gateway', 'Preparing to query MaxMind' );
 161+ wfDebugLog( 'payflowpro_gateway', $data[ 'order_id' ] . " Preparing to query MaxMind" );
162162 wfRunHooks( 'PayflowGatewayValidate', array( &$this, &$data ) );
163 - wfDebugLog( 'payflowpro_gateway', 'Finished querying Maxmind' );
 163+ wfDebugLog( 'payflowpro_gateway', $data[ 'order_id' ] . ' Finished querying Maxmind' );
164164
165165 // if the transaction was flagged for review
166166 if ( $this->action == 'review' ) {
@@ -221,7 +221,7 @@
222222 $tracked = $this->fnPayflowSaveContributionTracking( $data );
223223 if ( !$tracked ) {
224224 $when = time();
225 - wfDebugLog( 'payflowpro_gateway', 'Unable to save data to the contribution_tracking table ' . $when );
 225+ wfDebugLog( 'payflowpro_gateway', $data[ 'order_id' ] . ' Unable to save data to the contribution_tracking table ' . $when );
226226 }
227227 }
228228
@@ -450,15 +450,15 @@
451451 $i = 1;
452452
453453 while ( $i++ <= 3 ) {
454 - wfDebugLog( 'payflowpro_gateway', 'Preparing to send transaction to PayflowPro' );
 454+ wfDebugLog( 'payflowpro_gateway', $data[ 'order_id' ] . ' Preparing to send transaction to PayflowPro' );
455455 $result = curl_exec( $ch );
456456 $headers = curl_getinfo( $ch );
457457
458458 if ( $headers['http_code'] != 200 && $headers['http_code'] != 403 ) {
459 - wfDebugLog( 'payflowpro_gateway', 'Failed sending transaction to PayflowPro, retrying' );
 459+ wfDebugLog( 'payflowpro_gateway', $data[ 'order_id' ] . ' Failed sending transaction to PayflowPro, retrying' );
460460 sleep( 1 );
461461 } elseif ( $headers['http_code'] == 200 || $headers['http_code'] == 403 ) {
462 - wfDebugLog( 'payflowpro_gateway', 'Finished sending transaction to PayflowPro' );
 462+ wfDebugLog( 'payflowpro_gateway', $data[ 'order_id' ] . ' Finished sending transaction to PayflowPro' );
463463 break;
464464 }
465465 }
@@ -466,7 +466,7 @@
467467 if ( $headers['http_code'] != 200 ) {
468468 $wgOut->addHTML( '<h3>No response from credit card processor. Please try again later!</h3><p>' );
469469 $when = time();
470 - wfDebugLog( 'payflowpro_gateway', 'No response from credit card processor ' . $when );
 470+ wfDebugLog( 'payflowpro_gateway', $data[ 'order_id' ] . ' No response from credit card processor ' . $when );
471471 curl_close( $ch );
472472 exit;
473473 }
Index: trunk/extensions/DonationInterface/payflowpro_gateway/extras/recaptcha/recaptcha-php/recaptchalib.php
@@ -124,12 +124,10 @@
125125 $http_request .= $req;
126126
127127 $response = '';
128 - wfDebugLog( 'payflowpro_gateway', 'Preparing to communicate with reCaptcha via fsock.' );
129128 if ( false == ( $fs = @fsockopen( $host, $port, $errno, $errstr, 10 ) ) ) {
130129 wfDebugLog( 'payflowpro_gateway', 'Failed communicating with reCaptcha.' );
131130 die ( 'Could not open socket' );
132131 }
133 - wfDebugLog( 'payflowpro_gateway', 'Finished communicating with reCaptcha.' );
134132
135133 fwrite( $fs, $http_request );
136134

Follow-up revisions

RevisionCommit summaryAuthorDate
r76990Merging from r76950 thru r76989 of trunkawjrichards00:54, 19 November 2010

Status & tagging log