From 65eb4b90be0e21c993ddb9e4e5d80f569ad9a953 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:20:03 +0000 Subject: [PATCH 1/3] Initial plan From 5a4438986a465180492ae82354600abf437a47f3 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:23:34 +0000 Subject: [PATCH 2/3] Add payment permission to iframe to fix Payment Request API violations Co-authored-by: falkorichter <50506+falkorichter@users.noreply.github.com> --- README.md | 2 +- docs/donate.html | 2 +- docs/index.html | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index e4d1eb0..02ce946 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,6 @@ ## Donate Using `dialog` https://developer.mozilla.org/de/docs/Web/HTML/Reference/Elements/dialog -- [Donate Page (Direct iFrame)](donate.html) - Direct donation page with embedded iframe (may be blocked by browser security) +- [Donate Page (Direct iFrame)](donate.html) - Direct donation page with embedded iframe (includes payment permission for Apple Pay/Google Pay) -  - [Donate Page (JavaScript Embed)](donate_with_script.html) - Direct donation page using betterplace.org's official JavaScript embed code diff --git a/docs/donate.html b/docs/donate.html index 09ced8b..75e1983 100644 --- a/docs/donate.html +++ b/docs/donate.html @@ -22,7 +22,7 @@ position: absolute; /* 👈 Take it out of normal flow */ z-index: 10; /* 👈 Ensure it is above the iframe */ " onclick="this.closest('dialog').close()">x - + 🙏 Donate Page (Direct iFrame) - Direct donation page with embedded iframe (may be blocked by browser security) + Direct donation page with embedded iframe (includes payment permission for Apple Pay/Google Pay) 🙏 Donate Page (JavaScript Embed) From 4557b1333a2e0308cf501d9f3079c55b464a40a8 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Sun, 5 Oct 2025 21:25:09 +0000 Subject: [PATCH 3/3] Add comprehensive documentation about payment permission fix Co-authored-by: falkorichter <50506+falkorichter@users.noreply.github.com> --- README.md | 13 +++++++++++++ docs/index.html | 1 + 2 files changed, 14 insertions(+) diff --git a/README.md b/README.md index 02ce946..1cf2bfb 100644 --- a/README.md +++ b/README.md @@ -5,4 +5,17 @@ Using `dialog` https://developer.mozilla.org/de/docs/Web/HTML/Reference/Elements - [Donate Page (Direct iFrame)](donate.html) - Direct donation page with embedded iframe (includes payment permission for Apple Pay/Google Pay) -  + - Note: The iframe includes `allow="payment"` attribute to enable Payment Request API (Apple Pay/Google Pay) without browser console violations - [Donate Page (JavaScript Embed)](donate_with_script.html) - Direct donation page using betterplace.org's official JavaScript embed code + +## Technical Notes + +### Payment Permissions Policy +The `donate.html` page uses an iframe with the `allow="payment"` attribute to grant the embedded content permission to use the Payment Request API. This is required for modern browsers to allow Apple Pay and Google Pay functionality without triggering permissions policy violations. + +Without this attribute, you may see console errors like: +``` +[Violation] Permissions policy violation: payment is not allowed in this document. +``` + +Reference: [Permissions Policy](https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Permissions-Policy) diff --git a/docs/index.html b/docs/index.html index bd02406..e45c07d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -49,6 +49,7 @@ Donate Pages 🙏 Donate Page (Direct iFrame) Direct donation page with embedded iframe (includes payment permission for Apple Pay/Google Pay) + Uses allow="payment" attribute to enable Payment Request API without browser violations 🙏 Donate Page (JavaScript Embed)
allow="payment"