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
66 stars 126 forks source link

iOS - MissingPluginException #5

Closed bojanculafic closed 4 years ago

bojanculafic commented 4 years ago

Hi,

I am trying to startup your plugin on iOS, but I am getting the following error:

`flutter: [VERBOSE-2:ui_dart_state.cc(148)] Unhandled Exception: MissingPluginException(No implementation found for method requestPaypalNonce on channel flutter_braintree.custom)

0 MethodChannel.invokeMethod (package:flutter/src/services/platform_channel.dart:314:7)

#1 Braintree.requestPaypalNonce (package:flutter_braintree/src/custom.dart:44:36) ` Flutter doctor: Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel stable, v1.9.1+hotfix.4, on Mac OS X 10.14.6 18G1012, locale en-GB) [✓] Android toolchain - develop for Android devices (Android SDK version 29.0.1) [✓] Xcode - develop for iOS and macOS (Xcode 10.2.1) [✓] Android Studio (version 3.5) [✓] Connected device (2 available) • No issues found! Could you please check what could it be wrong? Thanks, Bojan
pikaju commented 4 years ago

It looks like you are using the custom UI functionality of the plugin? I have not implemented this feature on iOS yet, it currently only works on Android. I don't have a Mac and so I can't really work on the iOS part. The native Drop-in UI should work on iOS and Android though, so if you like, you can use that for the time being.

bojanculafic commented 4 years ago

What I am trying to do is to trigger PayPal payment.

Here is the code: `
BraintreePayPalRequest request = BraintreePayPalRequest( amount: "2.0", currencyCode: "EUR", displayName: "Order1");

BraintreePaymentMethodNonce result = await Braintree.requestPaypalNonce(
  tokenizationKey,
  request,
);

` This is all what I am doing.

Will this trigger the custom UI functionality? My intention was not to use custom UI, only to trigger PayPal payment.

Can I use your plugin for PayPal payment on iOS?

Thanks, Bojan

pikaju commented 4 years ago

No, sadly you cannot do this yet. What does work on iOS is the Drop-in UI, which looks like this: https://developers.braintreepayments.com/guides/drop-in/overview/ios/v4 An explanation of how to use this feature is at the bottom of the README.md file.

Muhammad-Ullah commented 2 years ago

I am trying it on Android, it's not working? I am getting this error, MissingPluginException(No implementation found for method requestPaypalNonce on channel flutter_braintree.custom)