Commit graph

26 commits

Author SHA1 Message Date
8725cdf699 RENAME(promotions): WALLET_PROMOTIONS_TRANSIT -> WALLET_PROMOTIONS_CREDIT
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 18:27:16 +03:30
d3800584b5 Merge branch 'master' into feature/wallet-changes
# Conflicts:
#	README.md
#	apps/promotions/models.py
#	main/settings.py
2026-08-25 17:49:45 +03:30
45a64f0013 FEATURE(promotions): route capture/first_ad_create payouts to advertising transit wallet
PromotionTypeChoices was an empty enum, so Recipient.promotion_type could
never hold a real value and every payout without an explicit
Recipient.wallet_uuid fell through to the same default wallet regardless of
what kind of promotion it was.

Give PromotionTypeChoices real values (first_ad_view, capture,
first_ad_create) and branch Recipient.get_wallet_category_uuid() on it:
first_ad_view (or unset) still pays into the user's cash-like reward wallet
(WALLET_USER_BILLBOARD_VISIT_INCOME); capture/first_ad_create are billboard/ad
credit, not a cash reward, so they route to the new WALLET_ADVERTISING_TRANSIT
setting (same wallet-service UUID as the advertising repo's own setting of
that name) instead. An explicit Recipient.wallet_uuid still wins over
promotion_type.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 16:57:44 +03:30
f59b8810d8 FEATURE(wallets): rename WALLET_RIAL/WALLET_REWARD, add WALLET_PROMOTIONS_TRANSIT, wire per-recipient routing
Promotion.promote() passed the same wallet UUID (WALLET_REWARD) as both
payer_wallet and payee_wallet, so every payout was routed out of and into
the same wallet type with no real company-owned pool. Add
WALLET_PROMOTIONS_TRANSIT as the dedicated payer_wallet, and rename
WALLET_RIAL/WALLET_REWARD to WALLET_RIAL_DEPOSIT/WALLET_USER_BILLBOARD_VISIT_INCOME
to match the naming used for the same wallet-service UUIDs in advertising/
settlement/ipg.

Also wires Recipient.get_wallet_category_uuid() (previously dead, and
falling back to an undefined setting) into the deposit call as payee_wallet,
so a Recipient can route its payout to its own wallet_uuid instead of every
payout hardcoding one constant.

Adds .env.example (none existed before) and docs/wallet_refactor.md
documenting the before/after and required .env changes per deploy target.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 13:27:49 +03:30
92bea29816 FEATURE(wallets): rename WALLET_RIAL/WALLET_REWARD and add WALLET_PROMOTION
WALLET_RIAL -> WALLET_RIAL_DEPOSIT, WALLET_REWARD -> WALLET_USER_BILLBOARD_VISIT_INCOME
to match the naming used for the same wallet-service UUIDs in the advertising/settlement
repos. Also introduces WALLET_PROMOTION as this service's own pool and routes
Promotion.promote()'s payer_wallet through it instead of reusing the payee's
WALLET_REWARD value.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-19 14:50:42 +03:30
Sayyid Hamid Mahdavi
e7db91d1da get user from accounts 2026-07-07 16:42:34 +03:30
Sayyid Hamid Mahdavi
3320ff93e3 temp 2026-07-07 12:10:19 +03:30
Sayyid Hamid Mahdavi
83582f25aa application views 2026-06-26 13:56:22 +03:30
Sayyid Hamid Mahdavi
61f3c8a920 get plan details 2026-02-22 13:59:48 +03:30
Sayyid Hamid Mahdavi
81e3e7776d update libs 2026-02-22 12:08:32 +03:30
Sayyid Hamid Mahdavi
7a55488a17 csrf 2026-02-21 17:10:59 +03:30
Sayyid Hamid Mahdavi
d4e77dbdf8 csrf 2026-02-15 12:24:21 +03:30
Sayyid Hamid Mahdavi
3443cba7bd logger 2025-12-03 18:32:23 +03:30
Sayyid Hamid Mahdavi
d67f4f6069 get notification base url from env 2025-12-03 18:14:15 +03:30
Sayyid Hamid Mahdavi
1ccc31ad23 get notification base url from env 2025-12-03 13:57:16 +03:30
Sayyid Hamid Mahdavi
419fe24c57 new wallet system 2025-11-11 18:57:22 +03:30
Sayyid Hamid Mahdavi
e30005021d last commit 2025-10-14 20:49:31 +03:30
Sayyid Hamid Mahdavi
a5854390cb recipient skeleton 2025-10-12 21:02:48 +03:30
Sayyid Hamid Mahdavi
75924dd2b6 basic promotion handler 2025-08-03 13:28:40 +03:30
Sayyid Hamid Mahdavi
bbc59c871e add -y 2025-07-29 20:43:24 +03:30
Sayyid Hamid Mahdavi
7a7f58ba69 more utils 2025-07-29 19:59:11 +03:30
Sayyid Hamid Mahdavi
68f0dd13db add celery 2025-07-22 18:03:24 +03:30
Sayyid Hamid Mahdavi
7a47f3e3d0 add static and template 2025-07-22 17:46:41 +03:30
Sayyid Hamid Mahdavi
acebaf94fe add additional settings 2025-07-22 16:25:13 +03:30
Sayyid Hamid Mahdavi
975dee6b3c settings as dir 2025-07-22 16:07:18 +03:30
Sayyid Hamid Mahdavi
3d836e8d79 init 2025-07-22 16:05:03 +03:30