next-stripe-helper
Advanced tools
Comparing version 1.1.27 to 1.1.28
@@ -38,2 +38,5 @@ "use strict"; | ||
'price.updated', | ||
'customer.created', | ||
'customer.deleted', | ||
'customer.updated', | ||
'checkout.session.completed', | ||
@@ -45,3 +48,5 @@ 'customer.subscription.created', | ||
if (relevantEvents.has(stripeEvent.type)) { | ||
console.log('stripe event: ', stripeEvent.type); | ||
if (process.env.NEXT_STRIPE_HELPER_DEBUG) { | ||
console.log('Processing event:', stripeEvent.type, stripeEvent); | ||
} | ||
try { | ||
@@ -77,2 +82,3 @@ switch (stripeEvent.type) { | ||
} | ||
break; | ||
case 'checkout.session.completed': | ||
@@ -79,0 +85,0 @@ await (0, handleCheckoutSessionCompleted_1.handleCheckoutSessionCompleted)(stripeEvent.data.object, manageSubscriptionChange, manageCustomerDetailsChange); |
{ | ||
"name": "next-stripe-helper", | ||
"version": "1.1.27", | ||
"version": "1.1.28", | ||
"description": "Easily add Stripe boilerplate code to Nextjs, like webhook handling, and subscription updates. This package provides a thin wrapper around the Stripe API, and makes integrating Stripe and NextJS a lot faster!", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.js", |
@@ -7,4 +7,6 @@ # next-stripe-helper | ||
Includes a smart webhook handler that will automatically keep your database up to date with current plans, pricing, and subscriptions. | ||
Includes a smart webhook handler that will automatically keep your database up to date with current plans, pricing, and subscriptions. I also included a few helper function examples below. | ||
If you would like to contribute or report an error, the github repo is [here]('https://github.com/i-dream-of-ai/next-stripe-helper). Please star and follow if you find this tool helpful!! | ||
## Installation | ||
@@ -26,2 +28,4 @@ | ||
If you would like to log Stripe Webhook Events for debugging purposes you can add `NEXT_STRIPE_HELPER_DEBUG` in your `.env.local` (or other environment-specific `.env` files). | ||
``` dotenv | ||
@@ -28,0 +32,0 @@ |
Sorry, the diff of this file is not supported yet
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
83229
965
776
6