flutter_paypal_payment_plus library
Flutter PayPal Payment Plus - A seamless PayPal integration for Flutter apps.
This package provides a simple and customizable way to integrate PayPal payments into your Flutter mobile applications.
Features
- Easy PayPal checkout integration
- Support for sandbox and production environments
- Customizable UI components
- Comprehensive transaction handling
- Type-safe payment callbacks
Usage
import 'package:flutter_paypal_payment_plus/flutter_paypal_payment_plus.dart';
PaypalCheckoutView(
sandboxMode: true,
clientId: 'YOUR_CLIENT_ID',
secretKey: 'YOUR_SECRET_KEY',
returnURL: 'https://yourapp.com/return',
cancelURL: 'https://yourapp.com/cancel',
transactions: TransactionOption(...),
onSuccess: (model) => print('Success: ${model.toJson()}'),
onError: (error) => print('Error: $error'),
onCancel: () => print('Cancelled'),
);
Classes
- Item
- ItemList
- Represents the list of items included in a payment transaction. This class holds the collection of purchased items along with an optional
- PaymentDetails
- Represents a breakdown of the payment details.
- PaymentOptions
- Defines the payment options allowed for the transaction.
- PaymentSuccessModel
- PayPalAmount
- Represents the total payment amount to be charged via PayPal.
- PaypalCheckoutView
- This class represents a PayPal checkout screen as a stateful widget. It's stateful because it may undergo changes (like loading, error, or success) during the payment process.
- PaypalCheckoutViewState
- ShippingAddress
- Represents the shipping address details for the transaction.
- TransactionOption
- Represents a single payment transaction option in the PayPal payment process.
Enums
- PaymentMethodEnum
- Payment methods supported by PayPal.
Functions
-
getPaymentMethod(
PaymentMethodEnum paymentMethod) → String