支付成功回调

This commit is contained in:
Hiven
2023-07-28 11:15:42 +08:00
parent dbf500813c
commit 334ea4aa3f
13 changed files with 199 additions and 51 deletions

View File

@@ -15,7 +15,7 @@ service pay {
post /api/pay/payment-intent(OrderPaymentIntentReq) returns (response);
@handler StripeWebhookHandler
get /api/pay/stripe-webhook(StripeWebhookReq) returns (response);
post /api/pay/stripe-webhook(StripeWebhookReq) returns (response);
}
// 生成预付款
@@ -27,12 +27,15 @@ type (
PayMethod int64 `form:"pay_method"` //支付方式
}
OrderPaymentIntentRes {
RedirectUrl string `json:"redirect_url"`
RedirectUrl string `json:"redirect_url"`
ClientSecret string `json:"clientSecret"`
}
)
// StripeWebhook支付通知
type (
StripeWebhookReq {
Payload []byte `json:"base_byte_slice,optional"`
StripeSignature string `json:"Stripe-Signature"`
}
)