alepay
v0.1.3
Published
`alepay` is a SDK for communicating with Alepay payment gateway in nodejs and created by [oneV.travel](https://oneV.travel) - a travel marketplace of Vietnam.
Downloads
103
Readme
alepay
is a SDK for communicating with Alepay payment gateway in nodejs and created by oneV.travel - a travel marketplace of Vietnam.
Prerequisites
node
version >= 10.x.x
Notes
This library only works in server side (nodejs) only.
Installation
npm install --save alepay
or
yarn add alepay
Usage
var Alepay = require('alepay');
var alepay = new Alepay({
env: 'sandbox', // or 'live' for production
token: TOKEN,
encryptedKey: ENCRYPT_KEY,
checksum: CHECK_SUM,
});
alepay.createRequestPayment({
orderCode: "O-SGT-2034",
amount: 4960000,
currency: "VND",
orderDescription:
"Thanh toán 10% - Tour Mauritius - Bản Sao Của Thiên Đường",
totalItem: 1,
checkoutType: 0,
returnUrl: "https://success-callback-url.com",
cancelUrl: "https://cancel-callback-url.com",
buyerName: "Trần Butterfly",
buyerEmail: "[email protected]",
buyerPhone: "0904121212",
buyerAddress: "dia chi nguoi mua",
buyerCity: "HO CHI MINH",
buyerCountry: "Viet Nam",
paymentHours: 1,
allowDomestic: true
})
.then(response => {
})