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

ApplePay within an iframe #707

Open
luigi-xdesign opened this issue Jan 2, 2024 · 8 comments
Open

ApplePay within an iframe #707

luigi-xdesign opened this issue Jan 2, 2024 · 8 comments

Comments

@luigi-xdesign
Copy link

General information

  • SDK version: 3.88.4
  • Environment: Sandbox (maybe production as well)
  • Browser and OS: Safari 17.1 (19616.2.9.11.7) on MacOS Sonoma 14.1.1

Issue description

I am trying to test Apple Pay support in an iframe on the latest version of Safari (Apple Pay support in an iframe was added here PR and it was released on September 18, 2023 for Safari 17. Release logs)

Historically, Apple Pay does not work in an iframe. It was updated to work with the allow=payment attribute in the above PR.

Steps to reproduce:

  • domain A opens up an iframe with sub domain B where ApplePay button shows up. The ApplePay button only loads with allow="payment" attribute added to the iframe.
  • Click on pay button: We used a test card (Apple sandbox account).
  • The confirmation ApplePay pop up shows up but it ends up showing "Payment not completed" error.

Loading sub domain B in a new window and testing the payment flow has no issues.

Is there any documentation or guide to make this work?

Thank you!

@hollabaq86
Copy link

👋 Thanks for reaching out.

I'm genuinely curious: why do you need to load ApplePay within an iframe? Any info on your use case would be helpful, thanks.

@luigi-xdesign
Copy link
Author

👋 Thanks for reaching out.

I'm genuinely curious: why do you need to load ApplePay within an iframe? Any info on your use case would be helpful, thanks.

Hi @hollabaq86 . Due to technical reasons and how the project architecture has been designed web app A loads a different web app B (the one responsible of payments) and this payments app is loaded through an iframe.

@zelda26
Copy link

zelda26 commented Jan 19, 2024

I have exactly the same issue.

Screenshot 2024-01-19 at 15 11 58

If I open the url of the iframe in a new window, it works though.

@zelda26
Copy link

zelda26 commented Jan 29, 2024

Hello @hollabaq86 or any member from the Braintree team, could you tell me if you are actively tracking this issue or if you would have a fix in the roadmap by any chance? thank you ☺️

@acmoore1
Copy link

I have the same problem and issue. Any one got a fix?

@JuanGongora
Copy link

Is there an update on this? I also have this existing issue.

@markwallman
Copy link

Looking to get a response from Braintree on this one to.

@danshirley1
Copy link

We have a solution involving pulling in the braintree and apple pay scripts in the parent page, using Post Messages to communicate between parent page and iFrame, which is working but undesirable.

As above, it would be good if we can get some formal docs around this from Braintree. Thanks.

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

7 participants