<?php

/**
 * =========================================
 * MADR CORE CONFIGURATION
 * =========================================
 */

// Environment Mode
define('MADR_ENV', 'SANDBOX'); // SANDBOX or LIVE

// Global Callback
define('MADR_CALLBACK_URL', 'https://yourdomain.com/madr/callback.php');



/**
 * =========================================
 * HUBTEL CONFIG (GHANA)
 * =========================================
 */

if (MADR_ENV === 'SANDBOX') {

    define('HUBTEL_URL', 'https://sandbox.hubtel.com/v1/merchantaccount/merchants/{merchantId}/transactions/send/mobilemoney');
    define('HUBTEL_USERNAME', 'your_sandbox_username');
    define('HUBTEL_PASSWORD', 'your_sandbox_password');

} else {

    define('HUBTEL_URL', 'https://api.hubtel.com/v1/merchantaccount/merchants/{merchantId}/transactions/send/mobilemoney');
    define('HUBTEL_USERNAME', 'qQ8My7G');
    define('HUBTEL_PASSWORD', '4daa91de2db94928824c19392030ca63');

}



/**
 * =========================================
 * SASAPAY CONFIG (KENYA + TANZANIA)
 * =========================================
 */

if (MADR_ENV === 'SANDBOX') {

    define('SASAPAY_URL', 'https://sandbox.sasapay.app/api/v1/payouts');
    define('SASAPAY_TOKEN_URL', 'https://sandbox.sasapay.app/api/v1/auth/token');

    define('SASAPAY_CLIENT_ID', 'rFloU4wLHu35qH9fi3xYXDRoq91UFJk5CA7TIM0O');
    define('SASAPAY_CLIENT_SECRET', '1h5E43B6VceqjumiPPDMAudYF5GawvcXRsBOy07Wgn7tXsFsiBX5ibNxcDSYgziR0qS2xp9LfyYLhJMqEnfwuKYmf9nTZH8DxnYPoXqWoYzEZAdb4n0VTdoBTfcKH27H');
    define('SASAPAY_MERCHANT', '600980');

} else {

    define('SASAPAY_URL', 'https://api.sasapay.app/api/v1/payouts');
    define('SASAPAY_TOKEN_URL', 'https://api.sasapay.app/api/v1/auth/token');

    define('SASAPAY_CLIENT_ID', 'NjXMcjQ1Kx2DJ2JLQIFIL1YGmF1fZ7vZeEYrEGZw');
    define('SASAPAY_CLIENT_SECRET', 'NTTxReiWQHaNN1f2lDQtDtZTmFWkkVsHdMHCaMnGZ3RmL1pjuzwPMgJOzJaAcNgpC4JTy8K07dKViM9SogxnsBJZmKmLOEQuqrMUEs8a7ByxVpaUkAfrXTFdjrWoU0Va');
    define('SASAPAY_MERCHANT', '2762');

}



/**
 * =========================================
 * TIMEOUTS / SECURITY SETTINGS
 * =========================================
 */

define('MADR_HTTP_TIMEOUT', 30);
define('MADR_MAX_RETRIES', 3);



/**
 * =========================================
 * LOGGING (Optional but Recommended)
 * =========================================
 */

define('MADR_LOG_FILE', __DIR__ . '/logs/madr.log');

