PHP code example of zaporylie / oauth2-zuora
1. Go to this page and download the library: Download zaporylie/oauth2-zuora 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/ */
zaporylie / oauth2-zuora example snippets
$oauth = new \zaporylie\OAuth2\Client\Provider\Zuora([
'clientId' => 'id_obtained_from_zuora',
'clientSecret' => 'secret_obtained_from_zuora',
// Skip `mode` for production.
'mode' => 'sandbox',
]);
try {
$token = $oauth->getAccessToken()->getToken();
}
catch (IdentityProviderException $exception) {
// Something went wrong on Zuora. Check message.
}