Setup of the VSF module
The third part of the setup is installing Stripe integration for commercetools in your Vue Storefront middleware.
yarn
yarn add @vsf-enterprise/stripe-commercetools@^3
Setup
Add @vsf-enterprise/stripe-commercetools/server
integration to the middleware with the following configuration:
// middleware.config.js
module.exports = {
integrations: {
// ...
stripe: {
location: '@vsf-enterprise/stripe-commercetools/server',
configuration: {
ctApi: {
apiHost: "https://api.europe-west1.gcp.commercetools.com",
authHost: "https://auth.europe-west1.gcp.commercetools.com",
projectKey: "my-project",
clientId: "***",
clientSecret: "***",
scopes: [
"manage_orders:my-project",
"manage_payments:my-project",
"view_orders:my-project"
]
},
stripe: {
profile: 'stripeProfile1'
}
}
}
}
}
configuration
:ctApi
- An object containing credentials of your commercetools API client. Please refer to our documentation for commercetools integration for more information. Two notable differences are that:- the
scopes
array must containmanage_orders
,manage_payments
, andview_orders
and your API client must have access to these scopes, apiHost
should only contain the base URL, without the path to the GraphQL endpoint. For example,https://<SHOP_DOMAIN>.com/
instead ofhttps://<SHOP_DOMAIN>.com/vsf-ct-dev/graphql
.
- the
stripe
:profile
- As prepared by us, Stripe commercetools extension supports multitenancy. This field's value allows to differentiate Stripe merchant accounts. o