ThinkChat🤖让你学习和工作更高效,注册即送10W Token,即刻开启你的AI之旅 广告
<div class="article-body kancloud-markdown-body"><h3><a id="_0"></a>基础配置</h3> <p><img src="https://box.kancloud.cn/de5a4982d278a0bfb8a35c608b967884_861x620.png" alt=""><br><br></p> <h4><a id="APPIDAppSecret_4"></a><strong>填写小程序APPID和小程序密钥AppSecret</strong></h4> <ul><li>登录微信小程序平台--&gt;开发--&gt;开发设置 将小程序参数填写到商城后台<br><img src="https://box.kancloud.cn/a6072692319cd73a8f650f68e03c2c68_964x517.png" alt=""><br><br></li></ul> <h4><a id="mpweixinqqcom_9"></a><strong>将商城访问网址域名填写到小程序后台(<a href="http://mp.weixin.qq.com" target="_blank">mp.weixin.qq.com</a>)设置—开发设置—服务器域名</strong></h4> <p><img src="https://box.kancloud.cn/15226de733e91259386afc103b73c122_901x836.png" alt=""><br><br></p> <h2><a id="_13"></a><strong>完成上面的两个步骤就实现了微信小程序和商城后台的相互关联,如商城不需要支付功能可以不用配置下面操作,如果需要微信支付,必须配置以下操作</strong></h2> <hr> <hr> <hr> <hr> <hr> <hr> <h4><a id="mpweixinqqcomhttpspayweixinqqcomAPI_20"></a><strong>配置微信支付,微信小程序后台(<a href="http://mp.weixin.qq.com" target="_blank">mp.weixin.qq.com</a>)必须先申请开通微信支付,开通后,登陆微信支付商户平台(<a href="https://pay.weixin.qq.com" target="_blank">https://pay.weixin.qq.com</a>)下载API证书,证书解压好后用记事本打开,全选复制粘贴到商城后台</strong></h4> <p><img src="https://box.kancloud.cn/db965b959c0c3c36ce9301527732cf29_592x595.png" alt=""></p> <h4><a id="_23"></a><strong>微信支付相关参数获取:</strong></h4> <p>新版商户平台证书获取教程:<a href="http://kf.qq.com/faq/161222NneAJf161222U7fARv.html" target="_blank">http://kf.qq.com/faq/161222NneAJf161222U7fARv.html</a><br> 登陆小程序后台(<a href="https://mp.weixin.qq.com" target="_blank">https://mp.weixin.qq.com</a>):<br> 点“微信支付”<br> 若,未开通,则需要开通<br><img src="https://box.kancloud.cn/c53ce01e06c922b33ef983b22512ba68_1139x959.png" alt=""><br> 商户号及密码已发送至邮箱xxxxx@qq.com。登陆邮箱找到微信支付商户平台相关信息<br><img src="https://box.kancloud.cn/40da959356782497437ed9aa8279b4f8_757x532.png" alt=""><br> 登陆微信支付|商户平台(<a href="https://pay.weixin.qq.com" target="_blank">https://pay.weixin.qq.com</a>)<br><img src="https://box.kancloud.cn/7bf2fde42dc190351924323d19fc8a0b_1266x918.png" alt=""><br> 设置32位API秘钥、下载API支付证书(apiclient_cert.pem和apiclient_key.pem)并解压用记事本打开——复制,粘贴到对应配置位置</p> </div>