flutter_paypal_payment_checkout_v2 2.1.0
flutter_paypal_payment_checkout_v2: ^2.1.0 copied to clipboard
A powerful, secure PayPal checkout wrapper for Flutter.
Changelog #
All notable changes to this project will be documented in this file.
2.1.0 โ 2025-12-11 #
๐ Backend Flexibility, Async Validation & Error Handling Overhaul #
This release introduces powerful improvements to support secure, backend-driven PayPal integrations and richer error handling capabilities.
โจ New & Updated Features #
Backend-Driven Checkout Flow
- Renamed
getApprovalUrlโgetCheckoutUrl. - Method now allows developers to fully parse backend responses and return a complete
PaypalPaymentModelor 'PayPalErrorModel' error. - Enables secure production workflows where the app never handles secret keys or order creation โ only the checkout URL.
Asynchronous Payment Callback
onUserPaymentis now async and returnsEither<PayPalErrorModel, T>.- Developers can run backend validation after PayPal approval but before the UI completes.
- Returning
Left(PayPalErrorModel(...))now correctly triggers the error pathway.
Flexible Error Payload Structure
PayPalErrorModel.errorupdated fromStringโdynamic.- Allows passing backend error objects or full PayPal API responses.
Dartz Re-Exported
-
dartzis now re-exported to provide direct access to:EitherLeftRightUnit
-
Enables easier construction of custom validation results inside
onUserPayment.
Localization Completion
-
All remaining keys added to:
errors_keys.jsonmessages_keys.json
-
Ensures full localization coverage across success and error flows.
2.0.9 โ 2025-12-10 #
๐ Documentation Update #
-
Added full SDK documentation across:
- All V1 & V2 models
- Enums
- Services
- Checkout view
- Barrel exports
-
Improved inline DartDoc everywhere for:
- Better IDE autocomplete
- Cleaner pub.dev documentation
- Easier onboarding for developers
-
Ensured consistent formatting and explanations across all classes.
2.0.7 โ 2025-12-10 #
๐ Refactor & Stability Improvements #
- Removed all
part/part offiles across V1 and V2 to make the package fully modular and public-API friendly. - Replaced parts with standard imports, fixing issues where models were not accessible when importing the package.
- Properly exported all V1 & V2 models, enums, and services from the main library file.
- Improved package structure to follow pub.dev best practices for public packages.
- Stability improvements for IDE code completion, analyzer warnings, and pub.dev scoring.
- No breaking API changes โ all models remain the same, just now properly exposed.
2.0.3 โ 2025-12-10 #
- Added Tharwat to the contributors.
2.0.2 โ 2025-12-10 #
- Added a donation link.
PayPal: https://paypal.me/mazenelgayar
InstaPay:
https://ipn.eg/S/mazenel-gayarcib/instapay/0ecfXw
Tag: mazenel-gayarcib@instapay
2.0.1 โ 2025-12-10 #
๐งฉ Unified V1 + V2 API with shared models and services
This release builds on top of the V2 Orders support and introduces a unified, version-aware API that can handle both PayPal Payments API V1 and Orders API V2 from a single, clean interface.
โจ New Features #
-
Added shared abstract base types:
PaypalServicesBasePayPalOrderRequestBase
-
New unified checkout widget:
PaypalCheckoutView- Explicit
version: PayPalApiVersion.v1 | PayPalApiVersion.v2
-
Shared payment result model:
PaypalPaymentModel(used for both V1 & V2 flows)
-
Version-aware order models:
PayPalOrderRequestV1(Payments API v1)PayPalOrderRequestV2(Orders API v2)
-
Clear client-side handling of:
- V1 โ Execute via
PayerID - V2 โ Capture via
orderId
- V1 โ Execute via
๐งช New Example Screen #
-
Demo screen with two buttons:
- โPay with PayPal (V2 โ Orders API)โ
- โPay with PayPal (V1 โ Payments API)โ
-
Documentation explaining secure vs insecure workflows.
๐ Safety & Validation #
- Added runtime validation for mismatched order/service versions.
- Centralized checks for empty orders, null payloads, and invalid states.
โ ๏ธ Deprecated / Breaking Notes #
PaypalCheckoutViewV1/V2now replaced by unified widget.
2.0.0 โ 2025-12-09 #
๐ Major rewrite introducing full PayPal Orders API V2 support.
Highlights #
- V2 Orders API: create + capture flow
- Strongly typed models
- New enums for shipping, payment preference, landing page, etc.
- Secure custom URL schemes
- Safer credential validation
- Cleaner webview flow
1.0.8 โ Legacy #
Initial package features.