Skip to content

Commit

Permalink
Fixing comments and unused code
Browse files Browse the repository at this point in the history
  • Loading branch information
samilabud committed Nov 11, 2023
1 parent 791058b commit 4c3ddce
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 96 deletions.
72 changes: 0 additions & 72 deletions client/src/components/payment-form/payment-form.component.jsx

This file was deleted.

21 changes: 0 additions & 21 deletions client/src/components/payment-form/payment-form.styles.jsx

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ import StripeCheckout from 'react-stripe-checkout';
import axios from 'axios';

const StripeCheckoutButton = ({price}) => {
const backendURL = process.env.BACKEND_URL ? process.env.BACKEND_URL : '';
const priceForStripe = price * 100;
const publishablekey = 'pk_test_51IfAwgF7VDSpoZmOV8VtWIwE4hJOLce3ch0DPT5DkwR8Gm0g8DWhqqxGmI3qkSywYrnGEbdIbhaNNXpbTTpzWgGO00J2aOGAhi';
//const secretkey = 'sk_test_51IfAwgF7VDSpoZmO90Kbmy03DFqIOQxE6r6niC190Z79kp94GJIILU8bGTjlFlOIN9TD4LTxdaoFCeQ3HzkPLXiw00sifdGSKj';
const onToken = () => {
axios({
url: 'payment',
url: `${backendURL}payment`,
method: 'post',
data:{
amount: priceForStripe,
Expand Down
2 changes: 0 additions & 2 deletions client/src/pages/checkout/checkout.component.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import { createStructuredSelector } from 'reselect'
import { selectCartItems, selectCartTotal } from '../../redux/cart/cart.selector';

import CheckoutItem from '../../components/checkout-item/checkout-item.component';
// import PaymentForm from "../../components/payment-form/payment-form.component";
import StripeCheckoutButton from '../../components/stripe-button/stripe-button-component';

import './checkout.styles.scss';
Expand Down Expand Up @@ -43,7 +42,6 @@ const CheckoutPage = ({cartItems, cartTotal}) => (
4242 4242 4242 4242 - Exp: 01/25 - CVV: 123
</div>
<StripeCheckoutButton price={cartTotal} />
{/* <PaymentForm /> */}
</div>
)
const mapStateToProps = createStructuredSelector({
Expand Down

0 comments on commit 4c3ddce

Please sign in to comment.