pixelpay-ipg
Version:
NPM for PixelPay IPG
50 lines (34 loc) • 1.48 kB
Markdown
# PixelPay IPG Plugin
**PixelPay IPG** is a simple and flexible payment integration for developers looking to integrate Internet Payment Gateway (IPG) by PixelPay into their Javascript applications. With support for multiple payment methods, tokenization, and both sandbox and live environments, this package helps you securely handle transactions with ease.
## Features
- **Card Transactions** — Visa, Mastercard and American Express
- **Bank Transfe**r — Enable payments through bank transfers in Sri Lanka.
- **Saved Card Feature (Tokenization)** — Offer your customers the convenience of securely saving their card details for future transactions.
- Facilitate transactions via **Frimi**, **Q+**, **Sampath Vishwa**, **iPay** and **Lanka QR**
## Installation
```bash
npm install pixelPay-ipg
```
## Usage
### package
```js
const PixelPayIpg = require('PixelPay-ipg')
const dp = new PixelPayIpg.Init({
signature: signature,
dataString: encoded_payload,
stage: 'DEV',
container: 'card_container'
})
//popup IPG
dp.doInAppCheckout().then((data) => {
console.log('client-res', JSON.stringify(data))
}).catch((error) => {
console.log('client-error', JSON.stringify(error))
})
//open IPG inside page component
dp.doInContainerCheckout().then((data) => {
console.log('client-res', JSON.stringify(data))
}).catch((error) => {
console.log('client-error', JSON.stringify(error))
})
```