initiateSTKPush($phone_number, $amount, $user_id); if (isset($result['success'])) { $success = "M-Pesa prompt sent to your phone! Please enter your PIN to complete payment."; // Record pending transaction $mainAccount = new MainAccount(); $mainAccount->recordPendingTransaction($user_id, $amount, $phone_number, $result['CheckoutRequestID']); // Add detailed success message $success .= " Check your phone for the M-Pesa prompt. Transaction ID: " . $result['CheckoutRequestID']; } else { $error = "Payment initiation failed: " . ($result['message'] ?? 'Please try again later.'); // Log detailed error for debugging error_log("M-Pesa Error: " . print_r($result, true)); } } elseif ($payment_method === 'Manual') { // Redirect to manual payment page $_SESSION['payment_amount'] = $amount; $_SESSION['payment_phone'] = $phone_number; header('Location: ../api/manual_payment.php'); exit; } } } // Get currency rates for display require_once '../../db.php'; $db = new Database(); $conn = $db->getConnection(); $currency_rates = []; try { $stmt = $conn->prepare("SELECT target_currency, exchange_rate FROM currency_rates"); $stmt->execute(); $currency_rates = $stmt->fetchAll(PDO::FETCH_KEY_PAIR); } catch (PDOException $e) { error_log("Currency rates error: " . $e->getMessage()); } ?> Recharge | Japanese Motors
Jmotors

Check your phone for M-Pesa prompt. Enter your PIN to complete payment.

Quick Deposit

Minimum amount: 500

M-Pesa STK Push

Instant • Automatic

Manual Verification

Admin • Secure

M-Pesa STK Push

  • Instant payment processing
  • Automatic balance update
  • Receipt sent to your phone

Manual Verification

  • Upload payment screenshot
  • Admin verification required
  • ‎24/7 support available

Send to: Paybill 542542

Account: 00106664176150

Bonus Packages

5, 1000 => 15, 2000 => 40, 5000 => 120, 10000 => 300, 20000 => 700 ]; foreach ($packages as $amount => $bonus): $display_amount = $currency === 'KES' ? $amount : number_format($amount * ($currency_rates[$currency] ?? 1), 2); ?>
+ Bonus

Currency Converter

$rate): ?>
1 = KES