Skip to content

Commit aa7d2bc

Browse files
(SP: 1) [Backend] Stripe webhook: preserve refund history in pspMetadata (refunds[]), merge PSP metadata safely, and harden full-refund gating/partial-refund ignore
1 parent a82de55 commit aa7d2bc

6 files changed

Lines changed: 639 additions & 302 deletions

File tree

Lines changed: 2 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,89 +1,30 @@
11
.shop-scope {
22
--radius: 0.5rem;
3-
43
--background: #ffffff;
54
--foreground: #111111;
6-
75
--card: #ffffff;
8-
--card-foreground: #111111;
9-
10-
--popover: #ffffff;
11-
--popover-foreground: #111111;
12-
136
--primary: #111111;
14-
--primary-foreground: #ffffff;
15-
167
--secondary: #f5f5f5;
17-
--secondary-foreground: #111111;
18-
198
--muted: #f5f5f5;
20-
--muted-foreground: #555555;
21-
22-
--accent: #ff2d55;
9+
--accent: #111111;
2310
--accent-foreground: #ffffff;
24-
2511
--destructive: oklch(0.577 0.245 27.325);
26-
2712
--border: #e5e5e5;
2813
--input: #e5e5e5;
29-
--ring: #ff2d55;
30-
31-
--chart-1: oklch(0.646 0.222 41.116);
32-
--chart-2: oklch(0.6 0.118 184.704);
33-
--chart-3: oklch(0.398 0.07 227.392);
34-
--chart-4: oklch(0.828 0.189 84.429);
35-
--chart-5: oklch(0.769 0.188 70.08);
36-
37-
--sidebar: oklch(0.985 0 0);
38-
--sidebar-foreground: oklch(0.145 0 0);
39-
--sidebar-primary: oklch(0.205 0 0);
40-
--sidebar-primary-foreground: oklch(0.985 0 0);
41-
--sidebar-accent: oklch(0.97 0 0);
42-
--sidebar-accent-foreground: oklch(0.205 0 0);
43-
--sidebar-border: oklch(0.922 0 0);
44-
--sidebar-ring: oklch(0.708 0 0);
14+
--ring: #111111;
4515
}
4616

4717
.dark .shop-scope {
4818
--background: #0a0a0a;
4919
--foreground: #ffffff;
50-
5120
--card: #0a0a0a;
52-
--card-foreground: #ffffff;
53-
54-
--popover: #0a0a0a;
55-
--popover-foreground: #ffffff;
56-
5721
--primary: #ffffff;
58-
--primary-foreground: #0a0a0a;
59-
6022
--secondary: #1c1c1e;
61-
--secondary-foreground: #ffffff;
62-
6323
--muted: #1c1c1e;
64-
--muted-foreground: #cccccc;
65-
6624
--accent: #ff2d55;
6725
--accent-foreground: #ffffff;
68-
6926
--destructive: oklch(0.396 0.141 25.723);
70-
7127
--border: #333333;
7228
--input: #333333;
7329
--ring: #ff2d55;
74-
75-
--chart-1: oklch(0.488 0.243 264.376);
76-
--chart-2: oklch(0.696 0.17 162.48);
77-
--chart-3: oklch(0.769 0.188 70.08);
78-
--chart-4: oklch(0.627 0.265 303.9);
79-
--chart-5: oklch(0.645 0.246 16.439);
80-
81-
--sidebar: oklch(0.205 0 0);
82-
--sidebar-foreground: oklch(0.985 0 0);
83-
--sidebar-primary: oklch(0.488 0.243 264.376);
84-
--sidebar-primary-foreground: oklch(0.985 0 0);
85-
--sidebar-accent: oklch(0.269 0 0);
86-
--sidebar-accent-foreground: oklch(0.985 0 0);
87-
--sidebar-border: oklch(0.269 0 0);
88-
--sidebar-ring: oklch(0.439 0 0);
8930
}

frontend/app/api/shop/admin/orders/[id]/refund/route.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,9 @@ export async function POST(
2828
);
2929
}
3030

31-
const order = await refundOrder(parsed.data.id);
31+
// app/api/shop/admin/orders/[id]/refund/route.ts
32+
const order = await refundOrder(parsed.data.id, { requestedBy: 'admin' });
33+
3234
const orderSummary = orderSummarySchema.parse(order);
3335

3436
return NextResponse.json({

0 commit comments

Comments
 (0)