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

Uploaded Python 3

File details

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

File metadata

  • Download URL: apimoneyfusion-0.1.3.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.3.tar.gz
Algorithm Hash digest
SHA256 042060ed5f6eaccc353f5bcda7c32cf4302523dcc2ad3e07be827584c12b655c
MD5 c497dbd16af5d4fa5e9a8b240f56c5fe
BLAKE2b-256 07270d79fa5360e6e3ae9bb056f65e5fbedfcabba1df1eddada5d67a39ad86e4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: apiMoneyFusion-0.1.3-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.3-py3-none-any.whl
Algorithm Hash digest
SHA256 9668ba19346259a48ac9fbb7206c7594acc16f7c545bada272a8bc883d15b6f5
MD5 63d99ca0106e6f0911287375de75a711
BLAKE2b-256 fc84ea70886659824dc003f8b53001c7276977d03e242c557418fe77eadb0dd8

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