'source_contact_id' => CRM_Core_Session::getLoggedInContactID() ? CRM_Core_Session::getLoggedInContactID() :
$contactID,
));
+
+ // CRM-20336 Make sure that the contribution status is Failed, not Pending.
+ civicrm_api3('contribution', 'create', array(
+ 'id' => $contributionID,
+ 'contribution_status_id' => 'Failed',
+ ));
}
/**
// CRM-8141 update the membership type with the value recorded in log when membership created/renewed
// this picks up membership type changes during renewals
+ // @todo this is almost certainly an obsolete sql call, the pre-change
+ // membership is accessible via $this->_relatedObjects
$sql = "
SELECT membership_type_id
FROM civicrm_membership_log