-
Notifications
You must be signed in to change notification settings - Fork 0
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
[SC-11] Integrated Stripe API and added another donation page (v2) and a post-successful donation page #25
base: main
Are you sure you want to change the base?
Conversation
thanhliemtu
commented
Feb 25, 2025
…e correct checkout sessions now
} | ||
], | ||
mode="payment", | ||
success_url="https://google.com", # this should route to the /success page |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you use this for testing? if so can you change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changing this requires us to have a public facing domain, I can't put "http://localhost:3000" to redirect to the "/success" page in the front-end. I used ngrok to get a temporary public domain that mapped to my port 3000, allowing me to test it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fair enough, could you make a note to change this once we do have a proper domain?
case ("true", "50"): | ||
return "price_1QwQioLtztZ9KxoQdil8ZPj0" | ||
case ("false", _): | ||
return "price_1QuMCdLtztZ9KxoQXBt26UDy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I do not know what these values represent, in the case of a non-fixed amount being donated what happens?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see, so if I donated 60 dollars then the last hardcoded value will represent that in the stripe end?
@@ -27,7 +27,7 @@ def send_payment_recieved_email(request): | |||
from_email = Email(STOCK_CHARITY_EMAIL) | |||
to_email = To(request.data["receiver"]) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you utilize this work in order to send emails if there is a successful donation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I could, but I'm not sure how to retrieve the authentication of the logged in user (their emails) at the moment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you discuss this with William?
@@ -45,7 +45,7 @@ const NavBar: React.FC = () => { | |||
<Link href="/account" className="hover:text-[#007bff] text-[#333] block font-semibold text-[15px]">Account</Link> | |||
</li> | |||
<li className="max-lg:border-b max-lg:py-3 px-3"> | |||
<Link href="/donate" className="hover:text-[#007bff] text-[#333] block font-semibold text-[15px]">Donate</Link> | |||
<Link href="/donate_v2" className="hover:text-[#007bff] text-[#333] block font-semibold text-[15px]">Donate</Link> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you have to create a new page here instead of modifying /donate?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't modify the old donate page since I thought maybe we could find a use or repurpose it in the future
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also the backend CI seems like there's an issue
It seems the build script for the backend doesn't have the STRIPE_SECRET_KEY environmental variable |