Overview

Namespaces

  • Guzzle
    • Batch
      • Exception
    • Cache
    • Common
      • Exception
    • Http
      • Curl
      • Exception
      • Message
        • Header
      • QueryAggregator
    • Inflection
    • Iterator
    • Log
    • Parser
      • Cookie
      • Message
      • UriTemplate
      • Url
    • Plugin
      • Async
      • Backoff
      • Cache
      • Cookie
        • CookieJar
        • Exception
      • CurlAuth
      • ErrorResponse
        • Exception
      • History
      • Log
      • Md5
      • Mock
      • Oauth
    • Service
      • Builder
      • Command
        • Factory
        • LocationVisitor
          • Request
          • Response
      • Description
      • Exception
      • Resource
    • Stream
    • Tests
      • Batch
      • Cache
      • Common
        • Cache
        • Exception
      • Http
        • Curl
        • Exception
        • Message
          • Header
      • Inflection
      • Iterator
      • Log
      • Message
      • Mock
      • Parser
        • Cookie
        • Message
      • Parsers
        • UriTemplate
      • Plugin
        • Async
        • Backoff
        • Cache
        • Cookie
          • CookieJar
        • CurlAuth
        • ErrorResponse
        • History
        • Log
        • Md5
        • Mock
        • Oauth
        • Redirect
      • Service
        • Builder
        • Command
          • LocationVisitor
            • Request
            • Response
        • Description
        • Exception
        • Mock
          • Command
            • Sub
          • Model
        • Resource
      • Stream
  • None
  • Omnipay
    • Common
      • Exception
      • Message
    • Dummy
      • Message
    • VivaPayments
      • Message
  • PHP

Classes

  • Omnipay
  • Overview
  • Namespace
  • Class
  • Tree

Class Omnipay

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.

Namespace: Omnipay
See: Omnipay\Common\GatewayFactory
Codingstandardsignoreend
Codingstandardsignorestart
Located at Omnipay.php
Methods summary
public static Omnipay\Common\GatewayFactory
# getFactory( )

Get the gateway factory

Get the gateway factory

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

Returns

Omnipay\Common\GatewayFactory
A GatewayFactory instance
public static
# setFactory( Omnipay\Common\GatewayFactory $factory = null )

Set the gateway factory

Set the gateway factory

Parameters

$factory
A GatewayFactory instance
public static mixed
# __callStatic( string $method, array $parameters )

Static function call router.

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');

Parameters

$method
The factory method to invoke.
$parameters
Parameters passed to the factory method.

Returns

mixed

See

Omnipay\Common\GatewayFactory
Omnipay Viva Payments Gateway Module API Documentation API documentation generated by ApiGen