cordova-plugin-braintree icon indicating copy to clipboard operation
cordova-plugin-braintree copied to clipboard

ApplePay does not show up

Open tulga870911 opened this issue 7 years ago • 9 comments

I called BraintreePlugin.setupApplePay before presentDropInPaymentUI(), but in the Drop-In UI, ApplePay does not show up. In the callback of setupApplePay, I can see that ApplePay is enabled.

tulga870911 avatar Jan 17 '18 22:01 tulga870911

@Taracque This is the output of ionic info.

Cordova CLI: 8.0.0 Ionic Framework Version: 2.0.0-beta.2 Ionic CLI Version: 2.2.3 Ionic App Lib Version: 2.2.1 Ionic App Scripts Version: 2.1.4 ios-deploy version: 1.9.2 ios-sim version: Not installed OS: macOS Node Version: v6.9.2 Xcode version: Xcode 8.3.2 Build version 8E2002

tulga870911 avatar Jan 19 '18 00:01 tulga870911

Does it show up when you run it in an iOS simulator?

It'll have a simulated card you can use there, if it does I'd assume it has something to do with the phones Apple pay settings you're running it on.

adamfellon avatar Jan 19 '18 00:01 adamfellon

@adamfellon Thanks for your response.

I've tested in the iOS simulator, but it's same.

screen shot 2018-01-19 at 09 42 38

tulga870911 avatar Jan 19 '18 01:01 tulga870911

@adamfellon As you can see in the above screen shot, it says "set up Apple Pay".

I displayed this text after setupApplePay() is successful. Please check how I implemented in the code in the attached screenshot.

And I am sure, I've configured Merchant ID and entitlements stuff in xcode, cuz I can see Apple Pay when I use the following plugin in this same project. It's just I want to use Braintree plugin. https://www.npmjs.com/package/cordova-plugin-applepay

screen shot 2018-01-19 at 09 47 02

tulga870911 avatar Jan 19 '18 01:01 tulga870911

We use it in an ionic v1 project.

Once the device ready fires I Initialize the plugin:

        BraintreePlugin.initialize(BRAINTREE_TOKEN,
            function(){
                console.log('            ... braintree initialize.');
            },
            function (error) {
                console.log((error));
            }
        );

The if the device is an apple device I call the setup outside of the initialize.

            BraintreePlugin.setupApplePay({ merchantId : 'XXXXXXXX', country : 'US', currency : 'USD'});

Then when I call the dropInUi it's in the list.

Hope this helps!

adamfellon avatar Jan 19 '18 02:01 adamfellon

@adamfellon Thanks again for your reply.

Now I've changed the code as following. I called the setupApplePay() outside of the initialize. The device is iPhone 7+.

But it's still same. I don't see Apple Pay in the Drop-In UI.

screen shot 2018-01-19 at 11 39 22

tulga870911 avatar Jan 19 '18 03:01 tulga870911

Is it okay to call presentDropInPaymentUI outside initialize() and setupApplePay()?

tulga870911 avatar Jan 19 '18 03:01 tulga870911

Anybody used this plugin in Ionic 2?

tulga870911 avatar Jan 23 '18 23:01 tulga870911

I use this plugin for Cordova app (angular 9 project), the issue is still actual for real devices. I can't reproduce the issue on the emulator, the apple pay button is shown https://tppr.me/aRBZ8, but for the real device (IPhone 8, IOS 14.4) the issue is still actual. https://tppr.me/R7lB8 Has anyone had the same experience?

I use the plugin with the 4.34.0 Braintree_ios SDK . https://github.com/simplenetworks/cordova-plugin-braintree

toly-ua avatar Mar 18 '21 08:03 toly-ua