Migrated from Redmine #305 | Author: Bob Marley
Status: Closed | Priority: High, I’m very impatient | Created: 2018-12-13
I am getting
JsonRpcClient->__call(‘getUnitList’, Array) #1 {main} thrown in /Applications/XAMPP/xamppfiles/htdocs/simplybookme/JsonRpcClient.php on line 57howewer I have done all steps that are mantioned on main web site. My final code:
<?php
require_once('JsonRpcClient.php');
require_once('Contract.php');
$loginClient = new JsonRpcClient('https://user-api.simplybook.me' . '/login/');
$token = $loginClient->getToken(SIMPLYBOOKME_LOGIN, SIMPLYBOOKME_API);
$client = new JsonRpcClient('https://user-api.simplybook.me' . '/admin/', array(
'headers' => array(
'X-Company-Login: ' . SIMPLYBOOKME_LOGIN,
'X-User-Token: ' . $token
)
));
$services = $client->getUnitList();
echo $services;
?>
Contract.php it’s where I define my constant variables