1.0.17 • Published 10 months ago

netpayjs-reactjs v1.0.17

Weekly downloads
-
License
MIT
Repository
-
Last release
10 months ago

netpayjs-reactjs

Libreria desarrollada en el framework de ReactJS basado en la herramienta de netpay js (Custom Checkout)

NPM JavaScript Style Guide

Install

npm install --save netpayjs-reactjs

Build for local testing

In the root of the project

npm install

npm start

In the example folder

npm install

npm start

En caso de error al usar React con Typescript, agregar un archivo llamado 'alltypes.d.ts' y agregar la libreria de la siguiente forma 'declare module 'netpayjs-reactjs'.

Usage

import React from 'react'
import NetPay from 'netpayjs-reactjs'

function success(e) {
  console.log("Token created successfully");
  console.log(e); 
}

function error(e) {
  console.log("Something went wrong!");
  console.log(e);
}

/*
  sandboxmode = false -> Apunta a ambiente productivo
  sandboxmode = true -> Apunta a ambiente de pruebas

  showform = true -> Muestra formulario de tarjeta
  showform = false -> No muestra formulario de tarjeta
*/
const form = {
  id: 'netpay-form',
  success,
  error,
  options: { title: "Pagos con tarjeta", submitText: "Continuar" },
  sandboxMode: {boolean},
  showForm: true
}

const noForm = {
  success,
  error,
  cardInformation: {
      cardNumber: {Tarjeta},
      expMonth: {MesExp},
      expYear: {AñoExp},
      cvv2: {CVV},
      deviceFingerPrint: ''
  },
  sandboxMode: {boolean},
  showForm: false
}

const App = () => {
  let netpayDiv = document.createElement('div')
  netpayDiv.id = 'netpay-form'
  document.body.appendChild(netpayDiv)
  return (
    <NetPay apikey="apikey" form={form} />
  )
}
1.0.17

10 months ago

1.0.16

10 months ago

1.0.15

12 months ago

1.0.11

1 year ago

1.0.14

12 months ago

1.0.13

12 months ago

1.0.12

1 year ago

1.0.10

1 year ago

1.0.9

1 year ago

1.0.8

1 year ago

1.0.6

1 year ago

1.0.5

1 year ago

1.0.4

1 year ago

1.0.3

1 year ago

1.0.2

1 year ago

1.0.1

1 year ago

1.0.0

1 year ago