Re: [w3c/payment-handler] Payment Instrument architecture clarification (#381)

Can you describe your use case a little bit more, please? I'm still confused.

> i will never use that service worker in my logic.

Why not?

> why i must have a service worker for each payment instrument?

That's not a requirement. One service worker can handle multiple payment instruments.

> Let's imagine that Google Pay can be used as payment instrument... should I implement whole logic of google pay in my Payment Web App?

That's one approach. Your payment handler window also can redirect to other origins or include HMTL/CSS/JS assets from other origins to provide the necessary functionality.

> How to use service worker of payment instrument?

The service worker must register an event listener for `paymentrequest` event. The browser will fire this event when the user selects your payment handler.

-- 
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/381#issuecomment-744632975

Received on Monday, 14 December 2020 18:41:11 UTC