Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adds support for stripe payments #14

Merged
merged 1 commit into from
Jul 12, 2024
Merged

Adds support for stripe payments #14

merged 1 commit into from
Jul 12, 2024

Conversation

emmdim
Copy link
Member

@emmdim emmdim commented May 16, 2024

This PR enables:

  • the necessary endpoints for communication from the client stripe components, forwarding the request to the stripe servers
  • the webhook endpoint that receives the response of the stripe server after and checkout and creates the faucet package

Relevant documentation:
https://docs.stripe.com/payments/checkout/how-checkout-works
https://docs.stripe.com/checkout/embedded/quickstart

@emmdim emmdim force-pushed the f/stripe_support branch 2 times, most recently from cef1f26 to 5332fa9 Compare May 31, 2024 10:51
@emmdim emmdim marked this pull request as ready for review May 31, 2024 13:46
@emmdim emmdim requested a review from p4u May 31, 2024 13:46
@emmdim emmdim force-pushed the f/stripe_support branch 2 times, most recently from 32cedb4 to 6dfc146 Compare June 4, 2024 23:28
@emmdim emmdim requested review from p4u and removed request for p4u June 5, 2024 09:19
faucet.go Outdated Show resolved Hide resolved
faucet.go Outdated Show resolved Hide resolved
faucet.go Outdated Show resolved Hide resolved
handlers.go Outdated Show resolved Hide resolved
handlers.go Outdated Show resolved Hide resolved
stripehandler/handler.go Outdated Show resolved Hide resolved
stripehandler/handler.go Outdated Show resolved Hide resolved
stripehandler/handler.go Outdated Show resolved Hide resolved
stripehandler/handler.go Outdated Show resolved Hide resolved
stripehandler/handler.go Outdated Show resolved Hide resolved
@emmdim emmdim self-assigned this Jun 6, 2024
@emmdim emmdim requested review from p4u and removed request for p4u June 28, 2024 15:52
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
storage/storage.go Outdated Show resolved Hide resolved
storage/storage.go Outdated Show resolved Hide resolved
storage/storage.go Outdated Show resolved Hide resolved
storage/storage.go Outdated Show resolved Hide resolved
storage/storage.go Outdated Show resolved Hide resolved
storage/storage.go Outdated Show resolved Hide resolved
storage/storage.go Outdated Show resolved Hide resolved
Copy link
Member

@p4u p4u left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor comments, please address them and feel free to merge it.

I have not checked the internal stripe logic (how it is the interaction with the stripe API and the security behind it). So I'd ask you to make a double check on this before the final merge.

Thank you and good job!

storage/storage.go Outdated Show resolved Hide resolved
storage/storage.go Outdated Show resolved Hide resolved
stripehandler/handlers.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
main.go Outdated Show resolved Hide resolved
@emmdim emmdim force-pushed the f/stripe_support branch 2 times, most recently from 965073e to 1f2cad6 Compare July 12, 2024 16:10
… process, assuming an embedded form, and a given stripe price id.

Refactors `storage`, `handlersresponse`, `faucet` and `helpers` to  be new packages.
The min and max number of tokes is defined (should be paremtrized) and just aflat rate is allowed.
Adds the handlers:
- `/createCheckoutSession/{to}`
- `/createCheckoutSession/{to}/{amount}`
- `/sessionStatus/{session_id}`
- /webhook"
and the following env vars:
-STRIPEKEY
-STRIPEPRICEID
-STRIPEWEBHOOKSECRET
-STRIPEMINQUANTITY
-STRIPEMAXQUANTITY
@emmdim emmdim merged commit 7cf56ba into main Jul 12, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants