W3C home > Mailing lists > Public > public-payments-wg@w3.org > October 2017

Re: Custom events for payment methods

From: Rouslan Solomakhin <rouslan@google.com>
Date: Thu, 5 Oct 2017 16:53:59 -0400
Message-ID: <CAMMzaWFn=rdscxCdtOh-whJNNT7gVsi9rLWF0ycx3KbzMTrVsA@mail.gmail.com>
To: Andy Estes <aestes@apple.com>
Cc: Eiji Kitamura <agektmr@google.com>, Zach Koch <zkoch@google.com>, Web Payments Working Group <public-payments-wg@w3.org>
Can this be accomplished via feature detection on the PaymentRequest
object? For example, in current implementation in Chrome, the merchant can
compare the event endpoints to "undefined" to determine whether the current
browser supports these features:


​
Would this work?
​

On Thu, Oct 5, 2017 at 1:33 PM, Andy Estes <aestes@apple.com> wrote:

>
>
> On Oct 4, 2017, at 1:56 PM, Rouslan Solomakhin <rouslan@google.com> wrote:
>
> Eiji: You wrote https://github.com/GoogleChrome/appr-wrapper. How did you
> deal with "validatemerchant" and "paymentmethodselected" events?
>
>
> Not to speak for Eiji, but I did look into this myself recently.
>
> It looks like appr-wrapper will forward these events to the PaymentRequest
> object if its client has added “onvalidatemerchant” or
> “onpaymentmethodselected” properties.
>
> There’s also a declarative mechanism for handling merchant validation,
> where the client specifies their merchant identifier and validation
> endpoint in the payment method data dictionary and the wrapper
> automatically performs a POST fetch with the Apple validation URL
> JSON-encoded in the HTTP body.
>
> This is a clever solution, but I don’t think this can be the only way we
> do merchant validation. The declarative approach might require existing
> Apple Pay JS clients to make server-side changes to their validation
> endpoint, and I’d like to make it as easy as possible for them to migrate
> to Payment Request.
>
> Andy
>


Screenshot_from_2017-10-05_16:51:35.png
(image/png attachment: Screenshot_from_2017-10-05_16:51:35.png)

Received on Thursday, 5 October 2017 20:54:23 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 5 October 2017 20:54:24 UTC