Re: [w3c/webpayments-payment-apps-api] Payment App Decline (#92)

@rvm4 
> It looked promising, but goes out of its way to state that the api would not have network access. That makes any sophisticated gating not possible.

I think that a mechanism for letting the payment app silently opt out of the payment request list by contacting a backend sounds unfeasible for two reasons:

1. **Privacy:** Letting the backend register every payment request attempt made by the user for a given payment method does not sound great, and can easily be abused by a data-greedy payment provider.
2: **Performance:** If this mechanism is going to work, it means that the payment mediator cannot show the list of payment options until every single payment app has been given the chance to talk to its backend and see if they want to do this payment request or not. This will probably cause an unacceptably large for the user delay, and can turn into a huge obstacle for the adoption of Web Payments.

I would suggest using `canHandle()` for opting out where this can be done without making a network request, and for other cases, the payment app can reject the promise it passed to `respondWith()` as described in [10.5 Payment App Response](https://w3c.github.io/webpayments-payment-apps-api/#sec-payment-app-response). This will of course be visible to the user, but I think that in any case, if the merchant is so shady that the payment provider does not want anything to do with it, this is useful for the user to be made aware of.

@ianbjacobs 
> Should we be passing the payment method identifier for the selected payment method?

The current implementation in Chrome does not have the user select a specific payment method. Instead, the user picks a payment option, which can map to multiple payment methods. It is up to the payment app to figure out which payment method to use, in the case where there are multiple applicable payment methods.


-- 
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/webpayments-payment-apps-api/issues/92#issuecomment-273760264

Received on Thursday, 19 January 2017 12:07:31 UTC