Skip to content

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 an any_enabled summary 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 the pay_method; the response reuses the order-creation shape so the frontend can reuse the same QR / transfer modal.
  • Added a pay.status field to CreatePlanOrder / PayMyOrder responses: values are success (QR / transfer note is ready) or warning (channel not registered / disabled / SDK failure, with a warning message). The frontend can now tell "ready to pay" from "misconfigured" instead of guessing based on whether pay_url is 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 both CreatePlanOrder and PayMyOrder, 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 chosen pay_method is 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: on success it shows the QR (or bank-transfer note) modal; on warning it 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/pay to 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: on success it shows the QR or transfer-info modal; on warning it 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.vue was not importing IconWechatpay / 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-run npm install && npm run build before 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.