Is this problem because of the same-origin policy? If the checkout URL or any redirects go to a different website or subdomain, that could be why window.opener is null.
You can check same-origin policy documentation here: https://developer.mozilla.org/en-US/docs/Web/Security/Same-origin_policy