Updated hack that prevents failed transactions from marking membership as canceled
The change is needed due to upstream commit
0bad10e7 which relates to https://issues.civicrm.org/jira/browse/CRM-16523
I don't see a "correct" way to do this...
Fixed failed transaction handling. Cleaned up debugging output. Fixed some whitespacing.