2 class test_extension_manager_paymenttest
extends CRM_Core_Payment
{
3 static private $_singleton = NULL;
6 * singleton function used to manage this object
8 * @param string $mode the mode of operation: live or test
9 * @param array $paymentProcessor the details of the payment processor being invoked
10 * @param object $paymentForm reference to the form object if available
11 * @param boolean $force should we force a reload of this payment object
17 static function &singleton($mode = 'test', &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) {
18 $processorName = $paymentProcessor['name'];
19 if (self
::$_singleton[$processorName] === NULL) {
20 self
::$_singleton[$processorName] = new test_extension_manager_paymenttest();
22 return self
::$_singleton[$processorName];
25 static $counts = array();
28 self
::$counts['install'] = 1 +
(int) self
::$counts['install'];
31 function uninstall() {
32 self
::$counts['uninstall'] = 1 +
(int) self
::$counts['uninstall'];
36 self
::$counts['disable'] = 1 +
(int) self
::$counts['disable'];
40 self
::$counts['enable'] = 1 +
(int) self
::$counts['enable'];
44 * This function collects all the information from a web/api form and invokes
45 * the relevant payment processor specific functions to perform the transaction
47 * @param array $params assoc array of input parameters for this transaction
49 * @return array the result in an nice formatted array (or an error object)
52 function doDirectPayment(&$params) {
55 function checkConfig() {