推荐学习书目
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
pythonee
V2EX  ›  Python

支付宝的 notify_url 一直没有被调用,根本没有异步通知?

  •  
  •   pythonee · Jun 19, 2015 · 16256 views
    This topic created in 4005 days ago, the information mentioned may be changed or developed.
    调试了很久,就是找不到原因,return_url是有用的

    或者大家有对接过的python库可以用的吗,在django中使的
    Supplement 1  ·  Jun 19, 2015
    找到问题了,支付宝调用了notify_url,可是被我csrf拦住了,403了
    18 replies    2015-06-21 23:59:04 +08:00
    aru
        1
    aru  
       Jun 19, 2015
    你用http还是https的地址?
    据传https的地址可能有问题
    pythonee
        2
    pythonee  
    OP
       Jun 19, 2015
    @aru http的
    kevin8096
        3
    kevin8096  
       Jun 19, 2015
    看看字符中又没有特殊字符串 单引号之类的
    pubby
        4
    pubby  
       Jun 19, 2015 via Android
    外网能访问那个URL吗?
    pythonee
        5
    pythonee  
    OP
       Jun 19, 2015
    @pubby 可以的
    pythonee
        6
    pythonee  
    OP
       Jun 19, 2015
    @kevin8096 这个做了urlencode了
    xzl
        7
    xzl  
       Jun 19, 2015
    @aru 我是这样的,证书不被接受的问题,所以我针对阿里过来的ip默认不走https。
    tabris17
        8
    tabris17  
       Jun 19, 2015
    你在服务器上ping下淘宝,看看能不能通,再看看服务器日志有没有notify_url的访问。
    billyyuan
        9
    billyyuan  
       Jun 19, 2015
    这个我弄过,不过我是客户端,服务器是其它人做的,最好是设置一下白名单。
    sciooga
        10
    sciooga  
       Jun 19, 2015
    notify_url 应该以反斜杠结尾
    sciooga
        11
    sciooga  
       Jun 19, 2015
    @sciooga 正斜杠...
    gkiwi
        12
    gkiwi  
       Jun 19, 2015
    看下nginx或者apache的请求日志。应该是他们过来了,只是和你的有些出入。他们文档烂,但是服务没啥问题。
    predator
        13
    predator  
       Jun 19, 2015
    而且支付宝notify还是多次重试的,没理由抓不到
    找人tail下web服务器日志
    我这边记录到的支付宝notify来源包括:
    110.75.152.1
    110.75.152.2
    110.75.152.80
    110.75.242.0/24
    (不一定适用于你的服务器,仅供参考)
    pythonee
        14
    pythonee  
    OP
       Jun 19, 2015
    @gkiwi

    找到问题了,果然是过来了,可是被我csrf拦住了
    fising
        15
    fising  
       Jun 19, 2015
    还有一种可能,被防火墙作为DDoS请求拦住了。
    gkiwi
        16
    gkiwi  
       Jun 19, 2015
    qihboy
        17
    qihboy  
       Jun 19, 2015
    已经找到问题就好。我们曾经被https折磨过,直接访问那个https没问题,但支付宝notify的时候就是不成功,原因是支付宝对ssl证书好像也有检查,而那种免费的ssl证书通不过检查。
    后来没办法就只好改成http notify了
    mingyun
        18
    mingyun  
       Jun 21, 2015
    @qihboy 还有这个坑
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   1016 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 72ms · UTC 23:08 · PVG 07:08 · LAX 16:08 · JFK 19:08
    ♥ Do have faith in what you're doing.