Skip to main content

API pour gérer la transactions dans fusion Money pour python

Project description

PaymentClient

PaymentClient est une classe Python permettant d'interagir 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

Une fois que votre package est publié sur PyPI, vous pourrez l'installer avec :

pip install fusionpay

Utilisation

Importation

from fusionpay 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

apimoneyfusion-0.1.0.tar.gz (3.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

apiMoneyFusion-0.1.0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file apimoneyfusion-0.1.0.tar.gz.

File metadata

  • Download URL: apimoneyfusion-0.1.0.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

Hashes for apimoneyfusion-0.1.0.tar.gz
Algorithm Hash digest
SHA256 14761d7f075d8b56629add48fde6e8878a56d88ecd156887a69e0f991bfe3667
MD5 475afd897a4a6b97d4d4d637deb2ad0b
BLAKE2b-256 1a9b83cef1f68a227603dbdf1dfaf40a3c50f46d6644b3dd748be715efa695e4

See more details on using hashes here.

File details

Details for the file apiMoneyFusion-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: apiMoneyFusion-0.1.0-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

Hashes for apiMoneyFusion-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2260286774f14ad4e1d04341333d8770542045170ca39bbe6c6642e9d8497d16
MD5 804a957399ee64d7436b17207130bae5
BLAKE2b-256 71fc4fe8a28dab36f3ca653a628da4ce7d26e91887480670508eaa2873fa8482

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page