Re: [w3c/browser-payment-api] notifying the payment app when a payment is complete (#286)

> Well, it would be caught by whatever wanted to catch it; including the payment app.

The PR API is an interface between the merchant website and browser so I don't know how an event defined here could be handled by the payment app, that's my point.

The web-based payment app (a ServiceWorker) is running in a different context and is interfacing with the browser through a different API.

I agree we should have this event I just think it should be defined in the payment apps spec.

I would suggest that, in addition to the paymentrequest event [1] we define a paymentcomplete event that the browser emits to the serviceworker to notify it that it is closing down the UI. This could allow the payment app some time to notify the user of the result before the browser shuts down the UI?

[1] https://w3c.github.io/webpayments-payment-apps-api/#the-paymentrequest-event

-- 
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/browser-payment-api/issues/286#issuecomment-252571464

Received on Monday, 10 October 2016 09:29:48 UTC