diff --git a/payment/uc_paypal/uc_paypal.pages.inc b/payment/uc_paypal/uc_paypal.pages.inc index a548d7b..6d83e31 100644 --- a/payment/uc_paypal/uc_paypal.pages.inc +++ b/payment/uc_paypal/uc_paypal.pages.inc @@ -78,11 +78,17 @@ function uc_paypal_ipn() { $response = drupal_http_request($host, array( 'method' => 'POST', 'data' => $req, + 'Host' => $host, )); // TODO: Change this to property_exists when we have a PHP requirement >= 5.1. if (array_key_exists('error', $response)) { - watchdog('uc_paypal', 'IPN failed with HTTP error @error, code @code.', array('@error' => $response->error, '@code' => $response->code), WATCHDOG_ERROR); + if($response->code == '400') { + watchdog('uc_paypal', 'IPN failed with HTTP error @error, code @code. Please install @link, enable the module and check on the option "Override Drupal HTTP Request" in the chr configuration', array('@error' => $response->error, '@code' => $response->code, '@link' => l('Chr', array('external' => TRUE))), WATCHDOG_ERROR); + } + else { + watchdog('uc_paypal', 'IPN failed with HTTP error @error, code @code.', array('@error' => $response->error, '@code' => $response->code), WATCHDOG_ERROR); + } return; }