OVAC\Hubtel-Payment

Config

Config is the configuration class used by the Api and holds the developer authentication data. It is required by the client handler to authenticate the http calls to the Hubtel Api.

Creating a Config.

The Config class only accepts three arguments :

The arguments must be passed in accordingly to the Hubtel Config as follows:

    use OVAC\HubtelPayment\Config;

    new Config(AccountNumber, ClientId, ClientSecret);

The data on this Client ID and ClientSecret above can be obtained from any existing or new Hubtel account by creating a developer api application as follows:

First navigate to the Hubtel Accounts Api page at https://unity.hubtel.com/account/api-accounts

Click on the add application button.

Select Http Rest Api as the Api type and provide a description of the application and then hit save.

After hitting the save button, The ClientID and ClientSecret will be revealed as shown below.

The Account Number can also be found at https://unity.hubtel.com/merchantaccount/dashboard

Example #1 using the data from the Hubtel account shown above.

    use OVAC\HubtelPayment\Config;

    $config = new Config('HM2707170067', 'ukoqgisb', 'tfbfugam');

The config can now be injected into a call to any of the Transaction class as shown here

properties

The config object has setters and getters that allow you to manipulate the properties of the instance subject.