Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot complete checkout | o.ownerWindow.postMessage is not a function #562

Open
ablears opened this issue Jun 12, 2024 · 0 comments
Open

Comments

@ablears
Copy link

ablears commented Jun 12, 2024

I have 4.6.7 installed on a WP network child site. Submitting checkout leads to a "Thank you for your order, please click the button below to pay with Razorpay." page. There, clicking 'Pay Now' is unresponsive, and I see the following in the dev console.

Uncaught TypeError: o.ownerWindow.postMessage is not a function
value https://checkout.razorpay.com/v1/checkout.js:1
38111 https://checkout.razorpay.com/v1/checkout.js:1
checkout.js:1:74804

I guess because of this error the RazorPay JS object is not available, which causes the local plugin script to fail.

Uncaught ReferenceError: Razorpay is not defined
https://zzz.com/wp-content/plugins/woo-razorpay/script.js?ver=6.5.4:38
https://zzz.com/wp-content/plugins/woo-razorpay/script.js?ver=6.5.4:63
script.js:38:28

I've tested on Libreoffice on macOS, Chromium on RPI, and Chrome (urgh) on Windows (shudder), and all exhibit this issue.

Adding this script directly through the dev console also shows the same error.

var script = document.createElement('script'); script.src = 'https://checkout.razorpay.com/v1/checkout.js'; document.head.appendChild(script);

GET https://checkout.razorpay.com/v1/checkout.js
[HTTP/1.1 200 OK 212ms]
Uncaught TypeError: o.ownerWindow.postMessage is not a function

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant