v0.0.9
✨ New Features
Backend (/api)
- Added public endpoint
GET /api/payment/status: returns the enabled state of every payment channel (WeChat / Alipay / Bank) plus anany_enabledsummary so the frontend can decide whether to show the purchase flow or prompt the admin to configure payments first. - Added endpoint
POST /api/order/self/:id/pay: lets a user re-invoke payment for one of their own pending orders, optionally switching thepay_method; the response reuses the order-creation shape so the frontend can reuse the same QR / transfer modal. - Added a
pay.statusfield toCreatePlanOrder/PayMyOrderresponses: values aresuccess(QR / transfer note is ready) orwarning(channel not registered / disabled / SDK failure, with awarningmessage). The frontend can now tell "ready to pay" from "misconfigured" instead of guessing based on whetherpay_urlis empty. - No order is created when no payment channel is enabled: order / re-pay requests now return "No payment channel has been enabled yet" and the row is not persisted, keeping the order list clean.
- Extracted a
buildPayInfo()helper that unifies payment-parameter assembly for bothCreatePlanOrderandPayMyOrder, removing duplicated code.
Plans page
- Pre-flight payment check before opening the subscribe / upgrade flow: if no channel is enabled, a toast is shown and the confirm modal never opens — the user is never led to discover "can't pay" after confirming.
- Added a payment-method picker inside the subscribe / upgrade confirm modals: WeChat Pay (
IconWechatpay) and Alipay (IconAlipayCircle), each rendered in its official brand color (WeChat#07C160, Alipay#1677FF). Users can switch and the chosenpay_methodis sent on "Confirm". - The payment modal adapts to the chosen method: title and tip ("WeChat QR pay / Alipay QR pay") follow the user's selection.
- Driven by
pay.status: onsuccessit shows the QR (or bank-transfer note) modal; onwarningit only shows an error toast — no more auto-redirect to the orders list.
Orders page
- The "Pay" button no longer redirects to the plans page: it now opens a "Choose payment method" modal; after selection it calls
POST /api/order/self/:id/payto initiate payment for the existing pending order directly. - Payment picker uses Arco official brand icons: WeChat / Alipay icons are rendered in official colors, and the selected option is highlighted with a matching colored outline and check mark.
- Driven by
pay.status: onsuccessit shows the QR or transfer-info modal; onwarningit shows an error — the misleading "redirecting to pay…" message and forced navigation are gone.
Redeem page
- Removed the "Redeemed!" modal: the former modal (with a "View Plans" button) is replaced by a green inline success message below the input (mirroring the error style). After redeeming, the "Current Quota / Used" data is re-fetched immediately so the number visibly increases with a subtle scale animation.
🐛 Bug Fixes
- Fixed the payment icons not rendering on the Plans page:
Plans.vuewas not importingIconWechatpay/IconAlipayCircle, and Arco SVG icons are not globally registered like the component library, so<icon-wechatpay>/<icon-alipay-circle>rendered blank; the icons are now explicitly imported. - Fixed the check mark sitting in the top-right corner: it was absolutely positioned; it now uses flexbox to center vertically, aligned with the icon and label inside the option.
- Fixed wrongly creating an order and redirecting when no channel is enabled: previously the backend would still create an order and the frontend would navigate away; now the backend refuses to create it and the frontend only shows an error toast.
📚 Documentation
- Added online demo links to the multi-language READMEs (English / Traditional Chinese / Japanese / Russian / Korean / Arabic / German).
⚠️ Upgrade Notes
- Code/frontend-only release — no database migration; safe to upgrade in place.
- New front-end dependency on Arco brand icons (
@arco-design/web-vue/es/icon); please re-runnpm install && npm run buildbefore publishing. - To let users self-serve "pick a payment method and re-pay an existing order", make sure at least one online channel (WeChat / Alipay) is enabled under System Settings → Payment; otherwise the Plans page will prompt that payment must be configured first.