pikaju / flutter-braintree

Flutter plugin that wraps the native Braintree SDKs. Enables payments with credit cards, PayPal, Google Pay and more.
https://pub.dev/packages/flutter_braintree
MIT License
64 stars 115 forks source link

Drop-in UI will not display the Apple Pay sheet #117

Closed bhaveshbusa closed 1 year ago

bhaveshbusa commented 2 years ago

Updating to the latest version 2.3.1, I am not able to process payment using ApplePay.

I debugged the code and the setup seems to be enabled. I can select ApplePay however the apple pay sheet would not appear.

I am surely missing something in my code.

if (self.configuration.isApplePayEnabled && !self.dropInRequest.applePayDisabled && [PKPaymentAuthorizationController canMakePayments]) {
                [activePaymentOptions addObject:@(BTDropInPaymentMethodTypeApplePay)];
            }

Flutter request

applePayRequest: BraintreeApplePayRequest
                                        (
                                          paymentSummaryItems: [
                                            ApplePaySummaryItem(label: "Total", amount: amount, type: ApplePaySummaryItemType.Final)
                                            ],
                                          displayName: displayName,
                                          currencyCode: 'GBP',
                                          countryCode: 'GB', //Country code is 2-digit and not 3-digit as per the plugin documentation
                                          appleMerchantID: accountSettings.appleMerchantId,

                                        ),
PrathamDev commented 1 year ago

I am facing the same issue. Did you find any solution?

robman70 commented 1 year ago

@bhaveshbusa, @PrathamDev: did you have solved this problem?

pikaju commented 1 year ago

Version 3.0.0 adds more options and an example for Apple Pay, please try if this resolves the issue.