Closed Bug 1124790 Opened 9 years ago Closed 9 years ago

To be able to reliably close the popup when the user hits x in all cases we need to poll from the opener.

Categories

(Marketplace Graveyard :: Payments/Refunds, defect, P2)

Avenir
x86
macOS
defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: scolville, Assigned: scolville)

References

Details

We need openers to poll for the either the pop window being cleared or the closed attribute being set to true.

We do this fancy postMessage thing from payments to tell the opener to close the window but if the popup's location has changed this won't help much as there's no postMessaging going to come from other people's domains e.g. the payment provider or identity.
STR:

- start a desktop payment
- login, enter/create PIN
- wait until you are on a provider screen (such as Zippy, Bango, etc) showing payment confirmation.
- click the X in the corner of the popup window to close it

Expected: payment flow should be cancelled in Marketplace (or whatever app started the purchase)

Actual: you'll see a spinner as if the payment is still pending
Priority: -- → P2
Assignee: nobody → scolville
Status: NEW → ASSIGNED
https://github.com/mozilla/fxpay/commit/c37e40a57eece66daee2edcea653d566596a5a5b
https://github.com/mozilla/fireplace/commit/e21b91c404d4368d5e1debc399f693242be77d22

This should now be landed on -dev.

The polling watches for closure when on 3rd party domains. The rest of the time we continue to postMessage so that we can update the calling site with the cancellation notification.

Starting with the desktop payment flow:

* When we're on the provider in the popup closing the popup with 'x' should show payment cancelled.
* In a reset flow when we're back to the FXA auth if the user closes the window with 'x' we should see payment cancelled.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.