PHP code example of apimatic-pq / pq-api-matic-sdk
1. Go to this page and download the library: Download apimatic-pq/pq-api-matic-sdk 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/ */
apimatic-pq / pq-api-matic-sdk example snippets
use PayQuickerSDKLib\Logging\LoggingConfigurationBuilder;
use PayQuickerSDKLib\Logging\RequestLoggingConfigurationBuilder;
use PayQuickerSDKLib\Logging\ResponseLoggingConfigurationBuilder;
use Psr\Log\LogLevel;
use PayQuickerSDKLib\Models\SandboxInstance;
use PayQuickerSDKLib\Models\UatInstance;
use PayQuickerSDKLib\Environment;
use PayQuickerSDKLib\Authentication\ServerCredentialsBuilder;
use PayQuickerSDKLib\Models\OAuthScopeServer;
use PayQuickerSDKLib\Authentication\ClientsideCredentialsBuilder;
use PayQuickerSDKLib\PayQuickerSDKClientBuilder;
$client = PayQuickerSDKClientBuilder::init()
->serverCredentials(
ServerCredentialsBuilder::init(
'OAuthClientId',
'OAuthClientSecret'
)
->oAuthScopes(
[
OAuthScopeServer::READONLY,
OAuthScopeServer::MODIFY
]
)
)
->clientsideCredentials(
ClientsideCredentialsBuilder::init(
'AccessToken'
)
)
->xMyPayQuickerVersion('2026.02.01')
->environment(Environment::SANDBOX)
->sandboxInstance(SandboxInstance::SANDBOX)
->uatInstance(UatInstance::UAT1)
->loggingConfiguration(
LoggingConfigurationBuilder::init()
->level(LogLevel::INFO)
->requestConfiguration(RequestLoggingConfigurationBuilder::init()->body(true))
->responseConfiguration(ResponseLoggingConfigurationBuilder::init()->headers(true))
)
->build();