Add stripe templates

This commit is contained in:
Matej Bačo
2023-09-09 18:42:09 +02:00
parent e07f0379f4
commit 5a3c7b7358
+128
View File
@@ -737,6 +737,134 @@ export const marketplace: MarketplaceTemplate[] = [
type: 'text'
}
]
},
{
icon: 'icon-stripe',
id: 'subscriptions-with-stripe',
name: 'Subscriptions with Stripe',
tagline: 'Receive recurring card payments and grant subscribers extra permissions.',
permissions: ['any'],
events: [],
cron: '',
timeout: 15,
usecases: ['Utilities'],
runtimes: [
{
name: 'node-18.0',
commands: 'npm install',
entrypoint: 'src/main.js',
providerRootDirectory: 'node/subscriptions-with-stripe'
}
],
instructions: `For documentation and instructions check out <a target="_blank" rel="noopener noreferrer" class="link" href="https://github.com/appwrite/templates/tree/main/node/subscriptions-with-stripe">file</a>.`,
vcsProvider: 'github',
providerRepositoryId: 'templates',
providerOwner: 'appwrite',
providerBranch: 'main',
variables: [
{
name: 'APPWRITE_API_KEY',
description: `The API Key to talk to Appwrite backend APIs. <a class="u-bold" target="_blank" href="https://appwrite.io/docs/getting-started-for-server">Learn more</a>.`,
value: '',
placeholder: 'd1efb...aec35',
required: true,
type: 'password'
},
{
name: 'APPWRITE_ENDPOINT',
description: `The URL endpoint of the Appwrite server. <a class="u-bold" target="_blank" href="https://appwrite.io/docs/getting-started-for-server">Learn more</a>.`,
value: 'https://cloud.appwrite.io/v1',
placeholder: 'https://cloud.appwrite.io/v1',
required: false,
type: 'url'
},
{
name: 'STRIPE_SECRET_KEY',
description: `Secret for sending requests to the Stripe API. <a class="u-bold" target="_blank" href="https://stripe.com/docs/keys">Learn more</a>.`,
placeholder: 'sk_test_51J...',
required: true,
type: 'password'
},
{
name: 'STRIPE_WEBHOOK_SECRET',
description: `Secret used to validate the Stripe Webhook signature. <a class="u-bold" target="_blank" href="https://stripe.com/docs/webhooks">Learn more</a>.`,
placeholder: 'whsec_...',
required: true,
type: 'password'
}
]
},
{
icon: 'icon-stripe',
id: 'payments-with-stripe',
name: 'Payments with Stripe',
tagline: 'Receive card payments and store paid orders.',
permissions: ['any'],
events: [],
cron: '',
timeout: 15,
usecases: ['Utilities'],
runtimes: [
{
name: 'node-18.0',
commands: 'npm install && npm run setup',
entrypoint: 'src/main.js',
providerRootDirectory: 'node/payments-with-stripe'
}
],
instructions: `For documentation and instructions check out <a target="_blank" rel="noopener noreferrer" class="link" href="https://github.com/appwrite/templates/tree/main/node/payments-with-stripe">file</a>.`,
vcsProvider: 'github',
providerRepositoryId: 'templates',
providerOwner: 'appwrite',
providerBranch: 'main',
variables: [
{
name: 'APPWRITE_API_KEY',
description: `The API Key to talk to Appwrite backend APIs. <a class="u-bold" target="_blank" href="https://appwrite.io/docs/getting-started-for-server">Learn more</a>.`,
value: '',
placeholder: 'd1efb...aec35',
required: true,
type: 'password'
},
{
name: 'APPWRITE_ENDPOINT',
description: `The URL endpoint of the Appwrite server. <a class="u-bold" target="_blank" href="https://appwrite.io/docs/getting-started-for-server">Learn more</a>.`,
value: 'https://cloud.appwrite.io/v1',
placeholder: 'https://cloud.appwrite.io/v1',
required: false,
type: 'url'
},
{
name: 'STRIPE_SECRET_KEY',
description: `Secret for sending requests to the Stripe API. <a class="u-bold" target="_blank" href="https://stripe.com/docs/keys">Learn more</a>.`,
placeholder: 'sk_test_51J...',
required: true,
type: 'password'
},
{
name: 'STRIPE_WEBHOOK_SECRET',
description: `Secret used to validate the Stripe Webhook signature. <a class="u-bold" target="_blank" href="https://stripe.com/docs/webhooks">Learn more</a>.`,
placeholder: 'whsec_...',
required: true,
type: 'password'
},
{
name: 'APPWRITE_DATABASE_ID',
description: `The ID of the database to store paid orders. <a class="u-bold" target="_blank" href="https://appwrite.io/docs/databases">Learn more</a>.`,
value: 'orders',
placeholder: 'orders',
required: false,
type: 'text'
},
{
name: 'APPWRITE_COLLECTION_ID',
description: `The ID of the collection to store paid orders. <a class="u-bold" target="_blank" href="https://appwrite.io/docs/collections">Learn more</a>.`,
value: 'orders',
placeholder: 'orders',
required: false,
type: 'text'
}
]
}
];