Last updated:
0 purchases
flutter paypal sdk
Simple Paypal SDK for Flutter.
Usage #
This package provides three main Features. In order to handle payment you must need to have webview_flutter.
You can check in the /example folder.
import 'package:flutter_paypal_sdk/flutter_paypal_sdk.dart';
copied to clipboard
Features #
Authentication
Create Payment
Execute Payment
Initiate FlutterPaypalSDK #
FlutterPaypalSDK sdk = FlutterPaypalSDK(
clientId:'yourClientId',
clientSecret: 'yourSecretId',
mode: Mode.sandbox, // this will use sandbox environment
);
copied to clipboard
Authentication #
AccessToken accessToken = await sdk.getAccessToken();
copied to clipboard
Create Payment #
Payment payment = await sdk.createPayment(
transactions,
accessToken.token!,
);
copied to clipboard
Please refer to PayPal Payment API for more detail on required params and payment response.
Execute Payment #
Payment payment = await sdk.executePayment(
executeUrl,
payerId,
accessToken,
);
copied to clipboard
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.