Index: trunk/extensions/DonationInterface/payflowpro_gateway/extras/recaptcha/recaptcha-php/recaptchalib.php |
— | — | @@ -149,7 +149,7 @@ |
150 | 150 | * @return array response |
151 | 151 | */ |
152 | 152 | function _recaptcha_http_post_curl( $host, $path, $data, $port = 80 ) { |
153 | | - $url = RECAPTCHA_PROTOCOL . "://" . $host . ":" . $port; |
| 153 | + $url = "http://" . $host . ":" . $port; |
154 | 154 | |
155 | 155 | $ch = curl_init( $url ); |
156 | 156 | curl_setopt( $ch, CURLOPT_POST, true ); |
— | — | @@ -162,13 +162,14 @@ |
163 | 163 | |
164 | 164 | // set proxy settings if necessary |
165 | 165 | if ( RECAPTCHA_USE_HTTP_PROXY ) { |
166 | | - curl_setopt( $ch, CURLOPT_HTTPPROXYTUNNEL, 1 ); |
| 166 | + wfDebugLog( 'payflowpro_gateway', 'Using http proxy ' . RECAPTCHA_HTTP_PROXY ); |
| 167 | + curl_setopt( $ch, CURLPROXY_HTTP ); |
167 | 168 | curl_setopt( $ch, CURLOPT_PROXY, RECAPTCHA_HTTP_PROXY ); |
168 | 169 | } |
169 | 170 | |
170 | 171 | // try up to three times |
171 | 172 | for ( $i = 0; $i < RECAPTCHA_RETRY_LIMIT; $i++ ) { |
172 | | - wfDebugLog( 'payflowpro_gateway', 'Preparing to communicate with reCaptcha via cURL.' ); |
| 173 | + wfDebugLog( 'payflowpro_gateway', 'Preparing to communicate with reCaptcha via cURL at ' . $url . '.' ); |
173 | 174 | $response = curl_exec( $ch ); |
174 | 175 | wfDebugLog( 'payflowpro_gateway', "Finished communicating with reCaptcha." ); |
175 | 176 | if ( $response ) { |
— | — | @@ -188,7 +189,7 @@ |
189 | 190 | */ |
190 | 191 | if ( !$response ) { |
191 | 192 | wfDebugLog( 'payflowpro_gateway', 'Failed communicating with reCaptcha: ' . curl_error( $ch ) ); |
192 | | - $response = "true\r\n\r\ntrue"; |
| 193 | + $response = "true\r\n\r\nsuccess"; |
193 | 194 | } |
194 | 195 | |
195 | 196 | return $response; |