-- Seeder: Payment Methods
-- Description: Populates payment_methods table with all 8 payment options
-- Date: 2026-02-20

-- Clear existing data (optional - comment out if you want to keep existing data)
-- TRUNCATE TABLE payment_methods;

-- Insert payment methods (using INSERT IGNORE to prevent duplicates)
INSERT IGNORE INTO payment_methods
(name, code, type, description, transaction_fee_percentage, transaction_fee_fixed, transaction_fee_cap, min_amount, max_amount, is_active, is_automated, requires_proof, processing_time_minutes, instructions, display_order, logo_url)
VALUES

-- 1. Kuda Bank - Virtual Account (Automated)
(
  'Kuda Bank',
  'kuda',
  'virtual_account',
  'Get a unique account number for instant payment',
  0.00,
  0.00,
  NULL,
  100.00,
  500000.00,
  TRUE,
  TRUE,
  FALSE,
  0,
  'You will receive a unique Kuda Bank account number. Transfer to this account and your wallet will be credited instantly.',
  1,
  '/images/payment-methods/kuda.png'
),

-- 2. Opay - Mobile Money (Automated)
(
  'Opay',
  'opay',
  'mobile_money',
  'Pay with Opay wallet or card',
  0.50,
  0.00,
  100.00,
  100.00,
  500000.00,
  TRUE,
  TRUE,
  FALSE,
  0,
  'You will be redirected to Opay to complete your payment using your wallet, card, or bank account.',
  2,
  '/images/payment-methods/opay.png'
),

-- 3. Moniepoint - Virtual Account (Automated)
(
  'Moniepoint',
  'moniepoint',
  'virtual_account',
  'Get reserved account for instant payment',
  0.00,
  10.00,
  NULL,
  100.00,
  500000.00,
  TRUE,
  TRUE,
  FALSE,
  0,
  'Transfer to the generated account number. Your wallet will be credited automatically within seconds.',
  3,
  '/images/payment-methods/moniepoint.png'
),

-- 4. PalmPay - Mobile Money (Automated)
(
  'PalmPay',
  'palmpay',
  'mobile_money',
  'Pay with PalmPay wallet',
  0.50,
  0.00,
  NULL,
  100.00,
  500000.00,
  TRUE,
  TRUE,
  FALSE,
  0,
  'You will be redirected to PalmPay to complete your payment. Login with your PalmPay credentials.',
  4,
  '/images/payment-methods/palmpay.png'
),

-- 5. Binance Pay - Cryptocurrency (Automated)
(
  'Crypto (USDT)',
  'binance',
  'crypto',
  'Pay with cryptocurrency via Binance',
  1.00,
  0.00,
  NULL,
  100.00,
  500000.00,
  TRUE,
  TRUE,
  FALSE,
  5,
  'Pay with USDT or other cryptocurrencies via Binance Pay. Scan QR code or use payment link.',
  5,
  '/images/payment-methods/binance.png'
),

-- 6. Bank Transfer - Manual
(
  'Bank Transfer',
  'bank_transfer',
  'bank_transfer',
  'Transfer directly to our bank account',
  0.00,
  0.00,
  NULL,
  100.00,
  500000.00,
  TRUE,
  FALSE,
  TRUE,
  10,
  'Transfer to any of our bank accounts and upload payment proof. Your account will be credited within 5-10 minutes after verification.',
  6,
  '/images/payment-methods/bank-transfer.png'
),

-- 7. USSD Payment - Manual
(
  'USSD Payment',
  'ussd',
  'ussd',
  'Pay using your bank USSD code',
  0.00,
  0.00,
  NULL,
  100.00,
  500000.00,
  TRUE,
  FALSE,
  FALSE,
  10,
  'Dial your bank USSD code and transfer to our account. No internet required! Payment detected within 10 minutes.',
  7,
  '/images/payment-methods/ussd.png'
),

-- 8. Mono Verification (Hidden - Used for Bank Transfer Verification)
(
  'Mono Verification',
  'mono',
  'api',
  'Automated bank transfer verification',
  0.00,
  0.00,
  NULL,
  100.00,
  500000.00,
  FALSE,
  TRUE,
  FALSE,
  0,
  'Internal service for verifying bank transfers automatically.',
  999,
  NULL
);

-- Verify insertion
SELECT
  id,
  name,
  code,
  type,
  CONCAT('₦', FORMAT(min_amount, 2), ' - ₦', FORMAT(max_amount, 2)) AS amount_range,
  IF(is_automated, 'Automated', 'Manual') AS mode,
  IF(is_active, 'Active', 'Inactive') AS status
FROM payment_methods
ORDER BY display_order;
