Skip to content

Commit

Permalink
feat: ✨ Allow Apple Pay (Safari Only) (#112)
Browse files Browse the repository at this point in the history
* feat: ✨ Allow Apple Pay (Safari Only)

* Can't update the examples before the packages

* fix test

* remove duplicate everfund
  • Loading branch information
KayleeWilliams committed Jul 23, 2024
1 parent 4c93e7a commit f7a70bf
Show file tree
Hide file tree
Showing 9 changed files with 15 additions and 13 deletions.
2 changes: 1 addition & 1 deletion examples/vue/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@
"not ie <= 11",
"not op_mini all"
]
}
}
2 changes: 1 addition & 1 deletion packages/js-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@everfund/js-sdk",
"version": "3.0.1",
"version": "3.0.2",
"description": "Plug and Play Donation System",
"author": "Christopher Burns <christopher@everfund.co.uk>",
"license": "MIT",
Expand Down
1 change: 1 addition & 0 deletions packages/js-sdk/src/donationCheckoutModal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ class DonationCheckoutModal {
embeded: true,
close_on_success: closeOnSuccess,
})}`;
modalFrame.allow = 'payment';

// deperciated
// https://developer.mozilla.org/en-US/docs/Web/API/HTMLIFrameElement/allowPaymentRequest
Expand Down
2 changes: 1 addition & 1 deletion packages/react-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@everfund/react-sdk",
"version": "3.0.1",
"version": "3.0.2",
"author": "Christopher Burns",
"license": "MIT",
"engines": {
Expand Down
1 change: 1 addition & 0 deletions packages/react-sdk/src/components/DonationForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ export const DonationForm = ({
}/${code}/widget${serializeQueryParams({
embed_origin: window.location.origin,
})}`}
allow="payment"
style={iframeStyles}
/>
</div>
Expand Down
1 change: 1 addition & 0 deletions packages/react-sdk/src/components/DonationFrom.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,7 @@ describe('DonationForm', () => {
<div />
</div>
<iframe
allow="payment"
id="ef-donationForm"
src="https://evr.fund/${code}/widget?embed_origin=http://localhost:3000"
style="margin: 0px; width: 100%; height: 100%;"
Expand Down
14 changes: 6 additions & 8 deletions packages/wp-sdk/everfund.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
* Author: Everfund
* License: GPL-2.0-or-later
* License URI: https://www.gnu.org/licenses/gpl-2.0.html
* Text Domain: everfund.io
* Text Domain: everfund.com
*
* @package create-block
*/
Expand Down Expand Up @@ -41,9 +41,9 @@ function everfund_plugin_settings_page()
<div class="everfund-modal">
<h2 class="everfund-title"><?php _e('Everfund is Installed.', 'everfund'); ?></h2>
<p class="everfund-subtitle"><?php _e('You can now use Everfund on your website.', 'everfund'); ?></p>
<a class="everfund-button everfund-neutral" href="https://dashboard.everfund.io/donations/"><?php _e('Go to my Widgets', 'everfund'); ?></a>
<a class="everfund-button everfund" href="https://dashboard.everfund.io/donations/links/"><?php _e('Go to my Donations', 'everfund'); ?></a>
<p class="everfund-stuck"><?php _e('Stuck? Talk to ', 'everfund'); ?> <a href="https://help.everfund.co.uk/en/"> Support </a> <?php _e(' or check out the ', 'everfund'); ?><a href="https://developer.everfund.co.uk/integrations/wordpress">developer documentation </a></p>
<a class="everfund-button everfund-neutral" href="https://dashboard.everfund.com/donations/"><?php _e('Go to my Widgets', 'everfund'); ?></a>
<a class="everfund-button everfund" href="https://dashboard.everfund.com/donations/links/"><?php _e('Go to my Donations', 'everfund'); ?></a>
<p class="everfund-stuck"><?php _e('Stuck? Talk to ', 'everfund'); ?> <a href="https://help.everfund.com/en/"> Support </a> <?php _e(' or check out the ', 'everfund'); ?><a href="https://developer.everfund.com/integrations/wordpress">developer documentation </a></p>
</div>
</div>

Expand Down Expand Up @@ -72,10 +72,8 @@ function everfund_add_allowed_origins($origins)
$origins[] = 'https://nhs.charity';
$origins[] = 'https://shelter.charity';
$origins[] = 'https://urgent.charity';
$origins[] = 'https://everfund.co.uk';
$origins[] = 'https://api.everfund.co.uk';
$origins[] = 'https://everfund.io';
$origins[] = 'https://api.everfund.io';
$origins[] = 'https://api.everfund.com';
$origins[] = 'https://everfund.com';

return $origins;
}
Expand Down
4 changes: 2 additions & 2 deletions packages/wp-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@everfund/wp-sdk",
"version": "3.0.1",
"version": "3.0.2",
"description": "Plug and Play Donation System",
"author": "Christopher Burns <christopher@everfund.co.uk>",
"license": "MIT",
Expand All @@ -16,4 +16,4 @@
"devDependencies": {
"@wordpress/scripts": "^26.10.0"
}
}
}
1 change: 1 addition & 0 deletions packages/wp-sdk/src/donation-form/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ export default function save({ attributes }) {
domain || 'https://evr.fund'
}/${code}/widget?embed_origin=${origin}`}
className="iframeStyles"
allow="payment"
/>
</div>
</div>
Expand Down

0 comments on commit f7a70bf

Please sign in to comment.