4.1 KiB
4.1 KiB
ADDED Requirements
Requirement: Package payment SHALL support Alipay payment links
The system SHALL allow users to choose Alipay during package purchase and SHALL handle backend Alipay responses through payment_link while preserving the existing WeChat and wallet payment branches.
Scenario: User pays a package order with Alipay
- WHEN the user selects
alipayin the package payment popup and the backend returnspayment_method: "alipay"withpayment_link - THEN the system SHALL open or present the returned Alipay payment link for the user
- AND the system SHALL NOT require WeChat
pay_configfields for this branch
Scenario: User pays a package order with wallet balance
- WHEN the user selects
walletand the backend completes the package payment without a third-party redirect - THEN the system SHALL preserve the existing wallet payment success flow
- AND the system SHALL refresh relevant wallet-related page state after success
Scenario: Strong recharge branch returns an Alipay payment link
- WHEN package order creation enters the strong recharge branch and the backend returns
order_type: "recharge"withpayment_link - THEN the system SHALL use the Alipay payment-link flow for that recharge branch
- AND the system SHALL preserve the existing strong recharge messaging and follow-up refresh behavior
Requirement: Pending order payment SHALL support Alipay payment links
The system SHALL allow users to continue payment for pending package orders from the order list through an Alipay payment link flow.
Scenario: User continues a pending order with Alipay
- WHEN the user starts payment for a pending order from the order list and the backend returns
payment_method: "alipay"withpayment_link - THEN the system SHALL open or present the returned payment link
- AND the system SHALL refresh the order list from backend status after the user completes or retries the flow
Requirement: Wallet recharge flows SHALL support Alipay payment links
The system SHALL support Alipay both when creating a new wallet recharge order and when retrying payment for a pending recharge order.
Scenario: User creates a new wallet recharge with Alipay
- WHEN the user confirms a wallet recharge with
payment_method: "alipay"and the backend returnspayment_link - THEN the system SHALL open or present the returned payment link
- AND the system SHALL preserve the existing recharge validation rules and amount checks
Scenario: User retries a pending recharge order with Alipay
- WHEN the user continues payment for a pending recharge order and the backend returns
payment_link - THEN the system SHALL open or present the returned Alipay payment link
- AND the system SHALL refresh wallet detail and recharge list state from backend data after the user completes or retries the flow
Requirement: Payment method branching SHALL distinguish WeChat and Alipay contracts
The system SHALL treat WeChat and Alipay payment preparation responses as different contracts and SHALL determine final payment success from backend order or recharge status instead of the redirect result alone.
Scenario: WeChat payment returns pay_config
- WHEN the backend returns
payment_method: "wechat"withpay_config - THEN the system SHALL continue to use the existing WeChat H5 payment invocation flow
- AND the system SHALL preserve the current
app_typebehavior for WeChat requests
Scenario: Alipay payment returns payment_link
- WHEN the backend returns
payment_method: "alipay"withpayment_link - THEN the system SHALL use the returned link fields instead of expecting
pay_config - AND the system SHALL NOT depend on
app_typefor the Alipay branch
Scenario: User returns after Alipay jump
- WHEN the user comes back to the application after opening the Alipay payment link
- THEN the system SHALL refresh the relevant order or recharge data from backend APIs
- AND the system SHALL determine whether the payment succeeded from refreshed backend status