{"id":439294,"date":"2021-04-15T23:12:52","date_gmt":"2021-04-15T15:12:52","guid":{"rendered":"http:\/\/4563.org\/?p=439294"},"modified":"2021-04-15T23:12:52","modified_gmt":"2021-04-15T15:12:52","slug":"%e6%89%8b%e6%92%b8%e4%ba%86%e4%b8%aa%e5%be%ae%e4%bf%a1%e6%94%af%e4%bb%98-v3-%e7%89%88%e7%9a%84-sdk","status":"publish","type":"post","link":"http:\/\/4563.org\/?p=439294","title":{"rendered":"\u624b\u64b8\u4e86\u4e2a\u5fae\u4fe1\u652f\u4ed8 v3 \u7248\u7684 sdk"},"content":{"rendered":"<div>\n<div>\n<div>\n<h1>                  \u624b\u64b8\u4e86\u4e2a\u5fae\u4fe1\u652f\u4ed8 v3 \u7248\u7684 sdk               <\/h1>\n<p> <\/p>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : jstony <\/span>  <span><i><\/i> 0<\/span> <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<\/p><\/div>\n<div isfirst=\"1\"> <\/p>\n<h1>wechatpayv3<\/h1>\n<p> <\/p>\n<p><img decoding=\"async\" loading=\"lazy\" referrerpolicy=\"no-referrer\" rel=\"noreferrer\" src=\"http:\/\/4563.org\/wp-content\/uploads\/2021\/04\/20210419_607d5a8c19ed1.svg\" alt=\"\u624b\u64b8\u4e86\u4e2a\u5fae\u4fe1\u652f\u4ed8 v3 \u7248\u7684 sdk\" \/><\/p>\n<h2>\u4ecb\u7ecd<\/h2>\n<p>https:\/\/github.com\/minibear2021\/wechatpayv3<\/p>\n<p>\u5fae\u4fe1\u652f\u4ed8 v3 \u7248\u53d1\u5e03\u5f88\u4e45\uff0c\u5b98\u65b9\u53ea\u7ed9\u4e86 java \u548c go \u7684 sdk\uff0c\u65e0\u5948\u624b\u64b8\u4e86\u4e2a python \u7248\u7684\u5148\u9876\u7740\u3002<\/p>\n<h2>\u5b89\u88c5<\/h2>\n<pre><code>$ pip install wechatpayv3 <\/code><\/pre>\n<h2>\u4f7f\u7528\u65b9\u6cd5<\/h2>\n<h3>\u51c6\u5907<\/h3>\n<p>\u53c2\u8003\u5fae\u4fe1\u5b98\u65b9\u6587\u6863\u51c6\u5907\u597d\u5bc6\u94a5, \u8bc1\u4e66\u6587\u4ef6\u548c\u914d\u7f6e(\u8bc1\u4e66 \/\u5bc6\u94a5 \/\u7b7e\u540d\u4ecb\u7ecd)<\/p>\n<h3>\u521d\u59cb\u5316<\/h3>\n<pre><code>from wechatpayv3 import WeChatPay, WeChatPayType  MCHID = '1230000109'  MCH_PRIVATE_KEY = 'MIIEvwIBADANBgkqhkiG9w0BAQE...' MCH_KEY_SERIAL_NO = '444F4864EA9B34415...' WECHAT_PUBLIC_KEY = 'MIIEvwIBADANBgkqhkiG9w0BAQE...' APPID = 'wxd678efh567hg6787' NOTIFY_URL = 'https:\/\/www.weixin.qq.com\/wxpay\/pay.php'  wxpay = WeChatPay(wechatpay_type=WeChatPayType.MINIPROG,                   mchid=MCHID,                   mch_parivate_key=MCH_PRIVATE_KEY,                   mch_key_serial_no=MCH_KEY_SERIAL_NO,                   wechat_public_key=WECHAT_PUBLIC_KEY,                   appid=APPID,                   notify_url=NOTIFY_URL) <\/code><\/pre>\n<h3>\u63a5\u53e3<\/h3>\n<p>\u53c2\u8003<code>examples.py<\/code>\u3002<\/p>\n<\/p><\/div>\n<div> <b>\u5927\u4f6c\u6709\u8a71\u8aaa<\/b> (<span>5<\/span>)        <\/div>\n<div> <\/div>\n<\/p><\/div>\n<\/p><\/div>\n<ul>\n<li data-pid=\"5754367\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : 7075 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u641e\u4e2a nodejs \u7248\u7684\u4e0d\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5754368\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : wikinee <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u5927\u4f6c\u82b1\u4e86\u591a\u4e45                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5754369\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : cz5424 <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u8ddf\u4e4b\u524d\u7684\u6709\u4ec0\u4e48\u533a\u522b\u3002\uff1f\uff1f                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5754370\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u8cc7\u6df1\u5927\u4f6c : coreki <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             \u661f\u661f\u9001\u4e0a                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li data-pid=\"5754371\" data-uid=\"2\">\n<div>\n<div>\n<div> <span>\u4e3b<\/span> <span>\u8cc7\u6df1\u5927\u4f6c : jstony <\/span>  <\/div>\n<div> <i title=\"\u5f15\u7528\"><\/i>  <span>          <\/span> <\/div>\n<\/p><\/div>\n<div>                                                             @7075 \u5c31\u8fd9\u4e24\u5929\uff0c\u4e3b\u8981\u770b\u4e0b\u6587\u6863\u7814\u7a76\u4e0b\u65b0\u7248\u63a5\u53e3\u7684\u903b\u8f91\u3002                                                            <\/div>\n<\/p><\/div>\n<\/li>\n<li>\n","protected":false},"excerpt":{"rendered":"<p>\u624b\u64b8\u4e86\u4e2a\u5fae\u4fe1\u652f\u4ed8 v3 \u7248\u7684 sd&hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[],"tags":[],"_links":{"self":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/439294"}],"collection":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=439294"}],"version-history":[{"count":0,"href":"http:\/\/4563.org\/index.php?rest_route=\/wp\/v2\/posts\/439294\/revisions"}],"wp:attachment":[{"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=439294"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=439294"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/4563.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=439294"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}