feat: 实现站内USDT收银台支付流程
- 后端: payment.go 支付处理(创建订单/回调通知/状态查询/签名算法) - 后端: 新增公开支付通道API(PublicList,不暴露config) - 前端: Checkout.vue 收银台页面(倒计时/二维码/支付轮询) - 前端: Cart.vue 对接动态支付通道,选择bepusdt跳转收银台 - 前端: API添加paymentChannelApi和orderApi支付方法 - 路由: 注册checkout路由和支付相关API
This commit is contained in:
@@ -1,5 +1,9 @@
|
||||
import api from '../utils/request'
|
||||
|
||||
export const paymentChannelApi = {
|
||||
list: () => api.get('/payment-channels'),
|
||||
}
|
||||
|
||||
export const uploadApi = {
|
||||
uploadImage: (file: File) => {
|
||||
const formData = new FormData()
|
||||
@@ -74,6 +78,8 @@ export const orderApi = {
|
||||
refund: (id: number, data: any) => api.post(`/orders/${id}/refund`, data),
|
||||
cancel: (id: number) => api.put(`/orders/${id}/cancel`),
|
||||
confirmReceipt: (id: number) => api.put(`/orders/${id}/confirm-receipt`),
|
||||
createPayment: (id: number) => api.post(`/orders/${id}/pay`),
|
||||
checkPaymentStatus: (id: number) => api.get(`/orders/${id}/payment-status`),
|
||||
}
|
||||
|
||||
export const articleApi = {
|
||||
|
||||
Reference in New Issue
Block a user