我根据开发手记https://www.imooc.com/article/31607到微信访问http://proxy.springboot.cn/pay?openid=oTgZpwWye7pZV1gc20Bf7z1rl1VA&orderId=1501830787417512510&returnUrl=http://sell.com 成功跳出支付界面。
然后我就在微信里访问sell.com,下完单,填完信息后,显示openid必填,根据路径我将OrderForm中的卖家微信openid的@NotEmpty(message = “openid必填”)注释了。再次访问sell.com,点击支付后跳转到了错误页面:
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Thu Feb 28 15:23:39 CST 2019
There was an unexpected error (type=Internal Server Error, status=500).
???, returnCode != SUCCESS, returnMsg = JSAPI???openid
openid=null,怎么回事??? 是要在index.js中的wechatPayUrl中http://myshop.natapp1.cc/sell/pay/create后面要带上“?openid=oTgZpwWye7pZV1gc20Bf7z1rl1VA”吗?试了一下还是openid=null啊。还是说后端代码在某个地方openid要写死,可在哪里把openid写死啊???