0.0.11 • Published 2 years ago

netpayjs-angular v0.0.11

Weekly downloads
-
License
MIT
Repository
-
Last release
2 years 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

2 years ago

0.0.10

2 years ago

0.0.4

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.5

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago

0.0.0

2 years ago