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="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.2.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.2-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: apimoneyfusion-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 146327b74932db247ead4e50ab137abdbcbb9d1201f7c03b116368c2fff1be29
MD5 43166ffda8cbdd404216476cae9f9e5e
BLAKE2b-256 5a9d9a48b38c419dae79996180d2b7b7f17b59cf756bb3c3bc5aeb9eb52b57b7

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apiMoneyFusion-0.1.2-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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 1a1448c05c85f789899a532d55101ed13d0c2c8bdd2252d53f0335f5854b1be8
MD5 fbc8a42c3103f80bfd4649928327d937
BLAKE2b-256 360973358d72cb4e3b101ff8e8892b8ad54633411d512abee02bbce5e52d109f

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