django简单灵活的可插拔加密货币支付应用程序

django-cryptocurrency-payment的Python项目详细描述


https://badge.fury.io/py/django-cryptocurrency-payment.svghttps://travis-ci.org/ydaniels/django-cryptocurrency-payment.svg?branch=masterhttps://codecov.io/gh/ydaniels/django-cryptocurrency-payment/branch/master/graph/badge.svg ^{1}$ Django Version

django简单灵活的可插拔加密货币支付应用程序。硬币是可以消费和反映在高清钱包像银金矿

快速启动

安装Django加密货币支付:

pip install django-cryptocurrency-payment

将其添加到已安装的应用程序中:

^{pr2}$

添加Django加密货币支付的URL模式:

fromcryptocurrency_paymentimporturlsascryptocurrency_payment_urlsurlpatterns=[...url(r'^',include(cryptocurrency_payment_urls)),#/payment/{pk}/...]

创建付款方式

fromcryptocurrency_payment.modelsimportcreate_new_paymentpayment=create_new_payment(crypto='BITCOIN',#Cryptocurrency from your settingsfiat_amount=10,#Amount of item in fiatfiat_currency='USD',#Fiat currency used to convert to crypto amountpayment_title=None,#Title associated with paymentpayment_description=None,#Description associated with paymentrelated_object=None,#Generic linked object for this payment -> crypto_payments = GenericRelation(CryptoCurrencyPayment)user=None,#User of this payment for non-anonymous paymentparent_payment=None,#Associate with previous paymentaddress_index=None,# Use an address generated from a particular index for this payment e.g same address can always be used for a particular userreuse_address=None),#Used previously paid address for this payment

任务

使用您最喜欢的django任务管理器,根据您的首选时间定期运行这些任务

cryptocurrency_payment.tasks.update_payment_statuscryptocurrency_payment.tasks.cancel_unpaid_paymentcryptocurrency_payment.tasks.refresh_payment_prices

特点

  • 灵活的付款创建,可以链接到其他django对象
  • 从区块链自动更新付款状态
  • 如果未付款,则自动更新付款价格
  • 如果付款不足,自动创建子付款
  • 一段时间后取消未付款
  • 允许匿名支付
  • 支持更多加密货币后端

运行测试

代码真的有效吗?在

source <YOURVIRTUALENV>/bin/activate
(myenv) $ pip install tox
(myenv) $ tox

学分

用于呈现此包的工具:

历史

{21{0.0美元
  • PyPI的第一个版本。在

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
使用Spring Security成功登录后,java服务器连接丢失   macos Java代码在应用程序中工作,而不是在Servlet中   java LWJGL矩形变得更宽   Android Studio java。lang.NullPointerException:   将自定义主题应用到ChoiceBox时,JavaFX出现java错误   Selenium中具有不同ID的java Click元素   尝试从MySQL查询解析JSON时出现java异常   java CyclicBarrier启动执行不同逻辑的并行线程   添加strutshtml时使用java。tld到jsp文件发生错误   jpa ClassNotFoundException:java。sql。在weblogic上创建SAP Hana数据源时的SQLType   当Rest请求URI过长时,通过apache Camel执行的java GET HTTP操作失败   java在spring数据实体中填充“已创建”列   java背景和按钮问题   单击筛选的RecyclerView项时显示错误数据的java