Fix retrieving contribution_status_id for manual payment processor
authorMatthew Wire (MJW Consulting) <mjw@mjwconsult.co.uk>
Wed, 13 Nov 2019 05:47:58 +0000 (18:47 +1300)
committerMatthew Wire <mjw@mjwconsult.co.uk>
Sat, 18 Jan 2020 12:43:50 +0000 (12:43 +0000)
CRM/Contribute/BAO/Contribution/Utils.php
CRM/Core/Payment/Manual.php

index e936512ac9a6e21fa13aaf56b006b14cd7f24e13..5e3b9488284a873164a9a6a731686318fb0c6187 100644 (file)
@@ -180,8 +180,8 @@ class CRM_Contribute_BAO_Contribution_Utils {
             $contribution->payment_status_id = $result['payment_status_id'];
           }
           $result['contribution'] = $contribution;
-          if ($result['payment_status_id'] == CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution',
-            'status_id', 'Pending') && $payment->isSendReceiptForPending()) {
+          if ($result['payment_status_id'] == CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id', 'Pending')
+            && $payment->isSendReceiptForPending()) {
             CRM_Contribute_BAO_ContributionPage::sendMail($contactID,
               $form->_values,
               $contribution->is_test
index deaff409074857dd017104edf596c6ee1f6684db..be4a171c966765259bbf8eea14ef528f87cec236 100644 (file)
@@ -117,7 +117,7 @@ class CRM_Core_Payment_Manual extends CRM_Core_Payment {
    */
   protected function getResult() {
     if (!$this->result) {
-      $this->setResult(CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'status_id', 'Pending'));
+      $this->setResult(CRM_Core_PseudoConstant::getKey('CRM_Contribute_BAO_Contribution', 'contribution_status_id', 'Pending'));
     }
     return $this->result;
   }