Skip to content

DGS-444, DGS-446: align courier request pickup time with DPD's slot c… - #182

Open
GytisZum wants to merge 4 commits into
mainfrom
DGS-446-courier-request-pickup-time-slots
Open

DGS-444, DGS-446: align courier request pickup time with DPD's slot c…#182
GytisZum wants to merge 4 commits into
mainfrom
DGS-446-courier-request-pickup-time-slots

Conversation

@GytisZum

Copy link
Copy Markdown
Collaborator

…ontract (#181)

DPD's live pickupOrderSave_ endpoint now rejects any pickup time that is not one of its fixed pickupTimeFrom/pickupTimeTo slots, and answers with a JSON object instead of the legacy plain-text response.

Request side:

  • The 'Desired pick-up time' / 'Last pick-up time' datetime inputs are replaced with a pick-up date field and two slot dropdowns constrained to DPD's whitelists, so an invalid value can no longer be submitted.
  • Defaults are slot-aligned (next available slot today, or tomorrow 08:00) instead of the raw 'now + 30 min' value DPD always rejected.
  • CourierRequestValidator rejects non-whitelisted slots server-side.
  • The API request now carries pickupDate/pickupTimeFrom/pickupTimeTo alongside the legacy pickupTime/senderWorkUntil datetimes, which are kept for DPD endpoints still running the old contract and for the module's own entity.

Response side:

  • CourierRequestResponseParser accepts both response shapes: the legacy '

    DONE' / '402 Error:' strings and the new JSON object, whose body->message (or errlog) is surfaced to the merchant. Previously the JSON object reached strpos() and fatally crashed the admin page on PHP 8.

The unit-test bootstrap now defines PS_VERSION, without which every test touching module classes silently exits on the file guards.

Requires invertus/dpdbaltics-api with CourierRequestRequest slot setters (companion PR on that repo); composer.lock to be bumped once it lands on the developer branch.

GantasG and others added 4 commits August 31, 2026 14:19
…ontract (#181)

DPD's live pickupOrderSave_ endpoint now rejects any pickup time that is not
one of its fixed pickupTimeFrom/pickupTimeTo slots, and answers with a JSON
object instead of the legacy plain-text response.

Request side:
- The 'Desired pick-up time' / 'Last pick-up time' datetime inputs are
  replaced with a pick-up date field and two slot dropdowns constrained
  to DPD's whitelists, so an invalid value can no longer be submitted.
- Defaults are slot-aligned (next available slot today, or tomorrow 08:00)
  instead of the raw 'now + 30 min' value DPD always rejected.
- CourierRequestValidator rejects non-whitelisted slots server-side.
- The API request now carries pickupDate/pickupTimeFrom/pickupTimeTo alongside
  the legacy pickupTime/senderWorkUntil datetimes, which are kept for DPD
  endpoints still running the old contract and for the module's own entity.

Response side:
- CourierRequestResponseParser accepts both response shapes: the legacy
  '<p>DONE' / '402 Error:' strings and the new JSON object, whose
  body->message (or errlog) is surfaced to the merchant. Previously the JSON
  object reached strpos() and fatally crashed the admin page on PHP 8.

The unit-test bootstrap now defines _PS_VERSION_, without which every test
touching module classes silently exits on the file guards.

Requires invertus/dpdbaltics-api with CourierRequestRequest slot setters
(companion PR on that repo); composer.lock to be bumped once it lands on
the developer branch.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants