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
There's many ways, but without seeing how you're handling your cart, it's very hard to help
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 👍
Framework? Or vanilla
sorry , I just want to add a stripe or paypal button for payment
Both of those will have tutorials available
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 $200Then 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
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
You can use stripe read their docs and pass the right data in
I will try , sorry but whole backend stuff is a whole new world to me
but thanks 🙂
Yea it's going to be on the back so you can run a transaction and know when payment is successful
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.
Yea