PHP code example of plural-pinelabs / pinelabs-php
1. Go to this page and download the library: Download plural-pinelabs/pinelabs-php 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/ */
plural-pinelabs / pinelabs-php example snippets
apiInstance = new Pinelabs\Api\AuthenticationApi(
// 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()
);
$client_id = 'client_id_example'; // string | Your merchant client ID from the Pine Labs dashboard.
$client_secret = 'client_secret_example'; // string | Your merchant client secret. Keep this confidential.
$grant_type = 'grant_type_example'; // string | Must be \\\"client_credentials\\\".
try {
$result = $apiInstance->generateToken($client_id, $client_secret, $grant_type);
print_r($result);
} catch (Exception $e) {
echo 'Exception when calling AuthenticationApi->generateToken: ', $e->getMessage(), PHP_EOL;
}