Research
Security News
Quasar RAT Disguised as an npm Package for Detecting Vulnerabilities in Ethereum Smart Contracts
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
@chantouchsek/nuxt-stripe
Advanced tools
NuxtJS module for Stripe.js
$stripe()
is called)@chantouchsek/nuxt-stripe
dependency to your project:npm install @chantouchsek/nuxt-stripe
@chantouchsek/nuxt-stripe
module and configuration to nuxt.config.js
:export default {
modules: [
// simple usage
'@chantouchsek/nuxt-stripe',
// with options
["@chantouchsek/nuxt-stripe", {
publishableKey: 'YOUR_STRIPE_PUBLISHABLE_KEY',
version: '2020-08-27',
i18n: true,
}]
],
// .....option
stripe: {
publishableKey: 'YOUR_STRIPE_PUBLISHABLE_KEY',
version: '2020-08-27',
i18n: true,
},
// runtime config
publicRuntimeConfig: {
stripe: {
publishableKey: 'YOUR_STRIPE_PUBLISHABLE_KEY',
version: '2020-08-27',
i18n: true,
}
}
}
@chantouchsek/nuxt-stripe
to the types
section of tsconfig.json
:{
"compilerOptions": {
"types": [
"@nuxt/types",
"@chantouchsek/nuxt-stripe"
]
}
}
plugins/i18n.{js,ts}
import { Context, Inject } from '@nuxt/types/app'
import { getStripeInstance } from '@chantouchsek/nuxt-stripe'
import { CheckoutLocale, StripeElementLocale } from '@stripe/stripe-js'
export default function (ctx: Context, inject: Inject) {
const {app} = ctx
app.i18n.onLanguageSwitched = async (_, locale) => {
const stripeLocale = locale as StripeElementLocale | CheckoutLocale
const stripeInstance = await getStripeInstance(ctx, stripeLocale)
inject('stripe', stripeInstance)
ctx.app.stripe = stripeInstance
}
}
And call it in nuxt.config.{js,ts}
export default {
plugins: [
'~/plugins/i18n',
]
}
publishableKey
String
Your Stripe's publishable key.
version
String
Your Stripe's version.
i18n
Boolean
false
Enable i18n-module integration.
It can be used inside components like:
<template>
<div>
<div ref="stripeElements"/>
</div>
</template>
export default {
async mounted() {
const stripe = await this.$stripe()
const elements = stripe.elements()
const card = elements.create('card')
card.mount(this.$refs.stripeElements)
}
}
Stripe: JavaScript SDK documentation & reference
See the License file for license rights and limitations (MIT).
FAQs
NuxtJS module for Stripe.js
The npm package @chantouchsek/nuxt-stripe receives a total of 4 weekly downloads. As such, @chantouchsek/nuxt-stripe popularity was classified as not popular.
We found that @chantouchsek/nuxt-stripe demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
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.
Research
Security News
Socket researchers uncover a malicious npm package posing as a tool for detecting vulnerabilities in Etherium smart contracts.
Security News
Research
A supply chain attack on Rspack's npm packages injected cryptomining malware, potentially impacting thousands of developers.
Research
Security News
Socket researchers discovered a malware campaign on npm delivering the Skuld infostealer via typosquatted packages, exposing sensitive data.