Comparing version 0.1.0 to 0.1.1
{ | ||
"version": "0.1.0", | ||
"version": "0.1.1", | ||
"license": "MIT", | ||
@@ -4,0 +4,0 @@ "main": "dist/index.js", |
@@ -1,27 +0,53 @@ | ||
# TSDX Bootstrap | ||
`alepay` is a SDK for communicating with Alepay payment gateway in nodejs and created by oneV.travel - a travel marketplace of Vietnam. | ||
This project was bootstrapped with [TSDX](https://github.com/jaredpalmer/tsdx). | ||
## Prerequisites | ||
## Local Development | ||
- `node` version >= 8.x.x | ||
Below is a list of commands you will probably find useful. | ||
## Notes | ||
### `npm start` or `yarn start` | ||
This library only works in server side (nodejs) only. | ||
Runs the project in development/watch mode. Your project will be rebuilt upon changes. TSDX has a special logger for you convenience. Error messages are pretty printed and formatted for compatibility VS Code's Problems tab. | ||
## Installation | ||
<img src="https://user-images.githubusercontent.com/4060187/52168303-574d3a00-26f6-11e9-9f3b-71dbec9ebfcb.gif" width="600" /> | ||
`npm install --save alepay` | ||
Your library will be rebuilt if you make edits. | ||
or | ||
### `npm run build` or `yarn build` | ||
`yarn add alepay` | ||
Bundles the package to the `dist` folder. | ||
The package is optimized and bundled with Rollup into multiple formats (CommonJS, UMD, and ES Module). | ||
## Usage | ||
<img src="https://user-images.githubusercontent.com/4060187/52168322-a98e5b00-26f6-11e9-8cf6-222d716b75ef.gif" width="600" /> | ||
``` | ||
var Alepay = require('alepay'); | ||
### `npm test` or `yarn test` | ||
var alepay = new Alepay({ | ||
env: 'sandbox', // or 'live' for production | ||
token: TOKEN, | ||
encryptedKey: ENCRYPT_KEY, | ||
checksum: CHECK_SUM, | ||
}); | ||
Runs the test watcher (Jest) in an interactive mode. | ||
By default, runs tests related to files changed since the last commit. | ||
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 => { | ||
}) | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
50110
54