npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

library-paguelofacil-js

v1.0.8

Published

Integracion con la plataforma de Paguelofacil (https://www.paguelofacil.com/), JS

Downloads

5

Readme

PagueloFacil Javascript SDK

The PagueloFacil Node library provides convenient access to the PagueloFacil API from applications written in JavaScript/Typescript

You can read the full documentation of PagueloFacil.

Content

Installation

Usage Examples

API Reference

Running Tests

Installation

Install PagueloFacil with npm


npm i library-paguelofacil-js

Usage Examples

import  PagueloFacilSDK  from  'library-paguelofacil-js';
const  pagueloFacilSDK  =  new  PagueloFacilSDK({cclw, token, 'development'}); //change to 'produciton' for production environment
  • Payment Authorization


const  paymentInfo  =  {
    amount:  100,
    taxAmount:  0.0,
    email:  "[email protected]",
    phone:  "59128732734",
    concept:  "concept",
    description:  "description",
    lang: 'ES'
}

const  cardInfo  =  {
    cardNumber:  "411111111111",
    expMonth:  "12",
    expYear:  "30",
    cvv:  "123",
    firstName:  "Jhoson",
    lastName:  "Gibson",
    cardType:  "MASTERCARD"  // or VISA
}
const  response  =  await pagueloFacilSDK.TrasanccionAutorization(paymentInfo, cardInfo);
  • Reverse Payment Authorization


const  reverseInfo  =  {
    amount:  100,
    description:  'description',
    codOper:  'SANDBOX_AUTH-XXXXXXXXX'
}
const  response  =  await pagueloFacilSDK.TrasanccionReverseAutorization(reverseInfo);
  • Capture Payment


const  paymentInfo  =  {
    amount:  100,
    taxAmount:  0.0,
    email:  "[email protected]",
    phone:  "59128732734",
    concept:  "concept",
    description:  "description",
    lang: 'ES',
    codOper: "SANDBOX_AUTH-XXXXXXXXX"
}
const  response  =  await pagueloFacilSDK.TrasanccionCapture(paymentInfo);
  • Reverse Capture


const  reverseInfo  =  {
    amount:  100,
    description:  'description',
    codOper:  'SANDBOX_AUTH-XXXXXXXXX'
}
const  response  =  await pagueloFacilSDK.TrasanccionReverseCapture(reverseInfo);
  • Authorize and Capture Payment (preferred)


const  paymentInfo  =  {
    amount:  100,
    taxAmount:  0.0,
    email:  "[email protected]",
    phone:  "59128732734",
    concept:  "concept",
    description:  "description",
    lang: 'ES'
} 

const  cardInfo  =  {
    cardNumber:  "411111111111",
    expMonth:  "12",
    expYear:  "30",
    cvv:  "123",
    firstName:  "Jhoson",
    lastName:  "Gibson",
    cardType:  "MASTERCARD"  // or VISA
}
const  response  =  await pagueloFacilSDK.TrasanccionAuthCapture(paymentInfo, cardInfo);

API Reference

Constructor

new PagueloFacilSDK({cclw, token, environment})

| Parameter | Type | Description | | :------------ | :-------------------------- | :-------------------------------- | | cclw | string | Required. Your cclw key | | token | string | Required. Your token key | | environment | development or production | Optional. Type of environment |

PaymentInformation

| Parameter | Type | Description | | :------------------ | :-------------------------------- | :----------------------------------------------- | | amount | number | Required. Transaction amount | | taxAmount | number | Required. Trax amount | | email | string | Required. Client email | | phone | string | Required. Client phone | | concept | string | Required. Transaction concept | | description | string | Required. Transaction description | | lang | string | Optional. Language | | customFieldValues | Array<[string, string, string]> | Optional. Optional fields (id, label, value) |

CardInformation

| Parameter | Type | Description | | :----------- | :------------------- | :---------------------------------- | | cardNumber | string | Required. Client card number | | expMonth | string | Required. The expiration month | | expYear | string | Optional. The expiration year | | cvv | string | Optional. The cvv or cvc | | firstName | string | Optional. The client first name | | lastName | string | Optional. The client last name | | cardType | VISA or MASTERCARD | Optional. The card type |

ReverseInformation

| Parameter | Type | Description | | :------------------ | :-------------------------------- | :----------------------------------------------- | | codOper | string | Required. codOper return by the transaction | | amount | number | Required. Transaction amount | | description | string | Required. Transaction description | | lang | string | Optional. Language | | customFieldValues | Array<[string, string, string]> | Optional. Optional fields (id, label, value) |

CaptureInformation

| Parameter | Type | Description | | :------------------ | :-------------------------------- | :----------------------------------------------- | | amount | number | Required. Transaction amount | | taxAmount | number | Required. Trax amount | | email | string | Required. Client email | | phone | string | Required. Client phone | | concept | string | Required. Transaction concept | | description | string | Required. Transaction description | | lang | string | Optional. Language | | customFieldValues | Array<[string, string, string]> | Optional. Optional fields (id, label, value) | | codOper | string | Required. codOper return by the transaction |

ServerResponse

| Parameter | Type | Description | | :------------- | :---------------------------- | :----------------------------------- | | code | number| code Transaction| | success | boolean | Server response if is success or not | | message | string or null | Server message | | data | Data | Transaction data |

Data

| Parameter | Type | Description | | :----------------- | :-------------------- | :--------------------------------------------- | | date | string | Transaction date | | authStatus | string | Server session status | | cardType | VISA or MASTERCARD | Type of card for the transaction | | type | VISA or MASTERCARD | Card provider for the transaction | | idtx | number | Id identifier for the transaction | | cardToken | string | Token generated by the transaction | | totalPay | string | Total amount of the transaction | | binInfo | Object | Information of card provider | | name | string | Card name | | displayNum | string | Last fourth number of the card | | operationType | string | Type of operation | | returnUrl | string | Callback URL | | requestPayAmount | number | Amount to pay of the request | | email | string | Client email | | codOper | string | Operation code of the transaction | | status | boolean | Show if the transaction was successfull or not | | messageSys | boolean | Show the system message |

PaidLink

Object Name: paidLinkInfo | Parameter | Type | Description | | :----------------- | :-------------------- | :--------------------------------------------- | | amount | decimal | Required. Amount to pay in the payment link | | description | string | Required. Description for payment | | urlResponse | string | Required. url where you will respond when confirming the payment | | expiration | integer | Optional Link lifetime in seconds| | cardType | string | Optional It is used to determine which payment methods we want to show in our payment link. Values: NEQUI, CASH, KEY, CARD, CRYPTO| | tax | decimal | Optional. Amount corresponding to the ITBMS within the transaction amount|

Running Tests

Remember to set environment variables CCLW and TOKEN