This commit is contained in:
Hiven
2023-07-28 19:03:36 +08:00
parent ae717f932e
commit 1225a4efdc
23 changed files with 403 additions and 18 deletions

View File

@@ -14,10 +14,20 @@ service pay {
@handler OrderPaymentIntentHandler
post /api/pay/payment-intent(OrderPaymentIntentReq) returns (response);
@handler OrderRefundHandler
post /api/pay/refund(OrderRefundReq) returns (response);
@handler StripeWebhookHandler
post /api/pay/stripe-webhook(StripeWebhookReq) returns (response);
}
// 退款
type (
OrderRefundReq struct{}
OrderRefundRes struct{}
)
// 生成预付款
type (
OrderPaymentIntentReq {
@@ -37,5 +47,6 @@ type (
StripeWebhookReq {
Payload []byte `json:"base_byte_slice,optional"`
StripeSignature string `json:"Stripe-Signature"`
RemoteAddr string `json:"remote_addr"`
}
)