Skip to content

Authorize.Net Accept.js Payments v1.0.1

Choose a tag to compare

@dbltoe dbltoe released this 15 Sep 14:13
· 5 commits to master since this release

Wallet hook in the checkout script. An add-on (Apple Pay, Google Pay, anything the module's descriptor whitelist allows) hands its token to window.authorizenet_accept.setWalletToken(descriptor, value, {brand, last4, expires}). The script fills the hidden carriers, selects the module with a real radio click so One Page Checkout records the choice, keeps the token in session storage for fifteen minutes tied to the order total so an OPC re-render doesn't lose it, and lets Continue, Review or Confirm through without card validation or an Accept.js call. Editing the card fields, choosing another payment method, or submitting the form drops the token.

Why. The 1.0.0 script only let its own Accept.js nonce through. A wallet token placed in the carriers by an add-on was stopped on the standard checkout with the card-number message, and worked on OPC only by going around the script. There is now one sanctioned way in, on both checkouts.

Also

  • Each render of the payment block fires an authorizenet_accept:ready event on the document carrying the same API, so a wallet button can be redrawn after OPC redraws the block.
  • The script config carries the order total, currency, mode and the Accept descriptor; config() on the API returns them.
  • The browser-side contract is documented in docs/CUSTOMIZING.md.

Nothing changes for card payments. No settings change, no database change. Upgrade by uploading the new zc_plugins/AuthorizeNetAccept/v1.0.1 folder beside the old one and choosing Upgrade in Plugin Manager; settings and credentials stay. The two bridge files for Zen Cart 1.5.8 through 2.0.x are unchanged.

Zen Cart 1.5.8 through 3.0.0, PHP 7.4 through 8.5.