Paypal Payment Gateway Integration in Flutter

Gulshan Yadav
Flutter Community
Published in
2 min readMay 27, 2020

--

Paypal Payment Gateway Integration in Flutter

Problem:

At this time of writing this article, there is no SDK/package provided by Paypal for its payment gateway integration in Flutter. Also, there is no solution available for this problem on the whole internet.

After doing a lot of research on this topic, I have found a simple solution to this problem.

Solution:

I have successfully implemented Paypal Payment Gateway using WebView. I have used some of Paypal’s available APIs for Payment which are officially available for integration in websites.

So let’s start with the coding part.

First of all, we need to create a dart file named PaypalServices.dart which includes all the APIs required to perform the transaction using Paypal.

Given below are the codes. You can copy these codes to create the dart file.

Now, we need to create a dart file named PaypalPayment.dart which includes the WebView widget with Paypal URLs where the transaction has to be performed.

--

--

Gulshan Yadav
Flutter Community

Freelancer - Flutter | Android | Blockchain | NodeJs | Technical Writer | Open Source Contributor | LinkedIn — https://www.linkedin.com/in/mrgulshanyadav