njosefbeck / gatsby-plugin-stripe

[DEPRECATED] A Gatsby.js plugin that includes stripe.js in every page of your Gatsby site
17 stars 4 forks source link

Update to `loadStripe` #4

Closed thorsten-stripe closed 4 years ago

thorsten-stripe commented 4 years ago

@njosefbeck would you be up for updating this plugin to use the new loadStripe utility: https://stripe.com/docs/stripe-js/react#elements-provider?

thorsten-stripe commented 4 years ago

Mh, with the new stripe-js module we might not actually need a plugin anymore: https://github.com/stripe/stripe-js#import-as-a-side-effect

Wdyt?

njosefbeck commented 4 years ago

Hi Thor! So nice to hear from you!

I think you're right, I don't think we actually need a plugin anymore! So I think my migration plan will be:

  1. Update dragon-mart to use this new stripe-js ES module.
  2. Add information to this README that this plugin is now deprecated in favor of using this module, with links to the above information.
  3. Over the next couple of months, archive this repository and maybe also remove the package from npm.

Anything I'm missing?

thorsten-stripe commented 4 years ago

Thanks, @njosefbeck, those are exactly the right steps, appreciate your help with this!

In parallel I'll look into updating the Gatsby eCom tutorial: https://www.gatsbyjs.org/tutorial/ecommerce-tutorial/

njosefbeck commented 4 years ago

Of course! I'll work on this over the weekend 👍

njosefbeck commented 4 years ago

@thorsten-stripe So I've updated Dragon Mart to use stripe-js and I've updated this repo's README.

I've also updated the npm package so it shows the deprecation notice: https://www.npmjs.com/package/gatsby-plugin-stripe

How long do you think I should wait before archiving the repo?

thorsten-stripe commented 4 years ago

@njosefbeck thanks a mill. The stripe-js module is now officially out of beta 🎉

I've updated my demo: https://github.com/thorsten-stripe/ecommerce-gatsby-tutorial/pull/20

And opened a PR that updates the Gatsby eCom tutorial: https://github.com/gatsbyjs/gatsby/pull/21675

I think we're in a good place to archive this repo 👍 Thanks again for all your help with this ❤️

njosefbeck commented 4 years ago

My pleasure! Thanks for reaching out! So great to see Stripe releasing these packages :heart: