Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you test Apple Pay in Safari?

I am setting up Apple Pay on the web with Stripe and want to use the Sanbox Tester account we setup in iTunes Connect to test on both iOS and macOS in Safari.

On the test device (2017 iPad) I have logged in to iCloud with the Sandbox Tester account and added a test card into Wallet in the settings app. On my development website the Apple Pay button is showing up and interactions work fine.

I created a new account on my MacBook Pro (Retina, Mid 2015) and again logged in to iCloud with the same Sandbox Tester account. When I view my development website on here, however, the checkAvailability function always returns false:

Stripe.applePay.checkAvailability(function(available) {
  alert(available);
  ...
}

Presumably this is because I need further setup for Apple Pay to work. But for the life of me I can't get macOS cooperate. After reading some documentation here are some points that I think are relevant:

  • In my iPad's Wallet & Apple Pay settings there isn't an "Allow payments on Mac" option anywhere
  • There is no Wallet & Payments option in my macOS Settings app
  • There is no mention of Apple Pay in macOS Safari settings, privacy tab
  • Handoff is enabled on the Mac

Is it possible for me to enable test payments with my sandbox user on macOS using handoff, and if so what steps am I missing?

Update

  • My macOS Sierra version is 10.12.4 (16E195)
  • Running window.ApplePaySession.canMakePayments() in the console returns false

Update 2

The steps outlined here are all in place on both devices. When I open Safari on the MacBook and navigate to a page, the handoff icon shows on the multi-tasking screen and vice-vera, when I open a tab in iOS Safari, the handoff icon shows to the left of the dock. It appears handoff is working as expected.

Also, Universal Clipboard is working in both directions.

Note: On a different (non-sandbox) iCloud account on this same MacBook, which is using handoff with a different iPad, the payment options show up in Safari as expected.

like image 860
LeonardChallis Avatar asked Apr 25 '17 13:04

LeonardChallis


People also ask

How do I test my browser with Apple Pay?

Adding a Test Card Number To get started, add a test card to Wallet: Make sure to sign out of iCloud and sign into your test device with your sandbox tester account. Go to Wallet and tap Add Credit or Debit Card. Using your test credential, follow the steps to add a new card using manual entry.

How do I use Apple Pay in Safari?

In the Safari app on your Mac, at checkout, click Apple Pay. You can change the credit card, shipping address, or contact information before completing your purchase. Complete the purchase. Mac or Apple keyboard with Touch ID: Place your finger on Touch ID to complete the purchase.

What is check for Apple Pay in Safari?

When you visit a website that uses Apple Pay, the website can check if you have Apple Pay enabled on that device. If you're using a Mac to which a card cannot be added, the website can check if you have Apple Pay set up on an iPhone or Apple Watch. Apple websites and apps can also check to see if you have Apple Card.

Why is Apple Pay not working in Safari?

Go to your Safari menu bar, click Safari > Preferences then select the Privacy tab. Then make sure: Allow websites to check if Apple Pay is set up is selected. I confirm that the option is checked, both on my Mac and on my iPhone.


1 Answers

Apparently, Apple Pay on the Web using handoff is not possible with iPads. The only compatible devices are:

A Mac model introduced in 2012 or later with an Apple Pay-enabled iPhone or Apple Watch

This comes directly from Apple. Pretty explicit details can be found on this page.

like image 115
LeonardChallis Avatar answered Sep 22 '22 17:09

LeonardChallis