Symptoms
The PayPal payment processing system can send IPN messages only to standard HTTP (80) or HTTPS (443) ports. However the Customer & Business Manager component receives the same messages using only custom ports - 8880 for HTTP, 8443 for HTTPS. To forward PayPal notifications from standard ports to custom, you should add a proxying script to a publicly available website and specify the path to this script in the PayPal plugin settings.
We assume that you run Customer & Business Manager at mycompany.com:8443 and do not yet have the mycompany.com site. If this is the case, add a webspace and create the mycompany.com domain under it. If you already have the site, skip this preparatory step.
Resolution
1. Open the document root of mycompany.com. You can do so either by File Manager, FTP, SSH, or other ways.
2. In the directory, create a PHP file (i.e. paypalipn.php) with the following content:
<?php
$url = 'https://mycompany.com:8443/plesk-billing/gw/paypal.php';
$fields = $_POST;
if (count($fields) > 0) {
//url-ify the data for the POST
foreach ( $fields as $key => $value ) {
$fields_string .= $key . '=' . $value . '&';
}
rtrim ( $fields_string, '&' );
//open connection
$ch = curl_init ();
//set the url, number of POST vars, POST data
curl_setopt ( $ch, CURLOPT_URL, $url );
curl_setopt ( $ch, CURLOPT_POST, count ( $fields ) );
curl_setopt ( $ch, CURLOPT_POSTFIELDS, $fields_string );
curl_setopt ( $ch, CURLOPT_SSL_VERIFYPEER, FALSE );
curl_setopt ( $ch, CURLOPT_SSL_VERIFYHOST, FALSE );
//execute post
$result = curl_exec ( $ch );
//close connection
curl_close ( $ch );
}
?>
3. Make sure that this file is accessible at http://mycompany.com/paypalipn.php or https://mycompany.com/paypalipn.php.
4. Open the PayPal payment gateway configuration page (All Settings > Payment Gateways > PayPal) in Customer & Business Manager and set the IPN URL to http://mycompany.com/paypalipn.php or https://mycompany.com/paypalipn.php.
No
Yes