EasyPay popup mode relies on notify_url (webhook) to update order status,
but if the callback is missed, orders stay PENDING forever. This adds:
- POST /api/v1/payment/orders/verify endpoint that actively queries
the upstream provider to check payment status
- Frontend PaymentResultView calls verify when receiving EasyPay
return_url params (out_trade_no)
- Fix checkPaid to fall back to OutTradeNo when PaymentTradeNo is empty
(popup mode doesn't have trade_no until the notify callback)
Order ID format changed from sub2_5 to sub2_20250409aB3kX9mQ
(prefix + date + 8-char random, no DB ID embedded).
- Add out_trade_no column to payment_orders table
- Store generated external ID on order creation
- Webhook handler looks up order by out_trade_no instead of parsing DB ID
- Fallback to legacy sub2_N format for existing orders
- Remove saveSettings() call from handleSaveProvider - editing a
provider should not save the entire settings form
- Change order ID format from sub2_5 to sub2_20250409_5_aB3kX9mQ
(prefix + date + dbID + 8-char alphanumeric random) to avoid
collisions with external payment providers
- parseOrderID supports both legacy and new format
Backend returns null for unconfigured fields. Object.assign overwrites
form defaults (e.g. payment_enabled_types: []) with null, causing
"Cannot read properties of null" errors. Now only non-null values
are applied, preserving safe defaults for unconfigured environments.
Add alipay_direct and wxpay_direct to METHOD_ORDER so they appear
in the correct position when enabled. The checkout API already returns
these types from direct provider instances; the method selector's
icon/style matching (includes('alipay')) already handles them.
Create StripePopupView.vue - a standalone minimal page (no AppLayout)
that receives clientSecret/publishableKey via postMessage from parent:
- Alipay: auto-calls confirmAlipayPayment(), shows "正在跳转..."
- WeChat: calls confirmWechatPayPayment(), shows QR code inline
- Much faster than loading full StripePaymentView (no API calls needed)
- Add easypay back to enabled provider toggles (alongside alipay, wxpay, stripe)
- Disabling a provider toggle now also disables all matching provider instances
- Simplify enabledProviderKeyOptions - direct mapping instead of special cases
- Label: "启用的服务商" with hint about instance auto-disable
- ExpireTimedOutOrders now cancels upstream payment (Stripe PaymentIntent)
before marking order as expired
- Active subscriptions moved below plan list with compact inline style
- StripePaymentView uses minimal layout (no AppLayout) in popup mode
- Fix misleading "服务商" label → "支持的支付方式" for payment type toggles
Instead of opening a popup that renders the full Payment Element again
(forcing users to re-select payment method), pass the selected method
via query param. The popup now directly calls:
- confirmAlipayPayment() for Alipay (redirects to Alipay page)
- confirmWechatPayPayment() for WeChat (displays QR code)
Card and Google Pay remain inline on the main page.
createRedirectPayment was missing the cid parameter (channel ID) that
createAPIPayment already included via resolveCID(). This caused EasyPay
to use a default channel instead of the configured one (e.g. 13256/13264).
Also trim trailing slash from apiBase to prevent double-slash in URLs.
The EasyPay provider reads paymentMode from e.config["paymentMode"] to decide
between redirect (submit.php) and API (mapi.php) paths. However, paymentMode
is stored as a separate DB column, not inside the encrypted config JSON.
SelectInstance() returned it in the InstanceSelection struct but never injected
it into the Config map, so the provider always fell through to the API/QR path.
Also includes:
- Subscription success flow: show "订阅成功" and refresh on return
- Active subscription card: platform colors, rate/quota display
- Subscription plan card: compact layout to save height
- Provider list: drag-and-drop reorder via sort_order
Create utils/platformColors.ts as single source of truth for all
platform color classes (badge, border, accent, text, icon, button,
discount). Refactor SubscriptionPlanCard to use it.
Extend checkout API to return group name, rate multiplier, daily/weekly/monthly
limits and supported model scopes. Redesign SubscriptionPlanCard to display
platform badge, group quota info, and model scope tags.
- EasyPay: remove redirect mode, keep only qrcode and popup
- Stripe: remove mode config entirely, always use inline Payment Element
- Subscription: replace dialog with inline confirm UI (plan summary +
method selector + fee breakdown), same flow as top-up
- Move PaymentStatusPanel/StripePaymentInline to shared section for
both recharge and subscription payments
- Hide tabs and help card during payment/subscription confirm phases
When user selects a redirect-based payment method (e.g. Alipay) in the
inline Stripe Element and clicks pay, the payment page opens in a new
window instead of navigating the current page away. The main page
switches to waiting/polling mode. Inline methods (card, WeChat) still
complete directly on the page.
Stripe payment now shows the Payment Element directly on the purchase
page. User selects payment method (Alipay/WeChat/Card) inline, then
confirms. Redirect-based methods (Alipay) navigate to the payment
page; non-redirect methods (Card/WeChat) complete inline.
Quick amount buttons and custom input always use the global min/max
range (union of all methods). Payment method availability is
determined by whether the selected amount fits each method's limits.