New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

pgs

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pgs

Pay with PGS - Mitec

latest
Source
npmnpm
Version
0.0.7
Version published
Maintainers
1
Created
Source

pgs

Payment npm module from MiTec to help chatbots developers to implement a payment gateway

( You will need production credentials to make valid payments, contact us https://www.mitec.com.mx/ )

npm install pgs --save

demo.js

var pgs = require('pgs');
 
try{
	/*Set the endpoint (OPTIONAL) - Use to change between production (default) and sandbox*/
	pgs.setEndpoint("https://sandbox.mit.com.mx/");
	
	/* Cipher config for communication between the app and the gateway (REQUIRED)*/
    pgs.setCipher({
        "id":"0000000001",
        "key":"82A15AEEBFFCCC911F798BB6CFCCE7E2"
    });
	
	/* Your credentials (REQUIRED)*/
	pgs.setBussiness({
        "id_company":"0001",
        "id_branch":"1000",
        "user":"DEMO",
        "pwd":"DEMO01"
    });
 
	/* Description/label of the payment (REQUIRED)*/
    pgs.setReference('AAA123');
	
	/* Amount of the payment (REQUIRED)*/
    pgs.setAmount('25.00');
 
	/*Set debug flag (OPTIONAL), default: false*/
	pgs.setDebug(true);
 
    pgs.callAPI(function(url){
		/* Result URL */
        console.log( url );
    });
} catch (err) {
    console.error("Error:", err );
}

Keywords

pgs

FAQs

Package last updated on 14 Dec 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts