How does casdoor subscription payment system support status update without using Stripe's webhook?
@mariogk can you descirbe it more?
your app can call Casdoor's update-payment API to update Payment.State
if this is what you are asking
Usually we use webhooks from stripe to update the status if for example the user failed to make a payment we remove the role of the user to access the system
So we the developers have to notify casdoor via that api endpoint if the user failed to pay or canceled the subscription?
@hsluoyz would you accept an pr to add stripe webhook functionality to casdoor?
yes, PR is welcomed
Ok I am thinking on creating a pr to add polar as the payment provider and use its webhook for automatic status update, after testing I will create a pr and send to you @hsluoyz for review, thanks
what is polar?
give a URL pointer?
Polar is similar to Stripe but more modern and it is a merchant of record
it has some really nice features
does it have go SDK?
yes
https://github.com/polarsource/polar-go
I already created the basic polar payment provider for casdoor
i am creating the webhook functionality now to automatically update status after the initial payment
the new payment thing should be a standalone PR
you can just create the PR now
this thing is a second PR
Will do give me a second
@hsluoyz https://github.com/casdoor/casdoor/pull/4596 first PR, will work on the webhook feature now
you can test this commit first: https://github.com/casdoor/casdoor/commit/f0db95d0063c70197641b149a7406cb1e29ea678, if it still has bug in code logic, you can create an incremental PR to fix it
Sorry i was focused on the webhook feature, will try to create the PR for it tomorrow, but it seems another dev asked copilot for it
Join the conversation
Sign up to reply, like and follow topics.
Suggested Topics
Want to read more? Browse other topics in Casdoor or view latest topics.
