API pour gérer la transactions dans fusion Money pour python
Project description
API MONEY FUSION PAYEMENT PYTHON
Elle permet d'intéragir avec l'API de paiement de MoneyFusion. Elle facilite la création et la récupération des paiements via des requêtes HTTP.
Installation
vous pourrez l'installer avec :
pip install apiMoneyFusion==0.1.0
Utilisation
Importation
from apiMoneyFusion import PaymentClient
Initialisation du client
client = PaymentClient(api_key_url="https://api.moneyfusion.net")
Créer un paiement
payment = client.create_payment(
total_price="10000",
articles=[{"name": "Article 1", "price": "5000", "quantity": 1}],
numero_send="0101010101",
nom_client="assemienDev",
user_id=1,
order_id=123,
return_url="https://votre-domaine.com/callback"
)
print(payment)
Réponse attendue :
{
"statut": true,
"token": "f5EJ33JYmxqosi8BvaEt",
"message": "paiement en cours",
"url": "https://payin.moneyfusion.net/payment/f5EJ33JYmxqosi8BvaEt/10000/John Doe"
}
Récupérer un paiement
payment_info = client.get_payment("8L5teSc5TaIkP3ds9Dlx")
print(payment_info)
Réponse attendue :
{
"statut": true,
"data": {
"_id": "6748d365967cb4766fdd1616",
"tokenPay": "8L5teSc5TaIkP3ds9Dlx",
"numeroSend": "None",
"nomclient": "assemienDev",
"personal_Info": [{"userId": 1, "orderId": 123}],
"numeroTransaction": "",
"Montant": 475,
"frais": 25,
"statut": "paid",
"moyen": "card",
"return_url": "https://votre-domaine.com/callback",
"createdAt": "2024-11-28T20:32:37.037Z"
},
"message": "details paiement"
}
Contributions
Les contributions sont les bienvenues ! N'hésitez pas à proposer des améliorations ou signaler des bugs en ouvrant une issue sur GitHub.
Licence
Ce projet est sous licence MIT. Voir le fichier LICENSE pour plus d'informations.
Project details
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 apimoneyfusion-0.1.1.tar.gz.
File metadata
- Download URL: apimoneyfusion-0.1.1.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a44cd4af8ba7e630b672e05cc64af796733fd48271f0265fc8206ddd1500c96a
|
|
| MD5 |
009ae1cdf5c675ef5053fbfda48e14e1
|
|
| BLAKE2b-256 |
b9503ec5800618253ae0cdd606092a44b8e39685b2b71c3728e82be0ed32b3c3
|
File details
Details for the file apiMoneyFusion-0.1.1-py3-none-any.whl.
File metadata
- Download URL: apiMoneyFusion-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
95961a7d119a1ac4ce0ba166d48195693b04238cb74582e3f1771f8375377377
|
|
| MD5 |
3fabb69db099fa9e8c9a9422feed2ff6
|
|
| BLAKE2b-256 |
b8f55e469007321e5d05a6ec5f9d3110c7e2811e4f2379c2d4f04095ef4064fb
|