This package has been deprecated

Author message:

This package has been migrated to @openutility/acceptjs-angular-wrapper

@incentra/acceptjs-angular-wrapper
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

acceptjs-angular-wrapper

exposing the Authorize.net Accept.js Host your own script from an Angular6 service.

// file app.module.ts
import { NgModule } from '@angular/core';
import { AcceptJSService, CreditCard } from '@incentra/acceptjs-angular-wrapper';

const AcceptJSConfig: Config = {
  acceptjsUrl: 'mockAcceptjs.js'
  , apiLoginID: '123'
  , clientKey: '456'
};

@NgModule({
  providers: [
    {
      provide: TK_CONFIG,
      useValue: AcceptJSConfig
    },
    AcceptJSService
  ]
})
export class AppModule { }
// file app.component.ts
import { Component, OnInit  } from '@angular/core';
import { TK_CONFIG, Config, AcceptJSService } from '@incentra/acceptjs-angular-wrapper';

@Component({
  selector: 'app-root',
  templateUrl: './app.component.html'
})
export class AppComponent {
    constructor(private _acceptJSSrv: AcceptJSService) { }

    onSubmit(cc: CreditCard) {
        nonce = this._acceptJSSrv.generatePaymentNonce(cc);
        // submit nonce to your server with payment amount
    }
}

Readme

Keywords

none

Package Sidebar

Install

npm i @incentra/acceptjs-angular-wrapper

Weekly Downloads

3

Version

1.0.1

License

(ISC OR GPL-3.0)

Unpacked Size

100 kB

Total Files

42

Last publish

Collaborators

  • andrewjrvs
  • jarvisa
  • barrettotte