推荐学习书目
› Learn Python the Hard Way
Python Sites
› PyPI - Python Package Index
› http://diveintopython.org/toc/index.html
› Pocoo
值得关注的项目
› PyPy
› Celery
› Jinja2
› Read the Docs
› gevent
› pyenv
› virtualenv
› Stackless Python
› Beautiful Soup
› 结巴中文分词
› Green Unicorn
› Sentry
› Shovel
› Pyflakes
› pytest
Python 编程
› pep8 Checker
Styles
› PEP 8
› Google Python Style Guide
› Code Style from The Hitchhiker's Guide
chengxiao
V2EX  ›  Python

请教各位大佬,有没有微信支付的 Django 案例?

  •  
  •   chengxiao · Nov 13, 2017 · 5800 views
    This topic created in 3238 days ago, the information mentioned may be changed or developed.
    在写一个公众号的小玩意,不过在微信支付这里碰到坑了....
    7 replies  •  2018-07-02 09:16:39 +08:00
    zhengxiaowai
        1
    zhengxiaowai  
       Nov 13, 2017
    有,前年做过。。。
    unknowfly
        2
    unknowfly  
       Nov 13, 2017
    用 wechatpy 的话应该没有什么坑吧
    chengxiao
        3
    chengxiao  
    OP
       Nov 13, 2017
    @zhengxiaowai 可以参考一下么?
    Macuilxochitl
        4
    Macuilxochitl  
       Nov 13, 2017
    可以用 weixin-python,前两天才用 tornado 和它做了微信支付的功能
    https://github.com/zwczou/weixin-python
    chengxiao
        5
    chengxiao  
    OP
       Nov 15, 2017
    @Macuilxochitl 可以给个代码示例么?主要是搞不清楚整个流程,怎么发起支付求情....
    Macuilxochitl
        6
    Macuilxochitl  
       Nov 15, 2017
    @chengxiao
    import weixin-python
    pay = WeixinPay(appid,微信商户 id,微信商户 KEY,微信回调地址)
    order_string = pay.unified_order(trade_type=支付方式,product_id=商品 ID, body=标题, out_trade_no=订单号, total_fee=金额, attach=额外信息)
    如果你填的东西正确,order_string 就是微信给你返回的东西,比如选择二维码付款的话就会给你返回二维码链接
    haoji
        7
    haoji  
       Jul 2, 2018
    https://github.com/mrhaoji/django-wechat-pay

    Django + wechatpy 做的微信小程序端微信支付 demo
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2657 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 52ms · UTC 02:36 · PVG 10:36 · LAX 19:36 · JFK 22:36
    ♥ Do have faith in what you're doing.