civicrm/civicrm-core — pull request #4493 by eileenmcnaughton (2014-11-03 09:48:04+00:00)
Title: CRM-15555 refactor definition of fields onto payment processors

This PR is preparatory to allowing back-office payments by direct debit & offsite cards. It moves the declaration of which fields to show from the form layer to the payment processor classes.

Note that it only focusses on back-office & there is no actual change in behaviour as it is 'turned off' as the confirm function is not yet done (but want to get it merged while it is stable).

It does lay out a path for the other forms to more field setting to the payment processor - ie,

replacing calls to
CRM_Core_Payment_Form::buildDirectDebit
CRM_Core_Payment_Form::buildCredit

with
CRM_Core_Payment_Form::buildPaymentForm

and
CRM_Core_Payment_Form::setPaymentFieldsByType

with
CRM_Core_Payment_Form::setPaymentFieldsByProcessor

These functions take care of the interaction.

Also note replacement of $paymentProcessor->doDirectPayment with $paymentProcessor->doPayment which wraps the doDirectPayment & doTransferCheckout - allowing us to move these decisions into the processor framework too