Index: trunk/extensions/DonationInterface/payflowpro_gateway/payflowpro_gateway.body.php |
— | — | @@ -1161,7 +1161,7 @@ |
1162 | 1162 | * This would make this a lot less hack-ish |
1163 | 1163 | */ |
1164 | 1164 | public function paypalRedirect( &$data ) { |
1165 | | - global $wgPayflowGatewayPaypalURL, $wgPayflowGatewayTest; |
| 1165 | + global $wgPayflowGatewayPaypalURL, $wgOut; |
1166 | 1166 | |
1167 | 1167 | // if we don't have a URL enabled throw a graceful error to the user |
1168 | 1168 | if ( !strlen( $wgPayflowGatewayPaypalURL ) ) { |
— | — | @@ -1182,20 +1182,6 @@ |
1183 | 1183 | $wgPayflowGatewayPaypalURL .= "/" . $data[ 'language' ] . "?gateway=paypal"; |
1184 | 1184 | |
1185 | 1185 | // 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 ) ); |
1201 | 1187 | } |
1202 | 1188 | } // end class |