DHL: Auslandslabels mit V53WPAK, Feldlaengen und Tracking-Wiederholung
Log-Analyse 26.08. (P0-2, P1-5, P2-3): - Produktcode fuer DHL Paket International ist V53WPAK; mit V53PAK wurde kein einziges Auslandslabel erzeugt. Alte Codes werden gemappt (LEGACY_PRODUCT_CODE_ALIASES), Abrechnungsnummer und Masse suchen auch unter den alten Setting-Schluesseln (dhl_account_v53pak) und Env-Namen. - Zu lange Felder (Name, Stadt, Telefon, Referenz) werden auf die DHL-Grenzen gekuerzt bzw. bereinigt statt den Versand abzulehnen; refNo mindestens 8 Zeichen, sonst die Bestellreferenz. - Tracking wiederholt bei HTTP 5xx der Unified-API bis zu dreimal. Zolldaten fuer die Schweiz (P0-3) sind nicht Teil dieses Commits. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
323024f65d
commit
8f85c0107c
14 changed files with 508 additions and 68 deletions
|
|
@ -48,7 +48,7 @@ it('accepts DHL Kleinpaket as a product code', function () {
|
|||
|
||||
it('builds an international DHL parcel payload for Austria', function () {
|
||||
config([
|
||||
'dhl.account_numbers.V53PAK' => '63144073555301',
|
||||
'dhl.account_numbers.V53WPAK' => '63144073555301',
|
||||
'dhl.legacy.sandbox' => false,
|
||||
'dhl.legacy.test_mode' => false,
|
||||
]);
|
||||
|
|
@ -57,9 +57,9 @@ it('builds an international DHL parcel payload for Austria', function () {
|
|||
$method = new ReflectionMethod($service, 'buildShipmentPayload');
|
||||
$method->setAccessible(true);
|
||||
|
||||
$payload = $method->invoke($service, validDhlPhaseOneOrderData('V53PAK', 'AT'));
|
||||
$payload = $method->invoke($service, validDhlPhaseOneOrderData('V53WPAK', 'AT'));
|
||||
|
||||
expect($payload['shipments'][0]['product'])->toBe('V53PAK')
|
||||
expect($payload['shipments'][0]['product'])->toBe('V53WPAK')
|
||||
->and($payload['shipments'][0]['billingNumber'])->toBe('63144073555301')
|
||||
->and($payload['shipments'][0]['consignee']['country'])->toBe('AUT');
|
||||
});
|
||||
|
|
@ -69,7 +69,7 @@ it('rejects unsupported countries instead of falling back to Germany', function
|
|||
$method = new ReflectionMethod($service, 'buildShipmentPayload');
|
||||
$method->setAccessible(true);
|
||||
|
||||
$method->invoke($service, validDhlPhaseOneOrderData('V53PAK', 'FR'));
|
||||
$method->invoke($service, validDhlPhaseOneOrderData('V53WPAK', 'FR'));
|
||||
})->throws(InvalidArgumentException::class);
|
||||
|
||||
it('rejects legacy Warenpost for new labels', function () {
|
||||
|
|
@ -104,7 +104,7 @@ it('uses mustEncode only for German consignee addresses', function () {
|
|||
$method->setAccessible(true);
|
||||
|
||||
expect($method->invoke($service, validDhlPhaseOneOrderData('V01PAK', 'DE') + ['print_only_if_codeable' => true]))->toBeTrue()
|
||||
->and($method->invoke($service, validDhlPhaseOneOrderData('V53PAK', 'AT') + ['print_only_if_codeable' => true]))->toBeFalse()
|
||||
->and($method->invoke($service, validDhlPhaseOneOrderData('V53WPAK', 'AT') + ['print_only_if_codeable' => true]))->toBeFalse()
|
||||
->and($method->invoke($service, validDhlPhaseOneOrderData('V01PAK', 'DE') + ['print_only_if_codeable' => false]))->toBeFalse();
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue