);
if ($rfp) {
$payment = CRM_Core_Payment::singleton($this->_mode, $this->_paymentProcessor, $this);
- $expressParams = $payment->getExpressCheckoutDetails($this->get('token'));
+ $expressParams = $payment->getPreApprovalDetails($this->get('pre_approval_parameters'));
$this->_params['payer'] = CRM_Utils_Array::value('payer', $expressParams);
$this->_params['payer_id'] = $expressParams['payer_id'];
*/
public function doPreApproval($params) {}
+ /**
+ * Get any details that may be available to the payment processor due to an approval process having happened.
+ *
+ * In some cases the browser is redirected to enter details on a processor site. Some details may be available as a
+ * result.
+ *
+ * @param array $storedDetails
+ *
+ * @return array
+ */
+ public function getPreApprovalDetails($storedDetails) {
+ return array();
+ }
+
/**
* Default payment instrument validation.
*
return $result['token'];
}
+ /**
+ * Get any details that may be available to the payment processor due to an approval process having happened.
+ *
+ * In some cases the browser is redirected to enter details on a processor site. Some details may be available as a
+ * result.
+ *
+ * @param array $storedDetails
+ *
+ * @return array
+ */
+ public function getPreApprovalDetails($storedDetails) {
+ return $this->getExpressCheckoutDetails($storedDetails['token']);
+ }
+
/**
* Get details from paypal. Check PayPal documentation for more information
*