Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
19 commits
Select commit Hold shift + click to select a range
c7fa195
feat(settings): add payout settings and reward delay defaults
TheDanniCraft Feb 14, 2026
a8d65ac
feat(payout): implement stripe customer balance payouts
TheDanniCraft Feb 14, 2026
f24997c
fix(payout): harden payout processing and status transitions
TheDanniCraft Feb 14, 2026
5daed0f
feat(ops): add scheduled conversion promotion with docker cron setup
TheDanniCraft Feb 14, 2026
5e4cda5
feat(ui): improve conversions and earnings payout UX
TheDanniCraft Feb 14, 2026
fb45441
fix(db): align v5 migration and deploy defaults
TheDanniCraft Feb 14, 2026
8eccbe8
feat: add Tremendous payout workflow with webhook sync
TheDanniCraft Feb 15, 2026
3e352f8
refactor: remove legacy stripe_transfer payout type
TheDanniCraft Feb 15, 2026
833581e
refactor: clean up legacy payout migration/code paths
TheDanniCraft Feb 15, 2026
0d24a9d
refactor: harden payout update flow and settings handling
TheDanniCraft Feb 15, 2026
3362ef3
feat(partner): add dashboard payout summary and polish payout copy
TheDanniCraft Feb 15, 2026
006f11a
fix(webhook): harden Tremendous signature handling and payout transpo…
TheDanniCraft Feb 15, 2026
c1b0351
fix(db): add payout and conversion indexes for payout workflows
TheDanniCraft Feb 15, 2026
105294e
fix(payout): harden admin Stripe flow and protect Tremendous key field
TheDanniCraft Feb 15, 2026
4316b54
fix(payout): harden tremendous reconciliation and deploy FK ordering
TheDanniCraft Feb 15, 2026
09424ef
fix(webhook): handle tremendous executed event as paid
TheDanniCraft Feb 15, 2026
f85e43c
fix(payout): harden invoice search validation and payout consistency
TheDanniCraft Feb 16, 2026
073563d
fix(payout): address webhook parsing and payout settings regressions
TheDanniCraft Feb 16, 2026
4d69ba5
fix(earnings): show payout-pending payable conversions in list and count
TheDanniCraft Feb 16, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions bin/promote-conversions.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
<?php

declare(strict_types=1);

use Numok\Database\Database;

define('ROOT_PATH', dirname(__DIR__));

require_once ROOT_PATH . '/vendor/autoload.php';
require_once ROOT_PATH . '/config/config.php';

try {
$stmt = Database::query(
"UPDATE conversions c
JOIN partner_programs pp ON c.partner_program_id = pp.id
JOIN programs p ON pp.program_id = p.id
SET c.status = 'payable',
c.updated_at = CURRENT_TIMESTAMP
WHERE c.status = 'pending'
AND c.created_at <= DATE_SUB(NOW(), INTERVAL COALESCE(p.reward_days, 0) DAY)"
);

$updatedRows = (int) $stmt->rowCount();
fwrite(STDOUT, '[promote-conversions] Updated rows: ' . $updatedRows . PHP_EOL);
exit(0);
} catch (\Throwable $e) {
error_log('Failed to promote pending conversions: ' . $e->getMessage());
fwrite(STDERR, '[promote-conversions] Failed: ' . $e->getMessage() . PHP_EOL);
exit(1);
}
Loading