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 🙏

© 2026 – Pkg Stats / Ryan Hefner

niubizform

v0.0.0

Published

payment-form

Readme

npm version code style: prettier

Payment popup

Allows to show a modal with the payment gateway

Prerequisites

This project requires NodeJS (version 8 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.

$ npm -v && node -v
6.4.1
v8.16.0

Table of contents

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Installation

BEFORE YOU INSTALL: please read the prerequisites

To install and set up the library, run:

$ npm install niubiz-payment-form

Or if you prefer using Yarn:

$ yarn add niubiz-payment-form

Usage

Serving the app

$ npm start

API

niubiz-payment-form

Options

| CAMPO | TIPO | LONGITUD | OBLIGATORIO | DESCRIPCION | EJEMPLO | |---------------------|----------|--------------|-----------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|-----------------------------------------------------------------------| | src | string | Max 500 | SI | Script js para mostrar el modal de la pasarela | https://static-content-qas.vnforapps.com/vTokenSandbox/js/checkout.js | | action | string | Max 500 | SI | Indica el URL al que debe hacer post el formulario. Ejemplo: https://www.dominio.com/paginaRespuesta | https://www.dominio.com/paginaRespuesta | | sessiontoken | string | 64 | SI | Identificador único por transacción generado por el sistema (atributo “sessionKey” en respuesta de API del paso 2 | bb32b3b3781b49b2fa1f1c963d5e61b486f51467e52e38313efb0d0cefeb723a | | channel | string | Max 45 | SI | Canal de registro. Valor por defecto: “paycard” | paycard | | merchantid | string | 9 | SI | Código de comercio creado al momento de la afiliación | 456879856 | | purchasenumber | string | Max 12 | SI | Número de Pedido, este valor debe ser creado por el comercio y es único por intento de autorización | 123456789 | | amount | string | 8 | SI | Importe referencial al pago de la transacción. Este importe es finalmente usado en el proceso de autorización de la transacción. Formato ####.## (Dos decimales separados por punto) Ejemplo: 1000.00 | 500.0 | | cardholdername | string | Max 25 | SI | Nombres del titular de la tarjeta. No se permite caracteres especiales | Jhon | | cardholderlastname | string | Max 25 | SI | Apellidos del titular de la tarjeta. No se permite caracteres especiales | Doe | | cardholderemail | string | Max 25 | SI | Correo electrónico del titular de la tarjeta. No se permite caracteres especiales | [email protected] | | expirationminutes | string | – | SI | Tiempo de duración de la sesión de tokenización expresado en minutos | 5 | | timeouturl | string | Max 500 | SI | Dirección URL de la aplicación del comercio para redirección en caso de que exista un timeout durante el pago | https://www.dominio.com/timeout | | merchantlogo | string | Max 500 | Condicional | URL del logo del comercio. Altamente recomendable incluir un logo, caso contrario se mostrará el nombre del comercio. El tamaño sugerido es 187x40px. Nota: Si no inserta este valor, por no contar con una imagen como logo, es obligatorio colocar un texto en el campo “merchantname” | https://www.dominio.com/logo.png | | merchantname | string | Max 25 | Condicional | Nombre del comercio (se mostrará en caso se omita el logo en el campo “merchantlogo”). Nota: Si no inserta este valor es obligatorio colocar la dirección URL de una imagen en el campo: “merchantlogo” | ACME | | formbuttoncolor | string | 7 | NO | Define el color del botón en el formulario, por default es el color “rojo” | #9c27b0 | | formbuttontext | string | 7 | NO | Define el texto que se mostrará en el botón del formulario, por default es el texto “pagar” | Register | | formbackgroundcolor | string | 7 | NO | Define el color de fondo en el formulario, por default es el color “gris” | #ddd | | formbuttontextcolor | string | 7 | NO | Define el color del texto del botón, por default es el color “blanco” | #fff | | showamount | string | Max 5 | NO | Indica si se muestra en el botón del formulario algún importe referencial al pago de la transacción en caso se ejecute la autorización en ese momento. Valor por defecto: TRUE. Otros valores:TRUE,FALSE | FALSE |

Example

import { FC } from "react";
import { NiubizPopupForm } from 'niubiz-payment-form';

const MyComponent: FC = () => (
    <div>
      <NiubizPopupForm
        action="https://test.free.beeceptor.com/my/api/path"
        amount="500"
        cardholderemail="[email protected]"
        cardholderlastname="Doe"
        cardholdername="Jhon"
        channel="paycard"
        expirationminutes="20"
        formbackgroundcolor="#e0e0e0"
        formbuttoncolor="#E3350D"
        formbuttontext="Register"
        formbuttontextcolor="#FFF"
        hidexbutton="FALSE"
        merchantid="456879856"
        merchantlogo="https://cdn.worldvectorlogo.com/logos/pokemon-5.svg"
        merchantname="ACME"
        purchasenumber="2020103907"
        sessiontoken="e548d4aa9782c13bc04ab77ece24f1d0f466890d1717772a2803c69f928f5617"
        showamount="FALSE"
        src="https://static-content-qas.vnforapps.com/vTokenSandbox/js/checkout.js"
        timeouturl="about:blank"
        usertoken="3e44576b-1ea3-4ecc-95b4-6e672c5920fe"
      />
    </div>
  );

export default MyComponent;

Versioning

We use SemVer for versioning. For the versions available, see the tags on this repository.

Authors

See also the list of contributors who participated in this project.

License

MIT License