Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/uala-developers/ualabis-nodejs

Official Ualá Bis NodeJS SDK: https://www.npmjs.com/package/ualabis-nodejs
https://github.com/uala-developers/ualabis-nodejs

api-checkout checkout javascript node node-js nodejs sdk ts uala ualabis

Last synced: 3 months ago
JSON representation

Official Ualá Bis NodeJS SDK: https://www.npmjs.com/package/ualabis-nodejs

Awesome Lists containing this project

README

        

# Ualá API Checkout JavaScript SDK

Official Javascript SDK for Ualá Bis API Checkout

SDK Javascript oficial de Ualá Bis API Checkout

## Content
- [Installation](#installation) | [Instalación](#instalación)
- [Functions](#functions) | [Funciones](#funciones)
- [Usage](#usage) | [Uso](#uso)
- [API Checkout Docs](#api-checkout-docs)

## Installation
Install the package with:
```sh
npm i ualabis-nodejs
```

## Functions
List of all functions:
- setUp
- createOrder
- getOrder
- getFailedNotifications
- getOrders

## Usage
The package needs to be configured with your account's secret key

```js
/**
* if you use ES Modules instead of CommonJS use import statement
* import UalaApiCheckout from 'ualabis-nodejs';
*/

const UalaApiCheckout = require('ualabis-nodejs');

await UalaApiCheckout.setUp({
userName: 'example_user',
clientId: 'example_client_id',
clientSecret: 'example_client_secret',
isDev: true,
});

const order = await UalaApiCheckout.createOrder({
amount: 10.2,
description: 'test',
callbackSuccess: 'https://www.google.com/search?q=failed',
callbackFail: 'https://www.google.com/search?q=success',
});

const generatedOrder = await UalaApiCheckout.getOrder(order.uuid);

const orders = await UalaApiCheckout.getOrders({limit:'2', fromDate:'2022-08-04', toDate:'2022-08-09'});

```

# Español

## Instalación
Instale el paquete con el siguiente comando:
```sh
npm i ualabis-nodejs
```

## Funciones
Listado de todas las funciones:
- setUp
- createOrder
- getOrder
- getFailedNotifications
- getOrders

## Uso
Para hacer uso del SDK es necesario que configure sus credenciales como se muestra a continuación:

```js
/**
* Si su código usa ES Modules y no CommonJS, importa el
* paquete de la siguiente manera:
* import UalaApiCheckout from 'ualabis-nodejs';
*/

const UalaApiCheckout = require('ualabis-nodejs');

await UalaApiCheckout.setUp({
userName: 'example_user',
clientId: 'example_client_id',
clientSecret: 'example_client_secret',
isDev: true,
});

const order = await UalaApiCheckout.createOrder({
amount: 10.2,
description: 'test',
callbackSuccess: 'https://www.google.com/search?q=failed',
callbackFail: 'https://www.google.com/search?q=success',
});

const generatedOrder = await UalaApiCheckout.getOrder(order.uuid);

const orders = await UalaApiCheckout.getOrders({limit:'2', fromDate:'2022-08-04', toDate:'2022-08-09'});

```

## API Checkout Docs
Also you can show Api Checkout Documentation in https://developers.ualabis.com.ar