BixPay card integration, phase 1 (Marty approved the copy 2026-10-29; docs/BIXPAY-INTEGRATION.md): gated by site config bixpayLive (off by default). Profile > BixPay card field (partner link validated: bix.ibportal.io/auth/register, e= token, a=1; the appId=3 card-customer link is refused with a message), bixpay.js resolver own > sponsor chain (10 levels) > company link (bixCompanyLink, seeded with Marty's partner link), every surface says whose link it is. Wallet tab card, one-week Overview announcement (24 h snooze), one sentence in TierPaid payout emails and the games' wallet nudges, Promo tools > BixPay tab (3 posts, email swipe, 4 text-only banners on the Spaces CDN, tracked link + per-member clicks), public guide /bixpay with masked app screenshots, chatbot canned answers + facts gated to 'coming soon' while off (KNOWLEDGE_DATE 2026-10-29). Clicks per surface via /go/bixpay in the admin Traffic tab; admin Overview counts members with a link; member card shows it; signed /api/partner/bixpay and the lssync profile row carry it for LinkSpin/CTB. accounts.bix_partner_link column (db.js alterSafe). Tests: qa/bixpay.test.cjs (17) + walk.mjs BixPay block; my.js/promo.js/admin.js ?v=20261029bx.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
+49
-1
@@ -423,5 +423,53 @@ window.IAPPromo = (function () {
|
||||
}
|
||||
}
|
||||
|
||||
return { fill, POSTS, TEXTS, SWIPES, OBJECTIONS, VIDEOS };
|
||||
// ── BixPay partner kit (2026-10-29, docs/BIXPAY-INTEGRATION.md). me.bix from /api/me. The three posts are Marty's approved
|
||||
// copy. {L} = the member's TRACKED link (/go/bixpay?s=promo&m=<member>: counted here, then the resolved partner link), so every
|
||||
// asset carries the member's link and the Promo tab can show its clicks. Banners: text only, no BIX logo (brand rules unconfirmed).
|
||||
const BIX_POSTS = [
|
||||
{ name: 'Short post', net: 'X', text: 'I spend my crypto with a Visa card now. BixPay keeps the keys with you, loads from USDT or USDC with no load fee, and works with Apple Pay. Virtual card from $9.99: {L}' },
|
||||
{ name: 'Friendly post', net: 'Facebook', text: 'Earning crypto is one thing. Spending it without jumping through hoops is another. BixPay fixed that for me: a self-custody wallet and a Visa card in one app. Here\'s where I got mine: {L}' },
|
||||
{ name: 'Partner angle', net: 'LinkedIn', text: 'BixPay pays partners on every card and on card spending, ten levels deep. If you\'re building a team anyway, this fits right in: {L}' }
|
||||
];
|
||||
const BIX_SWIPE = { subject: 'A Visa card for the crypto you already earn', body: 'Hey,\n\nQuick one, because this solved something for me.\n\nI earn crypto in a few places, and for a long time the awkward part was spending it. Exchange, bank, waiting, fees. BixPay took that out of the loop: it is a self-custody wallet with a Visa card in one app. You send USDT or USDC to it on Polygon, load the card, and pay wherever Visa is accepted, Apple Pay and Google Pay included.\n\nThe parts I liked:\n- The keys stay with you. It is your wallet, not an account someone else holds.\n- No load fee. 3% per purchase, and BIX\'s terms cover the rest.\n- A virtual card is $9.99 and you can be using it the same day.\n- If you build a team, BixPay pays partners on every card and on card spending, ten levels deep.\n\nUS note: it is open in 31 states so far. If yours is not on the list yet, you can still get the wallet and build.\n\nHere is my link: {L}\n\nBixPay is a separate company. BIX issues the wallet and the card through its banking partners and sets its own fees, limits, eligibility and terms. Crypto assets can lose value.\n\nTalk soon,' };
|
||||
const BIX_CDN = 'https://coolify-saasytop.nyc3.cdn.digitaloceanspaces.com/game-banners/bixpay/';
|
||||
const BIX_SIZES = [['728x90', 'Leaderboard'], ['300x250', 'Medium rectangle'], ['468x60', 'Banner'], ['600x300', 'Traffic exchange / splash page']];
|
||||
function fillBix(me) {
|
||||
const b = (me && me.bix) || {}; const sec = $('promo-bixpay'); if (!sec) return;
|
||||
if (!b.live || b.error || !b.go) { sec.hidden = true; return; }
|
||||
const enc = encodeURIComponent, link = b.link, go = b.go.promo;
|
||||
if (sec.dataset.filled === link + '|' + go + '|' + (b.clicks ? b.clicks.total : 0)) return;
|
||||
sec.dataset.filled = link + '|' + go + '|' + (b.clicks ? b.clicks.total : 0);
|
||||
$('bixPromoLink').textContent = link;
|
||||
$('bixPromoUsing').textContent = b.using || '';
|
||||
$('bixPromoSub').textContent = b.whose === 'you' ? 'every link and banner here carries your partner link' : 'add your own partner link in Profile and these switch to yours';
|
||||
$('bixPromoCopy').onclick = async () => { try { await navigator.clipboard.writeText(link); status('Partner link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
|
||||
const sh = $('bixPromoShare'); if (sh) { sh.hidden = !navigator.share; sh.onclick = async () => { try { await navigator.share({ title: 'BixPay', text: 'A Visa card for your crypto: ' + go }); } catch (e) { if (!(e && e.name === 'AbortError')) status('Could not open the share sheet.', 'bad'); } }; }
|
||||
$('bixPromoGo').textContent = go;
|
||||
$('bixPromoGoCopy').onclick = async () => { try { await navigator.clipboard.writeText(go); status('Tracked link copied.', 'ok'); } catch (e) { status('Copy failed.', 'bad'); } };
|
||||
const n = (b.clicks && b.clicks.promo) || 0; $('bixPromoClicks').textContent = n ? 'Clicks so far: ' + n.toLocaleString() + '.' : 'No clicks counted yet.';
|
||||
const pp = $('bixPromoPosts'); pp.innerHTML = '';
|
||||
for (const p of BIX_POSTS) {
|
||||
const text = p.text.replace('{L}', go), lead = text.replace(go, '').trim();
|
||||
const extras = [];
|
||||
if (p.net === 'X') extras.push(linkBtn('https://twitter.com/intent/tweet?text=' + enc(text), 'Post on X'));
|
||||
if (p.net === 'Facebook') extras.push(linkBtn('https://www.facebook.com/sharer/sharer.php?u=' + enc(go), 'Share on Facebook'));
|
||||
if (p.net === 'LinkedIn') extras.push(linkBtn('https://www.linkedin.com/sharing/share-offsite/?url=' + enc(go), 'Share on LinkedIn'));
|
||||
extras.push(linkBtn('https://t.me/share/url?url=' + enc(go) + '&text=' + enc(lead), 'Telegram'));
|
||||
extras.push(linkBtn('https://wa.me/?text=' + enc(text), 'WhatsApp'));
|
||||
pp.appendChild(block(text, '<span class="pb-net">' + esc(p.name) + '</span>', extras));
|
||||
}
|
||||
const sw = $('bixPromoSwipe'); sw.innerHTML = '';
|
||||
sw.appendChild(block('Subject: ' + BIX_SWIPE.subject + '\n\n' + BIX_SWIPE.body.replace('{L}', go), '<span class="pb-net">Email</span> <b>' + esc(BIX_SWIPE.subject) + '</b>'));
|
||||
const bg = $('bixPromoBanners'); bg.innerHTML = '';
|
||||
for (const [s, nme] of BIX_SIZES) {
|
||||
const w = s.split('x')[0], h = s.split('x')[1], src = BIX_CDN + 'bixpay-' + s + '.png';
|
||||
const code = '<a href="' + go + '" target="_blank" rel="noopener"><img src="' + src + '" width="' + w + '" height="' + h + '" alt="A Visa card for your crypto"></a>';
|
||||
const d = document.createElement('div'); d.className = 'promo-block';
|
||||
d.innerHTML = '<div class="pb-head"><span class="lab">' + s + '</span> <span class="muted small">' + esc(nme) + '</span></div><div style="overflow:auto;margin:8px 0"><img loading="lazy" src="' + src + '" alt="BixPay banner ' + s + '" style="max-width:100%;height:auto;border-radius:6px"></div><div class="pb-text mono small" style="overflow-wrap:anywhere">' + esc(code) + '</div>';
|
||||
const row = document.createElement('div'); row.className = 'pb-actions'; row.appendChild(copyBtn(code, 'Copy embed code')); row.appendChild(copyBtn(src, 'Copy image URL')); row.appendChild(linkBtn(src, 'Open image')); d.appendChild(row); bg.appendChild(d);
|
||||
}
|
||||
}
|
||||
|
||||
return { fill, fillBix, POSTS, TEXTS, SWIPES, OBJECTIONS, VIDEOS, BIX_POSTS, BIX_SWIPE };
|
||||
})();
|
||||
|
||||
Reference in New Issue
Block a user