Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/sc0vu/ecpay-node
A wrapper for ecpay in nodejs.
https://github.com/sc0vu/ecpay-node
ecpay
Last synced: about 1 month ago
JSON representation
A wrapper for ecpay in nodejs.
- Host: GitHub
- URL: https://github.com/sc0vu/ecpay-node
- Owner: sc0Vu
- License: mit
- Created: 2017-06-22T13:29:45.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-10-13T14:52:19.000Z (about 7 years ago)
- Last Synced: 2024-10-11T00:22:17.219Z (about 1 month ago)
- Topics: ecpay
- Language: JavaScript
- Homepage:
- Size: 9.77 KB
- Stars: 2
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ecpay-node
[![NPM](https://nodei.co/npm/ecpay.png)](https://nodei.co/npm/ecpay/)
[![Build Status](https://travis-ci.org/sc0Vu/ecpay-node.svg?branch=master)](https://travis-ci.org/sc0Vu/ecpay-node)
[![Dependency Status](https://www.versioneye.com/user/projects/59e0284e15f0d723e3121ae0/badge.svg?style=flat-square)](https://www.versioneye.com/user/projects/59e0284e15f0d723e3121ae0)A wrapper for ecpay in nodejs.
Depend on [allpay](https://www.npmjs.com/package/allpay) package library.
# Usage
```
npm install ecpay --saveconst Ecpay = require('ecpay')
const PaymentService = new Ecpay({
merchantID: "2000214",
hashKey: "5294y06JbISpM5x9",
hashIV: "v77hoKGq4kWxNNIS",
mode: "production"
})
```# Example
Transaction
```
PaymentService.aioCheckOut({
MerchantTradeNo: "EC20171001000001",
MerchantTradeDate: "2017/10/01 00:00:00",
TotalAmount: 199,
TradeDesc: "HelloWorld",
Items: [{
name: "Cake",
price: 199,
currency: "NTD",
quantity: 1
}],
ReturnURL: "http://localhost/res",
ChoosePayment: "ALL"
}, function(err, result) {
// Do something here...
});
```# Development
```
clone && npm install
```# Test
```
npm test
```# License
MIT