与SecurePay信用卡网关的接口。
securepa的Python项目详细描述
澳大利亚支付网关提供商SecurePay。这个图书馆可以用来 要求并按要求退款。
快速启动
此软件包的使用方法如下:
importsecurepayMERCHANT_ID='...'PASSWORD='...'# Take a $2 AUD credit card payment.try:pay_response=securepay.pay_by_cc(200,'PO-1234','4444333322221111','11/18',securepay.TEST_API_URL,MERCHANT_ID,PASSWORD,'J. Citizen')exceptsecurepay.GatewayErroraserr:# Service unavailable. Log err and give customers a generic error.exceptsecurepay.PaymentErroraserr:# Payment declined. Error message is in err.else:# Payment successful! Details in pay_response.# Refund the payment above in full.try:refund_response=securepay.refund(200,'PO-1234',pay_response['transaction_id'],securepay.TEST_API_URL,MERCHANT_ID,PASSWORD)exceptsecurepay.GatewayErroraserr:# Service unavailable. Log err and give customers a generic error.exceptsecurepay.PaymentErroraserr:# Refund declined. Error message is in err.else:# Refund successful! Details in refund_response.
运行测试:
$ tox
此模块尚未提供信用卡授权交易(即。 为即将到来的付款暂缓一些钱)。如果你有兴趣 资助一些工作来添加这些功能,请联系。
发布历史记录
0.6.0(2016-10-29)
改进
- Add the optional ^{tt1}$ field to payment requests (Greg McCoy). Note: This does not automate transaction processing. See the ^{tt2}$ function docstring and SecurePay docs for details.
0.5.7(2015-08-03)
改进
- Add ^{tt3}$ and ^{tt4}$ so you don’t have to define them yourself.
0.5.6(2015-08-03)
错误修复
- Fixed support for Python 2.7.
- Enabled tests for Python 2.7, 3.3 and 3.4 with Tox