zaz-aangaraa/pay 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

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

zaz-aangaraa/pay

Composer 安装命令:

composer require zaz-aangaraa/pay

包简介

A Laravel package for integrating MTN and Orange Money payments in Cameroon

README 文档

README

Un package Laravel pour intégrer facilement les paiements MTN Mobile Money et Orange Money au Cameroun via votre propre API.

Installation

composer require zaz-aangaraa/pay

Configuration

  1. Publiez les fichiers de configuration et les migrations :
php artisan vendor:publish --tag=aangaraa-pay
  1. Exécutez les migrations :
php artisan migrate
  1. Ajoutez les variables d'environnement suivantes à votre fichier .env :
# Aangaraa Pay Configuration
AANGARAA_PAY_API_URL=https://votre-api-url.com/api
AANGARAA_PAY_APP_KEY=votre_app_key
MTN_CALLBACK_URL=https://votre-site.com/callback/mtn
MTN_NOTIFY_URL=https://votre-site.com/notify/mtn
ORANGE_CALLBACK_URL=https://votre-site.com/callback/orange
ORANGE_NOTIFY_URL=https://votre-site.com/notify/orange

Utilisation

Initialiser un paiement

use Aangaraa\Pay\Facades\AangaraaPay;

// Initialiser un paiement
$payment = AangaraaPay::initializePayment([
    'phone_number' => '237XXXXXXXXX',
    'amount' => 1000,
    'description' => 'Paiement pour service X',
    'app_key' => 'votre_app_key',
    'transaction_id' => 'unique_transaction_id',
    'operator' => 'MTN_Cameroon', // ou 'Orange_Cameroon'
    'currency' => 'XAF',
]);

Vérifier le statut d'un paiement

$status = AangaraaPay::checkPaymentStatus('unique_transaction_id');

Retirer de l'argent

$response = AangaraaPay::withdrawMoney([
    'phone_number' => '237XXXXXXXXX',
    'amount' => 500,
    'app_key' => 'votre_app_key',
    'operator' => 'MTN_Cameroon', // ou 'Orange_Cameroon'
]);

Gestion des Webhooks

Le package gère automatiquement les webhooks de notification pour MTN et Orange Money. Assurez-vous que vos URLs de notification sont accessibles publiquement.

Sécurité

Le package utilise votre app_key pour authentifier les requêtes. Assurez-vous de ne jamais partager votre clé et de la stocker de manière sécurisée.

Support

Pour toute question ou problème, veuillez créer une issue sur le dépôt GitHub.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2024-12-10