how to add payment button?

Is there a way I can add and make the button like Pay $20 if the price in cart is $20 ?
13 Replies
Jochem
Jochem2y ago
There's many ways, but without seeing how you're handling your cart, it's very hard to help
13eck
13eck2y ago
Adding to/manipulating the DOM is not a back-end issue, it's a #front-end issue. Please re-post there with a codepen of your current code along with what you've tried that hasn't yet worked. Also, be sure to read #How To Ask Good Questions for more tips 👍
Electronic
Electronic2y ago
Framework? Or vanilla
i_lost_to_loba_kreygasm
sorry , I just want to add a stripe or paypal button for payment
Jochem
Jochem2y ago
Both of those will have tutorials available
i_lost_to_loba_kreygasm
but the tutorial I came across are like button for a single item or smth I want it to be like whatever price is , the button will be like Pay $200 if the cart price is $200
Jochem
Jochem2y ago
Then we get back to my original message. I have no idea how you're doing your cart or how you're rendering your html, so I can't tell you I'm detail how to do it. You can manipulate the DOM like Beck suggested, but that's a question for #front-end. If you're server side rendering your html, you can use concatenation to modify what the string is going to be. right now you're asking us how to get to the train station, but not telling us which train station, where you are, or how you intend to travel there
i_lost_to_loba_kreygasm
for example , if I have cart worth $200 , I just want a button either stripe or paypal to pay $200 and after that payment has been done , I would like to receive some info about it
Electronic
Electronic2y ago
You can use stripe read their docs and pass the right data in
i_lost_to_loba_kreygasm
I will try , sorry but whole backend stuff is a whole new world to me but thanks 🙂
Electronic
Electronic2y ago
Yea it's going to be on the back so you can run a transaction and know when payment is successful
i_lost_to_loba_kreygasm
https://stripe.com/docs/api/charges?lang=node this is what I need , right ?
Stripe API reference – Charges – Node
Complete reference documentation for the Stripe API. Includes code snippets and examples for our Python, Java, PHP, Node.js, Go, Ruby, and .NET libraries.
Electronic
Electronic2y ago
Yea
Want results from more Discord servers?
Add your server