x-cart_patchWe were getting reports from store owners about an increased number of Paypal orders which were “Paid” on Paypal side but marked as “Failed” on X-cart side. This seems to be related to the changes Paypal did at the end of last year and below is the patch which will fix this problem in X-cart 4:

1) Open your X-cart store folder in your FTP client

2) Download this file:

/include/func/func.https_libcurl.php

3) open this file in Notepad and find this code:

if (!empty($cookie))
curl_setopt ($ch, CURLOPT_COOKIE, implode("; ", $cookie));

4) BEFORE the above code insert code below – do not forget to replace YOURSTORENAME to your domain name (ex: mysuperstore.com):

curl_setopt($ch, CURLOPT_HTTPHEADER, array('Connection: Close', 'User-Agent: YOURSTORENAME'));

5) save “func.https_libcurl.php” and upload back to “include/func/” folder. Note: before you upload this new file, rename old file in that folder to “func.https_libcurl.orig.php” in case the changes you made will not work and you want to revert back to original version fast.

Special thanks to Pitak who posted this fix on X-Cart forum.

Hope this helps and if you are not comfortable with using FTP or modifying PHP files, just send us a request from www.mystorehelp.com and we’ll do the changes for you.

To your success!

Anton Pachkine
FinestShops offers premium Magento and X-Cart managed packages for companies without a large IT department and will host and manage your online store and servers like your own dedicated IT department so you and your staff can concentrate on growing your sales and serving your customers. Visit www.finestshops.com