@mohasinac/appkit 4.41.17 → 4.42.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/_internal/client/features/maintenance/views/MaintenanceDashboardView.js +1 -1
- package/dist/_internal/server/features/checkout/actions.d.ts +16 -14
- package/dist/_internal/server/features/checkout/actions.js +145 -97
- package/dist/_internal/server/features/checkout/bundle-expansion.d.ts +1 -1
- package/dist/_internal/server/features/checkout/index.d.ts +1 -1
- package/dist/_internal/server/features/checkout/index.js +1 -1
- package/dist/_internal/server/features/checkout/locked-lines.js +1 -1
- package/dist/_internal/server/features/checkout/source-context.js +2 -2
- package/dist/_internal/server/features/maintenance/analyze.js +1 -1
- package/dist/_internal/server/features/refunds/actions.d.ts +4 -4
- package/dist/_internal/server/features/refunds/actions.js +9 -8
- package/dist/_internal/server/functions/scheduled.d.ts +1 -2
- package/dist/_internal/server/functions/scheduled.js +1 -9
- package/dist/_internal/server/jobs/core/index.d.ts +0 -1
- package/dist/_internal/server/jobs/core/index.js +0 -1
- package/dist/_internal/server/jobs/handlers/index.d.ts +0 -1
- package/dist/_internal/server/jobs/handlers/index.js +0 -1
- package/dist/_internal/shared/actions/action-registry.js +2 -2
- package/dist/_internal/shared/checkout/order-math.d.ts +1 -1
- package/dist/_internal/shared/checkout/order-math.js +1 -1
- package/dist/_internal/shared/checkout/rules/prize-draw.rule.js +2 -2
- package/dist/_internal/shared/features/blog/schema.d.ts +4 -4
- package/dist/_internal/shared/features/cart/schema.d.ts +6 -6
- package/dist/_internal/shared/features/orders/refund-copy.d.ts +1 -1
- package/dist/_internal/shared/features/orders/refund-copy.js +1 -1
- package/dist/_internal/shared/features/orders/schema.d.ts +5 -5
- package/dist/_internal/shared/features/orders/schema.js +1 -1
- package/dist/_internal/shared/features/products/schema.d.ts +2 -2
- package/dist/_internal/shared/features/promotions/schema.d.ts +4 -4
- package/dist/_internal/shared/features/reviews/schema.d.ts +1 -1
- package/dist/client.d.ts +1 -1
- package/dist/client.js +1 -1
- package/dist/configs/next.js +2 -2
- package/dist/constants/field-names.d.ts +1 -1
- package/dist/constants/field-names.js +1 -1
- package/dist/contracts/index.d.ts +0 -2
- package/dist/contracts/index.js +0 -1
- package/dist/contracts/payment.d.ts +13 -2
- package/dist/contracts/payment.js +2 -2
- package/dist/core/integration-keys.d.ts +7 -3
- package/dist/core/integration-keys.js +13 -7
- package/dist/core/money.d.ts +11 -0
- package/dist/core/money.js +15 -0
- package/dist/errors/index.d.ts +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/errors/messages.d.ts +1 -0
- package/dist/errors/messages.js +1 -0
- package/dist/errors/{razorpay-unreachable.d.ts → payment-provider-unreachable.d.ts} +1 -1
- package/dist/errors/{razorpay-unreachable.js → payment-provider-unreachable.js} +1 -1
- package/dist/features/addresses/schemas/address-form.d.ts +20 -20
- package/dist/features/addresses/schemas/index.d.ts +2 -2
- package/dist/features/admin/components/AdminSiteSettingsView.js +32 -16
- package/dist/features/admin/constants/site-settings-tabs.d.ts +1 -1
- package/dist/features/admin/schemas/admin-ops-forms.d.ts +10 -10
- package/dist/features/admin/schemas/admin-user-form.d.ts +2 -2
- package/dist/features/admin/schemas/firestore.d.ts +17 -8
- package/dist/features/admin/schemas/firestore.js +1 -1
- package/dist/features/admin/schemas/nav-item-form.d.ts +2 -2
- package/dist/features/auctions/schemas/index.d.ts +2 -2
- package/dist/features/auth/schemas/index.d.ts +2 -2
- package/dist/features/before-after/schemas/index.d.ts +2 -2
- package/dist/features/blog/actions/blog-actions.d.ts +4 -4
- package/dist/features/blog/schemas/blog-form.d.ts +2 -2
- package/dist/features/blog/schemas/index.d.ts +4 -4
- package/dist/features/cart/schemas/index.d.ts +3 -3
- package/dist/features/catalogue/schemas/validation.d.ts +4 -4
- package/dist/features/categories/schemas/index.d.ts +2 -2
- package/dist/features/checkout/index.d.ts +0 -4
- package/dist/features/checkout/index.js +0 -3
- package/dist/features/checkout/types/index.d.ts +0 -25
- package/dist/features/checkout/types/index.js +1 -2
- package/dist/features/collections/schemas/index.d.ts +2 -2
- package/dist/features/consultation/schemas/index.d.ts +4 -4
- package/dist/features/corporate/schemas/index.d.ts +2 -2
- package/dist/features/events/schemas/index.d.ts +4 -4
- package/dist/features/grouped/schemas/index.d.ts +2 -2
- package/dist/features/homepage/schemas/index.d.ts +2 -2
- package/dist/features/lottery/schemas/zod.d.ts +4 -4
- package/dist/features/loyalty/schemas/index.d.ts +6 -6
- package/dist/features/orders/components/OrderPaymentSummary.d.ts +1 -1
- package/dist/features/orders/components/OrderPaymentSummary.js +5 -5
- package/dist/features/orders/components/RefundHistoryTable.js +1 -1
- package/dist/features/orders/repository/orders.repository.d.ts +10 -1
- package/dist/features/orders/repository/orders.repository.js +17 -1
- package/dist/features/orders/schemas/firestore.d.ts +11 -12
- package/dist/features/orders/schemas/firestore.js +0 -1
- package/dist/features/orders/schemas/index.d.ts +48 -48
- package/dist/features/orders/schemas/index.js +1 -1
- package/dist/features/orders/types/index.d.ts +1 -3
- package/dist/features/orders/types/index.js +1 -2
- package/dist/features/payments/manifest.js +1 -1
- package/dist/features/payments/repository/payout.repository.d.ts +1 -4
- package/dist/features/payments/repository/payout.repository.js +0 -29
- package/dist/features/payments/schemas/firestore.d.ts +8 -15
- package/dist/features/payments/schemas/firestore.js +7 -5
- package/dist/features/payments/schemas/index.d.ts +52 -125
- package/dist/features/payments/schemas/index.js +0 -58
- package/dist/features/payments/types/index.d.ts +2 -4
- package/dist/features/payments/types/index.js +1 -2
- package/dist/features/products/schemas/index.d.ts +14 -14
- package/dist/features/products/schemas/product-features.validators.d.ts +10 -10
- package/dist/features/promotions/schemas/index.d.ts +20 -20
- package/dist/features/reviews/schemas/index.d.ts +8 -8
- package/dist/features/scams/schemas/index.d.ts +10 -10
- package/dist/features/search/action-index/settings-entries.js +4 -4
- package/dist/features/seller/schemas/index.d.ts +12 -12
- package/dist/features/seller/schemas/order-forms.d.ts +4 -4
- package/dist/features/shipments/schemas/validation.d.ts +28 -28
- package/dist/features/store-extensions/schemas/payout-method-form.d.ts +50 -50
- package/dist/features/store-extensions/schemas/report-create-form.d.ts +2 -2
- package/dist/features/store-extensions/schemas/shipping-config-form.d.ts +10 -10
- package/dist/features/support/schemas/index.d.ts +14 -14
- package/dist/features/tester/actions/checklist-item-actions.d.ts +4 -4
- package/dist/features/tester/schemas/checklist-item-form.d.ts +2 -2
- package/dist/features/tester/seed-data/_money-flows.js +145 -0
- package/dist/features/tester/seed-data/authored/admin__site-system.js +38 -0
- package/dist/features/tester/seed-data/authored/buying__buying-checkout.js +10 -10
- package/dist/features/tester/seed-data/authored/buying__offers.js +11 -10
- package/dist/features/tester/seed-data/authored/cta-layout__checkout-bottom-bar.js +1 -1
- package/dist/features/tester/seed-data/tester-checklist-seed-data.js +24 -12
- package/dist/features/wishlist/schemas/index.d.ts +2 -2
- package/dist/index.d.ts +6 -28
- package/dist/index.js +8 -51
- package/dist/jobs.d.ts +1 -1
- package/dist/jobs.js +1 -1
- package/dist/providers/payment-phonepe/index.d.ts +117 -0
- package/dist/providers/payment-phonepe/index.js +221 -0
- package/dist/providers.d.ts +3 -2
- package/dist/providers.js +3 -2
- package/dist/schemas/registry.d.ts +163 -2623
- package/dist/schemas/registry.js +1 -6
- package/dist/seed/faq-seed-data.js +5 -5
- package/dist/seed/payouts-seed-data.js +3 -3
- package/dist/seed/site-settings-seed-data.js +7 -4
- package/dist/server-entry.d.ts +1 -2
- package/dist/server-entry.js +1 -3
- package/dist/server.d.ts +3 -9
- package/dist/server.js +5 -23
- package/dist/validation/schemas.d.ts +2 -2
- package/package.json +5 -4
- package/dist/_internal/server/features/payments/actions.d.ts +0 -30
- package/dist/_internal/server/features/payments/actions.js +0 -45
- package/dist/_internal/server/features/payments/data.d.ts +0 -13
- package/dist/_internal/server/features/payments/data.js +0 -20
- package/dist/_internal/server/features/payments/index.d.ts +0 -3
- package/dist/_internal/server/features/payments/index.js +0 -3
- package/dist/_internal/server/jobs/core/payoutBatch.d.ts +0 -2
- package/dist/_internal/server/jobs/core/payoutBatch.js +0 -120
- package/dist/_internal/server/jobs/handlers/payoutBatch.d.ts +0 -2
- package/dist/_internal/server/jobs/handlers/payoutBatch.js +0 -2
- package/dist/_internal/shared/features/payments/config.d.ts +0 -3
- package/dist/_internal/shared/features/payments/config.js +0 -3
- package/dist/contracts/client-payment-gateway.d.ts +0 -64
- package/dist/contracts/client-payment-gateway.js +0 -25
- package/dist/features/checkout/hooks/useCheckout.d.ts +0 -9
- package/dist/features/checkout/hooks/useCheckout.js +0 -24
- package/dist/features/checkout/hooks/useCheckoutApi.d.ts +0 -72
- package/dist/features/checkout/hooks/useCheckoutApi.js +0 -47
- package/dist/features/checkout/hooks/usePaymentCheckout.d.ts +0 -77
- package/dist/features/checkout/hooks/usePaymentCheckout.js +0 -192
- package/dist/providers/payment-razorpay/index.d.ts +0 -115
- package/dist/providers/payment-razorpay/index.js +0 -208
- package/dist/schemas/webhooks/razorpay.d.ts +0 -2634
- package/dist/schemas/webhooks/razorpay.js +0 -104
|
@@ -14,45 +14,45 @@ export declare const payoutMethodFormSchema: z.ZodEffects<z.ZodObject<{
|
|
|
14
14
|
isDefault: z.ZodBoolean;
|
|
15
15
|
isActive: z.ZodBoolean;
|
|
16
16
|
}, "strip", z.ZodTypeAny, {
|
|
17
|
-
type: "card" | "other" | "
|
|
17
|
+
type: "card" | "other" | "bank" | "upi";
|
|
18
18
|
label: string;
|
|
19
|
-
isDefault: boolean;
|
|
20
19
|
isActive: boolean;
|
|
21
|
-
|
|
22
|
-
ifscCode?: string | undefined;
|
|
23
|
-
bankName?: string | undefined;
|
|
20
|
+
isDefault: boolean;
|
|
24
21
|
accountNumber?: string | undefined;
|
|
22
|
+
ifscCode?: string | undefined;
|
|
25
23
|
upiVpa?: string | undefined;
|
|
24
|
+
accountHolderName?: string | undefined;
|
|
25
|
+
bankName?: string | undefined;
|
|
26
26
|
}, {
|
|
27
|
-
type: "card" | "other" | "
|
|
27
|
+
type: "card" | "other" | "bank" | "upi";
|
|
28
28
|
label: string;
|
|
29
|
-
isDefault: boolean;
|
|
30
29
|
isActive: boolean;
|
|
31
|
-
|
|
32
|
-
ifscCode?: string | undefined;
|
|
33
|
-
bankName?: string | undefined;
|
|
30
|
+
isDefault: boolean;
|
|
34
31
|
accountNumber?: string | undefined;
|
|
32
|
+
ifscCode?: string | undefined;
|
|
35
33
|
upiVpa?: string | undefined;
|
|
34
|
+
accountHolderName?: string | undefined;
|
|
35
|
+
bankName?: string | undefined;
|
|
36
36
|
}>, {
|
|
37
|
-
type: "card" | "other" | "
|
|
37
|
+
type: "card" | "other" | "bank" | "upi";
|
|
38
38
|
label: string;
|
|
39
|
-
isDefault: boolean;
|
|
40
39
|
isActive: boolean;
|
|
41
|
-
|
|
42
|
-
ifscCode?: string | undefined;
|
|
43
|
-
bankName?: string | undefined;
|
|
40
|
+
isDefault: boolean;
|
|
44
41
|
accountNumber?: string | undefined;
|
|
42
|
+
ifscCode?: string | undefined;
|
|
45
43
|
upiVpa?: string | undefined;
|
|
44
|
+
accountHolderName?: string | undefined;
|
|
45
|
+
bankName?: string | undefined;
|
|
46
46
|
}, {
|
|
47
|
-
type: "card" | "other" | "
|
|
47
|
+
type: "card" | "other" | "bank" | "upi";
|
|
48
48
|
label: string;
|
|
49
|
-
isDefault: boolean;
|
|
50
49
|
isActive: boolean;
|
|
51
|
-
|
|
52
|
-
ifscCode?: string | undefined;
|
|
53
|
-
bankName?: string | undefined;
|
|
50
|
+
isDefault: boolean;
|
|
54
51
|
accountNumber?: string | undefined;
|
|
52
|
+
ifscCode?: string | undefined;
|
|
55
53
|
upiVpa?: string | undefined;
|
|
54
|
+
accountHolderName?: string | undefined;
|
|
55
|
+
bankName?: string | undefined;
|
|
56
56
|
}>;
|
|
57
57
|
export type PayoutMethodFormValues = z.infer<typeof payoutMethodFormSchema>;
|
|
58
58
|
/**
|
|
@@ -71,45 +71,45 @@ export declare const payoutMethodCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
71
71
|
isDefault: z.ZodBoolean;
|
|
72
72
|
isActive: z.ZodBoolean;
|
|
73
73
|
}, "strip", z.ZodTypeAny, {
|
|
74
|
-
type: "card" | "other" | "
|
|
74
|
+
type: "card" | "other" | "bank" | "upi";
|
|
75
75
|
label: string;
|
|
76
|
-
isDefault: boolean;
|
|
77
76
|
isActive: boolean;
|
|
78
|
-
|
|
79
|
-
ifscCode?: string | undefined;
|
|
80
|
-
bankName?: string | undefined;
|
|
77
|
+
isDefault: boolean;
|
|
81
78
|
accountNumber?: string | undefined;
|
|
79
|
+
ifscCode?: string | undefined;
|
|
82
80
|
upiVpa?: string | undefined;
|
|
81
|
+
accountHolderName?: string | undefined;
|
|
82
|
+
bankName?: string | undefined;
|
|
83
83
|
}, {
|
|
84
|
-
type: "card" | "other" | "
|
|
84
|
+
type: "card" | "other" | "bank" | "upi";
|
|
85
85
|
label: string;
|
|
86
|
-
isDefault: boolean;
|
|
87
86
|
isActive: boolean;
|
|
88
|
-
|
|
89
|
-
ifscCode?: string | undefined;
|
|
90
|
-
bankName?: string | undefined;
|
|
87
|
+
isDefault: boolean;
|
|
91
88
|
accountNumber?: string | undefined;
|
|
89
|
+
ifscCode?: string | undefined;
|
|
92
90
|
upiVpa?: string | undefined;
|
|
91
|
+
accountHolderName?: string | undefined;
|
|
92
|
+
bankName?: string | undefined;
|
|
93
93
|
}>, {
|
|
94
|
-
type: "card" | "other" | "
|
|
94
|
+
type: "card" | "other" | "bank" | "upi";
|
|
95
95
|
label: string;
|
|
96
|
-
isDefault: boolean;
|
|
97
96
|
isActive: boolean;
|
|
98
|
-
|
|
99
|
-
ifscCode?: string | undefined;
|
|
100
|
-
bankName?: string | undefined;
|
|
97
|
+
isDefault: boolean;
|
|
101
98
|
accountNumber?: string | undefined;
|
|
99
|
+
ifscCode?: string | undefined;
|
|
102
100
|
upiVpa?: string | undefined;
|
|
101
|
+
accountHolderName?: string | undefined;
|
|
102
|
+
bankName?: string | undefined;
|
|
103
103
|
}, {
|
|
104
|
-
type: "card" | "other" | "
|
|
104
|
+
type: "card" | "other" | "bank" | "upi";
|
|
105
105
|
label: string;
|
|
106
|
-
isDefault: boolean;
|
|
107
106
|
isActive: boolean;
|
|
108
|
-
|
|
109
|
-
ifscCode?: string | undefined;
|
|
110
|
-
bankName?: string | undefined;
|
|
107
|
+
isDefault: boolean;
|
|
111
108
|
accountNumber?: string | undefined;
|
|
109
|
+
ifscCode?: string | undefined;
|
|
112
110
|
upiVpa?: string | undefined;
|
|
111
|
+
accountHolderName?: string | undefined;
|
|
112
|
+
bankName?: string | undefined;
|
|
113
113
|
}>;
|
|
114
114
|
/**
|
|
115
115
|
* Update contract.
|
|
@@ -131,23 +131,23 @@ export declare const payoutMethodUpdateSchema: z.ZodObject<{
|
|
|
131
131
|
isDefault: z.ZodOptional<z.ZodBoolean>;
|
|
132
132
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
133
133
|
}, "strict", z.ZodTypeAny, {
|
|
134
|
-
type?: "card" | "other" | "
|
|
134
|
+
type?: "card" | "other" | "bank" | "upi" | undefined;
|
|
135
135
|
label?: string | undefined;
|
|
136
|
-
isDefault?: boolean | undefined;
|
|
137
|
-
accountHolderName?: string | undefined;
|
|
138
|
-
ifscCode?: string | undefined;
|
|
139
|
-
bankName?: string | undefined;
|
|
140
136
|
isActive?: boolean | undefined;
|
|
137
|
+
isDefault?: boolean | undefined;
|
|
141
138
|
accountNumber?: string | undefined;
|
|
139
|
+
ifscCode?: string | undefined;
|
|
142
140
|
upiVpa?: string | undefined;
|
|
143
|
-
}, {
|
|
144
|
-
type?: "card" | "other" | "upi" | "bank" | undefined;
|
|
145
|
-
label?: string | undefined;
|
|
146
|
-
isDefault?: boolean | undefined;
|
|
147
141
|
accountHolderName?: string | undefined;
|
|
148
|
-
ifscCode?: string | undefined;
|
|
149
142
|
bankName?: string | undefined;
|
|
143
|
+
}, {
|
|
144
|
+
type?: "card" | "other" | "bank" | "upi" | undefined;
|
|
145
|
+
label?: string | undefined;
|
|
150
146
|
isActive?: boolean | undefined;
|
|
147
|
+
isDefault?: boolean | undefined;
|
|
151
148
|
accountNumber?: string | undefined;
|
|
149
|
+
ifscCode?: string | undefined;
|
|
152
150
|
upiVpa?: string | undefined;
|
|
151
|
+
accountHolderName?: string | undefined;
|
|
152
|
+
bankName?: string | undefined;
|
|
153
153
|
}>;
|
|
@@ -10,16 +10,16 @@ export declare const reportCreateSchema: z.ZodObject<{
|
|
|
10
10
|
detail: z.ZodString;
|
|
11
11
|
evidenceUrls: z.ZodOptional<z.ZodArray<z.ZodString, "many">>;
|
|
12
12
|
}, "strict", z.ZodTypeAny, {
|
|
13
|
-
reason: import("./firestore").ReportReason;
|
|
14
13
|
entityId: string;
|
|
15
14
|
entityType: import("./firestore").ReportEntityType;
|
|
16
15
|
detail: string;
|
|
16
|
+
reason: import("./firestore").ReportReason;
|
|
17
17
|
evidenceUrls?: string[] | undefined;
|
|
18
18
|
}, {
|
|
19
|
-
reason: import("./firestore").ReportReason;
|
|
20
19
|
entityId: string;
|
|
21
20
|
entityType: import("./firestore").ReportEntityType;
|
|
22
21
|
detail: string;
|
|
22
|
+
reason: import("./firestore").ReportReason;
|
|
23
23
|
evidenceUrls?: string[] | undefined;
|
|
24
24
|
}>;
|
|
25
25
|
export type ReportCreateValues = z.infer<typeof reportCreateSchema>;
|
|
@@ -21,8 +21,8 @@ export declare const shippingConfigFormSchema: z.ZodEffects<z.ZodObject<{
|
|
|
21
21
|
isActive: z.ZodBoolean;
|
|
22
22
|
}, "strip", z.ZodTypeAny, {
|
|
23
23
|
label: string;
|
|
24
|
-
isDefault: boolean;
|
|
25
24
|
isActive: boolean;
|
|
25
|
+
isDefault: boolean;
|
|
26
26
|
method: ShippingMethod;
|
|
27
27
|
estimatedDays?: number | undefined;
|
|
28
28
|
freeAbove?: number | undefined;
|
|
@@ -31,8 +31,8 @@ export declare const shippingConfigFormSchema: z.ZodEffects<z.ZodObject<{
|
|
|
31
31
|
expressSurcharge?: number | undefined;
|
|
32
32
|
}, {
|
|
33
33
|
label: string;
|
|
34
|
-
isDefault: boolean;
|
|
35
34
|
isActive: boolean;
|
|
35
|
+
isDefault: boolean;
|
|
36
36
|
method: ShippingMethod;
|
|
37
37
|
estimatedDays?: number | undefined;
|
|
38
38
|
freeAbove?: number | undefined;
|
|
@@ -41,8 +41,8 @@ export declare const shippingConfigFormSchema: z.ZodEffects<z.ZodObject<{
|
|
|
41
41
|
expressSurcharge?: number | undefined;
|
|
42
42
|
}>, {
|
|
43
43
|
label: string;
|
|
44
|
-
isDefault: boolean;
|
|
45
44
|
isActive: boolean;
|
|
45
|
+
isDefault: boolean;
|
|
46
46
|
method: ShippingMethod;
|
|
47
47
|
estimatedDays?: number | undefined;
|
|
48
48
|
freeAbove?: number | undefined;
|
|
@@ -51,8 +51,8 @@ export declare const shippingConfigFormSchema: z.ZodEffects<z.ZodObject<{
|
|
|
51
51
|
expressSurcharge?: number | undefined;
|
|
52
52
|
}, {
|
|
53
53
|
label: string;
|
|
54
|
-
isDefault: boolean;
|
|
55
54
|
isActive: boolean;
|
|
55
|
+
isDefault: boolean;
|
|
56
56
|
method: ShippingMethod;
|
|
57
57
|
estimatedDays?: number | undefined;
|
|
58
58
|
freeAbove?: number | undefined;
|
|
@@ -74,8 +74,8 @@ export declare const shippingConfigCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
74
74
|
isActive: z.ZodBoolean;
|
|
75
75
|
}, "strip", z.ZodTypeAny, {
|
|
76
76
|
label: string;
|
|
77
|
-
isDefault: boolean;
|
|
78
77
|
isActive: boolean;
|
|
78
|
+
isDefault: boolean;
|
|
79
79
|
method: ShippingMethod;
|
|
80
80
|
estimatedDays?: number | undefined;
|
|
81
81
|
freeAbove?: number | undefined;
|
|
@@ -84,8 +84,8 @@ export declare const shippingConfigCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
84
84
|
expressSurcharge?: number | undefined;
|
|
85
85
|
}, {
|
|
86
86
|
label: string;
|
|
87
|
-
isDefault: boolean;
|
|
88
87
|
isActive: boolean;
|
|
88
|
+
isDefault: boolean;
|
|
89
89
|
method: ShippingMethod;
|
|
90
90
|
estimatedDays?: number | undefined;
|
|
91
91
|
freeAbove?: number | undefined;
|
|
@@ -94,8 +94,8 @@ export declare const shippingConfigCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
94
94
|
expressSurcharge?: number | undefined;
|
|
95
95
|
}>, {
|
|
96
96
|
label: string;
|
|
97
|
-
isDefault: boolean;
|
|
98
97
|
isActive: boolean;
|
|
98
|
+
isDefault: boolean;
|
|
99
99
|
method: ShippingMethod;
|
|
100
100
|
estimatedDays?: number | undefined;
|
|
101
101
|
freeAbove?: number | undefined;
|
|
@@ -104,8 +104,8 @@ export declare const shippingConfigCreateSchema: z.ZodEffects<z.ZodObject<{
|
|
|
104
104
|
expressSurcharge?: number | undefined;
|
|
105
105
|
}, {
|
|
106
106
|
label: string;
|
|
107
|
-
isDefault: boolean;
|
|
108
107
|
isActive: boolean;
|
|
108
|
+
isDefault: boolean;
|
|
109
109
|
method: ShippingMethod;
|
|
110
110
|
estimatedDays?: number | undefined;
|
|
111
111
|
freeAbove?: number | undefined;
|
|
@@ -131,8 +131,8 @@ export declare const shippingConfigUpdateSchema: z.ZodObject<{
|
|
|
131
131
|
isActive: z.ZodOptional<z.ZodBoolean>;
|
|
132
132
|
}, "strict", z.ZodTypeAny, {
|
|
133
133
|
label?: string | undefined;
|
|
134
|
-
isDefault?: boolean | undefined;
|
|
135
134
|
isActive?: boolean | undefined;
|
|
135
|
+
isDefault?: boolean | undefined;
|
|
136
136
|
method?: ShippingMethod | undefined;
|
|
137
137
|
estimatedDays?: number | undefined;
|
|
138
138
|
freeAbove?: number | undefined;
|
|
@@ -142,8 +142,8 @@ export declare const shippingConfigUpdateSchema: z.ZodObject<{
|
|
|
142
142
|
zones?: string[] | undefined;
|
|
143
143
|
}, {
|
|
144
144
|
label?: string | undefined;
|
|
145
|
-
isDefault?: boolean | undefined;
|
|
146
145
|
isActive?: boolean | undefined;
|
|
146
|
+
isDefault?: boolean | undefined;
|
|
147
147
|
method?: ShippingMethod | undefined;
|
|
148
148
|
estimatedDays?: number | undefined;
|
|
149
149
|
freeAbove?: number | undefined;
|
|
@@ -44,16 +44,16 @@ export declare const ticketRelatedPartiesSchema: z.ZodObject<{
|
|
|
44
44
|
bidId: z.ZodOptional<z.ZodString>;
|
|
45
45
|
}, "strip", z.ZodTypeAny, {
|
|
46
46
|
storeId?: string | undefined;
|
|
47
|
-
userId?: string | undefined;
|
|
48
|
-
orderId?: string | undefined;
|
|
49
47
|
productId?: string | undefined;
|
|
48
|
+
userId?: string | undefined;
|
|
50
49
|
bidId?: string | undefined;
|
|
50
|
+
orderId?: string | undefined;
|
|
51
51
|
}, {
|
|
52
52
|
storeId?: string | undefined;
|
|
53
|
-
userId?: string | undefined;
|
|
54
|
-
orderId?: string | undefined;
|
|
55
53
|
productId?: string | undefined;
|
|
54
|
+
userId?: string | undefined;
|
|
56
55
|
bidId?: string | undefined;
|
|
56
|
+
orderId?: string | undefined;
|
|
57
57
|
}>;
|
|
58
58
|
export declare const supportTicketFirestoreSchema: z.ZodObject<{
|
|
59
59
|
createdAt: z.ZodUnion<[z.ZodDate, z.ZodString, z.ZodObject<{
|
|
@@ -86,16 +86,16 @@ export declare const supportTicketFirestoreSchema: z.ZodObject<{
|
|
|
86
86
|
bidId: z.ZodOptional<z.ZodString>;
|
|
87
87
|
}, "strip", z.ZodTypeAny, {
|
|
88
88
|
storeId?: string | undefined;
|
|
89
|
-
userId?: string | undefined;
|
|
90
|
-
orderId?: string | undefined;
|
|
91
89
|
productId?: string | undefined;
|
|
90
|
+
userId?: string | undefined;
|
|
92
91
|
bidId?: string | undefined;
|
|
92
|
+
orderId?: string | undefined;
|
|
93
93
|
}, {
|
|
94
94
|
storeId?: string | undefined;
|
|
95
|
-
userId?: string | undefined;
|
|
96
|
-
orderId?: string | undefined;
|
|
97
95
|
productId?: string | undefined;
|
|
96
|
+
userId?: string | undefined;
|
|
98
97
|
bidId?: string | undefined;
|
|
98
|
+
orderId?: string | undefined;
|
|
99
99
|
}>>;
|
|
100
100
|
status: z.ZodEnum<["open", "in_progress", "waiting_on_user", "resolved", "closed"]>;
|
|
101
101
|
priority: z.ZodEnum<["low", "normal", "high", "urgent"]>;
|
|
@@ -157,10 +157,10 @@ export declare const supportTicketFirestoreSchema: z.ZodObject<{
|
|
|
157
157
|
updatedAt: string | Date | z.objectOutputType<{
|
|
158
158
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
159
159
|
}, z.ZodTypeAny, "passthrough">;
|
|
160
|
-
userId: string;
|
|
161
160
|
category: "general" | "account" | "order_issue" | "billing_payment" | "listing_dispute" | "scam_report" | "refund_request" | "auction_dispute" | "store_change_request" | "order_modification_request" | "unban_request";
|
|
162
161
|
priority: "normal" | "high" | "low" | "urgent";
|
|
163
162
|
description: string;
|
|
163
|
+
userId: string;
|
|
164
164
|
userEmail: string;
|
|
165
165
|
userDisplayName: string;
|
|
166
166
|
subject: string;
|
|
@@ -185,10 +185,10 @@ export declare const supportTicketFirestoreSchema: z.ZodObject<{
|
|
|
185
185
|
assignedToName?: string | undefined;
|
|
186
186
|
relatedParties?: {
|
|
187
187
|
storeId?: string | undefined;
|
|
188
|
-
userId?: string | undefined;
|
|
189
|
-
orderId?: string | undefined;
|
|
190
188
|
productId?: string | undefined;
|
|
189
|
+
userId?: string | undefined;
|
|
191
190
|
bidId?: string | undefined;
|
|
191
|
+
orderId?: string | undefined;
|
|
192
192
|
} | undefined;
|
|
193
193
|
internalNotes?: string | undefined;
|
|
194
194
|
}, {
|
|
@@ -200,10 +200,10 @@ export declare const supportTicketFirestoreSchema: z.ZodObject<{
|
|
|
200
200
|
updatedAt: string | Date | z.objectInputType<{
|
|
201
201
|
toDate: z.ZodFunction<z.ZodTuple<[], z.ZodUnknown>, z.ZodDate>;
|
|
202
202
|
}, z.ZodTypeAny, "passthrough">;
|
|
203
|
-
userId: string;
|
|
204
203
|
category: "general" | "account" | "order_issue" | "billing_payment" | "listing_dispute" | "scam_report" | "refund_request" | "auction_dispute" | "store_change_request" | "order_modification_request" | "unban_request";
|
|
205
204
|
priority: "normal" | "high" | "low" | "urgent";
|
|
206
205
|
description: string;
|
|
206
|
+
userId: string;
|
|
207
207
|
userEmail: string;
|
|
208
208
|
userDisplayName: string;
|
|
209
209
|
subject: string;
|
|
@@ -228,10 +228,10 @@ export declare const supportTicketFirestoreSchema: z.ZodObject<{
|
|
|
228
228
|
assignedToName?: string | undefined;
|
|
229
229
|
relatedParties?: {
|
|
230
230
|
storeId?: string | undefined;
|
|
231
|
-
userId?: string | undefined;
|
|
232
|
-
orderId?: string | undefined;
|
|
233
231
|
productId?: string | undefined;
|
|
232
|
+
userId?: string | undefined;
|
|
234
233
|
bidId?: string | undefined;
|
|
234
|
+
orderId?: string | undefined;
|
|
235
235
|
} | undefined;
|
|
236
236
|
internalNotes?: string | undefined;
|
|
237
237
|
}>;
|
|
@@ -22,18 +22,18 @@ export declare const checklistItemCreateSchema: z.ZodObject<{
|
|
|
22
22
|
groupLabel: string;
|
|
23
23
|
pageLabel: string;
|
|
24
24
|
adminOnly: boolean;
|
|
25
|
-
href?: string | undefined;
|
|
26
25
|
description?: string | undefined;
|
|
26
|
+
href?: string | undefined;
|
|
27
27
|
}, {
|
|
28
28
|
label: string;
|
|
29
29
|
groupKey: string;
|
|
30
30
|
pageKey: string;
|
|
31
31
|
groupLabel: string;
|
|
32
32
|
pageLabel: string;
|
|
33
|
-
href?: string | undefined;
|
|
34
33
|
description?: string | undefined;
|
|
35
34
|
isActive?: boolean | undefined;
|
|
36
35
|
order?: number | undefined;
|
|
36
|
+
href?: string | undefined;
|
|
37
37
|
phase?: number | undefined;
|
|
38
38
|
adminOnly?: boolean | undefined;
|
|
39
39
|
}>;
|
|
@@ -51,10 +51,10 @@ export declare const checklistItemUpdateSchema: z.ZodObject<{
|
|
|
51
51
|
adminOnly: z.ZodOptional<z.ZodDefault<z.ZodBoolean>>;
|
|
52
52
|
}, "strip", z.ZodTypeAny, {
|
|
53
53
|
label?: string | undefined;
|
|
54
|
-
href?: string | undefined;
|
|
55
54
|
description?: string | undefined;
|
|
56
55
|
isActive?: boolean | undefined;
|
|
57
56
|
order?: number | undefined;
|
|
57
|
+
href?: string | undefined;
|
|
58
58
|
groupKey?: string | undefined;
|
|
59
59
|
pageKey?: string | undefined;
|
|
60
60
|
phase?: number | undefined;
|
|
@@ -63,10 +63,10 @@ export declare const checklistItemUpdateSchema: z.ZodObject<{
|
|
|
63
63
|
adminOnly?: boolean | undefined;
|
|
64
64
|
}, {
|
|
65
65
|
label?: string | undefined;
|
|
66
|
-
href?: string | undefined;
|
|
67
66
|
description?: string | undefined;
|
|
68
67
|
isActive?: boolean | undefined;
|
|
69
68
|
order?: number | undefined;
|
|
69
|
+
href?: string | undefined;
|
|
70
70
|
groupKey?: string | undefined;
|
|
71
71
|
pageKey?: string | undefined;
|
|
72
72
|
phase?: number | undefined;
|
|
@@ -25,8 +25,8 @@ export declare const checklistItemFormSchema: z.ZodObject<{
|
|
|
25
25
|
groupLabel: string;
|
|
26
26
|
pageLabel: string;
|
|
27
27
|
adminOnly: boolean;
|
|
28
|
-
href?: string | undefined;
|
|
29
28
|
description?: string | undefined;
|
|
29
|
+
href?: string | undefined;
|
|
30
30
|
}, {
|
|
31
31
|
label: string;
|
|
32
32
|
isActive: boolean;
|
|
@@ -37,7 +37,7 @@ export declare const checklistItemFormSchema: z.ZodObject<{
|
|
|
37
37
|
groupLabel: string;
|
|
38
38
|
pageLabel: string;
|
|
39
39
|
adminOnly: boolean;
|
|
40
|
-
href?: string | undefined;
|
|
41
40
|
description?: string | undefined;
|
|
41
|
+
href?: string | undefined;
|
|
42
42
|
}>;
|
|
43
43
|
export type ChecklistItemFormValues = z.infer<typeof checklistItemFormSchema>;
|
|
@@ -349,6 +349,151 @@ export const moneyFlowsPages = [
|
|
|
349
349
|
expectedUiState: "A discount line appears naming ARENA25, and the total drops accordingly before the order is placed.",
|
|
350
350
|
endResult: "After reloading the order, ARENA25 and the same discount amount are still recorded on it.",
|
|
351
351
|
},
|
|
352
|
+
/*
|
|
353
|
+
* PhonePe replaced Razorpay entirely in this migration. Unlike Razorpay,
|
|
354
|
+
* PhonePe never hands the browser a verifiable signature — the checkout
|
|
355
|
+
* iframe's own callback is not authoritative, and either the buyer's own
|
|
356
|
+
* /api/payment/verify call OR the async webhook (buyer may be gone) can
|
|
357
|
+
* be the one that actually places the order. A Firestore claim doc
|
|
358
|
+
* (phonepeOrderClaims/{merchantOrderId}) makes whichever caller arrives
|
|
359
|
+
* first the sole placer, which is the one behavior with no Razorpay
|
|
360
|
+
* precedent and the reason these five cases exist as their own group.
|
|
361
|
+
*/
|
|
362
|
+
{
|
|
363
|
+
key: "phonepe-iframe-payment-completes",
|
|
364
|
+
label: "🛑 A PhonePe online payment completes inside the checkout iframe and places the order",
|
|
365
|
+
roles: ["buyer"],
|
|
366
|
+
startPage: "/checkout",
|
|
367
|
+
steps: [
|
|
368
|
+
"Sign in as admin@letitrip.in / TempPass123!, open /admin/site, switch to the Shipping tab, and confirm 'PhonePe (online card/UPI) enabled' is ON.",
|
|
369
|
+
STEP_SIGNIN_BUYER,
|
|
370
|
+
"Open /products/product-beyblade-burst-valkyrie (₹999) and click 'Add to cart'.",
|
|
371
|
+
"Open /checkout and complete the address step.",
|
|
372
|
+
"On the payment step, click 'Pay Online (PhonePe)'.",
|
|
373
|
+
"Complete the payment inside the PhonePe checkout iframe using a sandbox test instrument.",
|
|
374
|
+
"Wait for the iframe to close and the page to react.",
|
|
375
|
+
],
|
|
376
|
+
expectedBehaviour: "The iframe's own callback is NOT trusted — the app calls /api/payment/verify immediately afterward, which asks PhonePe's Order Status API what actually happened and only then places the order.",
|
|
377
|
+
expectedUiState: "A brief 'processing' state appears after the iframe closes (this is the verify call in flight), then the page redirects to order confirmation with a success toast. It must not hang indefinitely or show a generic failure while the payment genuinely succeeded.",
|
|
378
|
+
endResult: "After reloading /user/orders, exactly one order exists for this purchase with status reflecting a confirmed payment.",
|
|
379
|
+
href: "/checkout",
|
|
380
|
+
},
|
|
381
|
+
{
|
|
382
|
+
key: "phonepe-webhook-places-order-alone",
|
|
383
|
+
label: "🛑 If the buyer leaves before /api/payment/verify runs, the PhonePe webhook alone places the order",
|
|
384
|
+
roles: ["buyer"],
|
|
385
|
+
startPage: "/checkout",
|
|
386
|
+
steps: [
|
|
387
|
+
"Confirm PhonePe is enabled (Site Settings → Shipping → 'PhonePe (online card/UPI) enabled').",
|
|
388
|
+
STEP_SIGNIN_BUYER,
|
|
389
|
+
"Open /products/product-beyblade-original-dranzer-s and click 'Add to cart'.",
|
|
390
|
+
"Open /checkout, complete the address step, and click 'Pay Online (PhonePe)'.",
|
|
391
|
+
"Complete the payment inside the PhonePe iframe using a sandbox test instrument.",
|
|
392
|
+
"The instant the iframe reports success, close the browser tab entirely — before the app's own confirmation screen or processing state can appear.",
|
|
393
|
+
"Wait about 30 seconds for PhonePe's server-to-server webhook to arrive.",
|
|
394
|
+
"Sign back in and open /user/orders.",
|
|
395
|
+
],
|
|
396
|
+
expectedBehaviour: "PhonePe never hands the browser a verifiable proof of payment, so with the tab closed before the buyer-present verify call ran, only the async webhook (POST /api/payment/webhook, event checkout.order.completed) is left to place the order — and it does, using the buyer identity packed into PhonePe's metaInfo at order-creation time rather than a session.",
|
|
397
|
+
expectedUiState: "There is no UI to observe during this case — the tab is gone. The check is entirely in what /user/orders shows afterward.",
|
|
398
|
+
endResult: "The order for product-beyblade-original-dranzer-s exists in /user/orders with a confirmed payment, even though the buyer's browser never received a success screen.",
|
|
399
|
+
href: "/user/orders",
|
|
400
|
+
},
|
|
401
|
+
{
|
|
402
|
+
key: "phonepe-verify-and-webhook-race-no-duplicate-order",
|
|
403
|
+
label: "A PhonePe payment confirmed by BOTH the buyer's browser and the webhook produces exactly ONE order, never two",
|
|
404
|
+
roles: ["buyer"],
|
|
405
|
+
startPage: "/checkout",
|
|
406
|
+
steps: [
|
|
407
|
+
"Confirm PhonePe is enabled.",
|
|
408
|
+
STEP_SIGNIN_BUYER,
|
|
409
|
+
"Open /products/product-beyblade-x-dran-sword-video-demo and click 'Add to cart'.",
|
|
410
|
+
"Open /checkout, complete the address step, and click 'Pay Online (PhonePe)'.",
|
|
411
|
+
"Complete the payment inside the PhonePe iframe and let the tab stay open normally (do NOT close it) — the ordinary happy path, where the buyer's own verify call and PhonePe's webhook can both arrive for the same payment.",
|
|
412
|
+
"After the confirmation page loads, open /user/orders and count how many orders exist for this one purchase.",
|
|
413
|
+
],
|
|
414
|
+
expectedBehaviour: "A Firestore claim doc keyed on the payment's merchantOrderId, created with .create() (which throws on conflict), makes whichever of the two callers — the buyer's browser or the webhook — arrives first the sole placer of the order. The second caller's attempt is a no-op.",
|
|
415
|
+
expectedUiState: "The confirmation page shows exactly one order.",
|
|
416
|
+
expectedData: { ordersCreatedForThisPurchase: 1 },
|
|
417
|
+
endResult: "After reloading /user/orders, still exactly one order exists for product-beyblade-x-dran-sword-video-demo from this checkout — not two, and not zero.",
|
|
418
|
+
href: "/user/orders",
|
|
419
|
+
},
|
|
420
|
+
{
|
|
421
|
+
key: "phonepe-failed-payment-creates-no-order",
|
|
422
|
+
label: "A PhonePe payment the buyer abandons or fails produces NO order and the item stays in the cart",
|
|
423
|
+
roles: ["buyer"],
|
|
424
|
+
startPage: "/checkout",
|
|
425
|
+
steps: [
|
|
426
|
+
"Confirm PhonePe is enabled.",
|
|
427
|
+
STEP_SIGNIN_BUYER,
|
|
428
|
+
"Open /products/product-beyblade-metal-dark-bull-video-demo and click 'Add to cart'.",
|
|
429
|
+
"Open /checkout, complete the address step, and click 'Pay Online (PhonePe)'.",
|
|
430
|
+
"Inside the PhonePe iframe, either close it without paying or use a sandbox instrument that simulates a decline.",
|
|
431
|
+
"Observe the checkout page's reaction.",
|
|
432
|
+
"Open /user/orders.",
|
|
433
|
+
],
|
|
434
|
+
expectedBehaviour: "A failed or abandoned PhonePe payment must never place an order — the webhook's checkout.order.failed handler only signals the failure, it never calls order placement, and a subsequent /api/payment/verify call reports the payment as not completed rather than creating one anyway.",
|
|
435
|
+
expectedUiState: "The checkout page shows a payment-failed error and returns to the payment step rather than redirecting to a confirmation page.",
|
|
436
|
+
expectedData: { ordersCreated: 0 },
|
|
437
|
+
endResult: "After reloading /user/orders, no order exists for this attempt, and the item is still in /cart to retry.",
|
|
438
|
+
href: "/cart",
|
|
439
|
+
},
|
|
440
|
+
{
|
|
441
|
+
key: "phonepe-auto-refund-on-skipped-item",
|
|
442
|
+
label: "🛑 An item dropped by the \"skip unavailable items\" policy on a paid PhonePe order is automatically refunded through PhonePe's real refund API",
|
|
443
|
+
roles: ["buyer"],
|
|
444
|
+
startPage: "/checkout",
|
|
445
|
+
steps: [
|
|
446
|
+
"Sign in as admin@letitrip.in / TempPass123!, confirm PhonePe is enabled, and set Site Settings → Checkout → Out-of-stock policy to 'Skip unavailable items'.",
|
|
447
|
+
STEP_SIGNIN_BUYER,
|
|
448
|
+
"Add product-beyblade-burst-valkyrie (₹999, stock available) and product-beyblade-original-dranzer-s (₹1,499) to the cart.",
|
|
449
|
+
"Open /checkout, complete the address step, and click 'Pay Online (PhonePe)'.",
|
|
450
|
+
"While on the PhonePe iframe (before completing payment), have the admin or another session reduce product-beyblade-original-dranzer-s's stock to 0.",
|
|
451
|
+
"Complete the PhonePe payment for the FULL cart total shown (both items) inside the iframe.",
|
|
452
|
+
"Open the resulting order's detail page.",
|
|
453
|
+
],
|
|
454
|
+
inputs: { policy: "Skip unavailable items", goesOutOfStock: "product-beyblade-original-dranzer-s" },
|
|
455
|
+
expectedBehaviour: "PhonePe already captured payment for the whole cart before the stock check ran, so the value of the dropped item (₹1,499) is refunded back to the buyer automatically via a real PhonePe refund call (processRefundAction, reason 'not_received'), keyed off the order's own merchantOrderId — not just recorded as a database adjustment.",
|
|
456
|
+
expectedUiState: "The order confirmation shows only product-beyblade-burst-valkyrie with a notice that product-beyblade-original-dranzer-s was unavailable and refunded. The order detail's refund history / status timeline shows a partial refund of ₹1,499 with reason 'not_received'.",
|
|
457
|
+
endResult: "After reloading the order detail page, the ₹1,499 partial refund is still listed in the timeline. If the automatic refund call itself fails (rare), the order is flagged refundPending and an admin-inbox notification 'Automatic refund failed' appears instead — that is the documented fallback, not a silent loss of the buyer's money.",
|
|
458
|
+
href: "/user/orders",
|
|
459
|
+
},
|
|
460
|
+
{
|
|
461
|
+
key: "phonepe-manual-refund-has-no-admin-control",
|
|
462
|
+
label: "🛑 There is currently no admin control that triggers a real PhonePe refund on a completed order — surfacing this, not asserting it works",
|
|
463
|
+
roles: ["admin"],
|
|
464
|
+
startPage: "/admin/orders",
|
|
465
|
+
steps: [
|
|
466
|
+
"Sign in as admin@letitrip.in / TempPass123!.",
|
|
467
|
+
"Open any order paid via PhonePe from /admin/orders and open its detail/editor.",
|
|
468
|
+
"Look for a control to issue a refund (a button, a 'Refund' action, or a status change to 'Refunded' with an amount field).",
|
|
469
|
+
"If a 'Refunded' status option with a refund-amount field exists, set it, save, and reload the order.",
|
|
470
|
+
],
|
|
471
|
+
expectedBehaviour: "A dedicated route (POST /api/admin/orders/[id]/refund) exists and does call PhonePe's real refund API when hit directly, but as of this migration nothing in the admin UI calls it. The generic order editor's status field can be set to 'Refunded' with a refund amount, but that PATCH goes through a schema (updateOrderSchema) that does not declare a refundAmount field at all — Zod's default object schema silently strips it, so the amount typed in is never persisted and PhonePe is never contacted.",
|
|
472
|
+
expectedUiState: "Setting status to 'Refunded' with an amount appears to save successfully (a 200 / success toast), which is the failure mode to watch for — a save that LOOKS like it worked.",
|
|
473
|
+
endResult: "After reloading the order, confirm whether the refund amount you entered is actually present on the order. If it is missing, this case should be answered 'no' — an admin currently has no working way to manually refund a PhonePe payment, and the money-moving path that exists (POST /api/admin/orders/[id]/refund) is only reachable automatically, from the checkout out-of-stock flow, never from a click in the dashboard.",
|
|
474
|
+
href: "/admin/orders",
|
|
475
|
+
},
|
|
476
|
+
{
|
|
477
|
+
key: "phonepe-preorder-deposit-charge-matches-shown-amount",
|
|
478
|
+
label: "A pre-order paid via PhonePe charges exactly the shown DEPOSIT amount, never the full listing price",
|
|
479
|
+
roles: ["buyer"],
|
|
480
|
+
startPage: "/pre-orders/preorder-beyblade-x-bx-08-wave",
|
|
481
|
+
steps: [
|
|
482
|
+
"Confirm PhonePe is enabled.",
|
|
483
|
+
STEP_SIGNIN_BUYER,
|
|
484
|
+
"Open /pre-orders/preorder-beyblade-x-bx-08-wave (listed at ₹799, 25% deposit) and click its buy/reserve control.",
|
|
485
|
+
"Open /checkout and complete the address step.",
|
|
486
|
+
"On the payment step, note the exact deposit amount shown in the Order Summary.",
|
|
487
|
+
"Click 'Pay Online (PhonePe)' and read the amount shown inside the PhonePe iframe before paying.",
|
|
488
|
+
"Complete the payment.",
|
|
489
|
+
"Open the resulting order's detail page.",
|
|
490
|
+
],
|
|
491
|
+
inputs: { productId: "preorder-beyblade-x-bx-08-wave", listedPrice: 799, depositPercent: 25 },
|
|
492
|
+
expectedBehaviour: "The PhonePe order is created for the deposit amount only (roughly 25% of ₹799), never the full ₹799 — a pre-order's checkout flow computes the deposit before ever calling PhonePe's create-order API.",
|
|
493
|
+
expectedUiState: "The amount inside the PhonePe iframe is identical, to the rupee, to the deposit figure shown in the Order Summary a moment earlier — not the full listing price.",
|
|
494
|
+
endResult: "The order detail page shows the deposit amount as paid and the remaining balance as due later, matching what was charged through PhonePe.",
|
|
495
|
+
href: "/user/orders",
|
|
496
|
+
},
|
|
352
497
|
],
|
|
353
498
|
},
|
|
354
499
|
{
|
|
@@ -114,6 +114,44 @@ export const authored = {
|
|
|
114
114
|
expectedUiState: "The tab lists every type, including offer-received and payment-review. After the reload only the toggled channel differs and every other type's settings are unchanged.",
|
|
115
115
|
endResult: "The channel is restored.",
|
|
116
116
|
},
|
|
117
|
+
"checklist-admin-site-system-phonepe-credentials-persist": {
|
|
118
|
+
roles: ["admin"],
|
|
119
|
+
startPage: "/admin/site",
|
|
120
|
+
steps: [
|
|
121
|
+
"Sign in as admin@letitrip.in / TempPass123!.",
|
|
122
|
+
"Open /admin/site and switch to the Integrations tab.",
|
|
123
|
+
"Read the current PhonePe Client ID, Client Secret, Client Version, Environment and both webhook credential fields.",
|
|
124
|
+
"Type QA-PHONEPE-CLIENT-991 into the Client ID field, QA-PHONEPE-SECRET-991 into the Client Secret field, and QA-WEBHOOK-USER-991 / QA-WEBHOOK-PASS-991 into the two webhook fields.",
|
|
125
|
+
"Save, then hard-reload the page.",
|
|
126
|
+
"Read how the Client Secret and both webhook fields display.",
|
|
127
|
+
"Change only the PhonePe Environment dropdown, save again, and reload.",
|
|
128
|
+
],
|
|
129
|
+
inputs: {
|
|
130
|
+
clientId: "QA-PHONEPE-CLIENT-991",
|
|
131
|
+
clientSecret: "QA-PHONEPE-SECRET-991",
|
|
132
|
+
webhookUsername: "QA-WEBHOOK-USER-991",
|
|
133
|
+
webhookPassword: "QA-WEBHOOK-PASS-991",
|
|
134
|
+
},
|
|
135
|
+
expectedBehaviour: "PhonePe replaced Razorpay entirely in this codebase. The Client ID and Environment are stored and displayed in the clear; the Client Secret and both webhook credentials are encrypted at rest and masked on read, the same pattern as the WhatsApp access token. Saving an unrelated field (Environment) must not silently blank or overwrite the already-masked secret fields with their own mask value.",
|
|
136
|
+
expectedUiState: "After the first reload, Client ID reads QA-PHONEPE-CLIENT-991 in the clear; the Client Secret and both webhook fields show a masked placeholder, not the raw value and not blank. After changing only Environment and reloading again, the masked fields are still masked and checkout still reaches PhonePe (the credentials were not wiped).",
|
|
137
|
+
endResult: "The credential fields hold the values entered through this case's own saves, and PhonePe checkout keeps working afterward.",
|
|
138
|
+
},
|
|
139
|
+
"checklist-admin-site-system-phonepe-enabled-toggle-persists": {
|
|
140
|
+
roles: ["admin", "buyer"],
|
|
141
|
+
startPage: "/admin/site",
|
|
142
|
+
steps: [
|
|
143
|
+
"Sign in as admin@letitrip.in / TempPass123!.",
|
|
144
|
+
"Open /admin/site and switch to the Shipping tab.",
|
|
145
|
+
"Read the current state of the 'PhonePe (online card/UPI) enabled' toggle.",
|
|
146
|
+
"Turn it OFF, save, and open /checkout in another tab (with an item in the cart) to confirm 'Pay Online (PhonePe)' is absent from the payment step.",
|
|
147
|
+
"Return to Site Settings, turn the toggle back ON, and save.",
|
|
148
|
+
"Reload the settings page to confirm it reads ON.",
|
|
149
|
+
"Reopen /checkout and confirm 'Pay Online (PhonePe)' is now offered.",
|
|
150
|
+
],
|
|
151
|
+
expectedBehaviour: "The toggle lives under the Shipping tab's 'Payment methods' section, not a dedicated Payments tab — the same admin field checkout's payment-method list reads from. It gates whether the PhonePe option is offered at all, independent of the manual-UPI and COD toggles beside it.",
|
|
152
|
+
expectedUiState: "With the toggle OFF, /checkout offers only whichever of manual UPI/cash and COD are separately enabled — no 'Pay Online (PhonePe)' button. With it back ON, the button reappears.",
|
|
153
|
+
endResult: "The toggle is restored to ON, matching the state before this case started.",
|
|
154
|
+
},
|
|
117
155
|
"checklist-admin-site-system-whatsapp-credentials-persist": {
|
|
118
156
|
roles: ["admin"],
|
|
119
157
|
startPage: "/admin/site",
|