#Daniel - checkout v2
1 messages · Page 1 of 1 (latest)
I assume the amount is off?
Can you show me your code for generating this?
Sure
Also are you just starting out with that version of Checkout or is this from an existing page of yours?
What do you mean?
I'm starting out with that version
That is a very old version of Checkout that we don't recommend stating with if you are begging your integration now.
This is our most up to date doc for the modern equivalent of that version of Checkout https://stripe.com/docs/payments/accept-a-payment?platform=web&ui=elements
I don't want to re-write all my code. This is just a simple test project for my portfolio. Is there any way to fix this without using the new version?
Looking in to this older version. Do you know where you do specify the price here?
It looks like there may be somewhere where you specify something like this?
<script
src="https://checkout.stripe.com/checkout.js"
class="stripe-button"
data-key="pk_test_TYooMQauvdEDq54NiTphI7jx"
data-name="Custom t-shirt"
data-description="Your custom designed t-shirt"
data-amount="{{ORDER_AMOUNT}}"
data-currency="usd">
</script>
</form>```
If so, what do you have for `data-amount`?
Gotcha. One second. Thank you, let me check
the form
Here is my code for my Cart component, in React
this then takes the user to the Payment component, which I showed previously
cart.totalPrice +4.99
in stripe amounts are in cents, so it sounds like you may be passing 4 instead of 400 and 4.99 instead of 499
Fixed! Thank you so much. Great support!
Daniel - checkout v2