DGS-444, DGS-446: align courier request pickup time with DPD's slot c… - #182
Open
GytisZum wants to merge 4 commits into
Open
DGS-444, DGS-446: align courier request pickup time with DPD's slot c…#182GytisZum wants to merge 4 commits into
GytisZum wants to merge 4 commits into
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…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:
Response side:
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.