Python/Django:我应该使用哪个authorize.net 库?
我需要使用 Authorize.net 集成来进行订阅付款,可能使用 CIM。要求很简单——每月定期付款,有几个不同的价格点。客户信用卡信息将存储在authorize.net 中。
周围有很多库和代码片段,我正在寻找关于哪些最有效的建议。
- Satchmo 似乎超出了我的需要,而且看起来很复杂。
- Django-Bursar 似乎是我所需要的,但它被列为 alpha。
- adroll/authorize 库 看起来也不错。
- CIM XML API 看起来还不错,我可以直接与它们连接。
还有很多其他代码片段。
鉴于我的要求相当简单,现在最好的选择是什么?
I need authorize.net integration for subscription payments, likely using CIM. The requirements are simple - recurring monthly payments, with a few different price points. Customer credit card info will be stored a authorize.net .
There are quite a few libraries and code snippets around, I'm looking for recommendations as to which work best.
- Satchmo seems more than I need, and it looks like it's complex.
- Django-Bursar seems like what I need, but it's listed as alpha.
- The adroll/authorize library also looks pretty good.
- The CIM XML APIs don't look too bad, I could connect directly with them.
And there are quite a few other code snippets.
What's the best choice right now, given my fairly simple requirements?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
无论如何,我们最终使用了 adroll 授权库。 Paython 和 django-authorizenet 看起来都很有趣,将进行检查。
For what it's worth we ended up using the adroll authorize library. Both Paython and django-authorizenet look interesting, will be checking those out.
我意识到这有点晚了,但希望对其他人有帮助。
我最近遇到了
Py-Authorize
,与其他可用的软件包相比,它有一些很棒的文档。您可以通过以下方式安装它:它似乎安装了一个依赖项(
colondar
),当通过pip
安装时该依赖项已过时,因此您可以获得最新的(在撰写本文时)通过执行以下操作:文档位于: http://vcatalano.github.io/py -authorize/index.html
根据我的经验,效果很好,但是对于我正在使用它的项目,我只需要 AuthCapture 而不是 ARB 或任何东西......尝试一下。迄今为止我找到的最好的包。
I realize this is a bit late, but hopefully it helps others.
I recently came across
Py-Authorize
which has some great documentation, compared to the other packages available. You can install it via:It seems to install a dependency (
colondar
) which when installed viapip
is outdated so you can get the latest (at the time of this writing) by doing the following:The docs are here: http://vcatalano.github.io/py-authorize/index.html
Works great in my experience, however for the project I am using it on I only needed AuthCapture and not ARB or anything...give it a try. Best package I've found so far.
长话短说,现有的解决方案都不能满足我的需求。它们要么没有维护、没有注释、没有经过测试,要么缺少已保存的卡片。因此,我当然构建了自己的解决方案并将其开源:
AuthorizeSauce: https://github.com/jeffschenck/authorizesauce
处理基本交易(AIM API)、保存的卡(CIM API)和定期付款(ARB API)。它有完整的文档记录并具有完整的测试套件。
我预计最初的发布者早已继续前进,但如果它可以帮助其他人避免付款处理的一些痛苦,我会非常高兴。
Long story short, none of the existing solutions met my needs. They were either unmaintained, uncommented, untested, or lacked saved cards. So of course I built my own solution and open-sourced it:
AuthorizeSauce: https://github.com/jeffschenck/authorizesauce
It handles basic transactions (the AIM API), saved cards (the CIM API), and recurring payments (the ARB API). It is fully documented and has a full test suite.
I expect the original poster has long since moved on, but if it can help anyone else avoid some of the pain of payment processing, I'd be overjoyed.
编辑: https://github.com/agiliq/merchant/ blob/master/billing/gateways/authorize_net_gateway.py
看起来很不错,还没尝试过。
编辑:[对于我使用authorize.net的下一个项目,我将仔细查看:http://github.com/zen4ever/django-authorizenet 它看起来很不错。但我不认为它支持定期付款。]
过去我很少进行一次性实施。
对于简单发布到 AIM 支付网关,您可以使用如下内容:
要授权,您可以执行以下操作:
然后,我们可以捕获:
有更多选项、请求方式、解析响应中的细微差别...我假设
AIM
中的 b/cA
代表advanced
,所有authorize.net 选项均可用。http://developer.authorize.net/guides/AIM/
我知道你的问题lib 是最好的.. 好吧,最简单的方法可能是根据您的特定要求实现您自己的一点临时请求和响应,而不是尝试在 api 之上探索 api。
Edit: https://github.com/agiliq/merchant/blob/master/billing/gateways/authorize_net_gateway.py
looks pretty nice, haven't tried it yet.
Edit: [For the next project I have that uses authorize.net, I'm going to take a close look at: http://github.com/zen4ever/django-authorizenet It looks pretty nice. I don't think that it has support for recurring payments though.]
In the past I have made little one-off implementations.
For simple post to the AIM payment gateway, you can use something like this:
To authorize, you do something like:
then, we can capture:
There are more options, ways to request, nuances in the response to parse... I assume b/c
A
inAIM
stands foradvanced
that all of the authorize.net options are available.http://developer.authorize.net/guides/AIM/
I know that your question is what lib is best .. well, it might be easiest just to implement your own little bit of ad-hoc request and response for your specific requirements rather than trying to trove through an api on top of an api.
总有 Paython: https://github.com/abunsen/Paython
目前支持 5+ 支付网关:
这是一个示例:
首先设置一张卡:
检查其是否有效:
设置要收费的客户数据,并非所有字段都是必需的:
针对网关授权,选项包括调试输出或测试凭据:
现在您可以解决:
There is always Paython: https://github.com/abunsen/Paython
Currently supports 5+ payment gateways:
Here is an example:
set up a card first:
check if its valid:
Set up customer data to charge, not all fields are required:
authorize against gateway, options include debug output or test credentials:
now you can settle:
在未能找到支持 Authorize.net 所有功能的 API 之后,我最近为 Python 和 Authorize.net 编写了这个 API。
https://github.com/vcatalano/py-authorize
I recently wrote this API for Python and Authorize.net after failing to find one that supported all of Authorize.net's functionality.
https://github.com/vcatalano/py-authorize