Merge pull request #12615 from eileenmcnaughton/amex
[civicrm-core.git] / CRM / Contribute / Form / ContributionBase.php
index ec174f47baa4e70501a4b8640ffb976714c02e54..45a62b78bb9c024360efbdf737399405507b7a28 100644 (file)
@@ -211,6 +211,14 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
    */
   public $paymentInstrumentID;
 
+  /**
+   * Is the price set quick config.
+   * @return bool
+   */
+  public function isQuickConfig() {
+    return isset(self::$_quickConfig) ? self::$_quickConfig : FALSE;
+  }
+
   /**
    * Set variables up before form is built.
    *
@@ -610,6 +618,13 @@ class CRM_Contribute_Form_ContributionBase extends CRM_Core_Form {
             CRM_Utils_System::mungeCreditCard(CRM_Utils_Array::value('credit_card_number', $this->_params))
           );
         }
+        elseif ($paymentField === 'credit_card_type') {
+          $this->assign('credit_card_type', CRM_Core_PseudoConstant::getLabel(
+            'CRM_Core_BAO_FinancialTrxn',
+            'card_type_id',
+            CRM_Core_PseudoConstant::getKey('CRM_Core_BAO_FinancialTrxn', 'card_type_id', $this->_params['credit_card_type'])
+          ));
+        }
         else {
           $this->assign($paymentField, $this->_params[$paymentField]);
         }