Skip to content

Instantly share code, notes, and snippets.

@jitendrapurohit
Created April 12, 2017 04:50
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jitendrapurohit/1629eb609a0bf9acc1c02e6a13e84124 to your computer and use it in GitHub Desktop.
Save jitendrapurohit/1629eb609a0bf9acc1c02e6a13e84124 to your computer and use it in GitHub Desktop.
diff --git a/CRM/Contribute/Form/Contribution/Confirm.php b/CRM/Contribute/Form/Contribution/Confirm.php
index 85574cca95..e8ca131364 100644
--- a/CRM/Contribute/Form/Contribution/Confirm.php
+++ b/CRM/Contribute/Form/Contribution/Confirm.php
@@ -1778,6 +1778,12 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
);
$result = array();
+ if ($tempParams['skipLineItem']) {
+ // We are not processing the line item here because we are processing a membership.
+ // Do not continue with contribution processing in this function.
+ return array($membershipContribution, $result);
+ }
+
if ($form->_values['is_monetary'] && !$form->_params['is_pay_later'] && $minimumFee > 0.0) {
// At the moment our tests are calling this form in a way that leaves 'object' empty. For
// now we compensate here.
@twomice
Copy link

twomice commented Apr 12, 2017

Hi Jitendra. FYI, in the case described in https://issues.civicrm.org/jira/browse/CRM-20172, this patch has the effect of sending only one payment request (in the amount of the non-membership contribution) to Authorize.net, and leaving the membership portion of the contribution unsent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment