# paypal_flutter **Repository Path**: swiftlyfish/paypal_flutter ## Basic Information - **Project Name**: paypal_flutter - **Description**: paypal_flutter - **Primary Language**: Dart - **License**: Not specified - **Default Branch**: main - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2021-07-29 - **Last Updated**: 2021-08-05 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # paypal_flutter A new flutter plugin project. ## Getting Started To install in your project: Insert this code in pubspec.yaml: ``` dependencies: paypal_flutter: git: url: https://github.com/cristianbregant/paypal_flutter.git ``` run `flutter pub get` in the terminal and add `import 'package:paypal_flutter/paypal_flutter.dart';` in your Dart file. ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------- This plugin handles PayPal native checkout SDK of both iOS Android in flutter. The plugin exposes two methods in PaypalFlutter: 1) Configuration: First of all inizialize PayPal native SDK. ``` static Future configSetup(String returnURL, String clientID, PaypalEnvironment paypalEnvironment) ``` 2) Paymant: Call this method to begin the paymant process. ``` static Future pay(String amount) ``` This plugin provides a PayPal styled button that can be use for paymant action (PaypalButton). Example configuration : ``` String? result = await PaypalFlutter.configSetup( "com.example.test.pharmanow://paypalpay", "ARZHok_McwdkH7wmUptpS0LrvIjFmIo-Zj02i564eznHYYhZ6mgpnGPXTDpyL6OcrrSRcTi4yYtSkwsa", PaypalEnvironment.sandbox); ``` Example paymant : ``` PaypalButton( onPressed: () async { String? result = await PaypalFlutter.pay("13.50"); }, shape: ShapeStyle.pill, colorStyle: ColorStyle.blue, ) ``` OFFICIAL DOCUMENTATION SDK : https://developer.paypal.com/docs/business/native-checkout/ SDK IOS : https://developer.paypal.com/docs/business/native-checkout/ios/ SDK ANDROID: https://developer.paypal.com/docs/business/native-checkout/android/