This is also happening to me using the Paypal Standard Gateway and the ‘Donation’ transaction type. Failed status in backend and on the donation receipt, however the transaction does complete at Paypal. I submitted a priority support message and was told to try upgrading my php version, which I have not tried to d yet and will hold off on as it looks like you might be making some progress on it?