微信JSAPI保存发票抬头到微信的接口,开始报:
errcode: 72031, errmsg: "invalid params hint:
以为是参数有问题,怎么传都不对,原来是因为用的application/x-www-form-urlencoded提交方式,后来换成application/json,报错:
"errmsg": "system error"
这个才是因为参数错误,‘user_fill’,‘out_title_id’ 俩可选参数传空,这才可以了,wx这个报错能不能友好一点呢。
'title' => $data['buyerName'],
'phone' => $arr1[1],
'tax_no' => $data['buyerTaxNo'],
'addr' => $arr1[0],
'bank_type' => $arr2[0],
'bank_no' => $arr2[1],
'user_fill' => '',
'out_title_id' => '',
欢迎交流,我的微信:

在使用微信JSAPI保存发票抬头时遇到错误,最初报错为'invalidparamshint',原因是使用了错误的Content-Type:application/x-www-form-urlencoded,改用application/json后,错误变为'systemerror'。解决方法是将可选参数'user_fill'和'out_title_id'设置为空。调整参数后成功解决报错问题。
1009

被折叠的 条评论
为什么被折叠?



