Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/bakaoh/zpi-nodejs
https://github.com/bakaoh/zpi-nodejs
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/bakaoh/zpi-nodejs
- Owner: bakaoh
- License: mit
- Created: 2019-05-16T08:12:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-05-21T08:32:21.000Z (over 5 years ago)
- Last Synced: 2024-11-12T20:48:35.501Z (about 1 month ago)
- Language: JavaScript
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ZPI NODEJS
[![Build Status](https://travis-ci.org/bakaoh/zpi-nodejs.svg?branch=master)](https://travis-ci.org/bakaoh/zpi-nodejs) [![npm version](https://badge.fury.io/js/zpi-nodejs.svg)](https://badge.fury.io/js/zpi-nodejs) [![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
## Usage
1. Install package
```bash
$ npm i zpi-nodejs
```2. Create order ([Detail](https://developers.zalopay.vn/docs/merchant/index.html#d-n-hang-co-kich-th-c-nh))
```node
const { App } = require('zpi-nodejs');
const app = new App(appid, macKey, callbackKey);
const data = await app.createOrder(apptransid, appuser, amount, apptime, embeddata, item, description);
```3. Generate deeplink
```node
const { genDeeplink } = require('zpi-nodejs');
genDeeplink(data.orderUrl);
```3. Open deeplink from client