NCD fork of the peertube-plugin-orion-sell-storage NPM package.
Go to file
matty 3199b487b1 add 10% disclaimer to crypto thing 2024-04-12 09:03:15 -04:00
assets replace orion with ncd 2023-12-12 19:42:42 -05:00
client add 10% disclaimer to crypto thing 2024-04-12 09:03:15 -04:00
languages update version and branding 2023-12-13 10:25:18 -05:00
public/images initial commit 2023-12-12 19:31:35 -05:00
scripts initial commit 2023-12-12 19:31:35 -05:00
.gitignore initial commit 2023-12-12 19:31:35 -05:00
.npmignore initial commit 2023-12-12 19:31:35 -05:00
LICENSE initial commit 2023-12-12 19:31:35 -05:00
README.md add payment gateway and fix crypto banner 2024-04-02 16:22:32 -04:00
main.js revert previous commit 2024-04-02 15:12:16 -04:00
package-lock.json initial commit 2023-12-12 19:31:35 -05:00
package.json update readme and bump version 2023-12-14 17:27:31 -05:00
yarn.lock replace orion with ncd 2023-12-12 19:42:42 -05:00

README.md

PeerTube plugin Sell Storage

Table of Contents

About

This plugin allow you to sell storage space to your users using Stripe subscription. Payments are automated with Stripe.

Getting Started

This is the NCD fork of the peertube-plugin-orion-sell-storage PeerTube plugin. This fork at inception allows you to add five packages rather than the original three. Everything else is pretty much left as-is, unless I decide to work on it more. Check Prerequisites to install this plugin

Prerequisites

  • Peertube >= v4.3.0

Installing

  • Go to your instance Admin
  • Navigate to the "Plugins" page
  • Search for "ncd-sell-storage"
  • Click Install near the plugin name

If installing locally

  • Clone Git repository
  • cd peertube-plugin-ncd-sell-storage
  • yarn
  • yarn build
  • Install via PeerTube CLI

Configuration

You need to configuration the plugin to work. Create an account on https://stripe.com to start.

In your Stripe dashboard, you can test in "Test mode", and go live by unchecking "Test mode" in the top right. To go in live mode, you need to fill form in Stripe side. We recommand you to test in Test mode the integration before go in live.

Note: If you perform a transaction in Test Mode, you'll need to manually clear the subscription status because the webhook will not send back the correct validation response, meaning the changes will take effect but nothing will be charged. Use a dedicated test account.

First, go to the Developer tab, and navigate to "API Keys". Grab your Secret API key, and insert it in your plugin settings. After that, always in the Developer tab, navigate to Webhook and create a webhook.

An example of webhook URL is available in your plugin settings. Its like https://your-instance.tld/plugins/ncd-sell-storage/1.1.2/router/webhook

Note: If you update the plugin, you'll have to update the webhook link in Stripe. Don't forget this!

Keep in mind, you need to update the webhook URL on stripe-side for each new plugin version, because the version is in the URL. Now, configure your Currency and Page description in the plugin settings.

Its time to add your Plans! In stripe, go to Product page, and add new product. Set a name, description and the price. After creation, go in this new Product and grab the "API ID" near the price field.

Now, you can continue configure your Plan (1, 2, 3, 4, 5) in the plugin settings. Repeat this process for each plans. Add new product, and grab the API ID corresponding to this price to insert it in your Product ID field, in the plugin settings.

Usage

  • Navigate to "My Account""
  • Navigate to the new navigation link "My Subscription"