1. Go to this page and download the library: Download zfmaster/optile-opg-lib library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
zfmaster / optile-opg-lib example snippets
onfigure HTTP basic authorization: payment_auth
$config = Optile\Configuration::getDefaultConfiguration()
->setUsername('YOUR_USERNAME')
->setPassword('YOUR_PASSWORD');
$apiInstance = new Optile\Api\ActivationApi(
// If you want use custom http client, pass your client which implements `GuzzleHttp\ClientInterface`.
// This is optional, `GuzzleHttp\Client` will be used as default.
new GuzzleHttp\Client(),
$config
);
$list_id = "list_id_example"; // string | The `longId` of a `LIST` session to complete an `ACTIVATION` operation
$network = "network_example"; // string | The code of selected payment network
$operation = new \Optile\Model\Operation(); // \Optile\Model\Operation | Holds information for `ACTIVATION` operation with selected payment network
$view = array("view_example"); // string[] | Enables or disables view options to configure response when creating or retrieving `LIST`. Multiple options can be combined in the single value of the `view` query parameter. Use comma (\",\") to separate options. See \"Get LIST session details\" for more detailed information about the `view` query parameter.
try {
$result = $apiInstance->activatePaymentNetwork($list_id, $network, $operation, $view);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling ActivationApi->activatePaymentNetwork: ', $e->getMessage(), PHP_EOL;
}
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.