fix:支付

This commit is contained in:
momo
2023-09-22 12:12:33 +08:00
parent d00089c625
commit c2723861fa
9 changed files with 150 additions and 442 deletions

View File

@@ -39,7 +39,7 @@ type CreateOrderReq {
type CreatePrePaymentByDepositReq {
OrderSn string `json:"order_sn"`
DeliveryMethod int64 `json:"delivery_method,optional,options=[1,2],default=2"`
DeliveryMethod int64 `json:"delivery_method,options=[1,2]"`
DeliveryAddress *DeliveryAddress `json:"delivery_address,optional"`
}

View File

@@ -11,9 +11,6 @@ import "basic.api"
service pay {
@handler OrderPaymentIntentHandler
post /api/pay/payment-intent(OrderPaymentIntentReq) returns (response);
@handler OrderRefundHandler
post /api/pay/refund(OrderRefundReq) returns (response);
@@ -28,20 +25,6 @@ type (
OrderRefundRes struct{}
)
// 生成预付款
type (
OrderPaymentIntentReq {
Sn string `form:"sn"` //订单编号
DeliveryMethod int64 `form:"delivery_method"` //发货方式
AddressId int64 `form:"address_id"` //地址id
PayMethod int64 `form:"pay_method"` //支付方式
}
OrderPaymentIntentRes {
RedirectUrl string `json:"redirect_url"`
ClientSecret string `json:"clientSecret"`
}
)
// StripeWebhook支付通知
type (
StripeWebhookReq {