4 * Class test_extension_manager_paymenttest
6 class test_extension_manager_paymenttest
extends CRM_Core_Payment
{
7 static private $_singleton = NULL;
10 * singleton function used to manage this object
12 * @param string $mode the mode of operation: live or test
13 * @param array $paymentProcessor the details of the payment processor being invoked
14 * @param CRM_Core_Form $paymentForm reference to the form object if available
15 * @param boolean $force should we force a reload of this payment object
21 static function &singleton($mode = 'test', &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) {
22 $processorName = $paymentProcessor['name'];
23 if (self
::$_singleton[$processorName] === NULL) {
24 self
::$_singleton[$processorName] = new test_extension_manager_paymenttest();
26 return self
::$_singleton[$processorName];
29 static $counts = array();
32 self
::$counts['install'] = 1 +
(int) self
::$counts['install'];
35 function uninstall() {
36 self
::$counts['uninstall'] = 1 +
(int) self
::$counts['uninstall'];
40 self
::$counts['disable'] = 1 +
(int) self
::$counts['disable'];
44 self
::$counts['enable'] = 1 +
(int) self
::$counts['enable'];
48 * This function collects all the information from a web/api form and invokes
49 * the relevant payment processor specific functions to perform the transaction
51 * @param array $params assoc array of input parameters for this transaction
53 * @return array the result in an nice formatted array (or an error object)
56 function doDirectPayment(&$params) {
59 function checkConfig() {