Contributions not recording if selected membership is "none" when using a membership priceset
Related issue on Jira: https://issues.civicrm.org/jira/browse/CRM-21703
Description Contributions are not recording if a user chooses not to sign up for a membership but still makes a contribution. It appears like there is no record anywhere, not in the payment processor, nor civi, nor is the submitter charged on their credit card.
Expected
To be able to select "none" for membership and:
- submitter to receive an email confirming the contribution
- admins see a contribution recorded in CiviCRM
- admins see a contribution recorded in the payment processor's records
- submitter to be charged on their credit card
What happens
The submitter makes it all the way to the Thank You Page and sees a message like "Your contribution has been submitted to Test Processor for processing." but otherwise the Thank You Page looks the same as a normal successful contribution.
- No email is sent
- No contribution is recorded in civi or payment processor's records
- Submitter is not charged
Reproducing
This is reproducible on the demo site. I created a contribution page which can be found here: https://dmaster.demo.civicrm.org/civicrm/contribute/transact?reset=1&action=preview&id=4
- Create a Membership Priceset with membership options as radios, set to not required.
- Add in some amount radios.
- Create a contribution page with no amount section and only the membership priceset.
- In Test or Live mode, make a contribution and select "none" for the membership.
- Check the contact's contribution record, nothing is there :(