#Dr. Strain - .NET
1 messages · Page 1 of 1 (latest)
Sure, I need to take a screencap
So I have two instances of SessionCreateOptions and my code can't currently tell whether or not Stripe.BillingPortal is being used or if Stripe.Checkout is being used
The bottom pic is what VS wants me to do
I'm very rusty with my .NET, but instead of saying SessionCreateOptions in those two places can you specify the full Stripe.BillingPortal.SessionCreateOptions and Stripe.Checkout.SessionCreateOptions instead?
Yeah, I tried that in the second picture and it doesn't work...
Im not sure why lol
Oh, I see it. Hang on...
Can you share a screenshot of your using statements?
Or imports?
I think I know what you're on to and yes
I was just importing Billing and Checkout
Ah, okay, you're using aliases, so you should be able to do CheckoutSessionOpts and then add another one for the Billing version.
I should, this seems like more of a C# thing than a stripe thing lol
sorry for the trouble and thank you for your help!
No problem! Let me know if you have trouble getting it working!
It works perfectly, I just would like to know If using the webhook secret on the client side is okay to do, currently I have this in my MVC controller
stripeEvent = EventUtility.ConstructEvent(
json,
Request.Headers["Stripe-Signature"],
this.webhookSecret
);
We're using GRPC so things have gotten incredibly weird and out of the scope of the docs lol
I was thinking that doing stripeEvent = await EventsService.ReadEvent(json, requestHeaders); and have the webhook secret on the GRPC server so that the events can be read but not exposed
Are you still there?
Hello, stepping in and catching up...
If using the webhook secret on the client side is okay to do
Could you elaborate on this point? What do you mean by client side?
To handle webhook events, you need a normal backend server AFAIK
I am not super familiar with .NET, but I think ConstructEvent is the right function to call, as it's on our official Doc
I also think either using GRPC or json, webhook secret is just an environment variable you need to securely save somewhere, and can pull it out when process the Webhook event