Skip to content

china union pay push trader and query order by nodejs

License

Notifications You must be signed in to change notification settings

zj8487/unionPay

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

china union pay push trader and query order by nodejs

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published