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 17:08:06 -0700
Cc: Eiji Kitamura <agektmr@google.com>, Zach Koch <zkoch@google.com>, Web Payments Working Group <public-payments-wg@w3.org>
Message-id: <A37FC2AD-689D-4556-8C70-C93194AA285E@apple.com>
To: Rouslan Solomakhin <rouslan@google.com>


> On Oct 5, 2017, at 1:53 PM, Rouslan Solomakhin <rouslan@google.com> wrote:
> 
> 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:
> 
> <Screenshot from 2017-10-05 16:51:35.png>
> ​
> Would this work?

Yes, I think this would work.

I referred to this as distasteful earlier because I’m concerned that the event names I choose might conflict with future standardized Payment Request event names, in particular because “payment method” is an overloaded term between Apple Pay JS and Payment Request. I could avoid conflicts with a prefix, though (e.g. “applepaypaymentmethodselected” instead of “paymentmethodselected”).

In a world where payment method data objects can’t be event targets, though, this is likely the best approach.

Thanks,
Andy
Received on Friday, 6 October 2017 00:08:31 UTC

This archive was generated by hypermail 2.3.1 : Friday, 6 October 2017 00:08:32 UTC