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

Update Iframe property in embedded checkout to allow apple pay #2189

Open
hardikbhut333 opened this issue Sep 20, 2023 · 5 comments
Open

Update Iframe property in embedded checkout to allow apple pay #2189

hardikbhut333 opened this issue Sep 20, 2023 · 5 comments

Comments

@hardikbhut333
Copy link
Contributor

hardikbhut333 commented Sep 20, 2023

Is your feature request related to a problem? Please describe.
Apple Safari has given 17 release and now it supports apple pay. But in embedded checkout we need to pass allow="payment" as attribute in iframe. Right now the attribute is iframe.allowPaymentRequest = true. allowPaymentRequest attribute is deprecated and now It's allow="payment"

Describe the solution you'd like
Solution is instead of using iframe.allowPaymentRequest = true use allow="payment" in following file checkout-sdk-js/packages/core/src/embedded-checkout/resizable-iframe-creator.ts (line no. 27)

Additional context
Once the above change will be done, it will start loading apple pay using embedded checkout on Safari browser. Look at the attached screenshot.

embedded-checkout-code

@bc-peng
Copy link
Contributor

bc-peng commented Sep 20, 2023

I was unable to locate the official documentation confirming support for Apple Pay within an iframe.
However, numerous sources assert that Apple prohibits the use of Apple Pay within an iframe.
image

@hardikbhut333
Copy link
Contributor Author

@bc-peng - Here is the release notes of Safari 17 by apple. You can find Added support for Apple Pay in cross-origin iframes with the allow="payment" attribute. (88969594) under Apple Pay -> New Features. I have attached screenshot.

Release Notes Link: https://developer.apple.com/documentation/safari-release-notes/safari-17-release-notes#Apple-Pay

Screenshot 2023-09-20 at 2 17 30 PM

@animesh1987
Copy link
Contributor

Thanks for informing us @hardikbhut333. We will look at this and see if we can implement this.

@hardikbhut333
Copy link
Contributor Author

@animesh1987 - I have already raised PR for this fix. You can look into this. #2190

@animesh1987
Copy link
Contributor

Nice 👍 let's discuss on the PR.

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

No branches or pull requests

3 participants