Commit graph

91 commits

Author SHA1 Message Date
fbe43a2cf4 FEAT(pg): sortable columns + date-range filters on the IPG+ admin panel
Make every PaymentRequest changelist column sortable ascending/descending
(computed amount/user/jalali columns get an `ordering` so they sort by the
underlying DB field; only the "check success again" action button stays
unsortable). Add a default `-created_at` ordering and surface `updated_at`
as its own sortable column. The created_at/updated_at DateTimeRangeFilters
are retained and compose with sorting.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-06 13:24:50 +03:30
b8e7ebb295 REVERT(pg): drop the commission-income wallet deposit
The deposit_income_submit/deposit_income_verify/charge_wallet_income
machinery and income_uuid added in 7dcb730 were not intended. Remove
them and the trailing charge_wallet_income() call.

The wallet charge is back to a single deposit: paid from IPG's own
application wallet (WALLET_IPG_CREDIT) into the user's rial wallet
(WALLET_RIAL_DEPOSIT).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 17:44:26 +03:30
e4e13b2235 FIX(pg): deposit user balance from IPG's own wallet, not the user rial wallet
deposit_submit/deposit_verify passed WALLET_RIAL_DEPOSIT (a user-side
wallet type) as the company-side payer wallet. The payer must be IPG's
application wallet, WALLET_IPG_CREDIT; the user's rial wallet stays as
the body payee_wallet. deposit_income_* already used WALLET_IPG_CREDIT
correctly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 17:39:31 +03:30
0083f1b092 REFACTOR(wallets): rename WALLET_INCOME_FROM_IPG to WALLET_IPG_CREDIT
Rename the wallet-service UUID setting and its env var from
WALLET_INCOME_FROM_IPG to WALLET_IPG_CREDIT across settings and the
income-deposit flow in apps/pg/models.py. Deployments must rename the
corresponding environment variable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 16:57:28 +03:30
803c574796 REFACTOR(wallets): rename WALLET_INCOME_FROM_IPG to WALLET_IPG_TRANSIT
Rename the wallet-service UUID setting and its env var from
WALLET_INCOME_FROM_IPG to WALLET_IPG_TRANSIT across settings and the
income-deposit flow in apps/pg/models.py. Deployments must rename the
corresponding environment variable.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-31 16:47:02 +03:30
7dcb730507 FEATURE(wallets): rename WALLET_RIAL and add WALLET_INCOME_FROM_IPG
WALLET_RIAL -> WALLET_RIAL_DEPOSIT to match the naming used for the same
wallet-service UUID in the advertising/settlement/promotions repos. Also
adds WALLET_INCOME_FROM_IPG and wires it in: after a successful wallet
charge, the commission portion is deposited separately into it (attributed
to the requesting OAuth2 application) instead of never entering the wallet
ledger. The income deposit is best-effort and logs on failure rather than
failing an already-successful charge.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-19 15:09:49 +03:30
a52ba09460 FEATURE(pg): add DateTimeRangeFilter to panel admin
add DateTimeRangeFilter to panel admin
2026-04-27 14:44:39 +03:30
Sayyid Hamid Mahdavi
7a215dc457 bug fix 2026-04-22 21:41:23 +03:30
Sayyid Hamid Mahdavi
e77a711bbf bug fix 2026-04-22 21:38:24 +03:30
Sayyid Hamid Mahdavi
7ff91acb82 bug fix 2026-04-22 21:26:32 +03:30
Sayyid Hamid Mahdavi
a318185147 admin 2026-04-22 19:59:44 +03:30
Sayyid Hamid Mahdavi
82c35ffc4a comment hide 2026-04-22 19:54:25 +03:30
Sayyid Hamid Mahdavi
556cdaf20a application gateway policy 2026-04-22 19:51:36 +03:30
Sayyid Hamid Mahdavi
da7d25d29e config 2026-03-29 13:40:20 +03:30
Sayyid Hamid Mahdavi
8f7f56f3df basic healthcheck and status 2026-03-15 15:08:32 +03:30
Sayyid Hamid Mahdavi
03ca49fbe3 correct reference_number 2026-03-10 10:43:24 +03:30
Sayyid Hamid Mahdavi
d749dedbef sep 2026-03-09 17:44:49 +03:30
Sayyid Hamid Mahdavi
6bab3b28a8 merge 2026-03-09 15:11:05 +03:30
Sayyid Hamid Mahdavi
d684bb7083 basic sep 2026-03-09 14:53:31 +03:30
Sayyid Hamid Mahdavi
906866b8de template 2025-12-14 15:17:26 +03:30
Sayyid Hamid Mahdavi
4b2314879f template 2025-12-14 15:14:31 +03:30
Sayyid Hamid Mahdavi
7c93636e8d template 2025-12-14 15:08:02 +03:30
09799c028c feat(ipg): fix failed request and change html files
fix failed request and change html files
2025-12-14 14:05:48 +03:30
Sayyid Hamid Mahdavi
c6cd842b72 cleanup 2025-12-04 15:06:16 +03:30
d0e8b24321 FEAT(pg): ipg commission calculation
ipg commission calculation
api/calculate_commission/?amount=300000
2025-11-15 14:59:15 +03:30
179677756a FEAT(pg): ipg commission calculation
ipg commission calculation
api/calculate_commission/?amount=300000
2025-11-15 14:52:32 +03:30
89133022b1 FEAT(pg): ipg commission calculation
api/calculate_commission/?amount=300000
2025-11-15 14:38:47 +03:30
01744e4139 Merge branch 'master' of https://git.addwin.ir/addwin/pg into FEATURE/payment-commission
# Conflicts:
#	apps/pg/models.py
2025-11-15 14:31:15 +03:30
6aceb75185 FEAT(pg): ipg commission calculation
api/calculate_commission/?amount=300000
2025-11-15 14:15:54 +03:30
Sayyid Hamid Mahdavi
1a8e210e87 cleanup 2025-11-13 16:20:19 +03:30
0bb1889f27 FEAT(pg): ipg commission
COMMISSION_LEVEL1=1200
COMMISSION_LEVEL2_MIN_AMOUNT=6000000
COMMISSION_LEVEL2_MAX_AMOUNT=400000000
COMMISSION_LEVEL2_RATE=0.0002
COMMISSION_LEVEL3=80000
2025-11-11 14:50:52 +03:30
fbff6b1336 FEAT(pg): ipg commission
ipg commission
2025-11-11 14:47:22 +03:30
9d79f30518 FEAT(pg): ipg commission
ipg commission
2025-11-11 13:16:15 +03:30
0c9dde0339 fix(pg): deposit verify process
deposit verify process
2025-10-29 13:36:50 +03:30
1084ed0b5c fix(pg): new wallet client to handle category uuid
new wallet client to handle category uuid
notice: add WALLET_RIAL_CATEGORY to .env
2025-10-25 17:14:28 +03:30
ed77a06984 fix(pg): fix payment request admin list display
fix payment request admin list display
2025-10-25 16:38:10 +03:30
475d9aea38 Merge branch 'master' of https://git.addwin.ir/addwin/pg into FEATURE/adding_is_registered_to_payment_request
# Conflicts:
#	apps/pg/admin.py
2025-10-25 15:47:40 +03:30
hgh
fe31f41362 FEATURE(pg): check payment request success and add logger
check payment request success and add logger
2025-10-20 13:39:03 +03:30
hgh
64368eb188 FEATURE(pg):check success again
check success again
2025-10-15 17:53:22 +03:30
hgh
8ceb818edc FEATURE(pg):adding is registered field to payment request and batch mark as registered
adding is registered field to payment request and batch mark as registered
2025-10-14 11:48:14 +03:30
hgh
fe1f535ee6 FEATURE(pg):batch change payments to success/failed
batch change payments to success/failed
2025-10-13 15:49:53 +03:30
Sayyid Hamid Mahdavi
4281587396 state in callback 2025-10-07 13:19:48 +03:30
Sayyid Hamid Mahdavi
218a86ab7c i18n 2025-09-09 14:09:12 +03:30
Sayyid Hamid Mahdavi
011b1f2a72 i18n 2025-09-09 14:08:48 +03:30
Sayyid Hamid Mahdavi
336baa51eb local time instead of utc 2025-08-31 16:20:31 +03:30
Sayyid Hamid Mahdavi
cfe7db6dc9 local time instead of utc 2025-08-17 14:54:49 +03:30
Sayyid Hamid Mahdavi
91fed41036 sum in admin list view 2025-08-12 17:24:37 +03:30
Sayyid Hamid Mahdavi
9462e25de2 sum in admin list view 2025-08-12 16:55:25 +03:30
Sayyid Hamid Mahdavi
b410078649 new templates 2025-08-09 12:29:50 +03:30
Sayyid Hamid Mahdavi
2ccc838b11 fallah 2025-07-29 13:23:34 +03:30