_paymentProcessorID = CRM_Utils_Request::retrieve('processor_id', 'Integer', CRM_Core_DAO::$_nullObject, TRUE); $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'); CRM_Core_Payment_ProcessorForm::preProcess($this); //@todo - figure out how to deal with payment express. //get payPal express id and make it available to template //$payPalExpressId = ($values['payment_processor_type'] == 'PayPal_Express') ? $values['id'] : 0; // $this->assign('payPalExpressId', $payPalExpressId); // Add JS to show icons for the accepted credit cards $creditCardTypes = CRM_Core_Payment_Form::getCreditCardCSSNames(); CRM_Core_Resources::singleton() ->addScriptFile('civicrm', 'templates/CRM/Core/BillingBlock.js', 10) // workaround for CRM-13634 // ->addSetting(array('config' => array('creditCardTypes' => $creditCardTypes))); ->addScript('CRM.config.creditCardTypes = ' . json_encode($creditCardTypes) . ';'); $this->assign('paymentProcessorID', $this->_paymentProcessorID); } public function buildQuickForm() { CRM_Core_Payment_ProcessorForm::buildQuickForm($this); } }