Search

Language:  
Search for:

Available article translations:

How to set up PayPal payment gateway to receive IPN messages from PayPal system

APPLIES TO:
  • Parallels Plesk 10.4 for Linux/Unix
  • Parallels Plesk 10.3 for Linux/Unix
  • Parallels Plesk 10.4 for Windows
  • Parallels Plesk 10.3 for Windows

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.

Troubleshooting

If the IPN messages are not received check check that PayPal site with paypalipn.php is resolved, available and executable via target URL (like http://mycompany.com/paypalipn.php and https://mycompany.com/paypalipn.php).




783b875b64229fde618ad54999321dbc c81e59b61af9dca603ba03b14aabe968 42844a8183c58f5bd71c7d59929707e6 e26cd5a43fdb23cb2c65dd477ab20f95 0826aa97edb5f1b3d71e93052fe8ac9e 276b42158818c83055d6dfa6371d4e4b 9f8baf78266b4e54525d1c6bf06305a5 1d151d16e47c6f92bbf62d50eb32c4a2 70141129eb4c89113d6051de8d1fc515 56797cefb1efc9130f7c48a7d1db0f0c

FEEDBACK
Was this article helpful?
Tell us how we may improve it.
Yes No
 
 
 
 
 
 
Server Virtualization
- Parallels Cloud Server
- Parallels Containers for Windows 6.0
- Parallels Virtuozzo Containers
Automation
- Parallels Automation
- Parallels Automation for Cloud Infrastructure
- Parallels Business Automation Standard
- Parallels Virtual Automation
- Parallels Plesk Panel Suite
- Web Presence Builder
- Parallels Plesk Automation
- Parallels Small Business Panel
- Value-added Services for Hosters
- Parallels Partner Storefront
Services & Resources
- Cloud Acceleration Services
- Professional Services
- Support Services
- Training & Certification