Re: [w3c/browser-payment-api] PaymentAddress and null values (#495)

> What is "the information source for the PaymentAddress"? How would null values be incoming from it?

It can be a range of things: 

 * A custom "addresses" data store, specifically for Web Payments. 
 * Browser's Autofill DB (same hooks as HTML autocomplete data). 
 * Contacts.app on MacOS, or other third-party contact information provider.
 * Or a mix of the above. 

> I don't know what counts as the user providing a new shipping address.

Presumedly a result of user action of selecting an address on the payment sheet - but does the UA automatically selecting a default address trigger `shippingaddresschange`? This needs to be clarified because it seems one can conclude a payment flow without triggering a `shippingaddresschange` (see below).  

> If this is indeed an invariant, maybe we should state it. @rsolomakhin, does Chrome always fire "shippingaddresschange"?

... and if so, what are the triggers for it? 

> I'm not sure how this is related. It seems the same as the user not typing values. I am not sure how the spec handles this; the only validation I see is whether it's null or not. 

Well, it all of the above lead back to this: should all the attributes on `PaymentAddress` be nullable. 

> Probably it's up to the UA to determine whether the user has entered enough information (through autofill or otherwise) and whether it wants to allow them to click the "proceed" button or whatever.

Yes, absolutely. And we certainly aim to do that in Firefox. However, it really does appear that one can return incomplete information without a) having complete address information, b) requiring any user action. Example from ApplePay (the bogus address is coming from Contacts.app):

![screenshot 2017-04-04 11 55 59](https://cloud.githubusercontent.com/assets/870154/24639056/727db136-1930-11e7-813a-60a69365f7f3.png)


 


-- 
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/browser-payment-api/issues/495#issuecomment-291375283

Received on Tuesday, 4 April 2017 02:17:17 UTC