Connecteur asynchrone pour les paiements FedaPay
Project description
FedaPay Connector
FedaPay Connector est un connecteur asynchrone pour interagir avec l'API FedaPay. Il permet de gérer les paiements, les statuts des transactions, et les webhooks.
Installation
pip install fedapay_connector
Utilisation
from fedapay_connector import FedapayConnector, PaiementSetup, UserData, Pays, MethodesPaiement
import asyncio
async def main():
fedapay = FedapayConnector()
setup = PaiementSetup(pays=Pays.benin, method=MethodesPaiement.moov)
client = UserData(nom="john", prenom="doe", email="myemail@domain.com", tel="+22964000001")
# Initialisation du paiement
resp = await fedapay.Fedapay_pay(setup=setup, client_infos=client, montant_paiement=1000)
print(resp)
# vous pouver appeler la methode Fedapay_finalise si vous avez déja creer un endpoint dans votre api pour recevoir les webhook de fedapay (voir la methode Save_webhook_data et sa documentation)
# si vous ne pouvez pas utiliser Fedapay Finalise vous devrez faire du polling en utilisant la methode Check_transaction_status et en analysant sa reponse en fonction du status rechercher le tout dans une boucle
status = await fedapay.Check_transaction_status(resp.get("id_transaction_fedapay"))
print(status)
if __name__ == "__main__":
asyncio.run(main())
Licence
Ce projet est sous licence GNU Affero General Public License v3.0 or later (AGPL-3.0-or-later). Consultez le fichier LICENSE pour plus d'informations.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fedapay_connector-1.0.0.tar.gz.
File metadata
- Download URL: fedapay_connector-1.0.0.tar.gz
- Upload date:
- Size: 10.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7a7e64a61527e903d9c910db05a6af8982aa6313d4eee83f4e05ef7a2316c305
|
|
| MD5 |
22f408a4709ad26bed16f7211e85aa7b
|
|
| BLAKE2b-256 |
ca6aa810aed35bd30ba1e5fa70aa18d4585f8141168e3cddf7a7e84c982b7d75
|
File details
Details for the file fedapay_connector-1.0.0-py3-none-any.whl.
File metadata
- Download URL: fedapay_connector-1.0.0-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd0f59b7523b78df555b7913232a811013ffc61cadd4bf66f99c295442fe94c3
|
|
| MD5 |
5728a319993810a4ede651d89237ef54
|
|
| BLAKE2b-256 |
1b68b4b2194887f70d73a5fcbae70420554004faf5f3f971ba8b3fe3ab33f900
|