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

Unhandled Exception: PlatformException(braintree_error, Parsing error response failed, null, null) #160

Open BLACKCAT25896 opened 4 months ago

BLACKCAT25896 commented 4 months ago

//Code Screenshot 2024-05-08 201102

final request = BraintreePayPalRequest( billingAgreementDescription: 'I hereby agree that I give permission to HandyX to save and charge from this card in future for further transactions.', amount: "10", );

final dropInRequest = BraintreeDropInRequest(
  // clientToken: paymentBloc.clientToken,
  collectDeviceData: true,
  cardEnabled: true,
  amount: "10",
  requestThreeDSecureVerification: true,
  tokenizationKey: paymentBloc.clientToken,
  paypalRequest: request,
    email: "test@email.com",
    billingAddress: BraintreeBillingAddress(
      givenName: "Jill",
      surname: "Doe",
      phoneNumber: "5551234567",
      streetAddress: "555 Smith St",
      extendedAddress: "#2",
      locality: "Chicago",
      region: "IL",
      postalCode: "12345",
      countryCodeAlpha2: "US",
    ),
  googlePaymentRequest: BraintreeGooglePaymentRequest(
    currencyCode: "USD",
    totalPrice: "0.1",
    billingAddressRequired: false,
  ),
  applePayRequest: BraintreeApplePayRequest(
    displayName: "Payment",
    // amount: 0,

    countryCode: "US",
    currencyCode: "USD",
    paymentSummaryItems: [],
    merchantIdentifier: 'merchant.tech.dingi',
    supportedNetworks: [
      ApplePaySupportedNetworks.visa,
      ApplePaySupportedNetworks.masterCard,
    ],
  ),
);
BraintreeDropInResult? result = await BraintreeDropIn.start(dropInRequest);
BLACKCAT25896 commented 4 months ago

android

On Mon, 13 May 2024, 6:07 pm Muhammad Bani Akram, @.***> wrote:

Android or IOS?

— Reply to this email directly, view it on GitHub https://github.com/pikaju/flutter-braintree/issues/160#issuecomment-2107401394, or unsubscribe https://github.com/notifications/unsubscribe-auth/AENNNOJP2K7JENW7C525GYTZCCUH7AVCNFSM6AAAAABHNB46Q6VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDCMBXGQYDCMZZGQ . You are receiving this because you authored the thread.Message ID: @.***>

BunnyBuddy commented 4 months ago

Run the app by flutter run --verbose and keep an eye on the log. Try and change/comment the values 1 by 1 and see where it goes wrong. I think one of the values is wrong because it's throwing parse error.

rakotoleonce2106 commented 2 months ago

Hello everyone,

I have also encountered this error on iOS and Android. The problem occurs when changing the PayPal account linked to Braintree. Some accounts work fine, while others run into this error.

Could someone please help us?

krishnalalstha commented 2 weeks ago

Having same issue after linking with Braintree account.