Open Journal Systems  3.3.0
Omnipay\Omnipay Class Reference

Static Public Member Functions

static __callStatic ($method, $parameters)
 
static __callStatic ($method, $parameters)
 
static getFactory ()
 
static getFactory ()
 
static setFactory (GatewayFactory $factory=null)
 
static setFactory (GatewayFactory $factory=null)
 

Detailed Description

Omnipay class

Provides static access to the gateway factory methods. This is the recommended route for creation and establishment of payment gateway objects via the standard GatewayFactory.

Example:

// Create a gateway for the PayPal ExpressGateway // (routes to GatewayFactory::create) $gateway = Omnipay::create('ExpressGateway');

// Initialise the gateway $gateway->initialize(...);

// Get the gateway parameters. $parameters = $gateway->getParameters();

// Create a credit card object $card = new CreditCard(...);

// Do an authorisation transaction on the gateway if ($gateway->supportsAuthorize()) { $gateway->authorize(...); } else { throw new \Exception('Gateway does not support authorize()'); }

For further code examples see the omnipay-example repository on github.

@method static array all() @method static array replace(array $gateways) @method static string register(string $className) @method static array find() @method static array getSupportedGateways() @codingStandardsIgnoreStart @method static \Omnipay\Common\GatewayInterface create(string $class, \Guzzle\Http\ClientInterface $httpClient = null, \Symfony\Component\HttpFoundation\Request $httpRequest = null) @codingStandardsIgnoreEnd

See also
Omnipay\Common\GatewayFactory

Omnipay class

Provides static access to the gateway factory methods. This is the recommended route for creation and establishment of payment gateway objects via the standard GatewayFactory.

Example:

// Create a gateway for the PayPal ExpressGateway // (routes to GatewayFactory::create) $gateway = Omnipay::create('ExpressGateway');

// Initialise the gateway $gateway->initialize(...);

// Get the gateway parameters. $parameters = $gateway->getParameters();

// Create a credit card object $card = new CreditCard(...);

// Do an authorisation transaction on the gateway if ($gateway->supportsAuthorize()) { $gateway->authorize(...); } else { throw new \Exception('Gateway does not support authorize()'); }

For further code examples see the omnipay-example repository on github.

@method static array all() @method static array replace(array $gateways) @method static string register(string $className) @method static array find() @method static array getSupportedGateways() @codingStandardsIgnoreStart @method static \Omnipay\Common\GatewayInterface create(string $class, ClientInterface $httpClient = null, \Symfony\Component\HttpFoundation\Request $httpRequest = null) @codingStandardsIgnoreEnd

See also
\Omnipay\Common\GatewayFactory

Definition at line 54 of file lib/vendor/omnipay/common/src/Omnipay/Omnipay.php.

Member Function Documentation

◆ __callStatic() [1/2]

static Omnipay\Omnipay::__callStatic (   $method,
  $parameters 
)
static

Static function call router.

All other function calls to the Omnipay class are routed to the factory. e.g. Omnipay::getSupportedGateways(1, 2, 3, 4) is routed to the factory's getSupportedGateways method and passed the parameters 1, 2, 3, 4.

Example:

// Create a gateway for the PayPal ExpressGateway $gateway = Omnipay::create('ExpressGateway');

See also
GatewayFactory
Parameters
string$methodThe factory method to invoke.
array$parametersParameters passed to the factory method.
Returns
mixed

Definition at line 111 of file lib/vendor/omnipay/common/src/Omnipay/Omnipay.php.

◆ __callStatic() [2/2]

static Omnipay\Omnipay::__callStatic (   $method,
  $parameters 
)
static

Static function call router.

All other function calls to the Omnipay class are routed to the factory. e.g. Omnipay::getSupportedGateways(1, 2, 3, 4) is routed to the factory's getSupportedGateways method and passed the parameters 1, 2, 3, 4.

Example:

// Create a gateway for the PayPal ExpressGateway $gateway = Omnipay::create('ExpressGateway');

See also
GatewayFactory
Parameters
string$methodThe factory method to invoke.
array$parametersParameters passed to the factory method.
Returns
mixed

Definition at line 112 of file vendor/omnipay/common/src/Omnipay.php.

◆ getFactory() [1/2]

static Omnipay\Omnipay::getFactory ( )
static

Get the gateway factory

Creates a new empty GatewayFactory if none has been set previously.

Returns
GatewayFactory A GatewayFactory instance

Definition at line 71 of file lib/vendor/omnipay/common/src/Omnipay/Omnipay.php.

◆ getFactory() [2/2]

static Omnipay\Omnipay::getFactory ( )
static

Get the gateway factory

Creates a new empty GatewayFactory if none has been set previously.

Returns
GatewayFactory A GatewayFactory instance

Definition at line 72 of file vendor/omnipay/common/src/Omnipay.php.

◆ setFactory() [1/2]

static Omnipay\Omnipay::setFactory ( GatewayFactory  $factory = null)
static

Set the gateway factory

Parameters
GatewayFactory$factoryA GatewayFactory instance

Definition at line 85 of file lib/vendor/omnipay/common/src/Omnipay/Omnipay.php.

◆ setFactory() [2/2]

static Omnipay\Omnipay::setFactory ( GatewayFactory  $factory = null)
static

Set the gateway factory

Parameters
GatewayFactory$factoryA GatewayFactory instance

Definition at line 86 of file vendor/omnipay/common/src/Omnipay.php.


The documentation for this class was generated from the following file: