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

Re: Custom events for payment methods

From: Andy Estes <aestes@apple.com>
Date: Thu, 05 Oct 2017 10:33:23 -0700
Message-id: <3CD790FB-0CFD-4906-AF83-4449E0BA7CC6@apple.com>
Cc: Eiji Kitamura <agektmr@google.com>, Zach Koch <zkoch@google.com>, Web Payments Working Group <public-payments-wg@w3.org>
To: Rouslan Solomakhin <rouslan@google.com>


> On Oct 4, 2017, at 1:56 PM, Rouslan Solomakhin <rouslan@google.com> wrote:
> 
> Eiji: You wrote https://github.com/GoogleChrome/appr-wrapper <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
Received on Thursday, 5 October 2017 17:33:48 UTC

This archive was generated by hypermail 2.3.1 : Thursday, 5 October 2017 17:33:48 UTC