From 04b8859a040ea758bf309a3266527151bace9a16 Mon Sep 17 00:00:00 2001 From: sunil Date: Thu, 9 Feb 2017 12:50:32 +0530 Subject: [PATCH] CRM-19931 : when amount is zero and no payment processory selected then make Billing Address For Pay Later non required --- CRM/Core/Payment/ProcessorForm.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CRM/Core/Payment/ProcessorForm.php b/CRM/Core/Payment/ProcessorForm.php index 9baed6cc8f..8d0aabc41e 100644 --- a/CRM/Core/Payment/ProcessorForm.php +++ b/CRM/Core/Payment/ProcessorForm.php @@ -116,6 +116,12 @@ class CRM_Core_Payment_ProcessorForm { $isBillingAddressRequiredForPayLater = FALSE; $form->addElement('hidden', 'hidden_processor', 1); } + else if (!isset($processorId)) { + // If No Payment processor selected, then billing address is not required + // e.g Fee amount is zero, then all Payment Method option get unchecked and Payment Options section is hidden + $isBillingAddressRequiredForPayLater = FALSE; + } + CRM_Core_Payment_Form::buildPaymentForm($form, $form->_paymentProcessor, empty($isBillingAddressRequiredForPayLater), FALSE); } -- 2.25.1