* - pre_approval_parameters (this will be stored on the calling form & available later)
* - redirect_url (if set the browser will be redirected to this.
*/
- protected function doPreApproval($params) {}
+ public function doPreApproval($params) {}
/**
* Default payment instrument validation.
* @return array
* the result in an nice formatted array (or an error object)
*/
- public function setExpressCheckOut(&$params) {
+ protected function setExpressCheckOut(&$params) {
$args = array();
$this->initialize($args, 'SetExpressCheckout');
}
}
- /**
- * @param array $params
- *
- * @throws Exception
- */
- public function setExpressCheckOut(&$params) {
- CRM_Core_Error::fatal(ts('This function is not implemented'));
- }
-
- /**
- * @param $token
- *
- * @throws Exception
- */
- public function getExpressCheckoutDetails($token) {
- CRM_Core_Error::fatal(ts('This function is not implemented'));
- }
-
- /**
- * @param array $params
- *
- * @throws Exception
- */
- public function doExpressCheckout(&$params) {
- CRM_Core_Error::fatal(ts('This function is not implemented'));
- }
-
/**
* This function collects all the information from a web/api form and invokes
* the relevant payment processor specific functions to perform the transaction
$this->_setParam('sequence', rand(1, 1000));
}
- /**
- * @param array $params
- *
- * @throws Exception
- */
- public function setExpressCheckOut(&$params) {
- CRM_Core_Error::fatal(ts('This function is not implemented'));
- }
-
- /**
- * @param $token
- *
- * @throws Exception
- */
- public function getExpressCheckoutDetails($token) {
- CRM_Core_Error::fatal(ts('This function is not implemented'));
- }
-
- /**
- * @param array $params
- *
- * @throws Exception
- */
- public function doExpressCheckout(&$params) {
- CRM_Core_Error::fatal(ts('This function is not implemented'));
- }
-
/**
* @param array $params
*
);
$params['invoiceID'] = $invoiceID;
- $token = $payment->setExpressCheckout($params);
+ $token = $payment->doPreApproval($params);
if (is_a($token, 'CRM_Core_Error')) {
CRM_Core_Error::displaySessionError($token);
CRM_Utils_System::redirect($params['cancelURL']);