Re: [w3c/payment-request] Proposal to make the amount field in PaymentShippingOption optional (#901)

Hi @sahel-sh! sorry, just coming back to this. 

> Would you please explain more about your backwards compatibility concern? Making this optional will not break merchant's using Payment Request APIs. 

Right, my concern is breaking existing user agents: for example, right now, if Firefox or Safari or an outdated Chrome sees a shipping options without an amount, it would throw. 

So we'd need some kind of upgrade strategy for "legacy browsers". You are correct that it wouldn't affect merchants, however.  

> I think it should be merchant's call to see if the field is needed or not, e.g. when the shipping option label already includes the price, explicitly passing amount is redundant. 

Respectfully, including the price in the label might be considered bad practice. Consider, the reason we have structured data for amount is so browsers can accurately format, display, and/or announce the amount in an unambiguous way. For example, "$5 express delivery"... is that US dollars or Australian dollars? The formatting could also become ambiguous for larger numbers, allowing the browser to disambiguate the amount via internal localisation libraries (or via the OS's l10n preferences for how currencies should be displayed).
   

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/w3c/payment-request/issues/901#issuecomment-619866160

Received on Monday, 27 April 2020 09:48:39 UTC