公钥文件也要注意不是是从微信支付后台下载的商户证书. 通过接口下载平台证书, 需要解密: https://api.mch.weixin.qq.com/v3/certificates
微信支付海关申报国际版 - 身份信息验证API - 敏感信息加密回执: 平台私钥解密失败?微信支付海关申报国际版 - 身份信息验证API https://pay.weixin.qq.com/wiki/doc/api/wxpay/en/declarecustom/chapter3_2.shtml 上面👆API有老哥使用过吗? https://pay.weixin.qq.com/wiki/doc/apiv3_partner/wechatpay/wechatpay6_0.shtml 使用微信支付发布的工具加密后的信息还是提示平台私钥解密失败 敏感信息加密后在V3 API里可以正常调用, 但就这个接口一直调用不通, 有老哥碰到过嘛
2022-02-17curl --location --request GET 'h5_url' \ --header 'Referer: http://redirecturl/' \ --header 'Authorization: {{auth}}' 返回的是html, 从中查找到 pay url: weixin://wap/pay?prepayid*** pay url在浏览器打开后会跳转到微信客户端. 微信Mac PC客户端跳转后, 还不能进行付款. Iphone 8手机, 用Chrome浏览器没有办法跳转到客户端, 但是用safari就可以
V3版微信h5支付api 生成的h5_url在浏览器中打开后提示商家参数格式有误,请联系商家解决?https://wx.tenpay.com/cgi-bin/mmpayweb-bin/checkmweb?prepay_id=wx11154712050918810c7c748571cb8f0000&package=1562167429 请求地址如上,通过url在浏览器访问报错:商家参数格式有误,请联系商家解决
2021-10-26手机浏览器里打开链接, 会跳转到微信客户端, 然后付款 ios手机可以通过safri浏览器 weixin://wap/pay?prepayid%3Dwx19110418556374f27563dabe9c52670000&package=676138724&noncestr=1634612685&sign=b73571d0f1768bf78782b67d2593b827
微信H5支付 如何通过h5_url调起微信支付中间页如下是h5_url如返回的页面信息, 要怎么支付呢 <!DOCTYPE html> <html> <head lang="en"> <meta http-equiv=Content-Type content="text/html;charset=utf-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0"> <meta name="apple-mobile-web-app-capable" content="yes"> <meta name="apple-mobile-web-app-status-bar-style" content="black"> <meta name="format-detection" content="telephone=no"> <title>weixin</title> <style>.f10{font-size:10px}.f11{font-size:11px}.f12{font-size:12px}.f13{font-size:13px}.f14{font-size:14px}.f15{font-size:15px}.f16{font-size:16px}.f17{font-size:17px}.f18{font-size:18px}.f19{font-size:19px}.f20{font-size:20px}body{font-size:14px}h1,h2,h3,h4,h5{font-weight:400;font-style:normal}h1,.h1{font-size:20px}h2,.h2{font-size:18px}h3,.h3{font-size:16px}h4,.h4{font-size:14px}h5,.h5{font-size:12px}a,a:visited{color:#007aff}.text_color{color:#888}.title_color{color:#000}.desc{color:#b2b2b2}.warn{color:#b71414}.nickname{color:#576b95}.tips{font-size:13px;color:#b2b2b2}body{background-color:#fff}body.msg_dark{background-color:#2e3132;color:#fff}.page_msg{padding:75px 15px 0;text-align:center}.icon_area{margin-bottom:19px}.text_area{margin-bottom:25px}.text_area .title{margin-bottom:12px}.opr_area{margin-bottom:25px}.extra_area{margin-bottom:20px}@media screen and (min-height:416px){.extra_area{position:fixed;left:0;bottom:0;width:100%}}.btn{display:block;margin-left:auto;margin-right:auto;padding-left:14px;padding-right:14px;font-size:16px;text-align:center;text-decoration:none;overflow:visible;height:40px;border-radius:5px;-moz-border-radius:5px;-webkit-border-radius:5px;box-sizing:border-box;-moz-box-sizing:border-box;-webkit-box-sizing:border-box;color:#fff;line-height:40px;-webkit-tap-highlight-color:rgba(255,255,255,0)}.btn.btn_inline{display:inline-block}.btn_default{background-color:#d1d1d1}.btn_default:not(.btn_disabled):visited{color:#fff}.btn_default:not(.btn_disabled):active{color:rgba(255,255,255,.4);background-color:#a7a7a7}.btn_primary{background-color:#04be02}.btn_primary:not(.btn_disabled):visited{color:#fff}.btn_primary:not(.btn_disabled):active{color:rgba(255,255,255,.4);background-color:#039702}.btn_warn{background-color:#ef4f4f}.btn_warn:not(.btn_disabled):visited{color:#fff}.btn_warn:not(.btn_disabled):active{color:rgba(255,255,255,.4);background-color:#c13e3e}.btn.btn_mini{height:25px;line-height:25px;font-size:14px}button.btn,input.btn{width:100%;border:0;outline:0;-webkit-appearance:none}button.btn:focus,input.btn:focus{outline:0}button.btn_inline,input.btn_inline{width:auto}.btn_disabled{color:rgba(255,255,255,.6)}.btn+.btn{margin-top:10px}.btn.btn_inline+.btn.btn_inline{margin-top:auto;margin-left:10px}.btn_area{margin-left:-5px;margin-right:-5px;font-size:0}.btn_area.btn_area_inline{margin-left:auto;margin-right:auto;display:-webkit-box;display:-webkit-flex;display:-moz-box;display:-ms-flexbox;display:flex}.btn_area.btn_area_inline .btn{margin-top:auto;margin-right:10px;width:100%;-webkit-box-flex:1;-webkit-flex:1;-moz-box-flex:1;-ms-flex:1;box-flex:1;flex:1;display:inline-block \9;width:48% \9;margin-left:1% \9;margin-right:1% \9}.btn_area.btn_area_inline .btn:last-child{margin-right:0}span.btn button{display:block;width:100%;height:100%;background-color:transparent;border:0;outline:0;color:#fff}span.btn button:active{color:rgba(255,255,255,.4)}span.btn.btn_loading button,span.btn.btn_disabled button{color:#fff}.icon_msg{width:100px;height:100px;vertical-align:middle;display:inline-block;border-radius:50%;-moz-border-radius:50%;-webkit-border-radius:50%}.icon_msg.warn{background-color:#f86161;color:#fff;font-size:60px;font-style:normal}html{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%}body{font:14px/1.5em "Helvetica Neue",Helvetica,Arial,sans-serif;background-color:#efeff4;line-height:1.6}body,h1,h2,h3,h4,h5,p,ul,ol,dl,dd,fieldset,textarea{margin:0}fieldset,legend,textarea,input,button{padding:0}button,input,select,textarea{font-family:inherit;font-size:100%;margin:0;*font-family:"Helvetica Neue",Helvetica,Arial,sans-serif}ul,ol{padding-left:0;list-style-type:none}a img,fieldset{border:0}a{text-decoration:none}</style> </head> <body> <div class="body"> <div id="errpage" class="page_msg"> </div> </div> <script src="//wx.gtimg.com/wxpay_h5/fingerprint2.min.1.4.1.js"></script> <script type="text/javascript"> var is_postmsg=""; if( 0!==0 && is_postmsg=="1" ) { parent.postMessage(JSON.stringify({ action : "send_deeplink_fail", data : { deeplink : "" }, error : { error_code : "0", error_msg : "ok" } }), ""); } if( 0===0) { window.onload=function() { // var fp=new Fingerprint2(); // fp.get(function(result) { // var fingerprint=""; /* if(fingerprint!=result && fingerprint) { document.getElementById("errpage").innerHTML='<div class="icon_area"><i class="icon_msg warn">!</i></div> \ <div class="text_area"> \ <h2 id="111" class="title"> '+result+'网络环境未能通过安全验证,请稍后再试</h2> \ </div>'; return; }*/ var is_postmsg=""; if(is_postmsg=="1") { parent.postMessage(JSON.stringify({ action : "send_deeplink", data : { deeplink : "weixin://wap/pay?prepayid%3Dwx19110418556374f27563dabe9c52670000&package=676138724&noncestr=1634612685&sign=b73571d0f1768bf78782b67d2593b827" } }), ""); } else { var url="weixin://wap/pay?prepayid%3Dwx19110418556374f27563dabe9c52670000&package=676138724&noncestr=1634612685&sign=b73571d0f1768bf78782b67d2593b827"; var redirect_url=""; top.location.href=url; if(redirect_url) { setTimeout( function(){ top.location.href=redirect_url; }, 5000 ); } else { setTimeout( function(){ window.history.back(); }, 5000); } } } // ); } } </script> </body> </html>
2021-10-19