glomopay_sdk 2.0.0 copy "glomopay_sdk: ^2.0.0" to clipboard
glomopay_sdk: ^2.0.0 copied to clipboard

Official GlomoPay Flutter SDK for integrating LRS Checkout.

Changelog #

Deprecation Notice #

  • Versions 1.0.3 and below are deprecated, and 1.0.4 or later versions are available.

2.0.0 #

See MIGRATION.md for upgrade steps. Every integration needs one change - the new required onUserJourneyCompleted callback - and the compiler points at it.

  • New required callback onUserJourneyCompleted - the second happy path. Invoked when the user completes the bank transfer flow. This previously used to arrive as onPaymentSuccess with a payload whose paymentId and signature were both null - a payment reported as received, but nothing for your backend to verify it against. It now arrives as onUserJourneyCompleted with a GlomoPayUserJourneyPayload carrying journeyType, orderId and the transfer details the page sent, and no longer reaches onPaymentSuccess - If onPaymentSuccess currently special-cases a null paymentId, that branch should move to the new callback.
  • Previously, for security reasons, file uploads were restricted to prevent users from accidentally uploading files of the wrong type. Now this security optimization has been removed and the SDK relies on the bank for guidance - whatever the bank's pages ask for, can be selected, including formats the picker had previously greyed out.
  • Removed some legacy integration options which were not suitable for production builds.
  • Improved error tracking and SDK diagnostics.
  • CheckoutStatus now also has error, for a checkout that could not proceed with no payment attempted - the order or configuration being unusable, the backend unreachable, or the user exiting one of the SDK's error screens. These were previously reported as paymentFailed. Appended like bankTransferSubmitted, so existing members keep their indices; only an exhaustive switch needs a new arm.
  • CheckoutStatus gained bankTransferSubmitted. A submitted bank transfer used to leave the status at paymentSuccessful. The new status has been appended to the enum, so the existing members keep the indices they shipped with; only an exhaustive switch over CheckoutStatus needs a new arm.
  • Improved diagnostics on the SDK; Merchants integrations can now freely use their own error tracking dependencies without any version restrictions.
  • Fixed the SDK's default error screens that could not be dismissed. Their buttons no longer take their colours from the host app's theme, so an app theme wouldn't hide the exit. Applies to both the default checkout error and connection error dialogs.
  • Dismissing a connection error now closes the checkout rather than keeping the user stuck in loading. On Android the system back button does the same, instead of closing the error and leaving the checkout stranded.
  • Error callbacks now fire independently of the default dialog being dismissed, so host apps are always informed about what went wrong even if the dialog is never closed.
  • Fixed a bug where errors were also triggering onPaymentFailure - Only confirmed payment failures on the backend will trigger the payment failure callback. All other errors will correctly go to onSdkError and onConnectionError.
  • When the user exits from any of the SDK's default error screens, the checkout now ends through onPaymentTerminate (source userDismiss) instead of onPaymentFailure. onPaymentFailure is reserved for a payment the backend confirms failed. SDK errors still reach the moment they are detected, through onSdkError or onConnectionError. Important: If closing the checkout or running cleanup was handled inside onPaymentFailure before, copy it to onPaymentTerminate - the SDK now closes itself on every one of these paths, so closure and cleanup should be replicated on every single path so that the user is not left stranded upon migration.
  • The SDK no longer draws its own default error screen when the checkout page reports a failure of its own, since the page already renders one. The page's events continue to reach onEvent exactly as before.
  • Internal event handling has been revamped, refactored and cleaned up. Recommended integrations are unaffected, as these events were never part of the SDK's API contract.
  • onEvent is now marked deprecated and will be removed in a future major version. It carries internal events that are subject to change; the lifecycle callbacks the SDK ships remain the supported integration. If you consume onEvent or supply your own GlomoPayController with addEventListener, please reach out to the Glomo mobile team and we will share the mapping before you upgrade.
  • Each failure now reports its actual semantic, and only once. Connectivity failures now arrive through onConnectionError and order or SDK faults through onSdkError. A single checkout loading failure also no longer fires both callbacks - it fires onConnectionError alone.
  • The back button is now no longer locked while a payment is in progress. Previously a page that stopped responding mid-payment would lock the back button and users can potentially get stuck until payment confirmation was received.
  • onPaymentTerminate is now a notification rather than a handover. The SDK closes the checkout itself whether or not a callback is supplied, so supplying it will no longer leave the user without a working back button. If checkout is closed from that callback, the SDK will not close a second time.
  • The load-timeout on onConnectionError is now advisory: network may still become re-available, and the SDK does not close itself on it (shouldAutoClose is false).
  • Fixed a bug where successful payments would be overridden if load-timeout errors had been reported. A payment completed on a slow checkout that recovered midway will correctly onPaymentSuccess.
  • Every payment failure the checkout page reports now reaches onPaymentFailure, including the thinner shape the page emits for its own setup failures. The page's own detail travels untouched in the payload's rawResponse.
  • Payment failures reported by the backend now reach onPaymentFailure. They were being checked against the rule written for a payment success, which requires a signature that a failure payload has never carried - so every confirmed decline was discarded before reaching your app, in every release build. If you have been treating onPaymentFailure as unreliable, it is now the callback for exactly this.
  • The checkout page's own close control now closes the checkout in every state. It stopped working once the page had reported a payment as pending, which every bank hand-off does.
  • Your app is told about one ending per checkout. A backend-confirmed payment result is the ending, so a user closing what remains afterwards no longer also delivers onPaymentTerminate for the same journey.
  • FlutterError.onError, PlatformDispatcher.instance.onError and the native crash handlers are no longer installed inside the host application. If your app inherited SDK-installed handlers, it loses them at this upgrade - install your own. In exchange, the SDK no longer constrains any versions for error trackers.
  • path_provider is now a direct dependency (^2.0.0). It was already resolved transitively, so no new package enters the dependency graph, but the constraint is now the SDK's own and may affect resolution in a pinned host app.
  • SDK diagnostics are spooled to the app support directory and flushed on the next initialisation, so a checkout interrupted by process death is still reported. The SDK writes only its own diagnostics there and no payment data.
  • Improved error tracking and diagnostics.

1.11.2 #

  • A failed order fetch now ends the checkout with an SDK error instead of opening the webview. Previously start() fell back to standard checkout and loaded the page anyway; the order type is only knowable from a successful fetch, and guessing routed LRS orders to the wrong checkout host, where the page itself then errored. An integration that assumed a webview always opens after start() now sees its error path fire instead.
  • The order fetch is bounded at 30 seconds and surfaces as a networkError. Previously it could hang indefinitely, leaving the checkout on a spinner with no outcome either way.
  • Added package_info_plus as a direct dependency, and removed yaml.
  • Improved analytics and error reporting on the checkout-open path. GlomoPayCheckout gained an optional checkoutOpenTimeout, which tunes when a slow checkout-open is reported and changes nothing the user sees.
  • Squashed CHANGELOG entries for expired SDK versions (versions prior to 1.0.4 are beyond their EOL and deprecated).
  • Fixed the flicker where a bank's 2FA page intermittently disappeared and the checkout screen showed through beneath it.
  • Optimized rendering of bank pages with several performance enhancements for redirect chains.
  • UI elements with educational content will no longer be created if there is nothing to render.
  • Transient failure of native bridge is handled resiliently.
  • Fixed the bank page showing as blank on Android the moment the paged loaded (zero width layout bug).
  • Fixed the iOS software keyboard being dismissed the instant a bank 2FA card or OTP field was focused. The fixed-element sweep no longer hides the container holding the focused field, no longer runs when nothing is focused, and now runs once per keyboard open rather than on every viewport resize.
  • On iOS, -webkit-user-modify: read-write is no longer forced onto input fields. It governs editability on contenteditable hosts and can interfere with caret handling on native form controls.
  • On iOS, bank pages that block text selection in their own card or OTP fields are now honoured rather than overridden. Long-press paste into an empty field is unaffected.

1.11.1 #

  • Added support for banks with breaking changes in remittance flows
  • Nested window.open redirects and back button navigations are now handled from within bank flows.

1.11.0 #

  • Added camera/gallery/file picker for images and PDFs, fixing bank flows where uploads were unusable.
  • image_picker now uses the system photo picker.
  • Added onUserRefusedDevicePermissions callback on GlomoPayCheckout - fires when the user denies camera permission during file upload.
  • captureEnabled (HTML capture attribute) now falls back to the bottom sheet when accept types include non-image formats, and falls back on camera permission denial instead of silently returning empty.
  • Fixed contextProvider to return null on disposed State instead of throwing.

1.10.4 #

  • Bug fixes

1.10.0 #

  • package version dependency fixed

1.0.9 #

  • Fix auto scroll bottom to top issue for ios.

1.0.8 #

  • Removed the aggressive auto-scroll handler from iOS WebView injection to reduce conflicts with bank pages such as Kotak.

1.0.7 #

  • Updated safe_device to ^1.4.0 so the Android checkTestKeys() compile issue is avoided and cross-platform builds remain stable.

1.0.6 #

  • safe device error fixed.

1.0.5 #

  • Pinned safe_device to the fixed 1.4.x line so the Android checkTestKeys() compile issue is avoided and cross-platform builds remain stable.

1.0.4 #

  • iOS host presentation updated to use a modal sheet style so the rendered webview back button remains clickable in partner integrations.