class Pay implements ConfigInterface (View source)

Pay Class

This is the main entry class for the OVAC/Hubtel-Payment Package This class is responsible for creating the config instance

Constants

VERSION

The package version.

CLIENT

The package Client Name.

Properties

protected ConfigInterface $config The Config repository instance.

Methods

void
__construct(string|array $account = null, string $clientId = null, string $clientSecret = null)

Constructor.

static Pay
make(string|array $account = null, string $clientId = null, string $clientSecret = null)

Create a new OVAC\HubtelPayment instance.

getConfig()

Returns the Config repository instance.

$this
setConfig(Config $config)

Sets the Config repository instance.

string
getAccountNumber()

Get the Merchant Client Account Number from the configuration

$this
setAccountNumber(string $accountNumber)

Sets the Hubter API Merchant Account Number.

string
getClientId()

Returns the Hubtel API Merchant Client ID.

$this
setClientId(string $clientId)

Sets the Hubtel API Merchant ID.

string
getClientSecret()

Returns the Hubtel API Merchant Client Secret.

$this
setClientSecret(string $clientSecret)

Sets the Hubtel API Merchant Client Secret.

string
getPackageVersion()

Returns the current package version.

setPackageVersion(string $version)

Set the current package version

static Transaction
__callStatic(string $className, array $parameters)

Dynamically handle missing Static Api Classes and Methods.

Transaction
__call(string $method, array $parameters)

Dynamically handle missing Api Classes and Methods.

Transaction
getApiInstance($className, $parameters)

Returns the Api class instance for the given method.

Details

void __construct(string|array $account = null, string $clientId = null, string $clientSecret = null)

Constructor.

Parameters

string|array $account
string $clientId
string $clientSecret

Return Value

void

static Pay make(string|array $account = null, string $clientId = null, string $clientSecret = null)

Create a new OVAC\HubtelPayment instance.

Parameters

string|array $account
string $clientId
string $clientSecret

Return Value

Pay

ConfigInterface getConfig()

Returns the Config repository instance.

Return Value

ConfigInterface

$this setConfig(Config $config)

Sets the Config repository instance.

Parameters

Config $config

Return Value

$this

string getAccountNumber()

Get the Merchant Client Account Number from the configuration

Return Value

string Merchant Client Account Number

$this setAccountNumber(string $accountNumber)

Sets the Hubter API Merchant Account Number.

Parameters

string $accountNumber

Return Value

$this

string getClientId()

Returns the Hubtel API Merchant Client ID.

Return Value

string

$this setClientId(string $clientId)

Sets the Hubtel API Merchant ID.

Parameters

string $clientId

Return Value

$this

string getClientSecret()

Returns the Hubtel API Merchant Client Secret.

Return Value

string

$this setClientSecret(string $clientSecret)

Sets the Hubtel API Merchant Client Secret.

Parameters

string $clientSecret

Return Value

$this

string getPackageVersion()

Returns the current package version.

Return Value

string

setPackageVersion(string $version)

Set the current package version

Parameters

string $version The version of this package

static Transaction __callStatic(string $className, array $parameters)

Dynamically handle missing Static Api Classes and Methods.

Parameters

string $className
array $parameters

Return Value

Transaction

Exceptions

BadMethodCallException

Transaction __call(string $method, array $parameters)

Dynamically handle missing Api Classes and Methods.

Parameters

string $method
array $parameters

Return Value

Transaction

protected Transaction getApiInstance($className, $parameters)

Returns the Api class instance for the given method.

Parameters

$className
$parameters

Return Value

Transaction

Exceptions

BadMethodCallException