endi_payment
项目描述
注意:从版本2.0开始,此库不再支持python 2
此库的目的是提供一组用于管理收款的统一功能,以满足2018年财政法的要求。以下文本 http://bofip.impots.gouv.fr/bofip/10691-PGP 更详细地描述了需要覆盖的需求
它的工作方式如下
收款操作通过公共API执行
对于每次收款操作,都会在日志中写入一条条目
日志是保证收款操作完整性的保证。
模块激活
公共API可以通过enDI中的.ini配置文件进行配置。
请确保endi_payment库已正确包含在endi.includes中
endi.includes = ...
...
endi_payment
配置endi.interfaces.IPaymentRecordService服务
endi.interfaces.IPaymentRecordService = endi_payment.public.PaymentService
配置endi_payment的日志。有关详细信息,请参阅Python logging模块的文档:https://docs.pythonlang.cn/2/library/logging.html 以及development.ini.sample文件中的示例。
配置要使用的endi_payment.interfaces.IPaymentRecordHistoryService日志服务。
endi_payment提供两种日志服务
HistoryLogService:默认服务,用于开发模式,仅记录操作而不记录详细信息。
HistoryDBService:将执行的操作记录在特定的数据库中(不一定在同一个mysql服务器上)
HistoryDBService
要在特定数据库中启用详细日志记录,请将以下行添加到.ini文件的[app:endi]部分:
endi_payment.interfaces.IPaymentRecordHistoryService = endi_payment.history.endi_payment.history.HistoryDBService
创建一个新的数据库,您可以使用endi仓库中提供的工具./tools/add_payment_database.sh。
cd endi/
./tools/add_payment_database.sh
# Suivez les instructions
然后,在.ini文件的[app:endi]部分输入新数据库的连接信息。
endi_payment_db.url = mysql://endi_payment:endi_payment@localhost/endi_payment?charset=utf8
归档
为了确保对收款的操作历史有记录,endi_payment允许使用归档服务。
本地版本,请将以下行添加到endi服务的.ini配置文件中的[app:endi]部分:
endi_payment.interfaces.IPaymentArchiveService=endi_payment.archive.FileArchiveService
endi_payment_archive_storage_path=<chemin sur disque pour le stockage des journaux>
本地版本提供了可接受的收款日志认证解决方案。
为了获得更稳定的解决方案,我们建议使用由第三方认证的远程服务。
完整的配置应包含以下信息:
endi.includes =
....
endi_payment
# Accès à la bdd de traitement des paiements
endi_payment_db.url = mysql://endi_payment:endi_payment@localhost/endi_payment?charset=utf8
# Le service qui sera utilisé depuis endi pour agir sur les encaissements
endi.interfaces.IPaymentRecordService = endi_payment.public.PaymentService
# Le service qui sera utilisé par endi_payment pour stocker l'historique des actions d'encaissement
endi_payment.interfaces.IPaymentRecordHistoryService = endi_payment.history.HistoryDBService
# Le service en charge de la génération d'une archive avec un peu de certification d'intégrité des journaux
endi_payment.interfaces.IPaymentArchiveService = endi_payment.archive.FileArchiveService
# Le chemin utilisé par le service d'archivage pour le stockage sur disque
endi_payment_archive_storage_path = /var/endi/files/treasury/payment_storage
查看日志
如果使用HistoryDBService服务,endi_payment将自动在enDI的会计菜单中添加一个条目,允许查看对收款所做的更改日志。
项目详情
下载文件
下载您平台对应的文件。如果您不确定选择哪个,请了解更多关于安装包的信息。
源分布
构建分布
endi_payment-2.5.1.tar.gz的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 0ca846d94e6621b99eede619c858a3a2bb28684e7a0460209740b54e223dee26 |
|
MD5 | 9d39f58dbf1b53610dbfaf8e1e6c0c32 |
|
BLAKE2b-256 | 133c4d879ddf6d2faf27e04abd66fd5087055b209b433ecbd1ebb7253d95f1e6 |
endi_payment-2.5.1-py3-none-any.whl的哈希值
算法 | 哈希摘要 | |
---|---|---|
SHA256 | 3845706b9a35d1b88b5297df6ec15f9b8f4e8ca4577428c114079580044efd04 |
|
MD5 | b91383901202036b156f2586469f5731 |
|
BLAKE2b-256 | ae8d3564dd9655ad5c4e3cc6755d3f7bec84e05ce1fbf9436a8b393190a7b817 |