Question: We're on civicrm 4.7.5 on Drupal 7.

All contributions paid through the paypal standard payment processor are failing to successfully complete.

The user sees a successful transaction, but the contribution status is " Pending (Incomplete Transaction)"

There is nothing in the CiviCRM log to suggest an error. The IPN is sent to the correct URL, the status recorded in paypal is HTTP 200 OK.

But when I copy the path into a browser:

<https://[ourwebsiteurlredacted.com]/sites/all/modules/civicrm/extern/ipn.php?reset=1&contactID=9994&contributionID=5669&module=contribute&membershipID=9587>

this prints the following message to screen:

```
Sorry, can not load CMS user account.

```

Any help debugging would be greatfully received!

Answer: 
Issue had been filed <https://issues.civicrm.org/jira/browse/CRM-18483> and this is my fix <https://github.com/civicrm/civicrm-core/pull/8270/files> 

As earlier in case of drupal site, CRM\_Utils\_System::loadBootStrap() eventually calls CRM\_Utils\_System\_Drupal::loadBootStrap() and fails at <https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/System/Drupal.php#L545> because we are not passing any drupal userID as $uid parameter in loadBootStrap() fn and got halt at the same point. Unlike in other CMS (wordpress, joomla) the underlying bootstrap code is not too reliant on user id and didn't break. 

As per my fix CRM\_Utils\_System::loadBootStrap($params, TRUE, FALSE) where 2nd parameter stands for $loadUser = TRUE and third $throwError = FALSE so if there is no corresponding CMS userID assigned against civiCRM contactID then it won't break rather it will return false and will complete the workflow just what happen when we call REST url <https://github.com/civicrm/civicrm-core/blob/master/CRM/Utils/REST.php#L711>. 

The reason behind calling loadBootstrap function lies in <https://issues.civicrm.org/jira/browse/CRM-18245> 

Can anyone please verify my patch if it works for ya!!

Thanks
This is a really common error incidentally.

I suspect that that error you're seeing is unrelated to the PayPal issue.

1. Check the CiviCRM Error Logs for errors that happened around the time of the last transaction.
2. Check your htaccess logs for blocked requests from PayPal.
3. The error being thrown is in libraries/civicrm/CRM/Utils/System/Drupal.php line 545 in function loadBootStrap. This code is messy, with a function that does many things.
4. I would check visiting the IPN with the correct parameters in a browser and seeing if that updates the transactions as you'd expect.