1.1.1 • Published 4 years ago

node-nicepay v1.1.1

Weekly downloads
44
License
ISC
Repository
gitlab
Last release
4 years ago

NODE NICEPAY

Nicepay Payment Gateway SDK on Node.js

Installing

npm install node-nicepay

Example

const Nicepay = require('node-nicepay')

const nicepay = new Nicepay()

// prepare the setup data
let setup = {}
setup.amt = 100000
setup.referenceNo = 'ORDER-NO-12345'
setup.timeStamp ='20191128'
setup.iMid = 'IONPAYTEST' // for testing purpose only
setup.merchantKey = '33F49GnCMS1mFYlGXisbUDzVf2ATWCl9k3R++d5hDd3Frmuos/XLx8XhXpe+LDYAbpGKZYSwtlyyLOtS/8aD7A==' // for testing purpose only
setup.url = 'https://dev.nicepay.co.id/'

// prepare the required data for Virtual Account
let data = {}
data.currency = 'IDR'
data.description = `Invoice No. ${referensiId}`
data.goodsNm = nameGoods
data.billingNm = username
data.billingPhone = noHp
data.billingEmail = email
data.billingAddr = alamat
data.billingCity = '-'
data.billingState = '-'
data.billingPostCd = '-'
data.billingCountry = 'Indonesia'
data.userIP = request.ip()
data.cartData = "{}"
data.payMethod = '02'
data.bankCd = 'CENA'
data.vacctValidDt = '20191128'
data.vacctValidTm = '105001'

// then setup nicepay first
let np = nicepay.setup(setup)

// request to nicepay
let res = await np.VA(data)
return res.data

or you can use chainable method

let res = await nicepay.setup(setup).VA(data)

API

setup(data)

let setup = {}
setup.amt = 100000
setup.referenceNo = 'ORDER-NO-12345'
setup.timeStamp ='20191128'
setup.iMid = 'IONPAYTEST' // for testing purpose only
setup.merchantKey = '33F49GnCMS1mFYlGXisbUDzVf2ATWCl9k3R++d5hDd3Frmuos/XLx8XhXpe+LDYAbpGKZYSwtlyyLOtS/8aD7A==' // for testing purpose only
setup.url = 'https://dev.nicepay.co.id/'

nicepay.setup(setup)

REGISTRATION

  1. VA(dataVA)
  2. CC(dataCC)
  3. CVS(dataCVS)
  4. clickPay(dataClickPay)
  5. eWallet(dataeWallet)

PAYMENT

Nicepay doesn't provide API to API request, use POST, SUBMIT, or Redirect methode

Read detail Payment Documentation

INQUIRY

TODO

  1. Create Unit Testing
1.1.1

4 years ago

1.0.13

4 years ago

1.0.12

4 years ago

1.0.11

4 years ago

1.0.10

4 years ago

1.0.9

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.2

4 years ago

1.0.3

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago