go-kratos / examples

Examples of Kratos framework
MIT License
364 stars 145 forks source link

issue: stripe webhook #9

Closed iunary closed 7 months ago

iunary commented 2 years ago

Is it possible to bring an example of using a webhook (eg: stripe webhook ) to the examples! as the following code doesn't receive the posting data from stripe

    rpc StripeWebhook(google.api.HttpBody) returns (google.protobuf.Empty) {
        option (google.api.http) = {
            post: "/v1/webhook"
            body:"*"
        };
    };
goulashify commented 1 year ago

Hey there, ran across this randomly, you can do it w/ java like so:

service Webhook {
    rpc Webhook(google.protobuf.Struct) returns(google.protobuf.Empty) {
        // This part is optional, but useful for transcoding via Cloud Endpoints.
        // See https://cloud.google.com/endpoints/docs/grpc/transcoding
        option (google.api.http) = {
            post: "webhook"
            body: "*"
        };
    }
}

See here.

zhouyu20011106 commented 10 months ago

如何获取 端口号 ip 和请求头

dosubot[bot] commented 7 months ago

Hi, @iunary! I'm helping the examples team manage their backlog and am marking this issue as stale.

It looks like you opened this issue to request an example of using a webhook, specifically for Stripe, in the examples. The provided code does not receive the posting data from Stripe, and there have been discussions in the comments about implementing the webhook properly, including suggestions for a Java implementation and inquiries about obtaining the port number and request header.

Could you please confirm if this issue is still relevant to the latest version of the examples repository? If it is, please let the examples team know by commenting on the issue. Otherwise, feel free to close the issue yourself, or it will be automatically closed in 7 days. Thank you! Dosu