Front-end pour Stripe
This commit is contained in:
@@ -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;
|
Reference in New Issue
Block a user