r76426 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76425‎ | r76426 | r76427 >
Date:04:01, 10 November 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
Adding timeout settings for curlopts for communicating with maxmind and payflow
Modified paths:
  • /trunk/extensions/DonationInterface/payflowpro_gateway/extras/minfraud/minfraud.body.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/extras/minfraud/minfraud.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php (modified) (history)
  • /trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
@@ -381,7 +381,7 @@
382382 * include in string (i.e. Vendor, password)
383383 */
384384 private function fnPayflowProcessTransaction( $data, $payflow_data ) {
385 - global $wgOut, $wgDonationTestingMode, $wgPayflowGatewayUseHTTPProxy, $wgPayflowGatewayHTTPProxy;
 385+ global $wgOut, $wgDonationTestingMode, $wgPayflowGatewayUseHTTPProxy, $wgPayflowGatewayHTTPProxy, $wgPayflowProTimeout;
386386
387387 // update contribution tracking
388388 $this->updateContributionTracking( $data, defined( 'OWA' ) );
@@ -429,7 +429,7 @@
430430 curl_setopt( $ch, CURLOPT_USERAGENT, $user_agent );
431431 curl_setopt( $ch, CURLOPT_HEADER, 1 );
432432 curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );
433 - curl_setopt( $ch, CURLOPT_TIMEOUT, 5 );
 433+ curl_setopt( $ch, CURLOPT_TIMEOUT, $wgPayflowProTimeout );
434434 curl_setopt( $ch, CURLOPT_FOLLOWLOCATION, 0 );
435435 curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, 0 );
436436 curl_setopt( $ch, CURLOPT_POSTFIELDS, $payflow_query );
Index: trunk/extensions/DonationInterface/payflowpro_gateway/extras/minfraud/minfraud.body.php
@@ -215,6 +215,8 @@
216216 * Perform the min fraud query and capture the response
217217 */
218218 public function query_minfraud( array $minfraud_query ) {
 219+ global $wgMinFraudTimeout;
 220+ $this->get_ccfd()->timeout = $wgMinFraudTimeout;
219221 $this->get_ccfd()->input( $minfraud_query );
220222 $this->get_ccfd()->query();
221223 $this->minfraud_response = $this->get_ccfd()->output();
Index: trunk/extensions/DonationInterface/payflowpro_gateway/extras/minfraud/minfraud.php
@@ -48,6 +48,9 @@
4949 'reject' => array( -1, -1 )
5050 );
5151
 52+// Timeout in seconds for communicating with MaxMind
 53+$wgMinFraudTimeout = 2;
 54+
5255 /**
5356 * Define whether or not to run minFraud in stand alone mode
5457 *
Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.php
@@ -54,6 +54,9 @@
5555 // a boolean to determine if we're in testing mode
5656 $wgPayflowGatewayTest = FALSE;
5757
 58+// timeout in seconds for communicating with paypal
 59+$wgPayflowProTimeout = 2;
 60+
5861 /**
5962 * The default form to use
6063 */

Follow-up revisions

RevisionCommit summaryAuthorDate
r76427Merging from r76410 through r76426 of trunkawjrichards04:03, 10 November 2010

Status & tagging log