Open tulga870911 opened 6 years ago
@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
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 Thanks for your response.
I've tested in the iOS simulator, but it's same.
@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
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 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.
Is it okay to call presentDropInPaymentUI outside initialize() and setupApplePay()?
Anybody used this plugin in Ionic 2?
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
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.