CRM-17542 fix fatal on pay-later with separate membership
authoreileen <emcnaughton@wikimedia.org>
Wed, 11 Nov 2015 19:46:19 +0000 (11:46 -0800)
committereileen <emcnaughton@wikimedia.org>
Wed, 11 Nov 2015 19:46:41 +0000 (11:46 -0800)
CRM/Core/Payment/Manual.php
CRM/Financial/BAO/PaymentProcessor.php

index df49d590f3269ea5334a651e32dbf9cd93b05b83..1cedc975db773b59c7fd73b32e3b3f49dc545b4e 100644 (file)
@@ -155,4 +155,13 @@ class CRM_Core_Payment_Manual extends CRM_Core_Payment {
     return '';
   }
 
+  /**
+   * Declare that more than one payment can be processed at once.
+   *
+   * @return bool
+   */
+  protected function supportsMultipleConcurrentPayments() {
+    return TRUE;
+  }
+
 }
index 86a4396d2389945a4de682bdd9bab42f5ac7aab0..58a669ac5f31790aceb2e33a1c9ea820d5d2adaf 100644 (file)
@@ -314,6 +314,8 @@ class CRM_Financial_BAO_PaymentProcessor extends CRM_Financial_DAO_PaymentProces
       'name' => 'pay_later',
       'billing_mode' => '',
       'is_default' => 0,
+      // This should ideally be retrieved from the DB but existing default is check so we'll code that for now.
+      'payment_instrument_id' => CRM_Core_OptionGroup::getValue('payment_instrument', 'Check', 'name'),
       // Making this optionally recur would give lots of options -but it should
       // be a row in the payment processor table before we do that.
       'is_recur' => FALSE,