if ($this->_paymentProcessor &&
$this->_paymentProcessor['object']->supportsPreApproval()
) {
- $this->handlePreApproval($params);
- }
+ $this->handlePreApproval($params);
}
+ }
if (empty($this->_values['is_confirm_enabled'])) {
$this->skipToThankYouPage();
*
* @param array $params
* Parameters from the form
- * @param string component
- * contribution or event.
*
* This function returns an array which should contain
* - pre_approval_parameters (this will be stored on the calling form & available later)
}
}
else {
- if ($this->_paymentProcessor['billing_mode'] ==1) {
+ if ($this->_paymentProcessor['billing_mode'] == 1) {
$result = $this->doDirectPayment($params, $component);
}
else {
}
/**
->>>>>>> 65e3e1ce2d1e407fa768966606173c79b12ba81f
* Validate the payment instrument values before passing it to the payment processor
* We want this to be overrideable by the payment processor, and default to using
* this object's validCreditCard for credit cards (implemented as the default in the Payment class).
public static function validatePaymentInstrument($payment_processor_id, $values, &$errors, $form) {
// ignore if we don't have a payment instrument to validate (e.g. backend payments)
if ($payment_processor_id > 0) {
- $payment = Civi\Payment\System::singleton()->getById($payment_processor_id);
+ $payment = Civi\Payment\System::singleton()->getById($payment_processor_id);
$payment->validatePaymentInstrument($values, $errors);
}
}
return FALSE;
}
- /**
- * Function to action pre-approval if supported
- *
- * @param array $params
- * Parameters from the form
- *
- * @return array
- * - pre_approval_parameters (this will be stored on the calling form & available later)
- * - redirect_url (if set the browser will be redirected to this.
- */
+ /**
+ * Function to action pre-approval if supported
+ *
+ * @param array $params
+ * Parameters from the form
+ *
+ * @return array
+ * - pre_approval_parameters (this will be stored on the calling form & available later)
+ * - redirect_url (if set the browser will be redirected to this.
+ */
public function doPreApproval(&$params) {
$token = $this->setExpressCheckOut($params);
return array(