Skip to main content

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

Utilisation

Importation

from apiMoneyFusion import PaymentClient

Initialisation du client

client = PaymentClient(api_key_url="YOUR_API_URL")

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",
    webhook_url="https://your-domain.com/my-webhook-url",
)

print(payment)

NB: webhook_url doit accepter les requêtes POST

Réponse attendue :

{
    "statut": true,
    "token": "f5EJ33JYmxqosi8BvaEt",
    "message": "paiement en cours",
    "url": "https://www.pay.moneyfusion.net/pay/f5EJ33JYmxqosi8BvaEt"
}

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.4.tar.gz (3.7 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.4-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apimoneyfusion-0.1.4.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for apimoneyfusion-0.1.4.tar.gz
Algorithm Hash digest
SHA256 05a0a138d58d4839ef4f0db96dd7aff3b7c1ca0ce0395628fdd7cd0c931bb61e
MD5 09c7616ece02fb7e47ef2e0d3160ccb5
BLAKE2b-256 13fa4661d88700d095036aafcc9668ffe099d50737d2dd7751a608c1f87bef12

See more details on using hashes here.

File details

Details for the file apimoneyfusion-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: apimoneyfusion-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.1

File hashes

Hashes for apimoneyfusion-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d4b54cda393f903eeff975a37563c176b5d4730c03034615cee814ceec95957e
MD5 f1899db4dd5481d5cc8683a6c527616c
BLAKE2b-256 edb95eca3822cc3b7c1bb64efab531665ba65757a6ad059ece91c637f5ef5015

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