icbc-open
v1.0.0
Published
工行开发平台 Node.js SDK
Downloads
2
Readme
node-icbc-open
掌上生活开放平台( https://open.cmbchina.com/Platform/ ) Node.js SDK
安装
npm install icbc-open --save
使用
const ICBC = require("icbc-open");
const icbc = new ICBC({
appId: "10000000000000",
mertId: "00000000",
aesKey: "xxxx", // base64 aseKey
icbcPublicKey: "",
privateKey: fs.readFileSync("prod.key").toString(),
});
// 登录获取用户信息
const userInfo = icbc.getUserInfo("xxxx"); // Base64 from APP
// 手机号发券
await icbc.sendEcouponByMobile("XXX", 1234566, "13800138000");
// 手机号发券查询
await icbc.queryEcouponByMobile("XXX", 1234566, "13800138000");