plebpay-utils
v1.0.21
Published
Utility package for PlebPay.
Downloads
14
Maintainers
Readme
plebpay-utils (beta)
Utility package to help protect your site with a PlebPay paywall. Example usage https://github.com/SamSamskies/protected-by-plebpay-example.
If you've never heard of PlebPay, go check it out https://www.plebpay.com/ 😀
Installation
npm
$ npm install plebpay-utils
or
yarn
$ yarn add plebpay-utils
Usage
Script Tag (no installation required)
<script src="https://unpkg.com/[email protected]/dist/index.js" type="text/javascript"></script>
<script>
// replace with your own PlebPay paywall URL
const plebPayPaywallUrl = 'https://www.plebpay.com/c5bc98ff-a386-45ba-9b99-c3b16da9cdaf'
window.PlebPay.redirectIfNecessary(plebPayPaywallUrl)
</script>
Module
import { redirectIfNecessary } from 'plebpay-utils'
// replace with your own PlebPay paywall URL
const plebPayPaywallUrl = 'https://www.plebpay.com/c5bc98ff-a386-45ba-9b99-c3b16da9cdaf'
redirectIfNecessary(plebPayPaywallUrl)