CRM-16803 QA fixes
authorEileen McNaughton <eileen@fuzion.co.nz>
Thu, 9 Jul 2015 21:26:59 +0000 (09:26 +1200)
committerEileen McNaughton <eileen@fuzion.co.nz>
Thu, 9 Jul 2015 21:26:59 +0000 (09:26 +1200)
CRM/Member/Form.php
CRM/Member/Form/MembershipRenewal.php

index 6f03adf305c7e0777e0ba487884acfd39f708272..6bdd3c62e869d660243b162b2df95917a35cabb2 100644 (file)
@@ -240,12 +240,12 @@ class CRM_Member_Form extends CRM_Contribute_Form_AbstractEditPayment {
       'contact_id' => $paymentParams['contactID'],
       'amount' => $paymentParams['total_amount'],
       'payment_processor_id' => $paymentParams['payment_processor_id'],
-      'campaign_id' => $paymentParams['campaign_id'],
+      'campaign_id' => CRM_Utils_Array::value('campaign_id', $paymentParams),
       'financial_type_id' => $paymentParams['financial_type_id'],
-      'is_email_receipt' => $paymentParams['is_email_receipt'],
+      'is_email_receipt' => CRM_Utils_Array::value('is_email_receipt', $paymentParams),
       // This is not great as it could also be direct debit - but is consistent with elsewhere & all need fixing.
       'payment_instrument_id' => 1,
-      'invoice_id' => $paymentParams['invoiceID '],
+      'invoice_id' => CRM_Utils_Array::value('invoiceID ', $paymentParams),
     );
 
     $mapping = array(
index 0504a0d637b0758c2a0a9f14e00f0ef65733b4a8..7a1c5c7a8e9961a69aa54231da60305639b76c6a 100644 (file)
@@ -598,7 +598,7 @@ WHERE   id IN ( ' . implode(' , ', array_keys($membershipType)) . ' )';
 
       $payment = CRM_Core_Payment::singleton($this->_mode, $this->_paymentProcessor, $this);
 
-      if ($paymentParams['auto_renew']) {
+      if (!empty($paymentParams['auto_renew'])) {
         $contributionRecurParams = $this->processRecurringContribution($paymentParams);
         $paymentParams = array_merge($paymentParams, $contributionRecurParams);
       }