zennopay_flutter 0.7.0
zennopay_flutter: ^0.7.0 copied to clipboard
Zennopay PaymentSheet for Flutter — a native bridge to the Zennopay iOS/Android cross-border QR checkout sheet. One call in, one PaymentResult out.
Changelog #
0.7.0 #
Partner package allowlist support, inherited from the native SDKs.
Changed #
- Bumped both native dependencies to the releases that send the
X-Zennopay-Packageheader — iOSZennopay ~> 0.7.0, Androidin.zennopay:sdk:0.7.0. The native PaymentSheet now stamps the host app's bundle id /applicationIdon every REST call so partners can enable a package allowlist in Console → Developers → Security. No Dart API change; the bridge inherits the behavior transitively.
0.6.1 #
Native-dependency alignment + packaging polish.
Changed #
- Bumped the Android native dependency
in.zennopay:sdk0.5.0 → 0.6.0, now that 0.6.0 is on Maven Central — both platforms reference native 0.6.0 (iOSZennopay ~> 0.6.0, Androidin.zennopay:sdk:0.6.0). No Dart API change. - Shortened the
pubspec.yamldescriptionto fit pub.dev's 60–180 character guidance (it was truncated in search results before). Recovers the "Follow Dart file conventions" pub points.
0.6.0 #
Partner-facing environment names. The config presets now match the docs and API reference: sandbox and production.
Added #
ZennopayConfig.sandbox—https://api.sandbox.zennopay.in, the environment partners integrate and test against. Now the default forpresentSheet/presentReceipt.ZennopayEnvironment.sandbox.
Changed #
presentSheet/presentReceiptdefaultconfig:is nowZennopayConfig.sandbox(was.staging). Same behavior, partner-facing name.- Native dependency bumped to
Zennopay ~> 0.6.0(iOS). The Android native dependency stays atin.zennopay:sdk:0.5.0until0.6.0propagates to Maven Central; the Dart config passesapiBaseUrlexplicitly, so the sandbox host is used regardless of the native default.
Deprecated #
ZennopayConfig.stagingandZennopayEnvironment.stagingare deprecated (@Deprecated('Use ...sandbox')) and are now compatibility aliases for the sandbox equivalents —stagingpoints athttps://api.sandbox.zennopay.in(previouslyhttps://api.staging.zennopay.in). Existing code keeps compiling; migrate tosandbox.
0.5.0 #
Version-aligned across all Zennopay SDKs (iOS/Android/Flutter) at 0.5.0. API
domain default migrated to zennopay.in (canonical) in the
ZennopayConfig.staging / ZennopayConfig.production base URLs. No API changes.
Native dependencies stay at Zennopay ~> 0.3.0 (iOS) / in.zennopay:sdk:0.3.0
(Android) — those releases remain valid.
0.4.0 #
New: Zennopay.presentReceipt(...) — reopen the authoritative receipt. A
second entrypoint that presents the native iOS/Android Zennopay receipt for
a payment intent and completes (Future<void>) when the user dismisses it. The
native SDK fetches the receipt, renders the native receipt / pending / failure
screens, polls a pending receipt through to a terminal state, shows refund copy
when the intent was refunded, and — on a 401 mid-poll — asks the host to
re-mint the receipt token. Nothing is re-implemented in Dart; this mirrors
presentSheet as a thin bridge.
await Zennopay.presentReceipt(
intentId: intentId,
receiptToken: receiptToken,
refreshReceiptToken: (intentId) => walletApi.refreshReceiptToken(intentId),
config: ZennopayConfig.production,
);
- Dart API:
presentReceipt({required String intentId, required String receiptToken, ZennopayConfig? config, ZennopayAppearance? appearance, Future<String?> Function(String intentId)? refreshReceiptToken}). - New channel method
presentReceipt+ a native→DartrefreshReceiptTokencallback round-trip (reusing the mechanismrefreshSessionuses). - Native SDK dependency bump: iOS
Zennopay ~> 0.3.0, Androidin.zennopay:sdk:0.3.0— the releases that exposepresentReceipt.
No changes to presentSheet or any existing public type.
0.3.0 #
BREAKING — zennopay_flutter is now a native bridge. The package no longer
ships its own pure-Dart PaymentSheet. Zennopay.presentSheet(...) now presents
the native iOS/Android Zennopay PaymentSheet — the exact same accessible
scan → amount → confirm → status flow as every other Zennopay SDK — over a
platform channel. Flutter partners get full native parity and accessibility for
free; there is no longer a separate Dart UI to keep in lockstep.
Converted to a proper Flutter plugin (in.zennopay.flutter /
ZennopayFlutterPlugin) that declares the native SDKs as transitive
dependencies — partners do not add them by hand:
- iOS: the
ZennopayCocoaPod (vias.dependency "Zennopay"), iOS 16+. - Android:
in.zennopay:sdk:0.2.1from Maven Central.
Breaking changes #
presentSheetsignature: removedcontext,navigatorKey, andonEvent. New shape:presentSheet({required String intentId, required String sessionJwt, ZennopayConfig? config, ZennopayAppearance? appearance, Future<String?> Function(String intentId)? refreshSession}). The native SDK presents over the top view controller / current Activity, so no FlutterBuildContextis needed.- Removed the display-only public models (
Merchant,Quote,ScanResult,PaymentIntentRecord,QrKind) and the reusable EMVCo parser (EmvCoParser,Tlv) — the native SDK owns all scanning, networking, and EMVCo decoding. Receiptfields are now all nullable. The native SDKs are the source of truth for receipt data; iOS currently returns a bare completed result with no line items (soreceiptisnullon iOS), while Android populates the merchant + amount fields.localAmountMinorUnits/amountUsdCentsare derived from the native display amounts.- The Dart-only deps (
http,mobile_scanner) are gone; the sheet's camera, REST, polling, retries, and slide-to-pay physics all live in the native SDK.
Kept (stable public API) #
Zennopay.presentSheet(...) → Future<PaymentResult>.- The
PaymentResultsealed hierarchy (Completed/Canceled/Failed/Pending) +Receipt. ZennopayError+ZennopayErrorCode(the native dotted taxonomy is mapped to these stable wire codes natively before crossing the channel).ZennopayConfig(staging/production/custom) and the fullZennopayAppearancetheming surface (colors, radii ≤ 12px, font, primaryButton, mode, logo) — serialized across the channel and applied by the native SDK.
0.2.0 #
First public release, version-locked with the native Zennopay SDKs (iOS / Android v0.2.0 — the PaymentSheet release).
- Package metadata now points at the public zennopay-flutter repository.
- Generic host-app wording in user-facing error copy.
- No API changes from 0.1.0.
0.1.0 #
Initial release of the Zennopay PaymentSheet for Flutter.
Zennopay.presentSheet(...)— single entrypoint returning aFuture<PaymentResult>(Completed/Canceled/Failed/Pending).- Three-screen flow rendered natively in Dart: Scanner (camera via
mobile_scanner, with torch / gallery / paste fallbacks), Amount (live USD-equivalent, static-QR numeric entry, silent quote re-fetch, VND per-transaction cap pre-check), and Confirm + Status (mass-spring slide-to-pay, processing, and success / failed / pending terminals). ZennopayAppearancetheming (colors, radii ≤ 12px, font, logo, light/dark) defaulting to theDESIGN.md"solid as a real bank" tokens.- REST client for
POST /v1/payment_intents/{id}/scan|confirmandGET /v1/payment_intents/{id}, session-JWTAuthorization: Bearer, on-device fail-fast JWT gate,refreshSessionhook, reused idempotency key on retry, and the shared error taxonomy. - SANDBOX ribbon on non-production environments; privacy-safe
onEventanalytics stream. - Ships a display-only EMVCo TLV parser for instant scan previews (the backend re-parses authoritatively).