<?php
// ============================================================
// AdityaHost Blog content (SEO-optimised posts data)
// ============================================================

function ah_all_posts() {
    return [
        [
            'slug'      => 'fampay-api-guide',
            'title'     => 'FamPay API Guide 2026: How to Accept UPI Payments Online (No Business Account Needed)',
            'metaDesc'  => 'Complete 2026 guide to the FamPay API. Learn how to accept UPI payments with just a FamPay account, generate QR codes and verify payments in 2 API calls.',
            'keywords'  => 'FamPay API, FamPay payment gateway, UPI payment API India, accept payments without business account',
            'category'  => 'Guides',
            'date'      => '2026-08-01',
            'readMins'  => 6,
            'author'    => 'AdityaHost Team',
            'grad'      => ['#0a4bff', '#6e3bff'],
            'icon'      => 'api',
            'content'   => '
<p>India runs on UPI, but accepting payments online usually forces you through a rabbit hole of KYC documents, business bank accounts and approval queues. The <strong>FamPay API</strong> changes that: if you already use FamPay, you already have everything you need to accept verified UPI payments.</p>
<h2>What is the FamPay API?</h2>
<p>The FamPay API is a developer interface that plugs into a FamPay account&rsquo;s Gmail inbox. When someone pays you via UPI, FamPay sends a payment confirmation email — the API reads that email, verifies it, and returns a <code>PAYMENT_SUCCESS</code> response to your application. No payment gateway registration, no business PAN, no merchant onboarding.</p>
<h2>Who is it for?</h2>
<ul>
  <li><strong>Bot developers</strong> — sell access, ranks, or features inside Telegram / Discord bots.</li>
  <li><strong>Creators</strong> — accept tips and donations on YouTube, Instagram or a personal blog.</li>
  <li><strong>Students &amp; freelancers</strong> — collect fees and deposits without a business account.</li>
  <li><strong>Small web stores</strong> — add a UPI QR checkout in an afternoon.</li>
</ul>
<h2>How it works (2 API calls)</h2>
<p>Integrating takes exactly two requests:</p>
<ol>
  <li><strong>Create an order</strong> — <code>POST /api/qr.php</code> returns a UPI QR image and an order ID.</li>
  <li><strong>Verify the payment</strong> — <code>POST /api/verify_order.php</code> confirms once the money hits the account.</li>
</ol>
<p>Your customer scans the QR with any UPI app (GPay, PhonePe, Paytm, BHIM), pays, and your server gets a verified webhook-style confirmation — usually within a few seconds.</p>
<h2>Step-by-step setup</h2>
<h3>1. Register on AdityaHost &amp; grab your API key</h3>
<p>Sign up at <a href="register.php">adityahost.in/register.php</a>, then go to Dashboard → API Keys and copy your secret key.</p>
<h3>2. Connect your FamPay Gmail</h3>
<p>Open Dashboard → Gmail &amp; Settings, and enter the Gmail address linked to your FamPay account plus a 16-character <a href="blog-post.php?slug=app-password">Gmail App Password</a>.</p>
<h3>3. Create your first order</h3>
<pre><code><span class="c-com">// PHP example</span>
$res = curl_create_order(50, "VIP_ACCESS_ORDER_001");
<span class="c-key">echo</span> $res[<span class="c-str">"qr_url"</span>];  <span class="c-com">// QR image for the customer</span></code></pre>
<h3>4. Verify and deliver</h3>
<pre><code><span class="c-com">// Poll / webhook-style check</span>
$res = curl_verify($order_id);
<span class="c-key">if</span> ($res[<span class="c-str">"status"</span>] == <span class="c-str">"success"</span>) { deliver_access(); }</code></pre>
<h2>Is it safe?</h2>
<p>Yes, on three levels. Your Gmail app password is AES-256 encrypted before it is stored, your API key is shown only once after generation, and every payment email is matched against your own order data before a transaction is marked successful.</p>
<h2>Frequently asked questions</h2>
<h3>Does the customer need a FamPay account?</h3>
<p>No. Anyone with any UPI app can pay you. Only <em>you</em> need FamPay.</p>
<h3>How fast do payments verify?</h3>
<p>Usually 5–15 seconds after the customer pays. Verification is checked automatically and continuously on active plans.</p>
<h3>What is the fee?</h3>
<p>No percentage commission. FamAPI plans are flat-rate access plans — the money goes straight to your FamPay account.</p>
<p>Ready to integrate? <a href="register.php">Create your free account →</a></p>'
        ],
        [
            'slug'      => 'upiqr-website',
            'title'     => 'How to Add a UPI QR Code to Your Website in 5 Minutes (2026 Step-by-Step)',
            'metaDesc'  => 'Add a working UPI payment QR to any website in 5 minutes with FamAPI. Static or dynamic QR codes, instant payment verification and free setup tutorial.',
            'keywords'  => 'add UPI QR code to website, UPI payment on website, dynamic QR payment, QR payment gateway India',
            'category'  => 'Tutorials',
            'date'      => '2026-07-22',
            'readMins'  => 5,
            'author'    => 'AdityaHost Team',
            'grad'      => ['#0ac66b', '#0a4bff'],
            'icon'      => 'qr',
            'content'   => '
<p>A UPI QR on your website is the fastest way to start collecting money — no card networks, no setup fees, and payments land in your account directly. Here&rsquo;s how to get a <em>working, auto-verified</em> UPI QR on your site in five minutes.</p>
<h2>Option 1: Static QR (2 minutes)</h2>
<p>A static QR is a single image that is always the same. Anyone who scans it can pay you any amount.</p>
<ol>
  <li>Open your FamAPI Dashboard → Payment Links.</li>
  <li>Click <strong>Generate QR</strong> for your UPI ID.</li>
  <li>Download the QR image and place it anywhere on your site:</li>
</ol>
<pre><code>&lt;img src=<span class="c-str">"qrs/yourawlupiid.png"</span> alt=<span class="c-str">"Scan to pay via UPI"</span> width=<span class="c-str">"220"</span>&gt;</code></pre>
<p>Done. The limitation: you must manually check if payment arrived — with FamAPI, even a static QR can be verified by the order API.</p>
<h2>Option 2: Dynamic QR with verification (3 minutes)</h2>
<p>A dynamic QR is generated per order, so you always know <em>exactly</em> which payment belongs to which customer.</p>
<pre><code><span class="c-com">// 1. Create an order → get a QR + order ID</span>
POST /api/qr.php
{ <span class="c-str">"key"</span>: <span class="c-str">"YOUR_API_KEY"</span>, <span class="c-str">"amount"</span>: 99, <span class="c-str">"order_id"</span>: <span class="c-str">"ORDER_001"</span> }

<span class="c-com">// 2. Show the returned qr_url to the customer</span>
<span class="c-com">// 3. Verify when they say they paid</span>
POST /api/verify_order.php
{ <span class="c-str">"key"</span>: <span class="c-str">"YOUR_API_KEY"</span>, <span class="c-str">"order_id"</span>: <span class="c-str">"ORDER_001"</span> }</code></pre>
<h2>Making it look professional</h2>
<ul>
  <li>Add a note under the QR: <em>&ldquo;Payment auto-verifies within 15 seconds.&rdquo;</em></li>
  <li>Show the amount in bold so users confirm before scanning.</li>
  <li>Redirect to a success page after verification, not before.</li>
</ul>
<h2>Common mistakes to avoid</h2>
<ul>
  <li>Using a static QR for paid products without an order ID — disputes become impossible to track.</li>
  <li>Hard-coding your UPI ID into client-side code. Always create orders server-side.</li>
  <li>Forgetting to check <code>status</code> equals <code>success</code> before delivering goods.</li>
</ul>
<p>If your site is a WordPress page, a Telegram bot, or a plain HTML file — the approach is identical. <a href="demo.php">Try the live demo first →</a></p>'
        ],
        [
            'slug'      => 'app-password',
            'title'     => 'FamPay Gmail App Password: How to Generate & Use It Safely with the API',
            'metaDesc'  => 'Step-by-step guide to creating a Gmail App Password for FamPay API integration, plus security checklist to keep your account safe.',
            'keywords'  => 'gmail app password fampay, generate app password, fampay api setup, gmail 2FA app password',
            'category'  => 'Setup',
            'date'      => '2026-07-10',
            'readMins'  => 4,
            'author'    => 'AdityaHost Team',
            'grad'      => ['#ff4d5e', '#ffb020'],
            'icon'      => 'key',
            'content'   => '
<p>Most payment confirmation emails for FamPay land in a Gmail inbox. To let the API read them automatically, you give it a <strong>Gmail App Password</strong> instead of your real password. Here&rsquo;s how to create one safely — and the do&rsquo;s and don&rsquo;ts.</p>
<h2>What is an App Password?</h2>
<p>An app password is a 16-character, single-purpose secret that lets one app access your Google account without giving it your main password — even when 2-Step Verification is on. You can revoke it anytime without touching your real password.</p>
<h2>How to generate it</h2>
<ol>
  <li>Open your Google Account and enable <strong>2-Step Verification</strong> (required).</li>
  <li>Go to <strong>Security → 2-Step Verification → App passwords</strong>.</li>
  <li>Types a name like <code>FamAPI</code> and click <strong>Create</strong>.</li>
  <li>Copy the 16-character password (spaces may be separated in groups of four).</li>
  <li>Paste it into your FamAPI Dashboard → Gmail &amp; Settings.</li>
</ol>
<h2>Security checklist</h2>
<ul>
  <li>Never share the app password in chats, screenshots or public repos.</li>
  <li>Use an app password only for the Gmail account connected to <em>your</em> FamPay — nobody else&rsquo;s.</li>
  <li>Check it gets encrypted at rest — FamAPI encrypts it with AES-256 before saving.</li>
  <li>Revoke the app password in Google immediately if you ever suspect a leak, then generate a new one and update the API settings.</li>
  <li>Turn off <strong>POP/IMAP</strong> access from other apps you don&rsquo;t use. The API only needs IMAP enabled.</li>
</ul>
<h2>What if IMAP is not available?</h2>
<p>Some accounts show IMAP as &ldquo;Not available&rdquo; for fresh accounts for a short period. Wait 24–48 hours, or verify your age/account recovery details in Google, and retry. The FamAPI dashboard validates the connection before saving settings.</p>
<h2>Can you use a Gmail account without FamPay?</h2>
<p>No — the API only processes payment-confirmation emails from FamPay. The Gmail account must be the one used to register/log in inside the FamPay app.</p>
<p>Setup in under 3 minutes: <a href="register.php">Connect your account now →</a></p>'
        ],
        [
            'slug'      => 'best-payment-gateway-creators',
            'title'     => 'Best Payment Gateway for Creators & Students in India 2026: FamAPI vs Razorpay vs Paytm',
            'metaDesc'  => 'Compare Razorpay, Paytm, Cashfree and FamAPI for Indian creators: KYC requirements, fees, approval time and UPI support in one table.',
            'keywords'  => 'best payment gateway India creators, payment gateway for teenagers, FamAPI vs Razorpay, UPI gateway without KYC',
            'category'  => 'Comparisons',
            'date'      => '2026-06-25',
            'readMins'  => 5,
            'author'    => 'AdityaHost Team',
            'grad'      => ['#0a4bff', '#0ac66b'],
            'icon'      => 'scale',
            'content'   => '
<p>If you are a student, creator or bot developer in India, the &ldquo;official&rdquo; payment gateways can feel like a closed door. Here&rsquo;s an honest comparison of the big players versus FamAPI.</p>
<table>
  <tr><th>Factor</th><th>Razorpay</th><th>Paytm</th><th>Cashfree</th><th>FamAPI (AdityaHost)</th></tr>
  <tr><td>Approval</td><td>KYC + manual review (days)</td><td>KYC + review</td><td>KYC + review</td><td>Instant</td></tr>
  <tr><td>Age limit</td><td>18+ with business docs</td><td>18+ with identity proof</td><td>18+ with business proof</td><td>Works from 14+ via FamPay</td></tr>
  <tr><td>Business account</td><td>Required</td><td>Required</td><td>Required</td><td>Not needed</td></tr>
  <tr><td>Commission</td><td>~2% + GST</td><td>~2% + GST</td><td>~1.5% + GST</td><td>0% (flat plan)</td></tr>
  <tr><td>UPI QR</td><td>Yes</td><td>Yes</td><td>Yes</td><td>Yes, + auto-verify</td></tr>
  <tr><td>Payout</td><td>Next day (after KYC)</td><td>Next day</td><td>Next day</td><td>Instant, direct to your UPI ID</td></tr>
</table>
<h2>When should you pick a traditional gateway?</h2>
<ul>
  <li>You have a registered business with GST/PAN and expect <strong>₹1 lakh+ monthly</strong>.</li>
  <li>You need <strong>international cards</strong>, EMIs, refund automation, or a credit line.</li>
  <li>Your customers expect an invoice with your legal entity name.</li>
</ul>
<h2>When is FamAPI the right choice?</h2>
<ul>
  <li>You are a <strong>creator/bot owner</strong> selling access, ranks or digital goods.</li>
  <li>You do not yet have KYC documents or a business account.</li>
  <li>You want money <strong>instantly in your UPI ID</strong> with no commission.</li>
  <li>Your customers are already UPI-native (GPay/PhonePe/Paytm/BHIM).</li>
</ul>
<h2>The middle path</h2>
<p>Many serious sellers start with FamAPI the day they begin, then add a full gateway once they incorporate. The integration is only 2 API calls, so migrating later is cheap.</p>
<h2>Bottom line</h2>
<p>For under-18 creators and anyone without a business account, FamAPI is the only option that works today. For established businesses doing high volume, a traditional PSP adds card support but also cuts into margins.</p>
<p><a href="index.php#pricing">View FamAPI plans →</a></p>'
        ],
        [
            'slug'      => 'accept-payments-without-business-account',
            'title'     => 'How to Accept Online Payments in India Without a Business Bank Account (2026)',
            'metaDesc'  => 'Legit ways to accept online payments in India without a business account: UPI via FamAPI, payment links, QR codes and payouts to personal UPI ID.',
            'keywords'  => 'accept payments without business account, receive money online India no KYC, UPI payment links personal account',
            'category'  => 'Guides',
            'date'      => '2026-06-08',
            'readMins'  => 4,
            'author'    => 'AdityaHost Team',
            'grad'      => ['#6e3bff', '#ff4d5e'],
            'icon'      => 'wallet',
            'content'   => '
<p>Not having a business bank account used to mean you could not sell online. In 2026, UPI changed the game — here are the real, workable ways to receive payments as an individual.</p>
<h2>1. UPI QR + payment links (fastest)</h2>
<p>A UPI ID linked to your personal account can receive payments of any amount. Generate a QR with FamAPI, share it as an image or a hosted <strong>payment link</strong>, and the money lands in your account instantly.</p>
<ul>
  <li>Payment links expire after a few minutes (configurable) so they can be tied to one order.</li>
  <li>Auto-verified: the API checks the payment confirmation email for you.</li>
</ul>
<h2>2. WhatsApp / Telegram the QR</h2>
<p>For one-off sales (a course, a Minecraft rank, a service fee), sending a QR image in WhatsApp is informal but works. Add the amount next to it to avoid under-payments.</p>
<h2>3. UPI payments in your app/bot</h2>
<p>With a payment API, you can build checkout directly into your Telegram bot or web app — user pays, bot unlocks immediately. This is what FamAPI is built for.</p>
<h2>4. What about tax and legal limits?</h2>
<p>Using your personal account to receive business income is legal, but be aware: banks apply <strong>KYC thresholds</strong> (typically ₹50,000–₹1,00,000/year for certain personal accounts). Once you cross a few lakhs per year, consider opening a current account and GST registration.</p>
<h2>5. Invoicing politely</h2>
<p>Even as an individual you can send a simple payment note (order ID + amount + date) instead of a formal invoice. FamAPI&rsquo;s hosted checkout page does this automatically.</p>
<h2>Comparison at a glance</h2>
<table>
  <tr><th>Method</th><th>Setup time</th><th>Verification</th><th>Cost</th></tr>
  <tr><td>Personal UPI QR (static)</td><td>0 min</td><td>Manual</td><td>Free</td></tr>
  <tr><td>FamAPI QR / links / checkout</td><td>3 min</td><td>Automatic</td><td>Flat plan (₹5+)</td></tr>
  <tr><td>GST-registered gateway</td><td>Days</td><td>Automatic</td><td>~2% fee</td></tr>
</table>
<p>Start today, upgrade later. <a href="register.php">Create your payment API now →</a></p>'
        ],
        [
            'slug'      => 'upipayment-failed-fixes',
            'title'     => 'FamPay UPI Payment Failed? 7 Common Issues and Quick Fixes (2026)',
            'metaDesc'  => 'Why UPI payments fail and how to fix them: wrong UPI ID, QR blocked, bank limits, pending transactions. Troubleshooting checklist for 2026.',
            'keywords'  => 'UPI payment failed, fampay payment not working, UPI QR not working fix, payment failed whatsapp pay',
            'category'  => 'Troubleshooting',
            'date'      => '2026-05-19',
            'readMins'  => 4,
            'author'    => 'AdityaHost Team',
            'grad'      => ['#ffb020', '#0a4bff'],
            'icon'      => 'wrench',
            'content'   => '
<p>A failed UPI payment is frustrating — especially when the customer already paid and your bot says &ldquo;no payment.&rdquo; Here are the seven most common failures and exactly how to fix each one.</p>
<h2>1. Payment went to the wrong UPI ID</h2>
<p><strong>Symptom:</strong> Customer paid but no money arrived. <strong>Fix:</strong> Ask for a screenshot of the UPI confirmation with the last 4 digits of the UPI ID (the payee). Compare it with the collect QR before you blame the API.</p>
<h2>2. QR was screened/screenshotted</h2>
<p><strong>Symptom:</strong> A long QR fails to scan. <strong>Fix:</strong> Regenerate — FamAPI&rsquo;s payment links expire (default 10 minutes) by design. Always create a fresh order for the customer and never reuse an old screenshot.</p>
<h2>3. Bank limit exceeded</h2>
<p><strong>Symptom:</strong> &ldquo;Transaction declined by bank.&rdquo; <strong>Fix:</strong> UPI daily limits (usually ₹1,00,000/day, lower for person-to-business) are set by the customer&rsquo;s bank, not you. Ask them to split the payment or try after midnight.</p>
<h2>4. Payment is pending, not instant</h2>
<p><strong>Symptom:</strong> Money deducted, you got nothing yet. <strong>Fix:</strong> UPI is almost always instant, but some banks delay confirmation up to a few minutes. The API keeps polling; wait 2–3 minutes before marking the order failed.</p>
<h2>5. Duplicate charges</h2>
<p><strong>Symptom:</strong> Customer paid twice because retry. <strong>Fix:</strong> Always deliver based on the order ID, never on the amount alone. If one order was paid twice, refund the second on your FamPay app directly.</p>
<h2>6. The Gmail verification broke</h2>
<p><strong>Symptom:</strong> Money arrived but status stays pending. <strong>Fix:</strong> Check your FamAPI Dashboard → Gmail &amp; Settings. If the app password was revoked, the connection shows offline — re-connect and the next check succeeds immediately.</p>
<h2>7. Customer app issue (GPay/PhonePe bugs)</h2>
<p><strong>Symptom:</strong> Very old app versions fail on QR. <strong>Fix:</strong> Ask the customer to update their UPI app or use <code>Collect Money</code> via the UPI ID manually instead of the QR.</p>
<h2>Prevention checklist</h2>
<ul>
  <li>Always generate a fresh order per customer.</li>
  <li>Show your UPI ID under the QR as a fallback.</li>
  <li>Log order IDs and amounts on your side.</li>
</ul>
<p>Still stuck? <a href="contact.php">Contact support with your order ID →</a></p>'
        ],
        [
            'slug'      => 'scam-warning-fake-domains',
            'title'     => 'URGENT: Fake FamPay API Websites Exposed - How to Stay Safe (2026)',
            'metaDesc'  => 'Warning about fake .xyz .shop .site domains impersonating FamPay API. Learn how to identify scam websites and protect your data. Only trust adityahost.in.',
            'keywords'  => 'fampay api scam, fake payment gateway, .xyz .shop .site scam, adityahost genuine, fampay api fake websites',
            'category'  => 'Security',
            'date'      => '2026-08-15',
            'readMins'  => 5,
            'author'    => 'AdityaHost Security Team',
            'grad'      => ['#ff4d5e', '#ff0000'],
            'icon'      => 'shield',
            'content'   => '
<div style="background:linear-gradient(135deg,#ff0000,#cc0000);color:#fff;padding:20px;border-radius:12px;margin-bottom:24px;">
<h3 style="color:#fff;margin:0 0 8px 0;">⚠️ CRITICAL SECURITY WARNING</h3>
<p style="margin:0;font-size:15px;">Multiple fake websites are impersonating FamPay API services. These scam sites steal your Gmail credentials, API keys, and personal data. Read this guide to stay safe.</p>
</div>

<h2>🚨 Fake Domains Currently Active</h2>
<p>The following domains are <strong>NOT affiliated</strong> with AdityaHost or FamPay in any way. They are scam operations designed to steal your data:</p>

<div style="background:#fff3f3;border:2px solid #ff4d5e;border-radius:12px;padding:16px;margin:16px 0;">
<h3 style="color:#ff4d5e;margin:0 0 12px 0;">DO NOT TRUST These Domains:</h3>
<ul style="margin:0;">
<li><strong style="color:#ff4d5e;">fam.aryanispe.in</strong> - SCAM! Stolen data, fake API keys</li>
<li><strong style="color:#ff4d5e;">*.xyz domains</strong> - SCAM! All .xyz payment API sites are fake</li>
<li><strong style="color:#ff4d5e;">*.shop domains</strong> - SCAM! All .shop payment API sites are fake</li>
<li><strong style="color:#ff4d5e;">*.site domains</strong> - SCAM! All .site payment API sites are fake</li>
</ul>
</div>

<h2>✅ Only Trust These Official Domains</h2>
<div style="background:#f0fff4;border:2px solid #0ac66b;border-radius:12px;padding:16px;margin:16px 0;">
<h3 style="color:#059a55;margin:0 0 12px 0;">Official & Trusted Domains:</h3>
<ul style="margin:0;">
<li><strong style="color:#059a55;">adityahost.in</strong> - Official website</li>
<li><strong style="color:#059a55;">fampay.adityahost.in</strong> - Official FamPay API dashboard</li>
</ul>
<p style="margin:12px 0 0 0;font-size:14px;color:#333;">If you found us through any other domain, you may be on a scam site. Please verify the URL in your browser address bar right now.</p>
</div>

<h2>How to Identify Fake Websites</h2>
<h3>1. Check the domain extension</h3>
<p>Legitimate payment services NEVER use <code>.xyz</code>, <code>.shop</code>, or <code>.site</code> domains. These extensions cost ₹10-50 and are commonly used by scammers because they are cheap and disposable.</p>

<h3>2. Look for SSL certificate details</h3>
<p>Click the padlock icon in your browser. Fake sites often have SSL certificates issued to generic names, not the actual business name. Our certificates are issued to "AdityaHost" specifically.</p>

<h3>3. Verify the about page</h3>
<p>Fake sites have vague "About" pages with no real team information. Check if they provide a real address, real social media links, and real support channels.</p>

<h3>4. Search for reviews</h3>
<p>Google "[domain name] scam" before entering any credentials. If there are multiple reports of stolen data, stay away.</p>

<h3>5. Check the registration date</h3>
<p>Use <code>whois</code> lookup to see when the domain was registered. Scam domains are typically registered within the last few weeks or months.</p>

<h2>What Happens When You Use Fake Sites</h2>
<ul>
<li><strong>Gmail credentials stolen</strong> - They get full access to your email</li>
<li><strong>API keys compromised</strong> - They can make unauthorized transactions</li>
<li><strong>UPI ID exposed</strong> - Your payment information is at risk</li>
<li><strong>Identity theft</strong> - Your personal data is sold on dark web</li>
<li><strong>Financial loss</strong> - Direct theft from your linked accounts</li>
</ul>

<h2>What to Do If You Used a Fake Site</h2>
<ol>
<li><strong>Immediately change your Gmail password</strong> and revoke all app passwords</li>
<li><strong>Enable 2FA</strong> on your Google account if not already enabled</li>
<li><strong>Check your FamPay app</strong> for any unauthorized transactions</li>
<li><strong>Generate new API keys</strong> on the official AdityaHost dashboard</li>
<li><strong>Report the scam site</strong> to Google Safe Browsing and your local cyber crime cell</li>
<li><strong>Monitor your bank statements</strong> for the next 30 days</li>
</ol>

<h2>Our Commitment to Security</h2>
<p>AdityaHost takes your security seriously:</p>
<ul>
<li>All passwords are encrypted with <strong>AES-256</strong> before storage</li>
<li>We never store raw Gmail passwords</li>
<li>All API traffic is encrypted over HTTPS</li>
<li>We use HMAC signatures for webhook verification</li>
<li>Regular security audits of our infrastructure</li>
</ul>

<h2>Report Fake Sites</h2>
<p>If you encounter a fake site pretending to be FamPay API or AdityaHost, please report it to us immediately at our official channels. Together we can keep the community safe.</p>

<div style="background:#f0f7ff;border:2px solid #0a4bff;border-radius:12px;padding:16px;margin:24px 0;">
<p style="margin:0;font-weight:600;">Remember: Only <a href="https://adityahost.in" style="color:#0a4bff;">adityahost.in</a> and <a href="https://fampay.adityahost.in" style="color:#0a4bff;">fampay.adityahost.in</a> are official domains. Everything else is a scam.</p>
</div>'
        ],
    ];
}

function ah_get_post($slug) {
    foreach (ah_all_posts() as $p) {
        if ($p['slug'] === $slug) return $p;
    }
    return null;
}

function ah_cover($p) {
    [$a, $b] = $p['grad'];
    $icons = [
        'api'   => '<path d="M8 9l-4 3 4 3M16 9l4 3-4 3M13 5l-2 14"/>',
        'qr'    => '<rect x="4" y="4" width="7" height="7" rx="1"/><rect x="13" y="4" width="7" height="7" rx="1"/><rect x="4" y="13" width="7" height="7" rx="1"/><path d="M13 13h3v3h-3zM16 16h4v4h-4zM20 13h-1"/>',
        'key'   => '<circle cx="8" cy="15" r="4"/><path d="M11 12l8-8M15 8l3 3M12 11l2 2"/>',
        'scale' => '<path d="M12 3v18M7 21h10M12 7l-8 2 8 10-8-10M20 9l-8 2M12 7l8 2-8 10 8-10"/>',
        'wallet'=> '<rect x="3" y="6" width="18" height="13" rx="2"/><path d="M3 10h18M16 15h2"/>',
        'wrench'=> '<path d="M14.7 6.3a4.5 4.5 0 0 0-6 5.6L3 17.6V21h3.4l5.7-5.7a4.5 4.5 0 0 0 5.6-6L14 12.7 11.3 10l3.4-3.7z"/>',
        'shield'=> '<path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"/><path d="M9 12l2 2 4-4"/>',
    ];
    $icon = $icons[$p['icon']] ?? $icons['api'];
    return '<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 400 170" preserveAspectRatio="xMidYMid slice" aria-hidden="true">'
        . '<defs><linearGradient id="cg" x1="0" y1="0" x2="1" y2="1"><stop offset="0" stop-color="' . $a . '"/><stop offset="1" stop-color="' . $b . '"/></linearGradient></defs>'
        . '<rect width="400" height="170" fill="url(#cg)"/>'
        . '<g stroke="#ffffff" stroke-opacity="0.12"><path d="M0 42h400M0 85h400M0 128h400M67 0v170M134 0v170M200 0v170M267 0v170M334 0v170"/></g>'
        . '<circle cx="330" cy="36" r="90" fill="#ffffff" fill-opacity="0.08"/>'
        . '<circle cx="40" cy="150" r="70" fill="#ffffff" fill-opacity="0.07"/>'
        . '<g transform="translate(180,85)" fill="none" stroke="#ffffff" stroke-width="5" stroke-linecap="round" stroke-linejoin="round">' . $icon . '</g>'
        . '</svg>';
}