INFRA-132 add full stop after comments
[civicrm-core.git] / tests / extensions / test.extension.manager.paymenttest / main.php
1 <?php
2
3 /**
4 * Class test_extension_manager_paymenttest
5 */
6 class test_extension_manager_paymenttest extends CRM_Core_Payment {
7 static private $_singleton = NULL;
8
9 /**
10 * Singleton function used to manage this object.
11 *
12 * @param string $mode
13 * The mode of operation: live or test.
14 * @param array $paymentProcessor
15 * The details of the payment processor being invoked.
16 * @param CRM_Core_Form $paymentForm
17 * Reference to the form object if available.
18 * @param bool $force
19 * Should we force a reload of this payment object.
20 *
21 * @return object
22 */
23 public static function &singleton($mode = 'test', &$paymentProcessor, &$paymentForm = NULL, $force = FALSE) {
24 $processorName = $paymentProcessor['name'];
25 if (self::$_singleton[$processorName] === NULL) {
26 self::$_singleton[$processorName] = new test_extension_manager_paymenttest();
27 }
28 return self::$_singleton[$processorName];
29 }
30
31 static $counts = array();
32
33 public function install() {
34 self::$counts['install'] = 1 + (int) self::$counts['install'];
35 }
36
37 public function uninstall() {
38 self::$counts['uninstall'] = 1 + (int) self::$counts['uninstall'];
39 }
40
41 public function disable() {
42 self::$counts['disable'] = 1 + (int) self::$counts['disable'];
43 }
44
45 public function enable() {
46 self::$counts['enable'] = 1 + (int) self::$counts['enable'];
47 }
48
49 /**
50 * This function collects all the information from a web/api form and invokes
51 * the relevant payment processor specific functions to perform the transaction
52 *
53 * @param array $params
54 * Assoc array of input parameters for this transaction.
55 *
56 */
57 public function doDirectPayment(&$params) {
58 }
59
60 public function checkConfig() {
61 }
62
63 }