Socket
Book a DemoInstallSign in
Socket

gatsby-plugin-use-shopping-cart

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

gatsby-plugin-use-shopping-cart

A plugin for use-shopping-cart to kickoff your ecommerce experience with Stripe.

latest
npmnpm
Version
0.0.1
Version published
Maintainers
1
Created
Source

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

//gatsby-config.js
plugins: [
  //...other 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", // url must start with http or https
      cancelUrl: "https://www.stripe.com", // url must start with http or https
      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

Keywords

gatsby

FAQs

Package last updated on 15 Jun 2021

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts