- Add Stripe payment provider with Checkout Session flow - Payment provider abstraction layer (EasyPay + Stripe unified interface) - Stripe webhook with proper raw body handling and signature verification - Frontend: Stripe button with URL validation, anti-duplicate click, noopener - Active timeout cancellation: query platform before expiring, recover paid orders - Singleton Stripe client, idempotency keys, Math.round for amounts - Handle async_payment events, return null for unknown webhook events - Set Checkout Session expires_at aligned with order timeout - Add cancelPayment to provider interface (Stripe: sessions.expire, EasyPay: no-op) - Enable stripe in frontend payment type list
20 lines
406 B
TypeScript
20 lines
406 B
TypeScript
import type { Metadata } from 'next';
|
|
import './globals.css';
|
|
|
|
export const metadata: Metadata = {
|
|
title: 'Sub2API 充值',
|
|
description: 'Sub2API 余额充值平台',
|
|
};
|
|
|
|
export default function RootLayout({
|
|
children,
|
|
}: Readonly<{
|
|
children: React.ReactNode;
|
|
}>) {
|
|
return (
|
|
<html lang="zh-CN">
|
|
<body className="bg-gray-50 text-gray-900 antialiased">{children}</body>
|
|
</html>
|
|
);
|
|
}
|