Gatsby Plugin Use-Shopping-Cart
This is a WIP and not stable yet, use at your own risk.
This plugin simplifies the use of use-shopping-cart with your existing Gatsby site by handling the integration of the <CartProvider>
for you. Use-shopping-cart is an API layer to manage shopping cart logic and handle integration with Stripe payments for secure transactions.
Install
npm install gatsby-plugin-use-shopping-cart use-shopping-cart
yarn add gatsby-plugin-use-shopping-cart use-shopping-cart
How to use
plugins: [
{
resolve: `gatsby-plugin-use-shopping-cart`,
options: {
mode: "payment",
cartMode: "client-only",
stripePublicKey: process.env.GATSBY_STRIPE_PUBLIC_KEY,
successUrl: "https://www.google.com",
cancelUrl: "https://www.stripe.com",
currency: "USD",
allowedCountries: ["US", "GB", "CA"],
billingAddressCollection: true,
},
},
]
Options
mode - String
cartMode - String
stripePublicKey - String
successUrl - String
cancelUrl - String
currency - String
allowedCountries - Array of strings
billingAddressCollection - Boolean