0

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

Damien
  • 3,358
  • 11
  • 62
  • 106
  • window.ApplePaySession and ApplePaySession.canMakePayments() are checking for two different functionalities according to the Apple documentation. Are both of those returning false? – Lairen Apr 26 '18 at 14:28
  • yes they both are returning false unfortunately – Damien Apr 26 '18 at 16:14
  • Braintree's [docs](https://developers.braintreepayments.com/guides/apple-pay/client-side/javascript/v3) 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 Apr 30 '18 at 19:07

1 Answers1

0

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');
}