I just wanted to confirm that aMember 3.2.3 is configured to work with PayPal's upcoming IPN update. I have not received any notification from PayPal that I need to address anything for my site, but I still want to be assured that there will be no issue, as I rely heavily on recurring PayPal payments. Thanks, Ryan
What about older versions? At which version did it get fixed, and whats the code to fix earlier versions? David
This fix available from 3.0.6 For older versions you have to edit /amember/plugins/payment/paypal_r/paypal_r.inc.php find this code: PHP: $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n";$header .= "Content-Type: application/x-www-form-urlencoded\r\n";$header .= "Content-Length: " . strlen ($req) . "\r\n\r\n"; and change it to PHP: $header .= "POST /cgi-bin/webscr HTTP/1.1\r\n";$header .= "Content-Type: application/x-www-form-urlencoded\r\n";$header .= "Host: www.paypal.com\r\n";$header .= "Content-Length: " . strlen ($req) . "\r\n\r\n";
I was just told by andrey it was needed in 3.1.8, please verify whats needed for which version! The fix for 3.1.8 from Andrey: //if (extension_loaded('curl') || $config['curl'] ){ if (false){ $ret = get_url("https://{$this->paypal_domain}/cgi-bin/webscr", $req); } else { $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; $header .= "Host: www.paypal.com\r\n"; $header .= "Content-Type: application/x-www-form- urlencoded\r\n"; $header .= "Content-Length: " . strlen ($req) . "\r\n\r\n"; $fp = fsockopen ($this->paypal_domain, 80, $errno, $errstr, 30); My 3.1.8 paypal shows this, which was wrong... > > if (extension_loaded('curl') || $config['curl'] ){ > $ret = get_url("https://{$this-> paypal_domain}/cgi-bin/webscr", $req); > } else { > $header .= "POST /cgi-bin/webscr HTTP/1.0\r\n"; > $header .= "Content-Type: application/x-www-form-urlencoded\r\n"; > $header .= "Content-Length: " . strlen ($req) . "\r\n\r\n"; > $fp = fsockopen ($this->paypal_domain, 80, $errno, $errstr, 30);
From 3.0.6 curl validation was added to paypal plugin. Almost all hosting companies have curl support by default, (either compiled in php or standalone curl binary which can be configured in amember CP -> Setup -> Global) If there is no curl support fix from my message #4 should work.