import os
import time
from stanley_shield import Gatekeeper

def test_paystack_integration():
    # 1. Setup Paystack Identity
    os.environ["STANLEY_CLIENT_ID"] = "PAYSTACK"
    os.environ["STANLEY_HMAC_SECRET"] = "ps_secret_2026_paystack_test"
    
    shield = Gatekeeper(bunker_url="http://localhost:3000")
    
    print("🚀 PAYSTACK: Sending log to Bunker...")
    
    shield.log(
        actor_id="admin@paystack.co",
        action="TRANSFER_INITIATED",
        resource="txn_998877",
        residency="GLOBAL",
        metadata={"amount": 5000, "currency": "NGN"}
    )
    
    time.sleep(1)
    print("✅ Done. Check Bunker for PAYSTACK logs!")

if __name__ == "__main__":
    test_paystack_integration()