$paymentParams['contributionRecurID'] = $contribution->contribution_recur_id;
}
- if (!empty($form->_paymentProcessor) && $form->_amount > 0.0) {
+ if (!empty($form->_paymentProcessor)) {
try {
$payment = Civi\Payment\System::singleton()->getByProcessor($form->_paymentProcessor);
if ($form->_contributeMode == 'notify') {
$form->_values['contribution_id'] = $contribution->id;
$form->_values['contribution_page_id'] = $contribution->contribution_page_id;
-
+ if ($form->_params['amount'] == 0) {
+ // This is kind of a back-up for pay-later $0 transactions.
+ // In other flows they pick up the manual processor & get dealt with above (I
+ // think that might be better...).
+ return array(
+ 'payment_status_id' => 1,
+ 'contribution' => $contribution,
+ 'payment_processor_id' => 0,
+ );
+ }
CRM_Contribute_BAO_ContributionPage::sendMail($contactID,
$form->_values,
$contribution->is_test