'contact_id' => $paymentParams['contactID'],
'amount' => $paymentParams['total_amount'],
'payment_processor_id' => $paymentParams['payment_processor_id'],
- 'campaign_id' => $paymentParams['campaign_id'],
+ 'campaign_id' => CRM_Utils_Array::value('campaign_id', $paymentParams),
'financial_type_id' => $paymentParams['financial_type_id'],
- 'is_email_receipt' => $paymentParams['is_email_receipt'],
+ 'is_email_receipt' => CRM_Utils_Array::value('is_email_receipt', $paymentParams),
// This is not great as it could also be direct debit - but is consistent with elsewhere & all need fixing.
'payment_instrument_id' => 1,
- 'invoice_id' => $paymentParams['invoiceID '],
+ 'invoice_id' => CRM_Utils_Array::value('invoiceID ', $paymentParams),
);
$mapping = array(
$payment = CRM_Core_Payment::singleton($this->_mode, $this->_paymentProcessor, $this);
- if ($paymentParams['auto_renew']) {
+ if (!empty($paymentParams['auto_renew'])) {
$contributionRecurParams = $this->processRecurringContribution($paymentParams);
$paymentParams = array_merge($paymentParams, $contributionRecurParams);
}