V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
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 · 2015-06-19 10:46:36 +08:00 · 15603 次点击
    这是一个创建于 3240 天前的主题,其中的信息可能已经有所发展或是发生改变。
    调试了很久,就是找不到原因,return_url是有用的

    或者大家有对接过的python库可以用的吗,在django中使的
    第 1 条附言  ·  2015-06-19 14:52:08 +08:00
    找到问题了,支付宝调用了notify_url,可是被我csrf拦住了,403了
    18 条回复    2015-06-21 23:59:04 +08:00
    aru
        1
    aru  
       2015-06-19 10:53:54 +08:00
    你用http还是https的地址?
    据传https的地址可能有问题
    pythonee
        2
    pythonee  
    OP
       2015-06-19 10:54:30 +08:00
    @aru http的
    kevin8096
        3
    kevin8096  
       2015-06-19 11:05:22 +08:00
    看看字符中又没有特殊字符串 单引号之类的
    pubby
        4
    pubby  
       2015-06-19 11:16:24 +08:00 via Android
    外网能访问那个URL吗?
    pythonee
        5
    pythonee  
    OP
       2015-06-19 11:18:00 +08:00
    @pubby 可以的
    pythonee
        6
    pythonee  
    OP
       2015-06-19 11:18:20 +08:00
    @kevin8096 这个做了urlencode了
    xzl
        7
    xzl  
       2015-06-19 11:23:12 +08:00
    @aru 我是这样的,证书不被接受的问题,所以我针对阿里过来的ip默认不走https。
    tabris17
        8
    tabris17  
       2015-06-19 11:25:19 +08:00
    你在服务器上ping下淘宝,看看能不能通,再看看服务器日志有没有notify_url的访问。
    billyyuan
        9
    billyyuan  
       2015-06-19 12:45:01 +08:00
    这个我弄过,不过我是客户端,服务器是其它人做的,最好是设置一下白名单。
    sciooga
        10
    sciooga  
       2015-06-19 13:53:25 +08:00
    notify_url 应该以反斜杠结尾
    sciooga
        11
    sciooga  
       2015-06-19 13:54:01 +08:00
    @sciooga 正斜杠...
    gkiwi
        12
    gkiwi  
       2015-06-19 14:14:24 +08:00
    看下nginx或者apache的请求日志。应该是他们过来了,只是和你的有些出入。他们文档烂,但是服务没啥问题。
    predator
        13
    predator  
       2015-06-19 14:32:24 +08:00
    而且支付宝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
       2015-06-19 14:40:02 +08:00
    @gkiwi

    找到问题了,果然是过来了,可是被我csrf拦住了
    fising
        15
    fising  
       2015-06-19 14:58:57 +08:00
    还有一种可能,被防火墙作为DDoS请求拦住了。
    gkiwi
        16
    gkiwi  
       2015-06-19 15:36:39 +08:00
    qihboy
        17
    qihboy  
       2015-06-19 22:30:25 +08:00
    已经找到问题就好。我们曾经被https折磨过,直接访问那个https没问题,但支付宝notify的时候就是不成功,原因是支付宝对ssl证书好像也有检查,而那种免费的ssl证书通不过检查。
    后来没办法就只好改成http notify了
    mingyun
        18
    mingyun  
       2015-06-21 23:59:04 +08:00
    @qihboy 还有这个坑
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   2146 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 25ms · UTC 11:24 · PVG 19:24 · LAX 04:24 · JFK 07:24
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.