tools-cashier

1.0.6 • Public • Published

tools-cashier

install

npm i tools-cashier --save

useage

var Sdk = require('tools-cashier');
var cashierPay = document.getElementById('cashierPay');
function cashierPaySuccessBack(res) {
    alert(JSON.stringify(res));
}

cashierPay.addEventListener('click', function () {
    Sdk.cashierPay(cashierPaySuccessBack);
});

如果是全局引入的话 @展帝

function cashierPaySuccessBack(res) {
    alert(JSON.stringify(res));
}
window.CashierSdk.cashierPay(cashierPaySuccessBack);

返回结构格式如下

{
    "error": {
        "returnCode": 0,
        "returnMessage": "success",
        "returnUserMessage": "success"
    },
    "data": {
        "balance": 30000,
        "productList": [
            {
                "id": 1,
                "price": "0.01",
                "beans": 10000,
                "productId": 1
            },
        ]
    }
}

Readme

Keywords

Package Sidebar

Install

npm i tools-cashier

Weekly Downloads

1

Version

1.0.6

License

ISC

Unpacked Size

110 kB

Total Files

21

Last publish

Collaborators

  • shibiaoz