Re: [w3c/payment-handler] Ability to set default instrument for given handler (#173)

It seems like this could be managed through the definition of the default instrument:

* The PaymentInstrument dictionary includes an optional attribute: defaultInstrument (boolean value). At most one defaultInstrument may be specified within the scope of PaymentManager. PaymentInstruments or within the scope of a PaymentWallet.

* A browser displays EITHER a defaultInstrument OR the other specifies PaymentInstrument(s).
  The browser makes a choice based on context.

* This means:
   - Payment handlers can treat the display of default information specially if they wish.
   - Payment handlers know (by instrumentKey) whether the default (alone) was shown
     or whether the full set was shown. This lets the payment app adjust user flow accordingly  
     upon selection.

Note: There may be better ways to identify a default instrument (e.g., PaymentInstrumentDefault is a subclass of PaymentInstrument). I defer to the API specialists for good practice.



-- 
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-handler/issues/173#issuecomment-307946953

Received on Monday, 12 June 2017 22:03:59 UTC