Skip to content

Commit

Permalink
fix: 🐛 Fix amount in stripe session
Browse files Browse the repository at this point in the history
  • Loading branch information
kjarret committed Jul 17, 2024
1 parent 633eb22 commit 2fbadc4
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion backend/src/resolvers/checkout.resolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class CheckoutResolver {
name: product.name,
images: product.picture,
},
unit_amount: product.price,
unit_amount: product.price * 100,
},
quantity: product.quantity,
})),
Expand Down
2 changes: 1 addition & 1 deletion frontend/src/components/CheckoutButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const CheckoutButton = () => {

const handleCheckout = () => {
const products = cart.map((product) => ({
id: parseInt(product.id),
id: product.id,
name: product.name,
picture: [product.picture[0]],
price: product.price_fixed,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ const CardProductRent = ({

const handleAddToCart = () => {
const productToAdd = {
id,
id: Number(id),
name,
price_fixed,
quantity: 1,
Expand Down

0 comments on commit 2fbadc4

Please sign in to comment.