WIP: TEMU
This commit is contained in:
@@ -3,7 +3,6 @@
|
||||
//error_reporting(LC_ALL);
|
||||
//ini_set('display_errors', 1);
|
||||
// ?XDEBUG_SESSION_START=PHPSTORM
|
||||
//importInvoices();
|
||||
function apilo_importInvoices()
|
||||
{
|
||||
$apilo_config = apilo_loadConfiguration();
|
||||
@@ -14,7 +13,8 @@ function apilo_importInvoices()
|
||||
$offset = intval($db->fetchByAssoc($dbRes)['last_id']);
|
||||
|
||||
$invoices = apilo_loadInvoices($apilo_config['token'], $offset);
|
||||
if (isset($invoices->error)) {
|
||||
brecho($apilo_config);
|
||||
if (isset($invoices->errors)) {
|
||||
if (apilo_refreshToken($apilo_config['refreshToken'], $apilo_config['clientId'], $apilo_config['clientSecret']) == true) {
|
||||
//$apilo_config = apilo_loadConfiguration();
|
||||
//$invoices = apilo_loadInvoices($apilo_config['token'], $offset);
|
||||
@@ -23,6 +23,8 @@ function apilo_importInvoices()
|
||||
}
|
||||
}
|
||||
|
||||
brecho($invoices);
|
||||
|
||||
$GLOBALS['log']->bimit('----- Importing invoices from Apilo, documents count', count($invoices->documents));
|
||||
|
||||
$platforms = apilo_loadPlatformsList($apilo_config['token']);
|
||||
|
||||
Reference in New Issue
Block a user