authnet_flutter 1.0.2
authnet_flutter: ^1.0.2 copied to clipboard
Authorize.Net payments for Flutter: Accept.js, Accept Hosted, wallet tokens, gated direct-charge client. Not affiliated with or endorsed by Authorize.Net or Visa.
Changelog #
All notable changes to this project will be documented in this file. The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
1.0.2 #
- Improved pub.flutter-io.cn discovery with a search-focused description, five relevant topics, an integration-architecture thumbnail, current install commands, and a clearer explanation of tokenized versus direct Flutter integration.
- Added tag-based GitHub OIDC publishing support; no long-lived pub token is required after the package admin enables trusted publishing.
1.0.1 #
- Fixed
LICENSE: it had the standard MIT text plus a custom disclaimer appended after it, which broke automated license recognition (pub.flutter-io.cn scored it 0/10 for "Use an OSI-approved license").LICENSEis now pure MIT text; the disclaimer's content was already covered by this README's License section and the root repo'sSECURITY.md.
1.0.0 #
First stable release: the in-app client layer, covering Mode 2 (tokenize client-side, charge server-side) and Mode 3 (opt-in direct charge). Plain Dart, no WebView dependency and no widgets of its own: see the README.
- Test suite (35 tests) covers 100% of
lib/. - The Accept.js bridge now reports script-loading and malformed-response failures through the typed channel contract instead of failing silently.
AcceptHostedMessage.transactionIdis exposed only for atransactResponseaction, and never as an empty string.buildAcceptJsHtml()/buildAcceptJsTokenizeCall()/parseAcceptJsMessage(): a headless Accept.js bridge. The HTML page defines no form fields; collect card details with your own widgets and callrunJavaScript(buildAcceptJsTokenizeCall(...))on your ownWebViewController.buildAcceptHostedHtml()/buildAcceptHostedCommunicatorHtml()/parseAcceptHostedMessage(): Accept Hosted's documented iframe communicator contract, including query-string callback parsing and an Authorize.Net-origin filter.AuthNetDirectCharge: Mode 3's gated direct-charge wrapper. Refuses to construct unlessacknowledgeClientSecretRisk: trueis passed explicitly, checked before its underlyingAuthNetClientis created. Forwardsauthnet_core's charge-family operations plus an escape-hatch.clientgetter for everything else.applePayOpaqueData()/googlePayOpaqueData(): build theOpaqueDataAuthorize.Net expects from a wallet payment result. No decryption needed; Authorize.Net accepts the wallet's own token as opaque data.- Every HTML/JS builder escapes embedded values against breaking out of
their
<script>/JS-call context, including mixed-case HTML end tags. - New
authnet_coredependencies:AuthNetClient.getHostedPaymentPageToken(),.getHostedProfilePageToken(),.authenticate(),AuthNetConfig.hostedFormUrl. - Accept.js refuses to tokenize a page with no HTTPS origin, which is
exactly what
loadHtmlString()gives it without abaseUrl. The README and example now passbaseUrl: 'https://...'; seebuildAcceptJsHtml()'s dartdoc.
The JS bridge (script loading, authnetTokenize(), and the response
round-tripping through parseAcceptJsMessage()) has been run
end-to-end against the real sandbox Accept.js in a headless browser.
That doesn't cover the exact flow inside a mobile WebView on a device;
see the README.
