CRM-16914 fix reference to payment_instrument_id
authoreileenmcnaugton <eileen@fuzion.co.nz>
Tue, 25 Aug 2015 18:40:29 +0000 (06:40 +1200)
committereileenmcnaugton <eileen@fuzion.co.nz>
Tue, 25 Aug 2015 19:26:59 +0000 (07:26 +1200)
CRM/Contribute/Form/Contribution/Confirm.php

index d5f22c64d9cab0f9059b358e4b69270d60184aaf..2dda394e9159fabd094377fdf12c50fe61cc2d2f 100644 (file)
@@ -1785,8 +1785,7 @@ class CRM_Contribute_Form_Contribution_Confirm extends CRM_Contribute_Form_Contr
     $isMonetary = !empty($form->_values['is_monetary']);
     if ($isMonetary) {
       if (empty($paymentParams['is_pay_later'])) {
-        // @todo look up payment_instrument_id on payment processor table.
-        $contributionParams['payment_instrument_id'] = 1;
+        $contributionParams['payment_instrument_id'] = $form->_paymentProcessor['payment_instrument_id'];
       }
     }
     $membershipContribution = CRM_Contribute_Form_Contribution_Confirm::processFormContribution($form,