95ff3a8707
Co-authored-by: wolfoftyreso-debug <250630591+wolfoftyreso-debug@users.noreply.github.com>
17 lines
467 B
TypeScript
17 lines
467 B
TypeScript
import { EmbeddedCheckoutProvider, EmbeddedCheckout } from "@stripe/react-stripe-js";
|
|
import { getStripe } from "@/lib/stripe";
|
|
|
|
interface Props {
|
|
fetchClientSecret: () => Promise<string>;
|
|
}
|
|
|
|
export function StripeEmbeddedCheckout({ fetchClientSecret }: Props) {
|
|
return (
|
|
<div id="checkout">
|
|
<EmbeddedCheckoutProvider stripe={getStripe()} options={{ fetchClientSecret }}>
|
|
<EmbeddedCheckout />
|
|
</EmbeddedCheckoutProvider>
|
|
</div>
|
|
);
|
|
}
|