*
* @package CRM
* @copyright CiviCRM LLC (c) 2004-2015
- * $Id$
- *
*/
class CRM_Financial_Form_Payment extends CRM_Core_Form {
/**
* Set variables up before form is built.
- *
- * @return void
*/
public function preProcess() {
parent::preProcess();
$this->assignBillingType();
- // @todo - round about way to load it - just load as an object using civi\payment\system::getByProcessor
- $this->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment($this->_paymentProcessorID, 'unused');
+ $this->_paymentProcessor = CRM_Financial_BAO_PaymentProcessor::getPayment($this->_paymentProcessorID);
CRM_Core_Payment_ProcessorForm::preProcess($this);
self::addCreditCardJs();
$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
*/