@daffodil/authorizenet
v0.78.0
Published
An ecommerce package that has multi-platform support and state management features for managing authorize.net payments.
Downloads
447
Readme
@daffodil/authorizenet
@daffodil/authorizenet
manages the acceptJs calls, state, selectors, and models for making a payment token request to Authorize.net.
Installation
To install @daffodil/authorizenet
, use the following commands in the terminal.
Install with npm:
npm install @daffodil/authorizenet --save
Install with yarn:
yarn add @daffodil/authorizenet
Getting started
@daffodil/authorizenet
does most of the setup for you. All you need to do is:
- Import the
DaffAuthorizeNetStateModule
into the root component of your application. - Provide your own
DaffAuthorizeNetDriver
or use the default one by importingDaffAuthorizeNetDriverModule.forRoot()
.
Usage
To configure your Authorize.net authentication details:
- Provide a
DaffAuthorizeNetConfig
through theDaffAuthorizeNetConfigToken
injection token. - Call the
DaffAuthorizeNetGenerateToken
action with aDaffAuthorizeNetTokenRequest
to generate a payment nonce. - Access the payment nonce through the
DaffAuthorizeNetFacade
.
Extensions and customizations
If you feel like what our services return just won't cut it for your business needs, no problem! All of the reducers, effects, selectors, actions, and facades are 100% reusable with a customized model and service. If @daffodil/authorizenet
doesn't provide all of the fields you require on the payment info that is passed to the cart, you can inject a custom service through the DaffAuthorizeNetDriver
token and extend the DaffAuthorizeNetTokenRequest
model with a custom model.