feat(admin): show which domain a payment came from
Several storefronts share one gateway — the city booking sites and the ClinicPro panel itself — so the payments report could not say where a transaction originated. The payment already stores the return address it was started with; the domain is derived from it. Lowercased and stripped of "www." so one domain is one value in the report, null when a payment has no return address. Exposed on both the list and the detail (which also carries the full address), and the list search now matches it, so filtering to a single site needs no new parameter. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
+9
-1
@@ -654,7 +654,7 @@ List all payments.
|
||||
### Query Parameters (تکمیل)
|
||||
| Param | Type | Required | Description |
|
||||
|-------|------|----------|-------------|
|
||||
| `search` | string | ❌ | جستجو در موبایل کاربر، `reference_id` یا `order_id` |
|
||||
| `search` | string | ❌ | جستجو در موبایل کاربر، `reference_id`، `order_id` یا دامنهٔ مبدأ |
|
||||
|
||||
### Response `200`
|
||||
```json
|
||||
@@ -667,6 +667,7 @@ List all payments.
|
||||
"status": "success",
|
||||
"gateway": "mellat",
|
||||
"ref_id": "1234567",
|
||||
"origin": "nobat724.com",
|
||||
"patient_mobile": "0912...",
|
||||
"paid_at": "2026-07-02T09:00:00+03:30",
|
||||
"created_at": "2026-07-02T08:55:00+03:30"
|
||||
@@ -678,6 +679,11 @@ List all payments.
|
||||
|
||||
> `amount` بر حسب ریال، `ref_id` همان `reference_id` درگاه، `paid_at` فقط برای پرداخت `success` (بر اساس `updated_at`) و در غیر اینصورت `null`. تاریخها ISO-8601.
|
||||
|
||||
> `origin` دامنهٔ مبدأ پرداخت است — از `frontend_address` (آدرس بازگشت) استخراج
|
||||
> میشود، با حروف کوچک و بدون `www.`، تا یک دامنه در گزارش یک مقدار باشد. چند مبدأ
|
||||
> به یک درگاه میروند: سایتهای نوبتدهی شهری و پنل خودِ کلینیکپرو. پرداخت بدون آدرس
|
||||
> بازگشت `null` میگیرد.
|
||||
|
||||
---
|
||||
|
||||
### GET `/api/v1/admin/payments/{uuid}`
|
||||
@@ -698,6 +704,8 @@ List all payments.
|
||||
"gateway": "mellat",
|
||||
"type": "appointment",
|
||||
"ref_id": "1234567",
|
||||
"origin": "nobat724.com",
|
||||
"frontend_address": "https://nobat724.com/payment/result",
|
||||
"card_pan": "502229******2928",
|
||||
"patient_mobile": "0912...",
|
||||
"patient_name": "علی احمدی",
|
||||
|
||||
Reference in New Issue
Block a user