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.
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.
19 * Should we force a reload of this payment object.
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();
28 return self
::$_singleton[$processorName];
31 static $counts = array();
33 public function install() {
34 self
::$counts['install'] = 1 +
(int) self
::$counts['install'];
37 public function uninstall() {
38 self
::$counts['uninstall'] = 1 +
(int) self
::$counts['uninstall'];
41 public function disable() {
42 self
::$counts['disable'] = 1 +
(int) self
::$counts['disable'];
45 public function enable() {
46 self
::$counts['enable'] = 1 +
(int) self
::$counts['enable'];
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
53 * @param array $params
54 * Assoc array of input parameters for this transaction.
57 public function doDirectPayment(&$params) {
60 public function checkConfig() {