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

ngx-niubiz

v1.0.12

Published

Pasarela de pago Niubiz.

Downloads

105

Readme

NgxNiubiz

Integrar la pasarela de pago de Niubiz para Pago Web, con boton de pago mas facil y rapido con esta libreria. Desarrollada para proyectos en Angular.

Instalación

Con NPM:

npm install ngx-niubiz

Con Yarn:

yarn add ngx-niubiz

Uso

Para utilizar la librería, agrega los siguientes datos en tu componente:

import { Component, OnInit, ViewChild, ViewContainerRef } from '@angular/core';
import { RouterOutlet } from '@angular/router';
import { NgxNiubizComponent, DataMap } from 'ngx-niubiz';

@Component({
  selector: 'app-root',
  standalone: true,
  imports: [
    RouterOutlet,
  ],
  providers: [],
  templateUrl: './app.component.html',
  styleUrl: './app.component.css'
})
export class AppComponent implements OnInit {
  title = 'demo';

  ipAddress!: string;
  @ViewChild('paymentContainer', { read: ViewContainerRef }) paymentContainer!: ViewContainerRef;

  // OBJETO DE DATOS (Opcional)
  dataMap: DataMap = {
    'cardholderCity': "Lima",
    'cardholderCountry': "PE",
    'cardholderAddress': "Av Jose Pardo 831",
    'cardholderPostalCode': "12345",
    'cardholderState': "LIM",
    'cardholderPhoneNumber': "982217786"
  }

  constructor(
    // private ngxNiubizService: NgxNiubizService,
    private resolver: ViewContainerRef
  ) { }

  async ngOnInit(): Promise<void> {
    
    const factory = this.resolver.createComponent(NgxNiubizComponent);
    const componentRef = factory;
    // Objeto de Authenticación 
    componentRef.instance.authentication = 'Bearer ' + 'eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJodHRwOi8vc2NoZW1hcy54bWxzb2FwLm9yZy93cy8yMDA1LzA1L2lkZW50aXR5L2NsYWltcy9uYW1lIjoiYWRtaW5pc3RyYXRvciIsImV4cCI6MTcyOTIwMjE0NSwiaXNzIjoiaHR0cHM6Ly95b3VyZG9tYWluLmNvbSIsImF1ZCI6Imh0dHBzOi8vYXBpLnlvdXJkb21haW4uY29tIn0.7ifpy_szIzIUCUiEoe_t0jnaD9gpWcUqnjTYz6P9JzM'
    componentRef.instance.urlToken = 'http://localhost:5135/api/payment/niubiz/gettoken'
    componentRef.instance.urlAuthorization = 'http://localhost:5135/api/payment/niubiz/authorization'
    componentRef.instance.merchantId = 456879852; // COLOCAR MARCHANT ID
    componentRef.instance.amount = 30.33; // COLOCAR MONTO A APAGAR
    componentRef.instance.dataMap = this.dataMap;
    componentRef.instance.purchasenumber = "2020100901";
    componentRef.instance.developerMode = true; // Colocar  TRUE o FALSE para ver logs 
    componentRef.instance.redirect_url = 'http://localhost:4200/' // URL DE AUTORIZACION

    // Suscribirse al evento onSuccess
    componentRef.instance.onSuccess.subscribe(() => {
      console.log('Se ejecuto el success');
    });
    componentRef.instance.onFailed.subscribe(() => {
      console.log('Se ejecuto el onFailed');
    });
  }

}

Nota

Es recomendable concatenar la URL con un identificador de tu transacción ya que posteriormente deberás implementar el servicio de autorización del pago, tambien este componente trabaja con la libreria desarrollada en c# por DLP CONSULTING EIRL, para mas informacion contactar a Antonio de la Paz [email protected].

Documentación Oficial de Niubiz

Puedes encontrar la documentación oficial para desarrollar tu propia librería en la página oficial de Niubiz.

Desarrolladores

Desarrolladores

Desarrollado por : Antonio de la Paz DLP CONSULTING EIRL

Colaboración

Si quiere colaborar con nosotros puedes hacerlo aqui.