https://github.com/kujenga/use-apple-pay
[WIP] Firefox extension to prompt to use apple pay when available
https://github.com/kujenga/use-apple-pay
Last synced: 13 days ago
JSON representation
[WIP] Firefox extension to prompt to use apple pay when available
- Host: GitHub
- URL: https://github.com/kujenga/use-apple-pay
- Owner: kujenga
- Created: 2020-05-02T18:01:37.000Z (about 5 years ago)
- Default Branch: main
- Last Pushed: 2023-07-18T21:59:11.000Z (almost 2 years ago)
- Last Synced: 2025-04-01T01:51:41.468Z (about 2 months ago)
- Language: JavaScript
- Homepage:
- Size: 157 KB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# use-apple-pay
Firefox extension to prompt to use Apple Pay when available. The intended
behavior is to notify the user that Apple Pay is available on the site and allow
them to open it within Safari to make the purchase there.It doesn't really work... yet.
## Test sites
- https://stripe-payments-demo.appspot.com/
- https://applepaydemo.apple.com/## Current status
The `src` directory can be loaded into Firefox as a temporary extension.
Issues to deal with:
- [x] Determine a mechanism to inject the `ApplePaySession` into the current
page so that is available to scripts there.
- [ ] Most payment sites inspect the user agent before checking for the presence
of `window.ApplePaySession`, meaning that mocking it is insufficient. Need to
adopt [1] some functionality for spoofing user agents? In the meantime other
extensions [2] can be used.
- [ ] When the user agent _is_ spoofed, current
- [ ] Once the core mechanics are working, need to provide a reasonable way for
the user to open Safari on the same site to complete the purchase.[1] Example source code for moking the User Agent: https://github.com/ray-lothian/UserAgent-Switcher/blob/master/extension/data/inject.js
[2] Install the following extension and switch User Agent to Safari on Mac: https://addons.mozilla.org/en-US/firefox/addon/user-agent-string-switcher/