digetpay_plugin 0.4.4 copy "digetpay_plugin: ^0.4.4" to clipboard
digetpay_plugin: ^0.4.4 copied to clipboard

Pure-Dart DigetPay payment plugin: hosted (PCI-safe) checkout via WebView plus transaction management over the DigetPay REST API.

0.4.4 - 2026-07-09 #

  • New: CheckoutPage now accepts html as an alternative to checkoutUrl — loads raw HTML directly (WebViewController.loadHtmlString) instead of navigating to a URL, while still watching for the same terminal successUrl/failureUrl navigation. Exactly one of checkoutUrl/html must be provided (asserted). This closes a real gap: sale()'s response carries a 3-D Secure collector page (DigetPayResponse.html, when needs3ds is true) that has to be loaded and auto-submitted in a WebView before the payment can complete — previously there was no supported way to present it, so a sale() requiring 3DS (most cards) never actually finished. cardPay()'s existing checkoutUrl usage is unaffected.
  • Example app: the S2S Card Sale screen now presents the 3DS collector page via CheckoutPage(html: ...) when response.needs3ds, then best-effort confirms the outcome with getTransactionById(response.paymentId) (falling back to the terminal URL reached if that lookup is inconclusive), and shows the result. Previously the screen just displayed the initial PENDING response and stopped.
  • Docs: README's "Direct (S2S) card sale" section gained a "Completing 3-D Secure" subsection with a full example.

0.4.3 - 2026-07-09 #

  • New: sale()'s integrity hash is now computed automatically — the algorithm has been confirmed against the backend. computeSaleHash (MD5 of reverse(email) + apiKey + reverse(first6+last4 of the card number), uppercased) is wired back into DigetPaySdk.sale(): it computes and injects hash on every call unless SaleRequest.hash is already set, in which case that value is sent verbatim. This reverses the "temporarily disabled" note from 0.4.0/0.4.1 — computeSaleHash itself never changed, only whether sale() calls it.
  • Fix: the README's "Direct (S2S) card sale" example didn't compile — Customer(...) was missing the now-required phone argument. Added it.
  • Docs: removed the "temporary hash" callouts from DigetPaySdk.sale()'s dartdoc, SaleRequest.hash's field doc, the README, and the example app's S2S Card Sale screen; all now describe hash computation as automatic.

0.4.2 - 2026-07-09 #

  • Fix: TransactionFilter.pageNumber is confirmed 1-based — the backend rejects 0 with 400 Bad Request ("pageNumber must not be less than 1"). Doc comments on TransactionFilter.pageNumber/status and DigetPaySdk.getTransactionHistory() updated accordingly; no change to the method signatures themselves.
  • Example app: fixed Transaction History's pager to drive Prev/Next from a locally-tracked, 1-based page number instead of trusting the response's first/last/number — those follow a different convention on other endpoints and previously let the "Prev" button send an invalid pageNumber (0), triggering the 400 above.
  • Example app: added a status filter (All / Success / Failed) to Transaction History, wired to TransactionFilter.status; changing it restarts pagination at page 1.
  • Example app: Transaction History's detail bottom sheet now shows a copyable Transaction ID row and scrolls (capped at 90% of screen height) instead of overflowing on transactions with many fields or a long fee breakdown.
  • Example app: transactionStatus is now color-coded (green SUCCESS / red FAILED) in both Transaction History's list rows and the detail sheet, via a new shared transactionStatusColor() helper (example/lib/utils.dart).
  • Fix: TransactionSummaryCard (shared with Transaction Lookup) no longer shows "recurringToken: issued" when the backend returns "" instead of omitting the field — it now checks for a non-empty value.

0.4.1 - 2026-07-09 #

  • Fix: SaleRequest.toMap() and Customer.toMap() now match the S2S collection's request sample exactly: billingAddress/invoice are always present (null when unset, not omitted), and Customer's phone/idNumber/idType/taxNumber are always present ('' when unset, not omitted) — the backend expects these keys regardless of value. This is a deliberate, endpoint-specific exception to this package's usual "omit null optionals" convention.
  • Docs: moved the "Transaction history & lookup by id" section to directly follow "Direct (S2S) card sale" (ahead of "Listing checkout sessions") — it's a more commonly-needed lookup than the sessions listing.

0.4.0 - 2026-07-08 #

  • New: sale(SaleRequest) now performs a real headless S2S card sale/authorization against POST /payment/s2s/sale — no more UnsupportedError. This widens PCI scope for callers who opt into it; cardPay() remains the recommended, PCI-safe default. The backend's integrity hash field has a ported implementation (computeSaleHash, MD5) but automatic injection is temporarily disabled pending confirmation of the algorithm/secret — sale() currently sends the request as-is; set SaleRequest.hash yourself if you need one meanwhile (see the TODO(hash-decision) markers in lib/src/digetpay_sdk.dart).
  • New: recurring(RecurringRequest) now performs a real merchant-initiated recurring charge against POST /payment/checkout/recurring, charging a recurringToken from a prior cardPay() transaction — no more UnsupportedError.
  • New: getTransactionById(id) now performs a real lookup against GET /payment/transactions/digetpay/{id}/details — no more UnsupportedError. This reverses the 0.3.0 breaking change now that a real replacement endpoint exists. The returned Transaction gained ~23 fields from this richer endpoint (businessUnitId, reconciliationStatus, cardScheme, cardChannel, originalAmount/originalCurrency, gateway, settlementStatus, businessUnitHierarchy, and more), plus a new BusinessUnit model for the hierarchy.
  • New: getRecurringSubscriptions([RecurringSubscriptionFilter]) lists saved-card billing plans (GET /payment/checkout/recurring/subscriptions) as a PageDto<RecurringSubscription>.
  • New: chargeSubscription({subscriptionId, amount, email}) charges an existing subscription (POST /payment/checkout/recurring/{id}/charge) — no card data needed — returning a SubscriptionChargeResult.
  • New: getTransactionHistory([TransactionFilter]) lists raw transaction records (GET /payment/transactions/digetpay/) as a PageDto<Transaction>. Distinct from the deprecated getTransactions() (→ getCheckoutSessions(), session-shaped) — this lists transaction-shaped records instead.
  • Breaking: TransactionFilter's fields replaced (pageNumber, pageSize, status — dropping the old speculative id/page/size/ orderId/amountFrom/amountTo/dateFrom/dateTo) to back getTransactionHistory(). This class had no caller in the SDK until now.
  • Packaging: added the crypto dependency (for the S2S sale hash).
  • Example app: replaced the compile-time --dart-define=DIGETPAY_API_KEY flow with a first-run onboarding screen — enter your API key, pick Sandbox/Production, and the app calls DigetPaySdk.initialize() and persists the choice (shared_preferences, example-app-only). A new settings action on the home screen reopens it to change or reset the saved configuration. Added demo screens for S2S Card Sale, Recurring Charge (on the Money Movement screen), Recurring Subscriptions, and Transaction History; Transaction Lookup now also demos getTransactionById; Not Yet Available is trimmed to the four remaining guarded stubs (applePay, externalPayment, getTransactionByOrderId, getTransactionByRrn).
  • Docs: README capability tables updated; new "Direct (S2S) card sale" and "Recurring charges & subscriptions" / "Transaction history & lookup by id" sections; the security section now distinguishes cardPay() (PCI-safe) from the opt-in, PCI-scope-widening sale().

0.3.0 - 2026-07-07 #

  • Breaking: getTransactionById(id) is now a guarded stub — the backend lookup-by-id endpoint (GET /payment/checkout/status?id=) is no longer available, so this always throws UnsupportedError. Use getCheckoutStatus(sessionId), or list getCheckoutSessions() and inspect the returned CheckoutSessions, instead.
  • Docs: updated the README capability table, "which id do I use?" callout, and "not yet available" section; the example's Not Yet Available screen now demos getTransactionById alongside the other guarded stubs, and Transaction Lookup is limited to getCheckoutStatus.

0.2.0 - 2026-07-06 #

  • New: getCheckoutSessions([CheckoutSessionFilter]) lists your checkout sessions (GET /payment/checkout/sessions) as a PageDto<CheckoutSession>. Each CheckoutSession exposes gatewayTransactionId — the id to use with capture / voidd / refund / getTransactionById (not the session id).
  • New: CheckoutSession, CheckoutSessionFilter, and PageDto.fromPaginated (parses the NestJS {data, pagination} shape).
  • Deprecated: getTransactions() — renamed to getCheckoutSessions(); it now forwards to it and returns PageDto<CheckoutSession>.
  • Behaviour change: the not-yet-implemented methods now throw UnsupportedError instead of silently returning a failure/null: sale (disabled for PCI), applePay, externalPayment, recurring, getTransactionByOrderId, getTransactionByRrn.
  • Fix: getCheckoutStatus now calls GET /sdk/status?sessionId= (was pointing at the wrong path).
  • Packaging: added repository, issue_tracker, and topics metadata; converted to a true pure-Dart package (removed the unused native plugin scaffolding); aligned the flutter SDK constraint.
  • Docs: rewritten README (hero, quick start, capability table, sessions guide) and a runnable example is now published.

0.1.0 #

  • Initial DigetPay release (pure Dart).
  • DigetPaySdk facade with initialize() + init-guard.
  • Hosted, PCI-safe card checkout via cardPay() (WebView) — POST /payment/checkout/intiate + GET /payment/checkout/status.
  • Money movement: capture, voidd, refund.
  • Transaction queries: getTransactions, getTransactionById (typed Transaction / PageDto).
  • Typed DigetPayResponse normalizing the backend {code, message, errorCode, data} envelope.
  • Guarded stubs (no backend endpoint yet): sale (S2S card — disabled for PCI), applePay, externalPayment, recurring, getTransactionByOrderId, getTransactionByRrn.
1
likes
0
points
257
downloads

Publisher

unverified uploader

Weekly Downloads

Pure-Dart DigetPay payment plugin: hosted (PCI-safe) checkout via WebView plus transaction management over the DigetPay REST API.

Homepage
Repository (GitHub)
View/report issues

Topics

#payments #payment-gateway #checkout #webview

License

unknown (license)

Dependencies

crypto, flutter, http, uuid, webview_flutter

More

Packages that depend on digetpay_plugin