#Magic Mage

1 messages ยท Page 1 of 1 (latest)

umbral spadeBOT
eternal fiber
#

(I was not specifying and so it defaulted to http)

#

Also I wish we could instruct the stripe cli to self update.

#

๐Ÿ˜…

primal night
#

Hi @eternal fiber is your problem resolved? or you have a follow-up question?

eternal fiber
#

Well I will have to do some more testing to see if the webhook events start going through successfully now.

#

nope, seems it still fails.

#

oh wait I forgot to start the application, ofc it would not work.

primal night
#

I noticed that you are using https for localhost

eternal fiber
#

yeah for some reason it defaulted to https for localhost.

eternal fiber
#

oh looks like the test_clock pointed out that the thing auto generates invoices in draft and hopefully it will automatically finalize it.

#

Now I have to figure out why An unhandled exception of type 'System.Reflection.TargetException' occurred in EntityFramework.SqlServer.dll caused the 500 status code results there.

primal night
#

Can you share with me the request ID?

#

Oh, the 500 is returned from your webhook endpoint, not from Stripe, right?

eternal fiber
#

yes

#

it seems that the webhook endpoint is not populating Subscription.Customer object hence the need to get the customer object manually by id.

primal night
#

You can share with me the code if you want me to help with troubleshooting

eternal fiber
#

my guess is something might be making customer become null when I attempt to get customer if the customer.deleted event is sent before subscription.delete that it might be causing the issue.

eternal fiber
#

oh so it works when the customer.deleted event does not get triggered (when it gets auto deleted when a time_clock is deleted) ๐Ÿค”.

primal night
#

I was busy with other users.

#

Did you manage to solve the problem or do you need a second set of eyes on your code?

eternal fiber
#

I think a second set of eyes would not hurt.

#

it would help pinpoint other possible places where things can go wrong too.

primal night
#

OK, it's a big file, which line shall I start?

eternal fiber
#

I would start with the webhook method (I included the other api functions I use on the site itself that basically handles to whole "let's get the payments element to render in all possible cases.").

primal night
#

Also tell me the current problem that you are trying to resolve

eternal fiber
eternal fiber
primal night
#

It looks like you are using the same code to process three types of event Events.CustomerSubscriptionCreated , Events.CustomerSubscriptionUpdated and Events.CustomerSubscriptionDeleted

#

I'd suggest you to separate them so that your code is easier to read and maintain.

eternal fiber
#

ah

#

ah looks like my edit page does not need to render the elements and with it, does not need to return a client secret ๐Ÿ˜….

#

As if I do, it would result in an error.

#

Perhaps it's the same on my cancel page too lol.