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: 
I think there is a bug here of some sort - I have reverted to an old copy of ipn.php, from 4.7.3, and payments are now completing successfully again
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