I am trying to get the WPS module to work for Drupal Commerce but I am getting an error. After the payment is made in my logs I see.
Attempt to validate IPN failed with error -111: Connection refused
The code that this relates to in the pay pal module is:
// Process the HTTP request to validate the IPN.
$response = drupal_http_request($host, array('method' => 'POST', 'data' => implode('&', $variables)));
// If an error occurred during processing, log the message and exit.
if (property_exists($response, 'error')) {
watchdog('commerce_paypal', 'Attempt to validate IPN failed with error @code: @error', array('@code' => $response->code, '@error' => $response->error), WATCHDOG_ERROR);
return FALSE;
}
The $response
has an error in it (Connection refused).
As I am using the sandbox the $host
is https://www.sandbox.paypal.com/cgi-bin/webscr
.
I can confirm that I do receive the IPN from PayPal (some dd()
statements proved this), but when we check to see if PayPal sent it, the code falls over.
Any ideas what could be going wrong? I am preusming it is more likley to be enviromental rather than code.