7e08a07e29
This commit fixes the inconsistent calculation logic between order preview and actual order creation, which caused balance payment failures when using coupons. Changes: - Standardized fee calculation order in both preCreateOrderLogic and purchaseLogic - Moved gift amount deduction after fee calculation to ensure correct total - Removed premature gift amount deduction before transaction in purchaseLogic - Gift amount is now only deducted within the database transaction The calculation order is now unified: 1. Apply coupon discount 2. Calculate handling fee based on post-coupon amount 3. Deduct gift amount from total (including fee) This ensures the preview amount matches the actual payment amount.