68 Classifieds API

Features
class tree: 68Classifieds | index: 68Classifieds | all elements

 Class Gateways

Description

Handles interaction with the Gateway system.

Please visit our knowledge base for more information on creating a new Payment Gateway.

Located in /includes/classes/kernel/Gateways.php (line 24)


	
			
Method Summary
 Gateways Gateways (object database &$db)
 mixed callBack (string $name, array $params)
 void call_gateway (string $function, array $params, string $type)
 booleen changeStatus (int $id, string $state)
 mixed createForm (int $id, array $params)
 boolean exists (string $gateway)
 array getAllGateways ()
 mixed getGatewayByName (string $name, [ $type = "user"])
 void regenerate ()
Methods
Constructor Gateways (line 39)

Gateways constructor

  • access: public
Gateways Gateways (object database &$db)
  • object database &$db: connection
callBack (line 117)

Handle the call back from the gateway file.

This uses the sr.php file and the _processTransaction function.

  • return: The status from the sr.php file that is called.
mixed callBack (string $name, array $params)
  • string $name: The internal name of the gateway
  • array $params: The passback parameters.
call_gateway (line 180)

Call Gateway

  • access: public
void call_gateway (string $function, array $params, string $type)
  • string $function: String containing the function name.
  • array $params: An array of parameters that are passed.
  • string $type: The type of action. Default is user action.
changeStatus (line 208)

Change the status of a gateway

  • return: TRUE or FALSE
booleen changeStatus (int $id, string $state)
  • int $id
  • string $state
createForm (line 149)

Create the form from the sr.php file. This uses the _createForm function.

  • return: The value from the sr.php file that is called. Normally html.
mixed createForm (int $id, array $params)
  • int $id: The gateway id
  • array $params: The needed parameters.
exists (line 302)

Checks if a gateway exists

  • return: True if files exist, false otherwise
boolean exists (string $gateway)
  • string $gateway: The folder of the gateway.
getActiveGatewayList (line 68)

Gets all active gateways

  • return: Array of active gateways.
array getActiveGatewayList ()
getAllGateways (line 49)

Get a list of all the gateways

  • return: Array of gateways
array getAllGateways ()
getGatewayByName (line 87)

Get an active gateway by name

  • return: The gateway details on success.
mixed getGatewayByName (string $name, [ $type = "user"])
  • string $name: The name of the module.
  • $type
regenerate (line 242)

Scans the gateways directory and add any new ones

void regenerate ()