I am adding Apple Pay to my eCommerce site and I am having a lot of difficulty with the PaymentsRequest API in Microsoft Edge browser.
I have a partial implementation that displays the Apple Pay button and creates a PaymentRequest when the button is clicked. That's all.
On Safari, this is enough to display the Apple Pay dialog. The process doesn't proceed further because I haven't implemented a handler for the merchantvalidation event. With Chrome on a Mac, the behavior is the same, I can scan the code and see the Apple Pay dialog.
On Microsoft Edge, I never see the code to scan. In my web console, I'm seeing errors like
InvalidStateError: Failed to execute 'canMakePayment' on 'PaymentRequest': Cannot query payment request
and
NotSupportedError: The payment method "https://apple.com/apple-pay" is not supported. No "Link: rel=payment-method-manifest" HTTP header found at "https://www.apple.com/apple-pay/"
Is Apple Pay not supported on Windows?
I see the demo site here, which gets farther than I have gotten. It does display the scan code, but payment still never completes. I see the same payment-method-manifest error in the console.
If Apple Pay is not supported on any PCs other than Macs, is there any reason to use the PaymentRequest API instead of Apple Pay JS?
I started digging into the W3C standards and it turns out that merchantvalidation event is deprecated. Chrome on Mac does catch it, so it seems like it's supported there. But I have concerns about the long term future. Is it going to remain supported? If so, I would imagine that the interface could change.
It seems like the only benefit of the W3C PaymentRequest API is that Mac users with non-Safari browsers may still be able to use Apple Pay. In theory, that's something I'd still like to support, even if it's only a small number of users, but I only have time for one integration right now, and I need to pick the best one.
How much faith should I have in the W3C PaymentRequest API?
Is it reasonable to pursue it with the goal of including all Mac users regardless of browser? Or is it likely a dead API and I should stick to Apple Pay JS instead to provide a better experience to Safari users?
It also looks like the PaymentRequest API isn't fully finalized yet, so maybe that's the source of my issues. Maybe I should just use Apple Pay JS for now with an eye to supporting PaymentRequest when the spec is finalized.
I greatly appreciate your input.
Post
Replies
Boosts
Views
Activity
I'm working on adding Apple Pay to my web site and I'm getting this error when the element loads.
InvalidAccessError: Trying to start an Apple Pay session from an insecure document.
Do I need HTTPS on my development site? I have it on my production site, but I've never enabled it for dev.
If so, will it work with a self-signed certificate?
If not, what does this error mean? How can I resolve it?