Gathering detailed insights and metrics for @axolo/node-wechat-pay
Gathering detailed insights and metrics for @axolo/node-wechat-pay
npm install @axolo/node-wechat-pay
Typescript
Module System
Min. Node Version
Node Version
NPM Version
70.7
Supply Chain
98.3
Quality
75.6
Maintenance
50
Vulnerability
100
License
JavaScript (100%)
Total Downloads
2,368
Last Day
1
Last Week
4
Last Month
24
Last Year
329
1 Stars
19 Commits
1 Forks
3 Watching
2 Branches
1 Contributors
Minified
Minified + Gzipped
Latest Version
0.3.5
Package Id
@axolo/node-wechat-pay@0.3.5
Unpacked Size
14.20 kB
Size
4.64 kB
File Count
8
NPM Version
7.5.3
Node Version
15.10.0
Cumulative downloads
Total Downloads
Last day
0%
1
Compared to previous day
Last week
-55.6%
4
Compared to previous week
Last month
-48.9%
24
Compared to previous month
Last year
-20.3%
329
Compared to previous year
2
Wechat Pay v3 Node.js SDK.
1yarn add @axolo/node-wechat-pay
For more usage please issue.
params
config | required | description |
---|---|---|
appId | yes | wechat pay appid |
mchId | yes | wechat pay mchid |
mchCert | yes | wehcat pay merchant certificate |
mchCertKey | yes | wehcat pay merchant certificate private key |
mchCertSn | yes | wechat pay merchant certificate serial number |
apiV3Key | yes | wechat pay api v3 secret key |
notifyUrl | yes | Wechat Pay Notify callback url |
notifySuccess | Wechat Pay Notify need response { code: 'SUCCESS' } event types | |
platformCert | wehcat pay platform certificate | |
currency | default is CNY | |
appType | mp = miniprogram | |
http | HTTP Client, default is built-in axios instance | |
error | class of Error, default is WechatPayError | |
logger | function of logger, default is console | |
cache | default is {} , it is reserved |
return
Object
of WechatPay
Node.js SDK instance.
http client for request wechat pay API.
params
param | required | description |
---|---|---|
config | yes | config of axios |
return
Promise
of wechat pay result as axios response.
return
String
of nonce_str
, random string.
return
String
of timestamp
, unix timestamp second.
params
param | required | description |
---|---|---|
payPackage | yes | package of wechat pay, like prepay_id=*** |
signType | signType of wechat pay, default is RSA |
return
Object
of wechat pay payment request
prop | description |
---|---|
appId | wehcat pay appid |
timeStamp | timestamp, seconds |
nonceStr | nonce string |
package | package of wechat pay, like prepay_id=*** |
paySign | base64 signature |
signType | signType of wechat pay, like RSA |
params
param | required | description |
---|---|---|
data | yes | Wechat Pay Notify request body |
return
Object
of Wechat Pay Notify decrypt resource with response suggestion.
prop | description |
---|---|
resource | decrytp resource |
response | response suggestion. like { code: 'SUCCESS' } |
1const fs = require('fs'); 2const WechatPay = require('@axolo/node-wechat-pay'); 3 4const wechatPay = new WechatPay({ 5 appType: 'mp', 6 appId: 'wechat_pay_appid', 7 mchId: 'wechat_pay_mchid', 8 mchCertSn: 'wechat_pay_mch_cert_serial_no', 9 mchCertKey: fs.readFileSync('wehcat_pay_mch_cert_private_key.pem'), 10 mchCert: fs.readFileSync('wehcat_pay_mch_cert.pem'), 11 apiV3Key: 'wechat_pay_api_v3_secret', 12 notifyUrl: 'https://url-of-wechat-pay-notify', 13}); 14 15wechatPay.http.get('/v3/certificates').then(res => { 16 wechatPay.logger.log(res.data); 17}).catch(err => { 18 wechatPay.logger.error(err); 19});
1yarn test
Yueming Fang
No vulnerabilities found.
Reason
no binaries found in the repo
Reason
0 existing vulnerabilities detected
Reason
license file detected
Details
Reason
Found 0/19 approved changesets -- score normalized to 0
Reason
0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0
Reason
no SAST tool detected
Details
Reason
no effort to earn an OpenSSF best practices badge detected
Reason
project is not fuzzed
Details
Reason
security policy file not detected
Details
Reason
branch protection not enabled on development/release branches
Details
Score
Last Scanned on 2025-01-13
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More