Front-end pour Stripe

This commit is contained in:
Victor Turgeon
2022-11-27 12:02:00 -05:00
parent 5d64c7d8ca
commit 5ece2baea9
7 changed files with 284 additions and 123 deletions

View File

@@ -0,0 +1,19 @@
import React from "react";
import { loadStripe } from "@stripe/stripe-js"
import { Elements } from "@stripe/react-stripe-js"
import PaymentForm from "./PaymentForm";
const PUBLIC_KEY = "pk_test_51M8mzOEerenEZcQIUmJIrmsaZeeNlOil2G1JcMvvO68w50MJr8rDwUjVO44a8dDhSlsRH4GdzH9rDqtkg4Rtbzco00NqkHdn3H";
const stripeTestPromise = loadStripe(PUBLIC_KEY);
const StripeContainer = ({cost}) => {
return (
<Elements stripe={stripeTestPromise}>
<PaymentForm cost={cost}/>
</Elements>
)
}
export default StripeContainer;