feat(payment): implement first recharge offer functionality and UI updates

This commit is contained in:
2026-07-02 14:39:09 +08:00
parent 7b35fd18c5
commit d4de1370e8
20 changed files with 607 additions and 50 deletions
@@ -0,0 +1,135 @@
{
"code": 200,
"message": "success",
"success": true,
"data": {
"isFirstRecharge": true,
"firstRechargeOffer": {
"enabled": true,
"type": "first_recharge_half_price",
"discountPercent": 50
},
"plans": [
{
"planId": "vip_monthly",
"planName": "VIP Monthly",
"orderType": "vip_monthly",
"vipDays": 30,
"dolAmount": null,
"creditBalance": 3000,
"amountCents": 995,
"originalAmountCents": 1990,
"dailyPriceCents": 33,
"currency": "USD",
"isFirstRechargeOffer": true,
"firstRechargeDiscountPercent": 50,
"promotionType": "first_recharge_half_price"
},
{
"planId": "vip_quarterly",
"planName": "VIP Quarterly",
"orderType": "vip_quarterly",
"vipDays": 90,
"dolAmount": null,
"creditBalance": 9000,
"amountCents": 2495,
"originalAmountCents": 4990,
"dailyPriceCents": 28,
"currency": "USD",
"isFirstRechargeOffer": true,
"firstRechargeDiscountPercent": 50,
"promotionType": "first_recharge_half_price"
},
{
"planId": "vip_annual",
"planName": "VIP Annual",
"orderType": "vip_annual",
"vipDays": 365,
"dolAmount": null,
"creditBalance": 36000,
"amountCents": 8995,
"originalAmountCents": 17990,
"dailyPriceCents": 25,
"currency": "USD",
"isFirstRechargeOffer": true,
"firstRechargeDiscountPercent": 50,
"promotionType": "first_recharge_half_price"
},
{
"planId": "dol_1000",
"planName": "1000 Credits",
"orderType": "dol",
"vipDays": null,
"dolAmount": 1000,
"creditBalance": 1000,
"amountCents": 495,
"originalAmountCents": 990,
"dailyPriceCents": null,
"currency": "USD",
"isFirstRechargeOffer": true,
"firstRechargeDiscountPercent": 50,
"promotionType": "first_recharge_half_price"
},
{
"planId": "dol_2000",
"planName": "2000 Credits",
"orderType": "dol",
"vipDays": null,
"dolAmount": 2000,
"creditBalance": 2000,
"amountCents": 845,
"originalAmountCents": 1690,
"dailyPriceCents": null,
"currency": "USD",
"isFirstRechargeOffer": true,
"firstRechargeDiscountPercent": 50,
"promotionType": "first_recharge_half_price"
},
{
"planId": "dol_3000",
"planName": "3000 Credits",
"orderType": "dol",
"vipDays": null,
"dolAmount": 3000,
"creditBalance": 3000,
"amountCents": 1145,
"originalAmountCents": 2290,
"dailyPriceCents": null,
"currency": "USD",
"isFirstRechargeOffer": true,
"firstRechargeDiscountPercent": 50,
"promotionType": "first_recharge_half_price"
},
{
"planId": "dol_5000",
"planName": "5000 Credits",
"orderType": "dol",
"vipDays": null,
"dolAmount": 5000,
"creditBalance": 5000,
"amountCents": 1745,
"originalAmountCents": 3490,
"dailyPriceCents": null,
"currency": "USD",
"isFirstRechargeOffer": true,
"firstRechargeDiscountPercent": 50,
"promotionType": "first_recharge_half_price"
},
{
"planId": "dol_10000",
"planName": "10000 Credits",
"orderType": "dol",
"vipDays": null,
"dolAmount": 10000,
"creditBalance": 10000,
"amountCents": 3245,
"originalAmountCents": 6490,
"dailyPriceCents": null,
"currency": "USD",
"isFirstRechargeOffer": true,
"firstRechargeDiscountPercent": 50,
"promotionType": "first_recharge_half_price"
}
]
}
}