*
* @param string $mode the mode of operation: live or test
*
- * @return void
+ * @param $paymentProcessor
+ *
+ * @return \CRM_Core_Payment_PaymentExpress
*/
function __construct($mode, &$paymentProcessor) {
*
* @param string $mode the mode of operation: live or test
*
+ * @param object $paymentProcessor
+ * @param null $paymentForm
+ * @param bool $force
+ *
* @return object
* @static
- *
*/
static function &singleton($mode = 'test', &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) {
$processorName = $paymentProcessor['name'];
return self::$_singleton[$processorName];
}
+ /**
+ * This function checks to see if we have the right config values
+ *
+ * @internal param string $mode the mode we are operating in (live or test)
+ *
+ * @return string the error message if any
+ * @public
+ */
function checkConfig() {
$config = CRM_Core_Config::singleton();
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
+ *
+ * @param array $params assoc array of input parameters for this transaction
+ *
+ * @return array the result in an nice formatted array (or an error object)
+ * @abstract
+ */
function doDirectPayment(&$params) {
CRM_Core_Error::fatal(ts('This function is not implemented'));
}
/**
* Main transaction function
*
- * @param array $params name value pair of contribution data
+ * @param array $params name value pair of contribution data
+ *
+ * @param $component
*
* @return void
* @access public
- *
*/
function doTransferCheckout(&$params, $component) {
$component = strtolower($component);