feat(payment): implement coffee tip plans and update payment flow
This commit is contained in:
@@ -57,9 +57,9 @@ https://<APP_HOST>/external-entry?target=private-room
|
||||
|
||||
| `coffee_type` | 展示名称 | 价格 | 后端套餐 `planId` |
|
||||
| --- | --- | --- | --- |
|
||||
| `small` | Small Coffee | US$4.99 | `tip_coffee_small` |
|
||||
| `medium` | Medium Coffee | US$9.99 | `tip_coffee_medium` |
|
||||
| `large` | Large Coffee | US$19.99 | `tip_coffee_large` |
|
||||
| `small` | Small Coffee | US$4.99 | `tip_coffee_usd_4_99` |
|
||||
| `medium` | Medium Coffee | US$9.99 | `tip_coffee_usd_9_99` |
|
||||
| `large` | Large Coffee | US$19.99 | `tip_coffee_usd_19_99` |
|
||||
|
||||
分别进入三种咖啡打赏页面:
|
||||
|
||||
@@ -71,7 +71,7 @@ https://<APP_HOST>/external-entry?target=tip&coffee_type=large
|
||||
|
||||
外部入口会将它们规范化为 `/tip?coffee_type=<type>`。`coffee_type` 会在登录、Stripe 回跳和 Ezpay 回跳期间保留,确保支付流程始终使用最初选择的咖啡档位。
|
||||
|
||||
实际创建订单时,前端只使用对应 `planId` 的后端套餐;Small 额外兼容旧套餐 `tip_coffee`。最终支付金额以后端返回的套餐数据为准,若找不到对应套餐,页面会禁止下单,避免使用错误档位。
|
||||
实际创建订单时,前端通过 `/api/payment/tip-plans` 获取套餐,并只使用接口返回的对应 `planId`。最终支付金额以后端返回的套餐数据为准,若找不到对应套餐,页面会禁止下单,避免使用错误档位。
|
||||
|
||||
## 促销入口
|
||||
|
||||
|
||||
Reference in New Issue
Block a user