feat(shipments): add ShipmentProviderInterface and ShipmentProviderRegistry
- Introduced ShipmentProviderInterface to define the contract for shipment providers. - Implemented ShipmentProviderRegistry to manage and retrieve shipment providers. - Added a new tool for probing Apaczka order_send payload variants, enhancing debugging capabilities.
This commit is contained in:
@@ -1,6 +1,9 @@
|
||||
<?php
|
||||
$integration = is_array($settings ?? null) ? $settings : [];
|
||||
$hasApiKey = (bool) ($integration['has_api_key'] ?? false);
|
||||
$appId = trim((string) ($integration['app_id'] ?? ''));
|
||||
$hasAppSecret = (bool) ($integration['has_app_secret'] ?? false);
|
||||
$hasAppId = (bool) ($integration['has_app_id'] ?? false);
|
||||
$updatedAt = trim((string) ($integration['updated_at'] ?? ''));
|
||||
?>
|
||||
|
||||
<section class="card">
|
||||
@@ -18,17 +21,38 @@ $hasApiKey = (bool) ($integration['has_api_key'] ?? false);
|
||||
|
||||
<section class="card mt-16">
|
||||
<h3 class="section-title"><?= $e($t('settings.apaczka.config.title')) ?></h3>
|
||||
<div class="muted mt-12">
|
||||
<?= $e($t('settings.apaczka.status.app_id')) ?>:
|
||||
<strong><?= $e($hasAppId ? $t('settings.apaczka.status.saved') : $t('settings.apaczka.status.missing')) ?></strong>
|
||||
|
|
||||
<?= $e($t('settings.apaczka.status.app_secret')) ?>:
|
||||
<strong><?= $e($hasAppSecret ? $t('settings.apaczka.status.saved') : $t('settings.apaczka.status.missing')) ?></strong>
|
||||
<?php if ($updatedAt !== ''): ?>
|
||||
| <?= $e($t('settings.apaczka.status.updated_at')) ?>: <strong><?= $e($updatedAt) ?></strong>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<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>
|
||||
<span class="field-label"><?= $e($t('settings.apaczka.fields.app_id')) ?></span>
|
||||
<input class="form-control" type="text" name="app_id" maxlength="128" value="<?= $e($appId) ?>" required>
|
||||
</label>
|
||||
|
||||
<label class="form-field">
|
||||
<span class="field-label"><?= $e($t('settings.apaczka.fields.app_secret')) ?></span>
|
||||
<input class="form-control" type="password" name="app_secret" autocomplete="new-password">
|
||||
<span class="muted"><?= $e($hasAppSecret ? $t('settings.apaczka.app_secret.saved') : $t('settings.apaczka.app_secret.missing')) ?></span>
|
||||
</label>
|
||||
|
||||
<div class="form-actions">
|
||||
<button type="submit" class="btn btn--primary"><?= $e($t('settings.apaczka.actions.save')) ?></button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<form class="mt-12" action="/settings/integrations/apaczka/test" method="post">
|
||||
<input type="hidden" name="_token" value="<?= $e($csrfToken ?? '') ?>">
|
||||
<button type="submit" class="btn btn--secondary"><?= $e($t('settings.apaczka.actions.test')) ?></button>
|
||||
</form>
|
||||
</section>
|
||||
|
||||
Reference in New Issue
Block a user