Merge pull request #6293 from JoeMurray/patch-1
[civicrm-core.git] / CRM / Financial / Form / Payment.php
index 699ecfffb2a4d880aed94228f4531aefc63b73ea..b788fc9be1b2b92dbaed741de0ee6112dcacbea0 100644 (file)
@@ -29,8 +29,6 @@
  *
  * @package CRM
  * @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
  */
 class CRM_Financial_Form_Payment extends CRM_Core_Form {
   /**
@@ -51,12 +49,22 @@ class CRM_Financial_Form_Payment extends CRM_Core_Form {
     $this->assign('paymentProcessorID', $this->_paymentProcessorID);
 
     $this->assign('suppressForm', TRUE);
+    $this->controller->_generateQFKey = FALSE;
   }
 
   public function buildQuickForm() {
     CRM_Core_Payment_ProcessorForm::buildQuickForm($this);
   }
 
+  /**
+   * Set default values for the form.
+   */
+  public function setDefaultValues() {
+    $contactID = $this->getContactID();
+    CRM_Core_Payment_Form::setDefaultValues($this, $contactID);
+    return $this->_defaults;
+  }
+
   /**
    * Add JS to show icons for the accepted credit cards
    */