- 输入源“/appid”映射到字段“公众号ID”必填性规则校验失败,此字段为必填项?
微信jsapi支付,V3 接口,没有使用官方的SDK; 提交的参数 { "appid": "wxb4263b9ec123455", "mchid": "123456", "description": "腾讯会员", "out_trade_no": "20220223155946", "notify_url": "http://www.baidu.com", "amount": { "total": "9.90", "currency": "CNY" }, "payer": { "openid": "oZe5t50zsOSVi0O2sb" } } //使用的是 curl 请求的 private function sendHttpRequest($data,$url,$Authorization='') { $headers =array( 'Content-Type:application/json', 'Accept:application/json;', ); $curl = curl_init (); curl_setopt ( $curl, CURLOPT_URL, $url ); curl_setopt ( $curl, CURLOPT_SSL_VERIFYPEER, FALSE ); curl_setopt ( $curl, CURLOPT_SSL_VERIFYHOST, FALSE ); curl_setopt ( $curl, CURLOPT_POST, TRUE ); curl_setopt ( $curl, CURLOPT_POSTFIELDS,$data); curl_setopt ( $curl, CURLOPT_TIMEOUT, 30 ); curl_setopt ($curl, CURLOPT_HTTPHEADER, $headers); curl_setopt ($curl, CURLOPT_USERAGENT, array('User-Agent:'.$_SERVER['HTTP_USER_AGENT'])); curl_setopt($curl, CURLOPT_USERPWD, $Authorization); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); //CURLAUTH_DIGEST CURLAUTH_BASIC curl_setopt ( $curl, CURLOPT_RETURNTRANSFER, 1 ); $result = curl_exec ( $curl ); if (curl_errno ( $curl )) { } curl_close ( $curl ); return $result; } 请求之后 就报错 appid 不存在,我确实是 传了值的呀,麻烦大佬们帮我瞅瞅 是不是 curl 的问题
2022-02-23 - 输入源“/appid”映射到字段“公众号ID”必填性规则校验失败,此字段为必填项?
微信jsapi支付,V3 接口,没有使用官方的SDK; 提交的参数 { "appid": "wxb4263b9ec123455", "mchid": "123456", "description": "腾讯会员", "out_trade_no": "20220223155946", "notify_url": "http://www.baidu.com", "amount": { "total": "9.90", "currency": "CNY" }, "payer": { "openid": "oZe5t50zsOSVi0O2sb" } } //使用的是 curl 请求的 private function sendHttpRequest($data,$url,$Authorization='') { $headers =array( 'Content-Type:application/json', 'Accept:application/json;', ); $curl = curl_init (); curl_setopt ( $curl, CURLOPT_URL, $url ); curl_setopt ( $curl, CURLOPT_SSL_VERIFYPEER, FALSE ); curl_setopt ( $curl, CURLOPT_SSL_VERIFYHOST, FALSE ); curl_setopt ( $curl, CURLOPT_POST, TRUE ); curl_setopt ( $curl, CURLOPT_POSTFIELDS,$data); curl_setopt ( $curl, CURLOPT_TIMEOUT, 30 ); curl_setopt ($curl, CURLOPT_HTTPHEADER, $headers); curl_setopt ($curl, CURLOPT_USERAGENT, array('User-Agent:'.$_SERVER['HTTP_USER_AGENT'])); curl_setopt($curl, CURLOPT_USERPWD, $Authorization); curl_setopt($curl, CURLOPT_HTTPAUTH, CURLAUTH_DIGEST); //CURLAUTH_DIGEST CURLAUTH_BASIC curl_setopt ( $curl, CURLOPT_RETURNTRANSFER, 1 ); $result = curl_exec ( $curl ); if (curl_errno ( $curl )) { } curl_close ( $curl ); return $result; } 请求之后 就报错 appid 不存在,我确实是 传了值的呀,麻烦大佬们帮我瞅瞅 是不是 curl 的问题
2022-02-23