-- ================================================
-- Add Korapay and Cryptomus Payment Methods
-- WakaTraffic SMM Panel - Node.js/Express Version
-- ================================================

-- Insert Korapay Payment Method
INSERT 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,
    config,
    created_at,
    updated_at
) VALUES (
    'Korapay',
    'korapay',
    'api',
    'Pay with bank transfer, debit card, or mobile money via Korapay',
    1.5,
    0,
    2000,
    100,
    5000000,
    1,
    1,
    0,
    0,
    'You will be redirected to Korapay secure checkout. Supports bank transfer, debit cards (Visa, Mastercard, Verve), and mobile money. Payment is instant and secure.',
    2,
    '/images/payment-methods/korapay.png',
    JSON_OBJECT(
        'public_key', 'pk_test_i4UNcQQbWZWyNJv4WXUpfU1PPQbQUusUyGEiETn3',
        'base_url', 'https://api.korapay.com/merchant/api/v1',
        'supports_channels', JSON_ARRAY('bank_transfer', 'card', 'mobile_money')
    ),
    NOW(),
    NOW()
);

-- Insert Cryptomus Payment Method
INSERT 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,
    config,
    created_at,
    updated_at
) VALUES (
    'Cryptocurrency (USDT, BTC, ETH)',
    'cryptomus',
    'crypto',
    'Pay with Bitcoin, Ethereum, USDT, USDC, BNB, and 100+ cryptocurrencies',
    0.4,
    0,
    NULL,
    100,
    10000000,
    1,
    1,
    0,
    10,
    'Pay with cryptocurrency. Supports Bitcoin (BTC), Ethereum (ETH), USDT, USDC, BNB, and 100+ coins. Fast, secure, and no chargebacks. Payment confirms in 2-10 minutes.',
    5,
    '/images/payment-methods/cryptomus.png',
    JSON_OBJECT(
        'merchant_id', 'GET_FROM_DASHBOARD',
        'base_url', 'https://api.cryptomus.com/v1',
        'default_currency', 'USDT',
        'exchange_rate_ngn_usd', 1600
    ),
    NOW(),
    NOW()
);

-- Verify insertions
SELECT
    id,
    name,
    code,
    type,
    is_active,
    is_automated,
    transaction_fee_percentage,
    min_amount,
    max_amount
FROM payment_methods
WHERE code IN ('korapay', 'cryptomus');
