CRM-20413 fix to setting wrong payment_instrument_id, by passing responsibility to...
authoreileen <emcnaughton@wikimedia.org>
Tue, 11 Apr 2017 14:43:08 +0000 (02:43 +1200)
committereileen <emcnaughton@wikimedia.org>
Thu, 13 Apr 2017 01:58:52 +0000 (13:58 +1200)
commit181354227024fe6825aec038f891a66057d26c9b
treef4b17b91fdd8e1a34d8bfcaa968ecadd5771e230
parent39b231592ff925ec331ff9c0c2aa0e2495b615df
CRM-20413 fix to setting wrong payment_instrument_id, by passing responsibility to the processor.

This also reflects work towards allowing payment_instrument specific fields on the payment form - ie. check, credit_card_type, pan_truncation.

This idea is to finish the code allowing pay-later to be the manual payment processor indexed with a 0 on all payment forms, and have the
form render with appropriate fields. Note that I got this working on multiple forms, this commit reflects the smallest piece I could
break off that is complete within itself, and resolves an issue

I tested that it was still possible to enter checks on the offline contribution as well as membership & additional payment forms, and the
check number still shows up.

I also tested front end contribution credit card & pay later & front end event forms
17 files changed:
CRM/Contribute/BAO/Contribution.php
CRM/Contribute/Form/AbstractEditPayment.php
CRM/Contribute/Form/AdditionalPayment.php
CRM/Contribute/Form/Contribution/Confirm.php
CRM/Contribute/Form/ContributionBase.php
CRM/Core/Payment.php
CRM/Core/Payment/Form.php
CRM/Core/Payment/Manual.php
CRM/Core/Payment/PayPalImpl.php
CRM/Core/Payment/ProcessorForm.php
CRM/Event/Form/Registration.php
CRM/Financial/BAO/PaymentProcessor.php
CRM/Financial/Form/Payment.php
CRM/Member/Form.php
CRM/Member/Form/Membership.php
templates/CRM/common/paymentBlock.tpl
tests/phpunit/api/v3/ContributionPageTest.php