lxneng / alipay Goto Github PK
View Code? Open in Web Editor NEWAn Unofficial Alipay API for Python
An Unofficial Alipay API for Python
alipay.verify_notify(**request.args) failed in flask 0.10,
Are there any examples in Flask?
verify_notify验证生成md5的sign和支付宝post过来的始终不一致,求解答
No APIs for cross border trading.
These APIs should be added for foreigners.
sudo pip install alipay==0.2.4
Downloading/unpacking alipay==0.2.4
Downloading alipay-0.2.4.tar.gz
Running setup.py (path:/tmp/pip_build_root/alipay/setup.py) egg_info for package alipay
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/alipay/setup.py", line 7, in <module>
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
IOError: [Errno 2] No such file or directory: '/tmp/pip_build_root/alipay/CHANGES.rst'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 17, in <module>
File "/tmp/pip_build_root/alipay/setup.py", line 7, in <module>
CHANGES = open(os.path.join(here, 'CHANGES.rst')).read()
IOError: [Errno 2] No such file or directory: '/tmp/pip_build_root/alipay/CHANGES.rst'
----------------------------------------
Cleaning up...
对pip而言仅仅更新版本号不行吗?
alipay_wap = Alipay(pid='your_alipay_pid', key='your_alipay_key', seller_id='your_seller_id')
是否应该为
alipay_wap = WapAlipay(pid='your_alipay_pid', key='your_alipay_key', seller_id='your_seller_id')
def notify_url_handler(request):
if request.method=='POST':
if alipay.verify_notify(**request.POST.dict()):
a=Personblling.objects.create(user_id=1,billingmoney=2,billingstatus=True,trade_no=12)
return HttpResponse("success")
else:
return HttpResponse("failed")
else:
return HttpResponse("failed")
直接访问连接有用,但是支付后a那条操作无法执行
https://doc.open.alipay.com/doc2/detail.htm?treeId=203&articleId=105463&docType=1
文档介绍 wap 下生成的是 m.alipay.com 开头的 url
这里生成的是 mapi.alipay.com/gateway.do 开头的
不能唤起 支付宝 App ,需要手动拼接成 m.alipay.com 的 url 吗?
def alipy_notify(request):
if alipay.verify_notify(**request.POST):
# this is a valid notify, code business logic here
else:
# this is a invalid notify
alipay.verify_notify(**request.args) failed
对比过示例的pyramid的 request.params
pyramid的request.params是
NestedMultiDict([(u'a', u'111'), (u'b', u'cccc')])
flask的
MultiDict([('a', u'111'), ('b', u'cccc')])
看起来区别好像是 key 一个为 unicode,另一个不是
values 两者都是unicode
您上次让我检查 values 是不是utf-8 编码,那示例应该是能够成功的吧,示例的pyramid也是unicode的
我看的文档https://doc.open.alipay.com/docs/api.htm?spm=a219a.7395905.0.0.wItNMR&docType=4&apiId=862 sign_type 都是RSA 为什么你的封装签名中用的是MD5 文档中说只支持RSA和RSA2呀 难道我看的是假文档?
Would love to be able to read the docs in English :D
请问,会开发“手机网站支付”接口吗?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.