公众账号ID
仿真模式开关
密钥
测试用验签密钥
商户号
证书
拼接路径
生成 FetchOptions 数据
获取私钥
获取RSA加密公钥
pay.getPublicKey({
sign_type: SignType.MD5
});
查询企业付款到零钱
pay.getTransferInfo({
partner_trade_no: "10000098201411111234567890"
});
企业付款到银行卡
pay.payBank({
partner_trade_no: "1212121221227",
enc_bank_no: utils.rsa(pemKey, "6225760017946512"),
enc_true_name: utils.rsa(pemKey, "王小王"),
bank_code: "1001",
amount: 100,
desc: "理财"
});
// pemKey 通过 `pay.getPublicKey` 获取
查询企业付款到银行卡
pay.queryBank({
partner_trade_no: "1212121221227"
});
仿真模式开关
企业付款到零钱
pay.transfers({
partner_trade_no: "10000098201411111234567890",
openid: "oxTWIuGaIt6gTKsQRLau2M0yL16E",
check_name: "FORCE_CHECK",
amount: 10099,
desc: "理赔",
spbill_create_ip: "192.168.0.1"
});
校验 sign
Generated using TypeDoc
企业付款
const pay = new Bank({ appId: "wxb80e5bddb2d804f3", key: "6Q9VX4N3WTBM9G9XBL7H1L9PB9ANHLY7", mchId: "1434712502", pfx: fs.readFileSync(path.resolve(__dirname, "cert.p12")) });
https://pay.weixin.qq.com/wiki/doc/api/tools/mch_pay.php?chapter=14_1