Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

auttarjs

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

auttarjs

Auttar WebSocket JS Class. An easy implementation of Auttar WebSocket Service.

  • 0.2.1
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
8
Maintainers
1
Weekly downloads
 
Created
Source

Auttar.JS

Uma forma mais fácil de implementar o websocket da Auttar em seu sistema.

Exemplo Online

Acesse https://auttar-js.netlify.com para acessar o exemplo online da implementação

Como Usar

NPM / Yarn

npm install auttarjs --save

# For Yarn, use the command below.
yarn add auttarjs

CDN

<!-- For UNPKG use the code below. -->
<script src="https://unpkg.com/auttarjs@latest/dist/index.umd.js"></script>

<!-- For JSDelivr use the code below. -->
<script src="https://cdn.jsdelivr.net/npm/auttarjs@latest/dist/index.umd.js"></script>

<script>
  console.log(Auttar);
</script>

API

Classe

import AuttarClass from 'auttarjs';

// Inicializando Classe
const  Auttar  =  new  AuttarClass({});
Argumentos
Construtor
PropiedadeTipoDefault
hoststringws://localhost:2500
debugbooleanfalse
orderIdstring''
amountfloat0

credit

Auttar.credit(installments =  1, withInterest = false)

debit

Auttar.debit(isVoucher = false)

cancel

Auttar.cancel(prop = {})
Argumentos
PropiedadeTipoDefault
operacaonumberÚltima operação realizada
dataTransacaostringData da última operação realizada
amountfloatValor da última operação realizada
nsuCTFstringnsuCTF da última operação realizada

Exemplos

import AuttarClass from 'auttarjs';

// Inicializando Classe
const  Auttar  =  new  AuttarClass({
orderId:  '123456ABCDEF',
amount:  100.90
});

//Realizando pagamento com cartão de crédito.
Auttar.credit();

//Realizando pagamento com cartão de crédito parcelado
Auttar.credit(3);

//Realizando pagamento com cartão de crédito parcelado juros pela administradora
Auttar.credit(3,  true);

//Realizando pagamento com cartão de débito.
Auttar.debit();

//Realizando desfazimento total de operação
Auttar.requestCancellation();

//Realizando cancelamento da última compra
Auttar.cancel();

//Realizando confirmação da operação
Auttar.confirm();

Keywords

FAQs

Package last updated on 02 Apr 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc