0.1.5 • Published 10 years ago

unionpay v0.1.5

Weekly downloads
12
License
MIT
Repository
github
Last release
10 years ago

union pay

china union pay push trader and query order by nodejs. complete push,query and async pay notice;

Example

    var appInfo = {
        merId: "xxx",
        secret_key: "xxx",
        tradeAdd: "xxx",
        queryAdd: "xxx",
        backEndUrl: "xx"
    };


	var unionPay = new UnionPay(appInfo);
	var now = new Date();
	var orderNo = '1234567890';
	var orderAmount = 100;



    unionPay.pushTrade(orderNo, orderAmount, now, 'test').then(function (data) {
        xxxx
    }).catch(function (err) {
            xxx
        }).finally(function () {
           xxx
        })

    unionPay.queryTrade(orderNo, now).then(function (data) {
        xxx
    }).catch(function (err) {
            xxx
        }).finally(function () {
            xxx
        })


    //server pay notice key,value object
    unionPay.payNotice({key: value}).then(function (data) {
        xxx
    }).catch(function (err) {
            xxx
        }).finally(function () {
            xxx
        })

License

MIT

0.1.5

10 years ago

0.1.4

10 years ago

0.1.3

11 years ago

0.1.2

11 years ago

0.1.1

11 years ago

0.1.0

11 years ago