ThinkChat2.0新版上线,更智能更精彩,支持会话、画图、阅读、搜索等,送10W Token,即刻开启你的AI之旅 广告
## **支付宝小程序** 本教程比较长,请仔细观看,细节不要忽视,不然可能配置不成功 [https://open.alipay.com/platform/home.htm](https://open.alipay.com/platform/home.htm) 首先登陆支付宝开放平台,没有的就先注册 支付宝企业账号注册地址:https://certifyweb.alipay.com/certify/reg/guide#/ ![](https://img.kancloud.cn/97/18/97184f5bfe96c717ad0cd893353e3c3d_554x365.png) ![](https://img.kancloud.cn/38/00/3800403bfb6d5fe86775e9538a43e08c_553x316.png) ![](https://img.kancloud.cn/28/f9/28f96380d7def8aea10a3a6db2bfe847_554x391.png) ![](https://img.kancloud.cn/bf/c8/bfc83b6a3ebce2c925171e5f5030cda7_553x183.png) 添加能力之前先去小程序信息里面改一下类目 ![](https://img.kancloud.cn/7a/fa/7afa9e90fe94d0177c72c68c9414483b_495x130.png) 类目可以在添加完所有能力后再改成自己实际类目 ![](https://img.kancloud.cn/ea/ee/eaee1affbd3ff5cc838b4a0dc050ddea_554x382.png) ![](https://img.kancloud.cn/4c/b2/4cb23460e42078470e322915f275f9b7_554x445.png) ![](https://img.kancloud.cn/60/aa/60aa443486fad8d5e9a6b2ac1a1f90fe_554x318.png) ![](https://img.kancloud.cn/ca/f3/caf30cc62b7e604d844f50073dffe540_554x281.png) ![](https://img.kancloud.cn/b1/7f/b17fbad322963ff0c61777c4fd07c43c_554x399.png) ![](https://img.kancloud.cn/1d/be/1dbe4fcd6ee9e059e92812172078a0fd_554x323.png) ~~~ 接下来配置支付宝公钥私钥 ~~~ ![](https://img.kancloud.cn/09/ce/09ce613df23efd0825fb9de814f996c2_553x309.png) ![](https://img.kancloud.cn/84/90/84900ba9b8461ec9156d66be7d202bf0_554x398.png) 下载安装密钥工具 ![](https://img.kancloud.cn/d2/30/d2302a8feeaa7ba08e99350fdbbf8884_554x320.png) 打开工具直接生成密钥 ![](https://img.kancloud.cn/21/6a/216ad1ee64ca6799161f5d957b197791_1080x780.png) ![](https://img.kancloud.cn/0e/2f/0e2f440293853c613e8dc85ae280f718_553x378.png) 复制公钥填入下方截图保存设置 ![](https://img.kancloud.cn/57/53/5753ae8b7e462f2ff40ac7e6bbd95fc6_554x402.png) ![](https://img.kancloud.cn/7b/d5/7bd5d0e2a812794a36e810ad3764c08d_554x395.png) 复制上方支付宝公钥填入后台支付宝公钥框内 ![](https://img.kancloud.cn/e9/3d/e93df988db963b4617d96e4410f146b0_554x285.png) 打开工具生成的文件 ![](https://img.kancloud.cn/02/3f/023fbcaac3566866f5cc581bfb55e248_554x458.png) ![](https://img.kancloud.cn/b2/13/b213b95600e300b494665fa6289939d5_554x440.png) 打开文件应用私钥复制并填入后台 ![](https://img.kancloud.cn/d6/95/d695a282b8a2fb6e1509825f40b8d20b_1303x760.png) ~~~ 接下来设置接口内容加密方式生成密钥复制填入后台即可 ~~~ ![](https://img.kancloud.cn/3b/d2/3bd2f53c913a4b344f58bb999650d03e_554x349.png) ![](https://img.kancloud.cn/08/4a/084a500077e89346eaabb9ee45492e1e_554x189.png) ![](https://img.kancloud.cn/21/ed/21ede3ece67dd502044f477e0bbb0446_554x140.png) ![](https://img.kancloud.cn/d2/9f/d29fecc4dcfa2c47754c3184a86f61ce_553x346.png) ![](https://img.kancloud.cn/04/a2/04a28771831d23006547bd5c69b5dae4_554x344.png) ![](https://img.kancloud.cn/98/32/98320e7b04b4e325db27a47c376019f5_554x267.png) ![](https://img.kancloud.cn/bd/23/bd23277288d139fcc2aa86341cb0beb7_554x257.png) ![](https://img.kancloud.cn/a2/ad/a2ad69fa00339389dda55f4daf57ae61_554x184.png) ![](https://img.kancloud.cn/94/68/94683983cffd18f79682ee225605668f_554x284.png) ![](https://img.kancloud.cn/93/6b/936b9d884e1484a3d96fafbb6f758996_553x188.png) ![](https://img.kancloud.cn/98/86/988678d60c22e891edd226a35ed2a094_554x291.png) ![](https://img.kancloud.cn/77/2b/772b8df2b83e1b13a1eb05bf6880630f_553x356.png) ![](https://img.kancloud.cn/6d/4a/6d4a4fde543750d44ab1d0b36df3b313_553x178.png) ![](https://img.kancloud.cn/f3/05/f3059e0cae13242e7b0edd313a7a2d19_553x356.png) ![](https://img.kancloud.cn/c9/35/c935895f39a3ff1a20145bfad1e2af2d_554x232.png) ![](https://img.kancloud.cn/13/d3/13d3c85fdd5ae0d80da7f47c24c89e03_554x321.png) ![](https://img.kancloud.cn/cf/53/cf53d58062e246eb94a2950b99312ade_554x213.png) ![](https://img.kancloud.cn/a5/34/a5340c503531913b796c0702d8f107db_554x247.png) 这里代运营授权,后台可以不用填写,直接去开发者平台创建门店即可(授权也就是为了创建门店)和下面图功能是一样的但这里只能授权一个。 ![](https://img.kancloud.cn/93/6b/936b9d884e1484a3d96fafbb6f758996_553x188.png) ![](https://img.kancloud.cn/9e/20/9e20cd19b8cfef832a0437c2392c7f63_554x292.png) 这里后台可以不填写,和开发者平台创建门店是一样的而且这里只能填写一个门店信息并且需要先在开发者平台先创建门店并绑定后这里才会出现门店ID. ![](https://img.kancloud.cn/a2/83/a283d211b17905e20973e705cee66872_554x273.png) ![](https://img.kancloud.cn/5e/14/5e144672fd6e477a47f1eaac118d126d_554x211.png) ![](https://img.kancloud.cn/d7/09/d709a4fee919b4867edfbc261c64627a_554x135.png) 将你的后台域名和apis.map.qq.com添加进去 ![](https://img.kancloud.cn/6f/ea/6fea66dc2e0eef7c17f78e58b5b5f3bd_554x291.png) ![](https://img.kancloud.cn/f0/32/f03295c46439956b7cb88cbfe6334275_553x128.png) ![](https://img.kancloud.cn/4e/6f/4e6f87e0d38a09465e5d94b11602a71a_553x253.png) ![](https://img.kancloud.cn/b2/c6/b2c6ed8a2cd3b44550aa7f845c3c361d_554x352.png) ![](https://img.kancloud.cn/23/cb/23cbe565573c190ffe6195af6a94af64_554x234.png) ![](https://img.kancloud.cn/f0/df/f0dfc696cc110c3462d6fcc778e95c26_554x319.png) ![](https://img.kancloud.cn/3d/03/3d03d208b62df11b5d08e1af4608d5d9_554x413.png) ![](https://img.kancloud.cn/d8/84/d88474b54aeb5d2524eb4a73ea4f55ab_554x319.png) ![](https://img.kancloud.cn/bf/40/bf4008d57a4b6356200ad1ff290fbbce_554x529.png) 把你添加成为支付宝小程序的开发者 ![](https://img.kancloud.cn/44/5f/445fed352d51b11455ef732ab87883e8_554x511.png) ![](https://img.kancloud.cn/61/0b/610b4d548d1739f3e371c6962c3810d8_553x259.png) ![](https://img.kancloud.cn/a4/c4/a4c44498b919d05564bf18f2f4be3973_553x419.png) 服务类目先选择这个,不然模板消息对不上 ![](https://img.kancloud.cn/94/c8/94c814c2660365f0486cb046294c18b2_553x430.png) ![](https://img.kancloud.cn/35/41/354149ed69a4f599760907bbe8df67be_554x813.png) ![](https://img.kancloud.cn/84/51/84518c8941c903407952a3be4a1c1be4_1889x911.png) ![](https://img.kancloud.cn/8f/88/8f88741e67c1adb1fe782ae91faff3ee_553x409.png) ![](https://img.kancloud.cn/aa/61/aa61ca5fbbb19979bf9c0430ef5c86b0_554x340.png) ![](https://img.kancloud.cn/13/8f/138f7934802e867ea6ba461b7963b6f5_553x196.png) ![](https://img.kancloud.cn/fb/71/fb711c621a6e45a018c28f58ae3b3992_553x121.png) ![](https://img.kancloud.cn/e3/b1/e3b1429ba5285c5d5d7bcd4dddfd7bcb_554x306.png) ![](https://img.kancloud.cn/80/fd/80fdcd2fe8c9fbccfd769145ceabbf5e_554x337.png) ![](https://img.kancloud.cn/49/a5/49a5cb91cae3767cd3cf9a2eb2147f47_554x415.png) ![](https://img.kancloud.cn/df/d4/dfd46858032b4be47b3f057b1539e829_553x295.png) ![](https://img.kancloud.cn/8d/e9/8de965fde431fd4adea54055b2d3e5e5_214x271.png) ![](https://img.kancloud.cn/84/2d/842d42005e4df7e92f5ee6d8bb1e2f64_407x295.png) ![](https://img.kancloud.cn/b1/53/b153e8617463bfbce849a42b3754fc77_554x323.png) ![](https://img.kancloud.cn/72/a9/72a933f6c23ec73a83fa5b4af2355f15_554x693.png) 修改为你的ID和后台域名,如果是独立版的请删除/app/index.php,微擎版的只需要改域名 ![](https://img.kancloud.cn/99/31/993133a0199d2928db284282b378ac78_554x302.png) ![](https://img.kancloud.cn/80/62/8062d5ecc56db18ff577f1df4a2784dd_554x237.png) ![](https://img.kancloud.cn/0c/57/0c57965b3627cb05ff337371a4efe9ac_554x693.png) 改好之后保存,然后打开支付宝开发者工具 ![](https://img.kancloud.cn/27/60/2760aefd8e64917bcf5d636e27ee5cad_553x388.png) ![](https://img.kancloud.cn/4f/4d/4f4dd10f2730fbbf4d0680515983354b_554x339.png) ![](https://img.kancloud.cn/f0/6b/f06bab7955d1d057c634308900a67efc_553x388.png) ![](https://img.kancloud.cn/3e/27/3e27724b67711d546c5c09d40cbdfa62_553x300.png) 右边没画面的把模拟器打开,记得登录支付宝选择支付宝小程序,然后等待编译 ![](https://img.kancloud.cn/64/cf/64cfeaf61a6743d6147b4acca7b939dc_554x659.png) ![](https://img.kancloud.cn/be/b2/beb2525898b8d68681590ce6ca587dd2_554x287.png) ![](https://img.kancloud.cn/ee/ed/eeedafb578b80a3f95df5a06de3db6aa_243x145.png) ![](https://img.kancloud.cn/96/51/965124bafecd373bab01e89bf3e53cfa_554x368.png) ![](https://img.kancloud.cn/a8/a3/a8a34d6063b9f541c7235ad2784d2dcb_553x266.png) ![](https://img.kancloud.cn/71/d2/71d2b74e548788a25eb5a8668e527c5d_554x387.png) ![](https://img.kancloud.cn/50/67/506745ad076762094c17d096bd3b5c16_554x392.png) 审核通过即可 ![](https://img.kancloud.cn/52/3b/523b01a4d07678b3a0b578c9795f01c6_553x375.png)