CRM-20158, added comments
authorPradeep Nayak <pradpnayak@gmail.com>
Wed, 5 Apr 2017 09:46:37 +0000 (15:16 +0530)
committerPradeep Nayak <pradpnayak@gmail.com>
Wed, 5 Apr 2017 09:46:37 +0000 (15:16 +0530)
----------------------------------------
* CRM-20158: Store card type and last 4 digits of credit card
  https://issues.civicrm.org/jira/browse/CRM-20158

CRM/Core/BAO/FinancialTrxn.php

index 3013845efe3f4b3b513bce74d456d6b1d0e6a2bd..c1a91e7fa83010795fecf0752e66e9d864f0bd6d 100644 (file)
@@ -713,6 +713,8 @@ WHERE ft.to_financial_account_id != {$toFinancialAccount} AND ft.to_financial_ac
       'options' => array('sort' => 'financial_trxn_id DESC', 'limit' => 1),
     ));
 
+    // In case of Contribution status is Pending From Incomplete Transaction or Failed there is no Financial Entries created for Contribution.
+    // Above api will return 0 count, in such case we won't update card type and pan truncation field.
     if (!$financialTrxn['count']) {
       return NULL;
     }