LinkSpin copy: every $20 qualifying-package reference is now $25 (LinkSpin sells $10, $25, $50, $100, $250, $500; there is no $20 package), first package From $10, the $10 test, partner kit split on a $25 package, team-building math; POL suggestion looks up the $25 product (the $20 lookup never matched); cache tags bumped. The $100 split examples ($20 level 2 / platform) are unchanged.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -695,7 +695,7 @@ function sponsorBlockedAlert(who, r) {
|
||||
// Resolves the sponsor from the join token by member id, share code, or username,
|
||||
// and notifies EVERY sponsor — activated or not (an active sponsor still wants to
|
||||
// know their team grew). A referral is on the line from signup; it only counts
|
||||
// toward qualification once it makes a $20+ purchase.
|
||||
// toward qualification once it makes a $25+ purchase.
|
||||
async function notifyNewReferral(ref, newAcct) {
|
||||
try {
|
||||
if (!mailer.hasKey()) return;
|
||||
@@ -708,7 +708,7 @@ async function notifyNewReferral(ref, newAcct) {
|
||||
if (!owner || !owner.email) return;
|
||||
const who = newAcct && newAcct.username ? '@' + newAcct.username : 'A new member';
|
||||
let body = who + ' just joined LinkSpin through your link — they are on your team from today.\n\n'
|
||||
+ 'They count toward your qualification once they make a $20+ purchase.\n\n';
|
||||
+ 'They count toward your qualification once they make a $25+ purchase.\n\n';
|
||||
if (!owner.address) body += 'Make sure payouts are switched on (one free wallet step) so you never miss a commission — '
|
||||
+ 'the contract locks each buyer to their sponsor at their first purchase.\n\n';
|
||||
body += 'See your team: ' + SITE_URL + '/team\n\nLinkSpin';
|
||||
@@ -795,9 +795,9 @@ async function emailOnEvent(ev) {
|
||||
if (sp && sp.email) {
|
||||
const bn = await memberLabel(ev.buyerId); // @username at a glance (Marty, 2026-09-12)
|
||||
const usd = ('$' + (ev.priceCents / 100).toFixed(2)).replace(/\.00$/, '');
|
||||
const qual = ev.priceCents >= 2000
|
||||
? ' This is a $20+ purchase, so it counts toward your qualification.'
|
||||
: ' (Purchases under $20 do not count toward qualification.)';
|
||||
const qual = ev.priceCents >= 2500
|
||||
? ' This is a $25+ purchase, so it counts toward your qualification.'
|
||||
: ' (Purchases under $25 do not count toward qualification.)';
|
||||
mailer.send(sp.email, bn + ' just bought a ' + usd + ' ad package',
|
||||
'Your referral ' + bn + ' (member #' + ev.buyerId + ') just purchased a package (' + usd + ' — ' + ev.creditAmount + ' credits).' + qual + '\n\n' +
|
||||
'See your team and the live ledger: ' + SITE_URL + '/team\n\nLinkSpin').catch(() => {});
|
||||
@@ -831,7 +831,7 @@ async function emailOnEvent(ev) {
|
||||
const what = pol ? pol + ' POL' + usdShare(pur, pct) : 'a level-' + ev.tier + ' payout';
|
||||
await tell(ev.skippedId, 'You missed ' + (pol ? pol + ' POL' : 'a payout') + ' on LinkSpin',
|
||||
buyer + ' just bought an ad package on your level ' + ev.tier + '. Your share was ' + what + ', and it passed you by because level ' + ev.tier + ' is not open on your account yet. The contract paid it to the next qualified person above you.\n\n' +
|
||||
'Level ' + ev.tier + ' opens at ' + need + ' qualifying buyers (people you referred who bought a $20 or larger package). You have ' + bc + (short ? ', so you are ' + short + ' buyer' + (short === 1 ? '' : 's') + ' away.' : '.') + '\n\n' +
|
||||
'Level ' + ev.tier + ' opens at ' + need + ' qualifying buyers (people you referred who bought a $25 or larger package). You have ' + bc + (short ? ', so you are ' + short + ' buyer' + (short === 1 ? '' : 's') + ' away.' : '.') + '\n\n' +
|
||||
'Two ways to close the gap: bring ' + (short || 1) + ' more buyer' + (short === 1 ? '' : 's') + ' from your My line page, or use Qualified Start under Buy packages to be your own buyer today. Every package on level ' + ev.tier + ' pays you ' + pct + ' percent once it is open, and the next one is coming whether you are ready or not.\n\n' +
|
||||
'Transaction: ' + txUrlOf(ev.tx) + '\n\nYour wallet and payouts: ' + SITE_URL + '/wallet');
|
||||
}
|
||||
@@ -2051,7 +2051,7 @@ const server = http.createServer(async (req, res) => {
|
||||
if (!isAdmin(req)) return json(res, 401, { error: 'auth' });
|
||||
return json(res, 200, await tank.adminView());
|
||||
}
|
||||
// -- admin Traffic tab: page views + join-page views + signups + $20 buyers, by referring
|
||||
// -- admin Traffic tab: page views + join-page views + signups + $25 buyers, by referring
|
||||
// domain / first-touch source, by landing page, by angle and by day (Marty, 2026-09-12)
|
||||
if (p === '/api/admin/traffic' && req.method === 'GET') {
|
||||
if (!isAdmin(req)) return json(res, 401, { error: 'auth' });
|
||||
@@ -2538,7 +2538,7 @@ const server = http.createServer(async (req, res) => {
|
||||
const own = (await accounts.positions(s.email)).filter(p => p.memberId);
|
||||
const myIds = new Set([myId, ...own.map(p => p.memberId)].filter(Boolean));
|
||||
const earnedBy = {};
|
||||
const qualified = new Set(); // members the contract counted as this account's qualifying buyers ($20+)
|
||||
const qualified = new Set(); // members the contract counted as this account's qualifying buyers ($25+)
|
||||
if (myIds.size) {
|
||||
for (const ev of chain.recentEvents(1e9)) {
|
||||
if (ev.type === 'TierPaid' && myIds.has(ev.recipientId) && ev.buyerId)
|
||||
@@ -2554,7 +2554,7 @@ const server = http.createServer(async (req, res) => {
|
||||
// a member's linked positions are theirs too: a qualifying buy from one of them lights their chip
|
||||
const posIds = {}; for (const m of levels.flatMap(L => L.members)) { try { posIds[m.email] = (await accounts.positions(m.email)).map(p => p.memberId).filter(Boolean); } catch (e) { posIds[m.email] = []; } }
|
||||
const idsOf = m => [m.memberId, ...(posIds[m.email] || [])].filter(Boolean);
|
||||
// Clinton's ask (2026-09-14): on levels 2 and 3 show who has made their $20+ buy (counted for their own
|
||||
// Clinton's ask (2026-09-14): on levels 2 and 3 show who has made their $25+ buy (counted for their own
|
||||
// sponsor) and how many qualifying buyers of their own they have, so a leader can see who is one short
|
||||
const onchain = {};
|
||||
for (const m of levels.flatMap(L => L.members)) { let bought = false, buyers = 0; for (const id of idsOf(m)) { const mm = await cachedMember(id); if (mm) { if (mm.countedAsBuyer) bought = true; buyers += mm.buyerCount || 0; } } onchain[m.email] = { bought, buyers }; }
|
||||
|
||||
Reference in New Issue
Block a user