0.0.11 • Published 10 months ago

netpayjs-angular v0.0.11

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

NetpayjsAngular

Este es un proyecto desarrollado en Angular version 14 donde se adapto la herramienta de NetpayJS (Custom Checkout).

Instalar

npm i netpayjs-angular

Importar libreria

Agregar los siguientes fragmentos de codigo en el componente donde este importaria la libreria.

En component.html:

<div>
    <div id="netpay-form"></div>
    <netpayjs [apikey]="'Public Key'" [forms]="Formulario"></netpayjs>
</div>

En component.module.ts:

import { NetpayjsModule } from 'netpayjs-angular'

@NgModule({
  imports: [
    NetpayjsModule
  ]
})

En component.ts:

    export class AppComponent implements OnInit {
    form:any;
    noForm:any;

    constructor(){
        this.form = {
        id: 'netpay-form',
        succes: this.success,
        error: this.error,
        options: { title: "Pagos con tarjeta", submitText: "Continuar" },
        sandboxMode: true,
        }
        
        this.noForm = {
        succes: this.success,
        error: this.error,
        cardInformation: {
            cardNumber: 'Num. Tarjeta',
            expMonth: 'Mes',
            expYear: 'Año',
            cvv2: 'CVV',
            deviceFingerPrint: ''
        },
        sandboxMode: true,
        }
    }

    success(e:any) {
        console.log("Token created successfully");
        console.log(e); 
    }
    
    error(e:any) {
        console.log("Something went wrong!");
        console.log(e);
    }
    }
0.0.11

10 months ago

0.0.10

10 months ago

0.0.4

10 months ago

0.0.9

10 months ago

0.0.8

10 months ago

0.0.7

10 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago

0.0.0

10 months ago