BixPay sign-up warning (Marty 2026-10-29: bizventures registered through our correct partner link but BIX recorded referrer N/A): the invite token lives only in BIX's URL and their security check often fails inside app webviews, so members who reopen BIX elsewhere lose their sponsor. Guide, Wallet card and Overview card now say: sign up on the page the button opens, no app first, no portal Sign Up menu; in-app browsers (Gmail/Telegram/Facebook webviews, iOS web views) get a notice with the link to copy into Chrome or Safari (no native dialogs); chatbot card answer carries the same; my.js + bixpay-guide.js ?v=20261029bz
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
@@ -1,14 +1,33 @@
|
||||
// BixPay guide (/bixpay, 2026-10-29): the CTA carries the viewer's resolved partner link (their own when signed in, else the
|
||||
// member whose ?ref brought them here or whose sponsor cookie they carry, else the network link), always through the counted
|
||||
// /go/bixpay link. The server already folded ?ref into the sponsor cookie; the ref is passed along too so the first view resolves.
|
||||
// In-app browsers (Gmail, Telegram, Facebook webviews): BIX's register page runs a Cloudflare check that often fails there, and
|
||||
// the invite token lives only in the URL, so a member who then reopens BIX elsewhere registers with no sponsor (bizventures,
|
||||
// 2026-10-29: referrer N/A). Those viewers get a notice with the link to copy into a real browser.
|
||||
(function () {
|
||||
var cta = document.getElementById('bixCta'), using = document.getElementById('bixUsing'), soon = document.getElementById('bixSoon');
|
||||
var box = document.getElementById('bixInApp'), boxLink = document.getElementById('bixInAppLink'), boxCopy = document.getElementById('bixInAppCopy');
|
||||
if (!cta) return;
|
||||
function inApp() {
|
||||
var u = navigator.userAgent || '';
|
||||
if (/FBAN|FBAV|FB_IAB|Instagram|Line\/|Twitter|Snapchat|GSA\/|Telegram|\bwv\b|WebView/i.test(u)) return true;
|
||||
return /iPhone|iPad|iPod/.test(u) && !/Safari\//.test(u); // an iOS web view: no Safari token
|
||||
}
|
||||
var ref = '';
|
||||
try { ref = new URLSearchParams(location.search).get('ref') || ''; } catch (e) { ref = ''; }
|
||||
fetch('/api/public/bixpay' + (ref ? '?ref=' + encodeURIComponent(ref) : ''), { credentials: 'same-origin' }).then(function (r) { return r.json(); }).then(function (d) {
|
||||
if (!d || !d.live) { if (soon) soon.hidden = false; cta.href = '/my#wallet'; if (using) using.textContent = 'Sign in to your dashboard and open the Wallet tab.'; return; }
|
||||
cta.href = d.go;
|
||||
if (using) using.textContent = d.whose === 'you' ? 'The button opens your own BixPay partner link.' : d.whose === 'sponsor' ? 'The button opens ' + d.name + "'s BixPay partner link." + (d.signedIn ? ' Add yours in Members > Profile.' : '') : 'The button opens the network’s BixPay partner link.' + (d.signedIn ? ' Add yours in Members > Profile.' : '');
|
||||
if (box && inApp()) {
|
||||
box.hidden = false;
|
||||
if (boxLink) boxLink.textContent = d.go;
|
||||
if (boxCopy) boxCopy.addEventListener('click', function () {
|
||||
var done = function () { boxCopy.textContent = 'Copied'; setTimeout(function () { boxCopy.textContent = 'Copy link'; }, 2000); };
|
||||
var select = function () { try { var r = document.createRange(); r.selectNodeContents(boxLink); var s = window.getSelection(); s.removeAllRanges(); s.addRange(r); boxCopy.textContent = 'Selected: copy it'; } catch (e) {} }; // no native dialogs
|
||||
if (navigator.clipboard && navigator.clipboard.writeText) navigator.clipboard.writeText(d.go).then(done, select);
|
||||
else select();
|
||||
});
|
||||
}
|
||||
}).catch(function () {});
|
||||
})();
|
||||
|
||||
+9
-1
@@ -1965,6 +1965,11 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
|
||||
loadWednesdayCard(); setInterval(loadWednesdayCard, 120000);
|
||||
// ── BixPay Visa card (2026-10-29, docs/BIXPAY-INTEGRATION.md). me.bix comes from /api/me: { live, own, link, whose, name, using, go, announce, clicks }.
|
||||
// Copy is Marty's approved wording; no in-app swap claim, "3% per purchase, no load fee", the 31-states line. No em dashes.
|
||||
// sign-up warning (2026-10-29, bizventures registered with referrer N/A): the BIX invite token lives only in the URL and their
|
||||
// security check often fails inside app webviews, so members who reopen BIX elsewhere lose their sponsor
|
||||
const BIX_SIGNUP_NOTE = 'Sign up on the page the button opens. Don’t install the BIX app first and don’t use the portal’s own Sign Up menu: your sponsor is lost and BIX shows the referrer as N/A.';
|
||||
const bixInApp = () => { const u = navigator.userAgent || ''; return /FBAN|FBAV|FB_IAB|Instagram|Line\/|Twitter|Snapchat|GSA\/|Telegram|\bwv\b|WebView/i.test(u) || (/iPhone|iPad|iPod/.test(u) && !/Safari\//.test(u)); };
|
||||
const BIX_INAPP_NOTE = 'You’re in an app’s built-in browser. BIX’s security check often fails here and your sponsor gets dropped: open instantadpay.com in Chrome or Safari first, then tap the button there.';
|
||||
const BIX_BODY = 'BixPay is a self-custody wallet with a Visa card. Send USDT or USDC to it on Polygon, load the card, and spend it wherever Visa is accepted, including Apple Pay and Google Pay. Virtual cards from $9.99.';
|
||||
const BIX_COMPLIANCE = 'BixPay is a separate company. BIX issues the wallet and the card through its banking partners and sets its own fees, limits, eligibility and terms. InstantAdPay is not the card issuer and earns a referral commission when you sign up through a partner link. Card availability varies by country. Crypto assets can lose value.';
|
||||
function renderBix(me) {
|
||||
@@ -1982,6 +1987,8 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
|
||||
+ '<p class="small">3% per purchase, no load fee. See BIX\'s terms for other charges. Available in 31 US states so far. Not in your state yet? You can still get the wallet and build.</p>'
|
||||
+ '<p style="display:flex;gap:8px;flex-wrap:wrap;align-items:center"><a class="btn" id="bixWalletGo" href="' + esc(b.go.wallet) + '" target="_blank" rel="noopener">Get your BixPay card</a> <a class="btn sec" href="/bixpay" target="_blank" rel="noopener">How it works</a></p>'
|
||||
+ '<p class="small muted" id="bixWalletUsing" style="margin:6px 0 0">' + esc(b.whose === 'you' ? b.using : b.using.replace(/\s*Add yours in Profile\.$/, '')) + (b.whose !== 'you' ? ' <a href="#profile" data-goto="profile" style="color:var(--mint)">Add yours in Profile</a>' : '') + '</p>'
|
||||
+ '<p class="small" id="bixWalletNote" style="margin:6px 0 0"><b>' + esc(BIX_SIGNUP_NOTE.split('. ')[0]) + '.</b> ' + esc(BIX_SIGNUP_NOTE.slice(BIX_SIGNUP_NOTE.indexOf('. ') + 2)) + '</p>'
|
||||
+ (bixInApp() ? '<p class="small" id="bixWalletInApp" style="margin:6px 0 0;border:1px solid #f2b84b;background:rgba(242,184,75,.12);border-radius:8px;padding:8px 10px">' + esc(BIX_INAPP_NOTE) + '</p>' : '')
|
||||
+ '<details class="small muted" style="margin-top:8px"><summary style="cursor:pointer">The fine print</summary><p style="margin:6px 0 0">' + esc(BIX_COMPLIANCE) + '</p></details>';
|
||||
wc.querySelectorAll('[data-goto="profile"]').forEach(a => a.addEventListener('click', e => { e.preventDefault(); const m = document.querySelector('.bo-menu [data-pane="profile"]'); if (m) m.click(); setTimeout(() => { const i = $('pfBixLink'); if (i) { i.scrollIntoView({ behavior: 'smooth', block: 'center' }); i.focus(); } }, 300); }));
|
||||
}
|
||||
@@ -1992,7 +1999,8 @@ function shareLink(ref) { return SHARE_DOMAIN && /^[A-Za-z0-9_]{1,40}$/.test(Str
|
||||
oc.hidden = false;
|
||||
oc.innerHTML = '<div class="card-head"><h3>\u{1F4B3} New: a Visa card for your POL</h3><span class="sub">BixPay, a separate company</span></div>'
|
||||
+ '<p>' + esc(BIX_BODY) + ' 3% per purchase, no load fee.</p>'
|
||||
+ '<p style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0"><a class="btn small" href="' + esc(b.go.overview) + '" target="_blank" rel="noopener">Get your BixPay card</a> <a class="btn small sec" href="/bixpay" target="_blank" rel="noopener">How it works</a> <span class="small muted">' + esc(b.using) + '</span></p>';
|
||||
+ '<p style="display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0"><a class="btn small" href="' + esc(b.go.overview) + '" target="_blank" rel="noopener">Get your BixPay card</a> <a class="btn small sec" href="/bixpay" target="_blank" rel="noopener">How it works</a> <span class="small muted">' + esc(b.using) + '</span></p>'
|
||||
+ '<p class="small muted" style="margin:6px 0 0">' + esc(BIX_SIGNUP_NOTE) + '</p>';
|
||||
cardDismiss(oc, 'bix');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user