@allnode/allpay
v0.0.84
Published
nodepay
Downloads
69
Readme
微信支付SDK
安装
npm i @allnode/midway@latest -save --registory=https://registory.npmjs.org
npm i @allnode/allpay
npm i @allnode/allpay@latest -save --registory=https://registry.npmmirror.com
常用方法
1、生成订单号
let orderNum=`sid_${new Date().getTime()}_`.substring(0, 32);
let parts = orderNum.split("_");
console.log("当前的门店编号:", parts[0]);
console.log("支付订单的时间戳:", parts[1]);
2、读取秘钥信息
const pay = new wechatpay({
appid: this.config.wx.appid,
mchid: this.config.wx.pay.mchid,
publicKey: readFileSync(join(
cwd(),
'src/app/modules/order/certificate',
'apiclient_cert.pem'
)), // 公钥
privateKey: readFileSync(join(
cwd(),
'src/app/modules/order/certificate',
'apiclient_key.pem'
)), // 秘钥
});
其他说明文档
微信支付官方文档
batches_transfer
close
combine
downloadbill
fundflowbill
profitsharing
query
tradebill
transactions_app
transactions_h5
transactions_jsapi
transactions_native
verifySign