SHOW:
|
|
- or go back to the newest paste.
1 | // File: wp-checkout/wp-checkout.php | |
2 | // Line: Approximately line #2848 | |
3 | // Changes: 2 small changes as noted below | |
4 | ||
5 | $header = ""; | |
6 | - | $header .= "POST /cgi-bin/webscr HTTP/1.0" . "\r\n"; |
6 | + | $header .= "POST /cgi-bin/webscr HTTP/1.1" . "\r\n"; |
7 | $header .= "Content-Type: application/x-www-form-urlencoded" . "\r\n"; | |
8 | $header .= "Content-Length: " . strlen($req) . "\r\n\r\n"; | |
9 | $ppurl = ($this -> get_option('pp_sandbox') == "Y") ? 'www.sandbox.paypal.com' : 'www.paypal.com'; | |
10 | $fp = fsockopen($ppurl, 80, $errno, $errstr, 30); | |
11 | ||
12 | //.....several lines of code here | |
13 | ||
14 | if (!$fp) { | |
15 | $message = __('An HTTP error has occurred', $this -> plugin_name); | |
16 | } else { | |
17 | fputs($fp, $header . $req); | |
18 | ||
19 | while (!feof($fp)) { | |
20 | $res = null; | |
21 | - | $res = fgets($fp, 1024); |
21 | + | $res = trim(fgets($fp, 1024)); |