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

Describe payment flow #161

Open Alienjob opened 1 month ago

Alienjob commented 1 month ago

If the payment is successful, I need to send the transaction ID to the backend. Can you describe in more detail what I should do with BraintreePaymentMethodNonce to make the transaction?

This code done its work, i have Nonce object.

final request = BraintreeCreditCardRequest(
    cardNumber: '4111111111111111',
    expirationMonth: '12',
    expirationYear: '2021',
    cvv: '123',
  );
  final myNonce = await Braintree.tokenizeCreditCard(
    tokenizationKey,
    request,
  );

But what i should do to use this Nonce? I expected method like

final transactionData = await Braintree.createTransaction(
  nonce: myNonce,
  orderId: '123'
  amount: 100,
)
BunnyBuddy commented 1 month ago

Read the documentation on Braintree