From f5c580a661fd0e04287369120ee70ce269614367 Mon Sep 17 00:00:00 2001 From: Shahed Nasser Date: Mon, 18 Nov 2024 09:52:00 +0200 Subject: [PATCH] docs: add missing prerequisite in stripe's storefront integration (#10097) --- .../checkout/payment/stripe/page.mdx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/www/apps/resources/app/storefront-development/checkout/payment/stripe/page.mdx b/www/apps/resources/app/storefront-development/checkout/payment/stripe/page.mdx index 9313518db1..8085fd1616 100644 --- a/www/apps/resources/app/storefront-development/checkout/payment/stripe/page.mdx +++ b/www/apps/resources/app/storefront-development/checkout/payment/stripe/page.mdx @@ -23,6 +23,10 @@ For other types of storefronts, the steps are similar. However, refer to [Stripe text: "Stripe publishable API key.", link: "https://support.stripe.com/questions/locate-api-keys-in-the-dashboard" }, + { + text: "Cart context in your storefront, which is used in a code snippet later.", + link: "/resources/storefront-development/cart/context" + }, ]} /> ## 1. Install Stripe SDK @@ -57,6 +61,12 @@ For Next.js storefronts, the environment variable's name must be prefixed with ` Then, create a file holding the following Stripe component: + + +This snippet assumes you're using the provider from the [Cart Context guide](../../../cart/context/page.mdx) in your storefront. + + + export const highlights = [ ["10", "useCart", "The `useCart` hook was defined in the Cart React Context documentation."], ["13", "stripePromise", "Initialize stripe using the environment variable added in the previous step."],