r75851 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r75850‎ | r75851 | r75852 >
Date:02:16, 2 November 2010
Author:awjrichards
Status:deferred
Tags:
Comment:
Merging from r75840 through r75850 from trunk
Modified paths:
  • /branches/fundraising/deployment/DonationInterface (modified) (history)
  • /branches/fundraising/deployment/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php (modified) (history)

Diff [purge]

Index: branches/fundraising/deployment/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php
@@ -1161,7 +1161,7 @@
11621162 * This would make this a lot less hack-ish
11631163 */
11641164 public function paypalRedirect( &$data ) {
1165 - global $wgPayflowGatewayPaypalURL, $wgPayflowGatewayTest;
 1165+ global $wgPayflowGatewayPaypalURL, $wgOut;
11661166
11671167 // if we don't have a URL enabled throw a graceful error to the user
11681168 if ( !strlen( $wgPayflowGatewayPaypalURL ) ) {
@@ -1182,20 +1182,6 @@
11831183 $wgPayflowGatewayPaypalURL .= "/" . $data[ 'language' ] . "?gateway=paypal";
11841184
11851185 // submit the data to the paypal redirect URL
1186 - $ch = curl_init();
1187 - curl_setopt( $ch, CURLOPT_URL, $wgPayflowGatewayPaypalURL );
1188 - curl_setopt( $ch, CURLOPT_USERAGENT, 'Donation_Interface PayflowPro Gateway PayPal Redirecter 1.0' );
1189 - curl_setopt( $ch, CURLOPT_POST, count( $data ) );
1190 - curl_setopt( $ch, CURLOPT_POSTFIELDS, http_build_query( $data ) );
1191 - if ( $wgPayflowGatewayTest ) curl_setopt( $ch, CURLOPT_SSL_VERIFYHOST, false );
1192 - $curl_result = curl_exec( $ch );
1193 - $curl_error = ( !$curl_result ) ? curl_error( $ch ) : null;
1194 - curl_close( $ch );
1195 -
1196 - // throw an exception if there was a curl error
1197 - if ( !is_null( $curl_error ) ) {
1198 - throw new MWException( 'There was a cURL error submitting information to ' . $wgPayflowGatewayPaypalURL . ': ' . $curl_error );
1199 - }
1200 -
 1186+ $wgOut->redirect( $wgPayflowGatewayPaypalURL . '&' . http_build_query( $data ) );
12011187 }
12021188 } // end class
Property changes on: branches/fundraising/deployment/DonationInterface
___________________________________________________________________
Modified: svn:mergeinfo
12031189 Merged /trunk/extensions/DonationInterface:r75840-75850

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r75840Merging from r75664 through r75839 of trunkawjrichards23:06, 1 November 2010
r75850Changed paypal redirect method to use query params in the url with wgOut->red...awjrichards02:06, 2 November 2010

Status & tagging log