2022-12-08 19:40:40 -05:00

19 lines
574 B
JavaScript

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, invoice}) => {
return (
<Elements stripe={stripeTestPromise}>
<PaymentForm cost={cost} invoice={invoice} />
</Elements>
)
}
export default StripeContainer;