0
votes

I am trying to setup apple pay using Braintree.

I have been following these instructions but to no avail - https://developers.braintreepayments.com/guides/apple-pay/client-side/javascript/v3

I have installed the latest libraries, deployed my code to a secure https endpoint. I am using Safari 11.1 on Mac OS 10.13.4 I have my urls whitelisted on the Braintree site and I am logged in as a sandbox user on the mac

No matter what I do - the following code returns that it doesnt support apple pay

if (window.ApplePaySession && ApplePaySession.canMakePayments()) {
    console.log('Device does support apple pay');
}else {
   console.log('Device DOESNT support apple pay');
}

Is there anything else I need to do to get apple pay working correctly?

Thanks Damien

1
window.ApplePaySession and ApplePaySession.canMakePayments() are checking for two different functionalities according to the Apple documentation. Are both of those returning false?Lairen
yes they both are returning false unfortunatelyDamien
Braintree's docs mention The user must have an iPhone or Apple Watch that can authorize the payment. to use ApplePay on a Mac. Can you confirm you are signed into an iCloud account on both your Mac and an iOS device?hollabaq

1 Answers

0
votes

May be you should try this:

if (!window.ApplePaySession){
  console.log('This device does not support Apple Pay');
}

if (!ApplePaySession.canMakePayments()) {
  console.log('This device is capable of making Apple Pay payments');
}