X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FContribute%2FForm%2FContribution%2FMain.php;h=0832bd9aa47fd006f5fe563461b8d33121ba78f9;hb=ec022878580e581215e845f418797dddf416a325;hp=eeb94c6fcf723106bb68811977e4a321f0dc849f;hpb=8d59b63834dfb7242c74dc774c7ad323299d05f6;p=civicrm-core.git diff --git a/CRM/Contribute/Form/Contribution/Main.php b/CRM/Contribute/Form/Contribution/Main.php index eeb94c6fcf..0832bd9aa4 100644 --- a/CRM/Contribute/Form/Contribution/Main.php +++ b/CRM/Contribute/Form/Contribution/Main.php @@ -1294,7 +1294,7 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu $this->set('invoiceID', $invoiceID); $params['invoiceID'] = $invoiceID; $params['description'] = ts('Online Contribution') . ': ' . (($this->_pcpInfo['title']) ? $this->_pcpInfo['title'] : $this->_values['title']); - + $params['button'] = $this->controller->getButtonName(); // required only if is_monetary and valid positive amount if ($this->_values['is_monetary'] && is_array($this->_paymentProcessor) && @@ -1346,31 +1346,6 @@ class CRM_Contribute_Form_Contribution_Main extends CRM_Contribute_Form_Contribu } - /** - * Handle pre approval for processors. - * - * This fits with the flow where a pre-approval is done and then confirmed in the next stage when confirm is hit. - * - * This applies to processors that - * @param array $params - */ - protected function handlePreApproval(&$params) { - try { - $payment = Civi\Payment\System::singleton()->getByProcessor($this->_paymentProcessor); - $params['component'] = 'contribute'; - $result = $payment->doPreApproval($params); - } - catch (\Civi\Payment\Exception\PaymentProcessorException $e) { - CRM_Core_Error::displaySessionError($e->getMessage()); - CRM_Utils_System::redirect($params['cancelURL']); - } - - $this->set('pre_approval_parameters', $result['pre_approval_parameters']); - if (!empty($result['redirect_url'])) { - CRM_Utils_System::redirect($result['redirect_url']); - } - } - /** * Process confirm function and pass browser to the thank you page. */