There is no license information available for the latest version (v1.0.0) of this package.

Digital-to-Mobile-Money Gateway for Tanzania: wallet integrations, KYC/AML, rate conversions, transaction logging.

v1.0.0 2025-06-23 12:03 UTC

This package is auto-updated.

Last update: 2025-06-23 12:20:31 UTC


README

A PHP package for integrating crypto and fiat (mobile money) transactions in Tanzania. Handles wallet integrations (M-Pesa, Tigo Pesa, Airtel Money), KYC/AML checks, rate conversions, and transaction logging.

📦 Package Summary Purpose: A PHP package for seamless digital-to-mobile-money transactions in Tanzania, supporting wallet integrations (M-Pesa, Tigo Pesa, Airtel Money), KYC/AML checks, rate conversions, and transaction logging. Key Modules: Wallet Integrations: M-Pesa, Tigo Pesa, Airtel Money (send money, check balance; ready for real API integration) KYC/AML: Tanzanian NIDA National ID verification (mocked, ready for real API)

Rate Conversion: Real-time TZS ↔ BTC/USDT using CoinGecko Transaction Logging: Secure, auditable logs (JSON lines in logs/transactions.log) Gateway Facade: Unified interface for all features, with high-level methods and logging Test Scripts: Each module has a test script in the tests/ directory for demonstration and validation. 🚀 Next Steps for Production Use

  1. Replace Mock Logic with Real API Calls Update wallet providers (Tigo Pesa, Airtel Money) and KYC to use real endpoints and authentication.

Securely store and load API credentials (use environment variables or a secure config). 2. Error Handling & Security Add robust error handling and input validation. Sanitize and validate all user inputs. Encrypt sensitive data (e.g., initiator passwords, API keys). 3. Testing Write comprehensive unit and integration tests. Test with sandbox and production credentials for all providers.

  1. Documentation Expand the README.md with usage examples, configuration instructions, and API references. Document each class and method with PHPDoc.

  2. Composer & Versioning Set a proper version in composer.json. Add a license and author information. Optionally, publish to Packagist for wider use.

  3. Integration Integrate with your Laravel or other PHP applications as a Composer dependency. Register service providers or facades if using Laravel.

  4. Compliance Ensure KYC/AML flows comply with Tanzanian regulations. Log and audit all sensitive operations. 📝 Example Usage use TzCryptoFiatGateway\Gateway;

$gateway = new Gateway();

// Send money via M-Pesa $result = $gateway->sendMoney('mpesa', '+255712345678', 5000, 'Ref001');

// Verify KYC $kyc = $gateway->verifyKyc('12345678901234567890', '+255712345678');

// Convert TZS to BTC $btc = $gateway->rateConverter->convert('tzs', 'bitcoin', 100000);

// Log a custom transaction $gateway->logger->logTransaction([...]);