w3c / payment-request

Payment Request API
https://www.w3.org/TR/payment-request/
Other
489 stars 135 forks source link

Ship Mode Update for PO BOX #888

Open ForTheJim opened 4 years ago

ForTheJim commented 4 years ago

Here's an issue I am running into with Payment Request in regards to PO Boxes and Ship Modes.

We have 3 Standard Ship Modes that user can select from: Overnight - $30 Express - $18 Standard - Free

We can calculate shipping modes based on State and update accordingly.

User in this case selects Standard Ship Mode.

For users with a PO Box as shipping address, we only offer one ship mode which is unique to PO Box.

Unique Shipping - $25

The change here would affect total cost of product with shipping and would need to notify user that ship mode has been updated to reflect PO Box address.

We have limited ship modes for users with PO BOX as shipping address. But, since addressLine is not exposed until user commits to payment, how would Payment Request handle this case?

Would we use the retry method and throw an error and advise user to select the updated ship mode? https://www.w3.org/TR/payment-request/#retry-method

cc @rsolomakhin

rsolomakhin commented 4 years ago

Hi @ForTheJim, would your use case be address if the redacted shipping address had an 'isPostOfficeBox` boolean?

ForTheJim commented 4 years ago

Hi @rsolomakhin,

If there was a 'isPostOfficeBox' boolean, it would help to resolve this use case since that could then be passed server-side and correct ship mode could then be returned 👍

marcoscaceres commented 4 years ago

Marked as future candidate feature. We should probably discuss at the upcoming face-to-face (if not before).

@ForTheJim:

Would we use the retry method and throw an error and advise user to select the updated ship mode?

Yes, you would need to verify the address with some kind of address verification service, and then .retry() with the new shipping option.

ianbjacobs commented 7 months ago

This issue was raised in Payment Request, but closed once we removed addresses from that API. We anticipate adding addresses back to the specification and so are re-opening this issue proactively.

ianbjacobs commented 1 month ago

We added addresses back to the specification in the 7 August 2024 CRD