- Implement AllegroShipmentService for managing shipment creation and status checks. - Create ShipmentController to handle shipment preparation and label downloading. - Introduce ShipmentPackageRepository for database interactions related to shipment packages. - Add methods for retrieving delivery services, creating shipments, checking creation status, and downloading labels. - Implement address validation and token management for Allegro API integration.
35 lines
1.4 KiB
PHP
35 lines
1.4 KiB
PHP
<?php
|
|
$integration = is_array($settings ?? null) ? $settings : [];
|
|
$hasApiKey = (bool) ($integration['has_api_key'] ?? false);
|
|
?>
|
|
|
|
<section class="card">
|
|
<h2 class="section-title"><?= $e($t('settings.apaczka.title')) ?></h2>
|
|
<p class="muted mt-12"><?= $e($t('settings.apaczka.description')) ?></p>
|
|
|
|
<?php if (!empty($errorMessage)): ?>
|
|
<div class="alert alert--danger mt-12" role="alert"><?= $e((string) $errorMessage) ?></div>
|
|
<?php endif; ?>
|
|
|
|
<?php if (!empty($successMessage)): ?>
|
|
<div class="alert alert--success mt-12" role="status"><?= $e((string) $successMessage) ?></div>
|
|
<?php endif; ?>
|
|
</section>
|
|
|
|
<section class="card mt-16">
|
|
<h3 class="section-title"><?= $e($t('settings.apaczka.config.title')) ?></h3>
|
|
<form class="statuses-form mt-16" action="/settings/integrations/apaczka/save" method="post" novalidate>
|
|
<input type="hidden" name="_token" value="<?= $e($csrfToken ?? '') ?>">
|
|
|
|
<label class="form-field">
|
|
<span class="field-label"><?= $e($t('settings.apaczka.fields.api_key')) ?></span>
|
|
<input class="form-control" type="password" name="api_key" autocomplete="new-password">
|
|
<span class="muted"><?= $e($hasApiKey ? $t('settings.apaczka.api_key.saved') : $t('settings.apaczka.api_key.missing')) ?></span>
|
|
</label>
|
|
|
|
<div class="form-actions">
|
|
<button type="submit" class="btn btn--primary"><?= $e($t('settings.apaczka.actions.save')) ?></button>
|
|
</div>
|
|
</form>
|
|
</section>
|