feat(127): polkurier integration foundation
Single-instance globalna konfiguracja polkurier.pl jako alternatywa dla Apaczki: szyfrowany login + Token API, karta w hubie integracji i realny test polaczenia przez apimetod=test_auth_api zweryfikowany na zywym koncie operatora (Autoryzacja: 1). ShipmentProviderRegistry netkniety - PolkurierShipmentService/ TrackingService w kolejnych fazach. Kluczowe ustalenia kontraktu API (z SDK polkurier-sdk): - POST https://api.polkurier.pl/ (jeden endpoint) - JSON body: {authorization:{login,token}, apimetod, data} - Sukces: top-level status === 'success' (nie 'ok') - Blad: tresc w polu 'response' envelope'a - Content-Type: application/json (strict, bez charset suffix) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -39,6 +39,9 @@ use App\Modules\Settings\InpostIntegrationController;
|
||||
use App\Modules\Settings\InpostIntegrationRepository;
|
||||
use App\Modules\Settings\IntegrationsHubController;
|
||||
use App\Modules\Settings\IntegrationsRepository;
|
||||
use App\Modules\Settings\PolkurierApiClient;
|
||||
use App\Modules\Settings\PolkurierIntegrationController;
|
||||
use App\Modules\Settings\PolkurierIntegrationRepository;
|
||||
use App\Modules\Settings\SmsplanetApiClient;
|
||||
use App\Modules\Settings\SmsplanetIntegrationController;
|
||||
use App\Modules\Settings\SmsplanetIntegrationRepository;
|
||||
@@ -217,6 +220,18 @@ return static function (Application $app): void {
|
||||
new HostedSmsApiClient(),
|
||||
new IntegrationsRepository($app->db())
|
||||
);
|
||||
$polkurierIntegrationRepository = new PolkurierIntegrationRepository(
|
||||
$app->db(),
|
||||
(string) $app->config('app.integrations.secret', '')
|
||||
);
|
||||
$polkurierIntegrationController = new PolkurierIntegrationController(
|
||||
$template,
|
||||
$translator,
|
||||
$auth,
|
||||
$polkurierIntegrationRepository,
|
||||
new PolkurierApiClient(),
|
||||
new IntegrationsRepository($app->db())
|
||||
);
|
||||
$smsplanetIntegrationRepository = new SmsplanetIntegrationRepository(
|
||||
$app->db(),
|
||||
(string) $app->config('app.integrations.secret', '')
|
||||
@@ -251,7 +266,8 @@ return static function (Application $app): void {
|
||||
$shopproIntegrationsRepository,
|
||||
$fakturowniaIntegrationRepository,
|
||||
$hostedSmsIntegrationRepository,
|
||||
$smsplanetIntegrationRepository
|
||||
$smsplanetIntegrationRepository,
|
||||
$polkurierIntegrationRepository
|
||||
);
|
||||
$cronSettingsController = new CronSettingsController(
|
||||
$template,
|
||||
@@ -613,6 +629,9 @@ return static function (Application $app): void {
|
||||
$router->get('/settings/integrations/hostedsms', [$hostedSmsIntegrationController, 'index'], [$authMiddleware]);
|
||||
$router->post('/settings/integrations/hostedsms/save', [$hostedSmsIntegrationController, 'save'], [$authMiddleware]);
|
||||
$router->post('/settings/integrations/hostedsms/test', [$hostedSmsIntegrationController, 'test'], [$authMiddleware]);
|
||||
$router->get('/settings/integrations/polkurier', [$polkurierIntegrationController, 'index'], [$authMiddleware]);
|
||||
$router->post('/settings/integrations/polkurier/save', [$polkurierIntegrationController, 'save'], [$authMiddleware]);
|
||||
$router->post('/settings/integrations/polkurier/test', [$polkurierIntegrationController, 'test'], [$authMiddleware]);
|
||||
$router->get('/settings/integrations/smsplanet', [$smsplanetIntegrationController, 'index'], [$authMiddleware]);
|
||||
$router->post('/settings/integrations/smsplanet/save', [$smsplanetIntegrationController, 'save'], [$authMiddleware]);
|
||||
$router->post('/settings/integrations/smsplanet/test', [$smsplanetIntegrationController, 'test'], [$authMiddleware]);
|
||||
|
||||
Reference in New Issue
Block a user