Jenga API 的 python 包装器。
项目描述
JengaAPIPythonWrapper
来自 Equity Bank 的 JengaAPI 的简单 python 包装器
设置
在开始之前将这两个环境变量添加到您的 .env 文件中:
- BASE_URL=" https://yourbaseurl.io " # 如果未提供,则默认为https://uat.jengahq.io/
- 环境=“生产”
汇款服务
# Initial Setup
>>> from jengaapi.auth import JengaAPI
>>> API = JengaAPI(api_key="Basic TFZXxx", password="EhPPgRx4ZpxDrrznGdm25d", merchant_code="8995674492", base_url="https://uat.jengahq.io/")
>>> token = API.authorization_token
>>> from jengaapi.send_money_services import SendMoneyService
>>> send_money = SendMoneyService(token=token)
在股权内发送
# Generate signature by calling API.signature and passing the relevant tuple (the contents of this tuple are relative based on the request)
# e.g to generate signature for
## generate signature for sending money within equity
>>> signature = API.signature((source_account_number, transfer_amount,currency_code, reference_no))
>>> send_money.send_within_equity(signature, country_code="KE", source_name="John Doe", source_account_number="0770194201783", destination_account_number="0340197385508",destination_name="Jane Doe", transfer_amount="2300.00", currency_code="KES", reference_no="202108211617", transfer_date=date.today(), description="Send Money")
{'transactionId': '202108211618', 'status': 'SUCCESS'}
发送到手机钱包
>>> signature = API.signature((source_account_number, transfer_amount, currency_code, reference_no))
>>> send_money.send_to_mobile_wallets(signature, wallet_name="Equitel", destination_mobile_number="0763659874", country_code="KE", source_name="John Doe", source_account_number="0770194201783", destination_account_number="0340197385508",destination_name="Jane Doe", transfer_amount="2300.00", currency_code="KES", reference_no="162955567473", transfer_date=date.today(), description="Send Money")
{'transactionId': '162955567473', 'status': 'SUCCESS'}
发送 RTGS
>>> signature = API.signature((reference_no, transfer_date.strftime("%Y-%m-%d"), source_account_number, destination_account_number, transfer_amount))
>>> send_money.send_rtgs(signature, destination_account_number="0340197385508", bank_code="01", country_code="KE", source_name="John Doe", source_account_number="0770194201783", destination_name="Jane Doe", transfer_amount="1500.00", currency_code="KES", reference_no="162955622013", transfer_date=date.today(), description="Send Money")
{'transactionId': '000002399997', 'status': 'SUCCESS'}
发送斯威夫特
>>> signature = API.signature((reference_no, transfer_date.strftime("%Y-%m-%d"), source_account_number, destination_account_number, transfer_amount))
>>> send_money.send_rtgs(signature, destination_account_number="0340197385508", bank_code="01", country_code="KE", source_name="John Doe", source_account_number="0770194201783", destination_name="Jane Doe", transfer_amount="1500.00", currency_code="KES", reference_no="162955622013", transfer_date=date.today(), description="Send Money")
{'transactionId': '000002399997', 'status': 'SUCCESS'}
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分布
python-jengaapi-1.1.1.tar.gz
(9.3 kB
查看哈希)
内置分布
python_jengaapi-1.1.1-py3-none-any.whl
(11.1 kB
查看哈希)
关
python_jengaapi -1.1.1-py3-none-any.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | e4a4a1d0a70a5869b0859268f89b855639dcd790505097463ca4298ec0fbc60b |
|
| MD5 | 5a61aff412c9d22757f0f730c893521d |
|
| 布莱克2-256 | bf60f68fe48703efc6c10c9257ff8c1ce1c997324a2a5d89736419f5fb14cf65 |