MoonPay card on-ramp for crypto-new members (zero custody)
- GET /api/public/moonpay-url: returns a MoonPay checkout link for POL on Polygon (pol_polygon). With partner keys in config (moonpayPublicKey/ moonpaySecretKey, now PATCHable), the URL is HMAC-signed and prefilled with the member's own wallet address + shortfall amount; without keys it falls back to MoonPay's generic buy page. MoonPay is merchant of record - the site never touches funds. - Join page: when the connected wallet can't cover the Premium entry, a funding box appears with the exact shortfall, a buy button (new tab), and a refresh-balance button. - Training page: "buy POL with a card" callout after the funding video with the three things to get right (POL, Polygon network, own address). - Start page: one-line card-buy pointer under the sponsor card. - Chatbot canned answer + AI system prompt updated (funding guidance). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,13 @@
|
||||
<div class="dj-kv"><span>Balance</span><b id="bal">—</b></div>
|
||||
</div>
|
||||
<div id="already" style="display:none;margin-top:12px;color:#f0b4aa;font-size:14px"></div>
|
||||
<div id="fundBox" style="display:none;margin-top:14px;padding:14px;border:1px solid rgba(240,197,109,.4);border-radius:12px;background:rgba(240,197,109,.06)">
|
||||
<div style="font-weight:800;margin-bottom:6px">💳 Need POL? Buy it with a card.</div>
|
||||
<p id="fundMsg" style="color:var(--muted);font-size:13px;margin:0 0 10px"></p>
|
||||
<button id="fundBtn" class="btn btn-secondary" style="width:100%">Buy POL with card / Apple Pay (MoonPay) →</button>
|
||||
<button id="fundRefresh" class="btn btn-secondary btn-sm" style="width:100%;margin-top:8px">I've bought it — refresh my balance</button>
|
||||
<p class="micro" style="margin:8px 0 0">MoonPay opens in a new tab. Choose <strong>POL on Polygon</strong>; the crypto is delivered to <strong>your own wallet</strong> — this site never touches your money. Card fees are MoonPay's (~4.5%), and first purchases can take a few minutes to arrive.</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="joinBox" class="dj-card" style="display:none">
|
||||
|
||||
Reference in New Issue
Block a user