npm

Check out our latest tech talk, "JavaScript Supply Chain Security" presented by VP of Security, Adam Baldwin.Watch it here »

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
            },
        ]
    }
}

install

npm i tools-cashier

Downloadsweekly downloads

4

version

1.0.6

license

ISC

repository

Gitgitee

last publish

collaborators

  • avatar
Report a vulnerability