0.1.0 • Published 7 months ago

phonepepg v0.1.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

Easily integrate PhonePe Payment Gateway

⚠️ You Need a PhonePe Business account to use this

If you dont have have an account create one by the following link

Create PhonePe Business Account

Getting Started

This package package can be used for server-side working with Node.js or Other Server ation supported frameworks like Next.js etc

Install the Package

npm i phonepepg

Usage

Required Parameters: | param | required | | --- | --- | | merchantId | true | | saltKey | true | | isDev | false |

Create an Instance of PhonepeGateway

import PhonepeGateway from 'phonepepg';

const gateway = new PhonepeGateway({
    merchantId: 'MYMERCHANTID',
    saltKey: 'XXXXXXXXXXXXXXXXXXX',
    saltIndex: 1,
    isDev: true // false for production
  });

Initialize Payment

const resp = await gateway.initPayment({
    amount:100, 
    transactionId:'TR12345', 
    userId:'userid', 
    redirectUrl:'https://mysite.com/payredirect',
    callbackUrl:'https://mysite.com/callback'
    });

Get Payment Status

const resp = await gateway.paymentStatus(transactionId);

Get Checksum

const checksome = gateway.getChecksum(transactionId);

Contribute

This package is still in development. Click to Contribute

License

MIT License

Copyright (c) 2024

ziqx.cc

0.1.0

7 months ago

0.0.9

7 months ago

0.0.8

7 months ago

0.0.7

7 months ago

0.0.6

10 months ago

0.0.5

10 months ago

0.0.4

10 months ago

0.0.3

10 months ago

0.0.2

10 months ago

0.0.1

10 months ago