Can't submit backend credit card contribution unless you have at least one payment processor that supports a future start date
If you don't have a payment processor that supports a future start date, you can't submit a credit card contribution.
Steps to replicate
- On a buildkit site, add a PayPal Pro payment processor. The creds don't have to be valid.
- Submit a backend credit card contribution with PayPal Pro. Should go through (or tell you invalid credentials).
- Delete the default processor of type "Dummy Payment Processor".
- Submit another backend credit card contribution with PayPal Pro.
Expected Result
Absence of a dummy test processor shouldn't affect the ability to submit a credit card processor.
Actual result
Please correct the following errors in the form fields below:
Date Received is a required field.
Why
In CRM_Contribution_Form_AbstractEditPayment::assignProcessors()
is this line:
$this->assign('processorSupportsFutureStartDate', CRM_Financial_BAO_PaymentProcessor::hasPaymentProcessorSupporting(['FutureRecurStartDate']));
This will return TRUE
if any payment processor supports a future start date. Which in turn causes the receive_date
to appear on templates/CRM/Contribute/Form/Contribution.tpl
.
Without the receive_date
on the form, even hidden, you can't submit the form.
The workaround is to create a dummy processor on your site. I have to run, but tomorrow I'll try to put together a PR that fixes this at the template level.
Is this a regression? I mean, technically yes, but it's two years old. And tricky to catch because the test suite creates the dummy processor in setUp()
. To catch this we might have to move that out of setUp()
and into its own helper function.