1. Go to this page and download the library: Download jlg/php-adp-client 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/ */
jlg / php-adp-client example snippets
$config = [
'client_id' => '********-****-****-****-************',
'client_secret' => '********-****-****-****-************',
'org_name' => 'ADP Org Name',
'ssl_cert_path' => '/etc/ssl/adp/company_auth.pem',
'ssl_key_path' => '/etc/ssl/adp/company_auth.key',
'server_url' => 'https://api.adp.com/'
];
$adp = new \Jlg\ADP\Client($config);
$filter = "workers/workAssignments/assignmentStatus/statusCode/codeValue eq 'A'";
$params = [
'query' => [
'$filter' => $filter,
'$top' => 100, // amount of records to grab
'$skip' => 0 // how many records to skip.
]
];
$httpResults = $adp::getContents($adp->get('hr/v2/workers', $params));
$workers = ($httpResults) ? $httpResults->workers : [];