定制 assemien-dev/money-fusion-php 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

assemien-dev/money-fusion-php

最新稳定版本:v1.0.2

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 :

  • webhookUrl doit accepter les requêtes POST.
  • returnUrl et webhookUrl doivent ê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

统计信息

  • 总下载量: 3
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 3
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-11-01

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固