pay_with_paystack 1.2.0
pay_with_paystack: ^1.2.0 copied to clipboard
A Flutter plugin for accepting Paystack payments via WebView. Supports card, mobile money, bank transfer, USSD, QR, EFT and more — with split payments, customer prefill, cart items, custom fields, and [...]
1.2.0 #
✨ New Customer Features #
- Customer prefill —
customerFirstName,customerLastName,customerPhonepre-fill the Paystack checkout form and appear on the Dashboard automatically. - Cart items —
cartItems: List<PaystackCartItem>attaches typed line items to the transaction metadata (name, amount, quantity). Amounts are in the major currency unit. - Custom fields —
customFields: List<PaystackCustomField>provides typed, structured fields visible on the Paystack Dashboard for every transaction. - Split payments — new
subaccount,splitCode,transactionCharge, andbearerparameters for routing payments to subaccounts or pre-defined split groups. - Subscription invoice limit —
invoiceLimitcontrols how many times a customer is charged on a subscription plan. PaystackBearerenum — type-safeaccount/subaccountfee-bearer selection.PaystackCartItemmodel — typed cart line item withname,amount,quantity.PaystackCustomFieldmodel — typed custom field withdisplayName,variableName,value.- All new model types are automatically exported from
pay_with_paystack.dart.
1.1.0 #
✨ New Features #
PaystackChannelenum — type-safe channel selection.planparameter — expose subscription plan codes through the public API.metadatais now typed —Map<String, dynamic>?instead ofdynamic.- Customisable AppBar —
showAppBar,appBarTitle,appBarColor,appBarTextColor. - Custom loading widget —
loadingWidgetparameter. - Custom error widget —
errorWidgetbuilder with retry callback. - Retry button — the default error screen retries the payment initialisation.
- Verification overlay — non-dismissible overlay while verifying the transaction.
- Branded loading & error UIs — pulsing Paystack-green logo animation.
Authorizationnew fields —expMonth,expYear,reusable,signature.Customernew fields —metadata, computedfullNamegetter.PaymentDatanew fields —requestedAmount,orderId.PaymentDatahelpers —isSuccessful,amountInMajorUnit,feesInMajorUnit.toString(),copyWith(),==,hashCodeon all models.PaystackException— typed exception withmessage,statusCode,responseBody.- Re-exports — importing
pay_with_paystack.dartnow exports all model types.
🐛 Bug Fixes #
- Fixed crash:
response!force-unwrap after a caught exception now throws a typedPaystackExceptioninstead of crashing withNull check operator used on a null value. NavigationDecision.preventreturned when the cancel/callback URL is detected.
🧪 Tests #
- Comprehensive unit test suite for all models and utilities.
1.0.14 #
- Previous release.