I just started on my Flutter journey and need to integrate Paypal payments into my app. However, there seems to be no standard Flutter API provided by Paypal and I couldn’t find an acceptable answer anywhere.
Question posted in Paypal API
The official documentation to get you started can be found here.
The official documentation to get you started can be found here.
4
Answers
You can achieve this using WebView.
PayPal provides some APIs to do transaction. Using those APIs you can achieve this.
Read this article
Paypal Payment Gateway Integration in Flutter
This article demonstrates the steps you need to follow.
Braintree is the payment processor provided by Paypal to accept safe and secure payments with feature Drop-in UI and custom UI design.
It also provides the Apple Pay, Google Pay feature to accept the payments.
Open Braintree Sandbox Account
Get the tokenization key from Braintree account
Add the flutter_braintree dependencies in your pubspec.yaml file
dependencies:
flutter_braintree: ^0.5.3+1
Create custom UI
Paypal Credit card: accept the followings from user
a. Card Number
b. Expiration Month
c. Expiration Year
Create a Braintree Request
Ask Braintree to tokenization it
For PayPal
create Paypal request
then launch Paypal Request
Get the NONCE from Braintree after successful payment and get the failure message on cancel the Paypal Payment by the user.
Save this NONCE for future reference in your database
you will find to do in this package
flutter PayPal package
There is a package in pub.dev called flutter_paypal https://pub.dev/packages/flutter_paypal
You can also check this youtube video, he cleared up everything that how to use it or how it works
https://youtu.be/QfLPdh771fA