From ef26b43b6e13bf84d40fb333c086141bd51fc158 Mon Sep 17 00:00:00 2001 From: Eileen McNaughton Date: Tue, 7 Jul 2015 22:35:33 +1200 Subject: [PATCH] CRM-16737 code coments --- CRM/Member/BAO/Membership.php | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/CRM/Member/BAO/Membership.php b/CRM/Member/BAO/Membership.php index bc51d8effb..fcce6d2285 100644 --- a/CRM/Member/BAO/Membership.php +++ b/CRM/Member/BAO/Membership.php @@ -1449,8 +1449,13 @@ AND civicrm_membership.is_test = %2"; $form->_values['contribution_id'] = $membershipContributionID; } - // Do not send an email if Recurring transaction is done via Direct Mode - // Email will we sent when the IPN is received. + // Refer to CRM-16737. Payment processors 'should' return payment_status_id + // to denote the outcome of the transaction. + // + // In 4.7 trxn_id will no longer denote the outcome & all processor transactions must return an array + // containing payment_status_id. + // In 4.6 support (such as there was) for other ways of denoting payment outcome is retained but the use + // of payment_status_id is strongly encouraged. if (!empty($form->_params['is_recur']) && $form->_contributeMode == 'direct') { if (!empty($membershipContribution->trxn_id) && !isset($membershipContribution->payment_status_id) || (!empty($membershipContribution->payment_status_id) && $membershipContribution->payment_status_id == 1)) { @@ -1466,6 +1471,8 @@ AND civicrm_membership.is_test = %2"; CRM_Core_Error::debug_log_message('contribution ' . $membershipContribution->id . ' not completed with trxn_id ' . $membershipContribution->trxn_id . ' and message ' . $e->getMessage()); } } + // Do not send an email if Recurring transaction is done via Direct Mode + // Email will we sent when the IPN is received. return; } -- 2.25.1