ver. 0.269: ShopPaymentMethod refactor + Apilo keepalive
This commit is contained in:
8
cron.php
8
cron.php
@@ -55,6 +55,12 @@ $mdb = new medoo( [
|
||||
$settings = \front\factory\Settings::settings_details();
|
||||
$apilo_settings = \admin\factory\Integrations::apilo_settings();
|
||||
|
||||
// Keepalive tokenu Apilo: odswiezaj token przed wygasnieciem, zeby integracja byla stale aktywna.
|
||||
if ( (int)($apilo_settings['enabled'] ?? 0) === 1 ) {
|
||||
\admin\factory\Integrations::apilo_keepalive( 300 );
|
||||
$apilo_settings = \admin\factory\Integrations::apilo_settings();
|
||||
}
|
||||
|
||||
function parsePaczkomatAddress($input)
|
||||
{
|
||||
$pattern = '/^([\w-]+)\s+\|\s+([^,]+),\s+(\d{2}-\d{3})\s+(.+)$/';
|
||||
@@ -574,4 +580,4 @@ foreach ( $orders as $order )
|
||||
}
|
||||
$mdb -> update( 'pp_shop_orders', [ 'parsed' => 1 ], [ 'id' => $order ] );
|
||||
echo '<p>Parsuję zamówienie <b>#' . $order . '</b></p>';
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user