feat: implement Pro subscription with a frontend unlock overlay and blockchain-based payment integration.

This commit is contained in:
2569718930@qq.com
2026-03-13 13:58:41 +08:00
parent f00360ed56
commit aa98623cab
10 changed files with 439 additions and 38 deletions
+1
View File
@@ -97,6 +97,7 @@ flowchart TD
6. P1 contract checkout (new):
- New payment APIs: `/api/payments/config|wallets|intents/*`.
- MetaMask wallet binding via nonce challenge + `personal_sign`.
- Supports multi-token checkout on Polygon (USDC.e + Native USDC) via token whitelist config.
- Frontend receives contract `tx_payload` and calls `eth_sendTransaction`.
- Backend validates `OrderPaid(orderId,payer,planId,token,amount)` onchain event and auto-grants entitlement.
- Confirmation writes `payments/subscriptions/entitlement_events` and can notify Telegram.