CRM-17256 fix for paylater billing_required
authoreileenmcnaugton <eileen@fuzion.co.nz>
Tue, 13 Oct 2015 13:39:58 +0000 (02:39 +1300)
committereileenmcnaugton <eileen@fuzion.co.nz>
Tue, 13 Oct 2015 13:46:44 +0000 (02:46 +1300)
commit1d1fee72e665d235f26adeaee6c613de707f3542
tree61dfbb19bb318ec61b1173436760a12dce952f1e
parentd2f455a1954a951a35ad8fdd16319666d4af0fd9
CRM-17256 fix for paylater billing_required

This commit sets up pay-later as a payment processor class in limited capacity to allow it to cope
with the field loading for billing_required_for_pay_later contribution forms. I had hoped not to have to do this
in 4.7 but the address fields were not loading correctly on form-change :-(. This did allow me to remove quite a few
hacks that were in place to support the way the billing_for_pay_later was working though :-).

Note that a better solution than a check-box for billing-required-for-pay-later would be to allow joining a profile
of field that the paymnet processor should be 'encouraged' to provide  on the payment form. ie. the payment processor could
then build the form to include the profile fields and those required (if any) by it's processor.

The code is written on the assumption the billing profile might be changed to a real profile at some point
13 files changed:
CRM/Contribute/Form/Contribution.php
CRM/Contribute/Form/Contribution/Main.php
CRM/Contribute/Form/ContributionBase.php
CRM/Contribute/Form/UpdateBilling.php
CRM/Core/Form.php
CRM/Core/Payment.php
CRM/Core/Payment/Form.php
CRM/Core/Payment/Manual.php [new file with mode: 0644]
CRM/Core/Payment/ProcessorForm.php
CRM/Financial/BAO/PaymentProcessor.php
CRM/Financial/Form/Payment.php
Civi/Payment/System.php
templates/CRM/common/paymentBlock.tpl