ver. 0.269: ShopPaymentMethod refactor + Apilo keepalive

This commit is contained in:
2026-02-14 15:22:02 +01:00
parent 5e5d3d068a
commit 818cd7f2c0
31 changed files with 1832 additions and 269 deletions

View File

@@ -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>';
}
}