Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

tools-cashier

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

tools-cashier

study code ,cashier beans

  • 1.0.6
  • latest
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

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

Keywords

FAQs

Package last updated on 11 Jun 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc