  // For some reason, window.opener is null after a Stripe OAuth flow.
    // In that case, we just have to watch from the parent, waiting for a
    // flag to say we're done.
    if (window.opener) {
        // TODO: Origin might be a full URL with path, does this really work?
	    window.opener.postMessage(params, origin);
    }
    
	window.callbackDone = true;
    window.close();

</script>

</body>
</html>