node-weixin / node-weixin-pay Goto Github PK
View Code? Open in Web Editor NEWnode weixin api
Home Page: https://node-weixin.github.io/
License: Other
node weixin api
Home Page: https://node-weixin.github.io/
License: Other
请问一下,在npm run test 的时候报了以下的错误(Invalid Merchant Data: {"key":"key","reason":"Key key is NULL"}),小白不知道怎么解决这个问题呀
f:\faymi\git_project\node-weixin-pay\gulpfile.js:40
throw err;
Error: Invalid Merchant Data: {"key":"key","reason":"Key key is NULL"}
at Error (native)
at Object.init (f:\faymi\git_project\node-weixin-pay\node_modules\node-weixin-config\lib\merchant.js:7:13)
at Object.<anonymous> (f:\faymi\git_project\node-weixin-pay\test\api.js:22:27)
at Module._compile (module.js:570:32)
at Object.Module._extensions..js (module.js:579:10)
at Object.Module._extensions.(anonymous function) [as .js] (f:\faymi\git_project\node-weixin-pay\node_modules\istanbul\lib\hook.js:109:37)
at Module.load (module.js:487:32)
at tryModuleLoad (module.js:446:12)
at Function.Module._load (module.js:438:3)
at Module.require (module.js:497:17)
1.企业付款接口中验证mch_billno字段为必填,实际微信文档是没有这个字段,此字段在红包中需要,请去除这个验证
2.企业付款接口签名功能,prepare方法中加入的字段appid实际不需要,mch_id实际在文档中应该为mchid,加入这些错误字段会导致提交到微信后报SIGN_ERROR错误,请尽快修改
发现支付这块请求接口比较特殊的几点:
1、需要证书加密的xmlssl请求(涉及退款功能的接口)
2、无需证书加密的xml(大部分接口)
3、微信接口直接返回文本表格(订单对账接口)
目前pay模块发送请求request方法中用的都是 xmlssl方法,对上述有两种方式并不支持。
感觉需要完善一下~
MERCHANT_KEY
APP_TOKEN
这两个是自己定义还是在微信那里获取的呀?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.