#Daniel - checkout v2

1 messages · Page 1 of 1 (latest)

regal dewBOT
craggy fog
#

I assume the amount is off?

violet cove
#

Yeah, the extra two zeros

#

how do I remove them

craggy fog
#

Can you show me your code for generating this?

violet cove
#

Sure

craggy fog
#

Also are you just starting out with that version of Checkout or is this from an existing page of yours?

violet cove
violet cove
#

I'm starting out with that version

craggy fog
#

That is a very old version of Checkout that we don't recommend stating with if you are begging your integration now.

violet cove
#

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?

craggy fog
#

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`?
violet cove
#

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

craggy fog
#

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

violet cove
#

ahhhhh, okay. I had a feeling that was the issue

#

Let me try, thanks!

violet cove
craggy fog
#

Daniel - checkout v2