Damien
Damien

Reputation: 4121

Braintree Apple Pay Integration

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

Upvotes: 0

Views: 1291

Answers (1)

Ankush Sohal
Ankush Sohal

Reputation: 1

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

Upvotes: 0

Related Questions