From: eileen Date: Wed, 11 Nov 2015 19:46:19 +0000 (-0800) Subject: CRM-17542 fix fatal on pay-later with separate membership X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ecb7ec329750b135b1539d4ca711ac3ee000545e;p=civicrm-core.git CRM-17542 fix fatal on pay-later with separate membership --- diff --git a/CRM/Core/Payment/Manual.php b/CRM/Core/Payment/Manual.php index df49d590f3..1cedc975db 100644 --- a/CRM/Core/Payment/Manual.php +++ b/CRM/Core/Payment/Manual.php @@ -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; + } + } diff --git a/CRM/Financial/BAO/PaymentProcessor.php b/CRM/Financial/BAO/PaymentProcessor.php index 86a4396d23..58a669ac5f 100644 --- a/CRM/Financial/BAO/PaymentProcessor.php +++ b/CRM/Financial/BAO/PaymentProcessor.php @@ -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,