SMFHacks.com

SMFHacks.com => News => Topic started by: SMFHacks on September 19, 2012, 01:44:31 pm

Title: Important Changes for SMF Store, SMF Classifieds, Downloads Pro, Adseller Pro
Post by: SMFHacks on September 19, 2012, 01:44:31 pm
PayPal is doing a change to IPN taking affect February 1, 2013 which affects SMF Store, SMF Classifieds, Downloads Pro,  Adseller Pro.
These products must be updated with the fix.

We have updated all our products with the latest fix and also below included a hotfix for each product affected.


SMF Store Changes in storeipn.php, storeipn2.php
Find
Code: [Select]
$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";

Change to
Code: [Select]
$header ="POST /cgi-bin/webscr HTTP/1.1\r\n";
$header .="Content-Type: application/x-www-form-urlencoded\r\n";
if ($modSettings['store_sandbox'] == 0)
    $header .="Host: www.paypal.com\r\n";
else
    $header .="Host: www.sandbox.paypal.com\r\n";
   
$header .= "Content-Length: " . strlen($req) . "\r\n";
$header .="Connection: close\r\n\r\n";



SMF Classifieds Changes in classifiedsipn.php and classifiedsipn2.php
Code: [Select]
$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";

Change to
Code: [Select]
$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";
$header .="Connection: close\r\n\r\n";


Ad Seller Pro changes in adselleripn.php and adselleripn2.php

Code: [Select]
$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";
Change to
Code: [Select]
$header ="POST /cgi-bin/webscr HTTP/1.1\r\n";
$header .="Content-Type: application/x-www-form-urlencoded\r\n";
if ($AdSellerSettings['seller_sandbox'] == 0)
    $header .="Host: www.paypal.com\r\n";
else
    $header .="Host: www.sandbox.paypal.com\r\n";
   
$header .= "Content-Length: " . strlen($req) . "\r\n";
$header .="Connection: close\r\n\r\n";



Downloads Pro changes in downloadsipn.php and downloadsipn2.php
Code: [Select]
$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";
Change to
Code: [Select]
$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";
$header .="Connection: close\r\n\r\n";


If you have any questions let us know