Open Journal Systems
3.3.0
|
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) |
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
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
Definition at line 54 of file lib/vendor/omnipay/common/src/Omnipay/Omnipay.php.
|
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');
string | $method | The factory method to invoke. |
array | $parameters | Parameters passed to the factory method. |
Definition at line 111 of file lib/vendor/omnipay/common/src/Omnipay/Omnipay.php.
|
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');
string | $method | The factory method to invoke. |
array | $parameters | Parameters passed to the factory method. |
Definition at line 112 of file vendor/omnipay/common/src/Omnipay.php.
|
static |
Get the gateway factory
Creates a new empty GatewayFactory if none has been set previously.
Definition at line 71 of file lib/vendor/omnipay/common/src/Omnipay/Omnipay.php.
|
static |
Get the gateway factory
Creates a new empty GatewayFactory if none has been set previously.
Definition at line 72 of file vendor/omnipay/common/src/Omnipay.php.
|
static |
Set the gateway factory
GatewayFactory | $factory | A GatewayFactory instance |
Definition at line 85 of file lib/vendor/omnipay/common/src/Omnipay/Omnipay.php.
|
static |
Set the gateway factory
GatewayFactory | $factory | A GatewayFactory instance |
Definition at line 86 of file vendor/omnipay/common/src/Omnipay.php.