Paypal integration using Html:Dialog

I added a paypal to my website using javascript sdk (server is using Django)

There is no problem to load that website using Html:Dialog and display paypal functions.
The problem begins, when I click ‘PayPal’ button.

After click it I have new window like this:
‘Get an app to open this ‘about’ link’
On the DevTools, I found ‘popup_open_error_iframe_fallback’, maybe it is a clue.

I wonder if there is a way to allow paypal to open iframe from SketchUP.
Any ideas?
In the example I used Sketchup 2022.

ps. everything is working fine when I am using standalone browser

Why are you adding a PayPal window in SketchUp?

Your profile says you are using SketchUp 2017 Make.

Screenshot - 3_8_2023 , 6_13_53 AM

Thanks for joining the discussion!

Why are you adding a PayPal window in SketchUp?

We are developing plugin which is connected with the web platform.
So for example…

  • user makes building using our plugin
  • load the project into web (using html:dialog)
  • we want add paypal integration to unlock files which is used to fabricate the model

I was wondering if it is possibility to do this in html:dialog.
If it isn’t we will request users to use external browser to make payment.

Your profile says you are using SketchUp 2017 Make.

I installed 2022 trial to check if the problem is still exists. (2017 have pretty old browser)
That’s why I made a notice

Since you’re using SketchUp commercially–developing commercial extensions with it, you should be using SketchUp Pro, not Make.

2 Likes

UI::HtmlDialog doesn’t support the HTML page creating a new window. If the PayPal checkout require that you probably have to redirect the user to a normal browser window for that payment process.

1 Like

What you tried was a cross origin request. See …

The Chrome Embedded Framework (used by the UI::HtmlDialog class,) is much more secure than a normal Chrome browser.

CEF enforces same-origin policy because (I think) the dialog pages have the origin http://localhost.

1 Like

You could have your dialog open a webpage in the user’s default browser using the UI.openURL() module method.

1 Like

Thanks for detailed information!

CEF enforces same-origin policy because (I think) the dialog pages have the origin http://localhost .

It was using test server, so it was not localhost, but that was nice guess.

In summary… probably I will upgrade workflow to use UI.openURL() instead.

Thanks for all answers!

1 Like

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.