alepay
TypeScript icon, indicating that this package has built-in type declarations

0.1.3 • Public • Published

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: "abc@gmail.com",
  buyerPhone: "0904121212",
  buyerAddress: "dia chi nguoi mua",
  buyerCity: "HO CHI MINH",
  buyerCountry: "Viet Nam",
  paymentHours: 1,
  allowDomestic: true
})
  .then(response => {

  })

Readme

Keywords

none

Package Sidebar

Install

npm i alepay

Weekly Downloads

4

Version

0.1.3

License

MIT

Unpacked Size

51.6 kB

Total Files

18

Last publish

Collaborators

  • mrphu3074