#tom-gullen_PRB-iframe
1 messages Β· Page 1 of 1 (latest)
π Welcome to your new thread!
β²οΈ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.
β±οΈ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.
π This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1219679012050305204
π Have more to share? Add more details, code, screenshots, videos, etc. below.
Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.
- tomgullen_code, 5 days ago, 15 messages
Hello, if you visit our PWA here:
https://editor.construct.net/r384/
And once loaded, click the "buy now" tab you can see the payment request button doesn't load.
Hi π
Sorry it's still pretty hard to understand what you are doing.
You are atrying to use the Payment Request Button loaded within an iframe?
Yes that's correct. If you visit this URL:
https://www.construct.net/en/make-games/buy-construct?editor=1&%3Btheme=dark&%3Blang=en-US&%3BproductType=games&%3Butm_campaign=C3Editor&%3Butm_source=browser&%3Butm_medium=r384&%3Butm_term=BuyNowTab&%3Butm_content=UserViewed
And press "buy now", it loads the button just fine
However, in an iframe, the button doesn't load.
In the docs it says:
To test your integration you must use HTTPS and a supported browser. If you use the paymentRequestButton Element within an iframe, the iframe must have the allow attribute set to equal βpayment *β.
https://docs.stripe.com/stripe-js/elements/payment-request-button?client=react&locale=en-GB#react-testing
Just so you can reproduce the error:
- Visit: https://www.construct.net/en/make-games/buy-construct?editor=1&%3Btheme=dark&%3Blang=en-US&%3BproductType=games&%3Butm_campaign=C3Editor&%3Butm_source=browser&%3Butm_medium=r384&%3Butm_term=BuyNowTab&%3Butm_content=UserViewed
- Click "Buy now" under "Personal"
- Checkout page shows Google Pay button in Chrome
Broken:
- Visit https://editor.construct.net/r384/
- Once loaded, press "Buy now" tab in top
- Press "Buy now" under "Personal"
- Google pay button fails to load in Chrome
Construct 3 is a video game maker that allows anyone to build games. Use this video game making software to create games for mobiles, desktops, consoles and web.
Thanks I'm checking with a colleague about this
Just to confirm these are our payment method domains, all verified.
Google Pay doesn't worry about this. Can you try changing your code from allow="payment *" to allow="payment"?
I did that before, but it had the same error. We changed it to "payment *" as per the docs and the same thing happens
I had a previous support thread about it and the advice was to go allow="payment" to allow="payment *", both methods in production fail
Okay I cannot fee whatever it is you are trying to share with that Construct link.
If you visit https://editor.construct.net/r384/ and let it load
Click no thanks not now if a dialogue pops up
Google pay button should appear here, but shows a JS error and doesn't load. The same URL not iframed it shows up.
Can you review my colleague's test integration here showing a Google Pay button rendered within an iFrame? https://4242.io/test/payment-request-button-iframe/
Yes, if you open up the editor.construct.net link above and inspect the payment page you can see it's in an iframe with the allow payment property set
Let me see if I can upload a simpler example
Right, so on www.construct.net the iFrame works
It doesn't work when iframed from editor.construct.net
Does the payment request button not work if iframed from a different host? Even if both hosts are verified payment domains?
I don't know how editor.construct.net works but when you build it in an actual standalone site, does it work?
My colleague updated his example to show both same origin and cross-origin iframes
editor.construct.net is a web application, and the buy now tab opens the checkout url in an iframe with the allow payment property like the demo page
Is there any content security policies that might be breaking this for editor.construct.net?
editor.construct.net is pretty locked down with its CSP
Just testing it again it's now working
I've no idea why, maybe some weird caching issue
Perhaps
Sorry for wasting your time this has been driving me nuts and I think was some weird caching issue
Appreciate your help and sorry again π¦
No worries, sometimes it just takes poking at it with other people