This is a Argetina's AFIP Client to communicate to their Business Web Services.
THIS IS AN ALPHA 1, NOT A PRODUCTION MODULE YET BUT ALMOST, USE IT AT YOUR OWN RISK
IMPORTANT: This module is currently using a PHP code snipped to Sign the TRA (ticket de requerimiento de autenticación), planned to be replace with pure node code soon
Development on this module started June 22, 2016. We are scheduling to release a beta version by July 15th, we are now open for bugs, suggestions and pull requests.
Install with npm:
npm install afip
This module provides a constructor method that gives you an instance of a WS SOAP Client (See: SOAP Module)
Starts a session with WSAA Afip and creates a Client for a given Business Service.
options argument allows you to customize the client with the following properties:
- service: business service to authenticate to, possible values: Any related business service associated to the Cuit ie - wsfe
- serviceClass: business service class to use, possible values: Any root path service ie - wsfev1
- productionCertFilename: absolute location to your production cert file
- productionKeyFilename: absolute location to your production cert file
Optional, default empty- passphrase used to generate the production key file
- homologCertFilename: absolute location to your production cert file
- homologKeyFilename: absolute location to your production cert file
Optional, default empty- passphrase used to generate the homolog key file
Optional, default: false- whether use production or homolog condiguration
callback function (mandatory) will be called once the soap client is ready.
The callback will receive the following parameters:
- error: and error object in case something went wrong
- businessWS: The business ws client object that have a connected SOAP Client instance
var afip = ;afip;