assemien-dev/money-fusion-php
Composer 安装命令:
composer require assemien-dev/money-fusion-php
包简介
SDK PHP officiel pour interagir avec l'API Money Fusion Pay (création et suivi de paiements).
README 文档
README
Cette bibliothèque PHP permet d’interagir facilement avec l’API de paiement Money Fusion. Elle facilite la création et la récupération des paiements via des requêtes HTTP sécurisées.
Installation
Installez la bibliothèque via Composer :
composer require assemien-dev/money-fusion-php
Utilisation
Importation
use MoneyFusion\PaymentClient;
Initialisation du client
$client = new PaymentClient("YOUR_API_URL");
Créer un paiement
$payment = $client->createPayment( totalPrice: "10000", articles: [ ["name" => "Article 1", "price" => "5000", "quantity" => 1] ], numeroSend: "0101010101", nomClient: "assemienDev", userId: 1, orderId: 123, returnUrl: "https://votre-domaine.com/callback", webhookUrl: "https://your-domain.com/my-webhook-url" ); print_r($payment);
⚠️ Note :
webhookUrldoit accepter les requêtes POST.returnUrletwebhookUrldoivent être en HTTPS avec un nom de domaine valide.
Réponse attendue
{
"statut": true,
"token": "f5EJ33JYmxqosi8BvaEt",
"message": "paiement en cours",
"url": "https://www.pay.moneyfusion.net/pay/f5EJ33JYmxqosi8BvaEt"
}
Récupérer un paiement
$paymentInfo = $client->getPayment("8L5teSc5TaIkP3ds9Dlx"); print_r($paymentInfo);
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"
}
Exemple complet
require 'vendor/autoload.php'; use MoneyFusion\PaymentClient; $client = new PaymentClient("https://api.moneyfusion.net/api/create-payment"); try { $payment = $client->createPayment( totalPrice: "10000", articles: [ ["name" => "Article 1", "price" => "5000", "quantity" => 1] ], numeroSend: "0101010101", nomClient: "assemienDev", userId: 1, orderId: 123, returnUrl: "https://votre-domaine.com/callback", webhookUrl: "https://votre-domaine.com/webhook" ); print_r($payment); // Exemple : récupération du paiement après confirmation $paymentInfo = $client->getPayment($payment['token']); print_r($paymentInfo); } catch (Exception $e) { echo "Erreur : " . $e->getMessage(); }
Méthodes disponibles
| Méthode | Description |
|---|---|
createPayment() |
Crée un nouveau paiement avec les détails de la commande |
getPayment() |
Récupère les informations d’un paiement à partir de son token |
assemien-dev/money-fusion-php 适用场景与选型建议
assemien-dev/money-fusion-php 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 3 次下载、GitHub Stars 达 0, 最近一次更新时间为 2025 年 11 月 01 日, 在 PHP 生态内属于活跃度较高的组件。
我们在过去多个企业项目中使用过 assemien-dev/money-fusion-php 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 assemien-dev/money-fusion-php 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
统计信息
- 总下载量: 3
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 20
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-11-01