Thursday, 4 October 2018

How to: Create your own custom Badger Button premium content paywall with 23 lines

  1. Embed the Badger Button script <script type="text/javascript" src="https://badgerwallet.cash/button.js"></script>
  2. Define your button <button class="badger-button your-class" data-to="bitcoincash:pp8skudq3x5hzw8ew7vzsw8tn4k8wxsqsv0lt0mf3g" data-satoshis="1000" data-paywall-id="paywall" >
    • Add the badger-button class the element you want to Badgerify
    • data-to is your receiving address
    • data-satoshis is the amount in satoshis you are requesting
    • data-paywall-id (optional) the id of an element containing your premium content
    • data-success-callback (optional) the name of a global scoped callback function called after transaction success. The transaction id will be passed as the first parameter.

Finally, 3. Style to your own brand and get paid for creating great content

This is what the example looks like completed: https://i.imgur.com/y8sXLkw.png

Example button live at https://badgerwallet.cash/paywalldemo

Make sure you have the wallet installed and unlocked, and that you serve the page from localhost when testing.

Please let me know if you need any specific features, thanks!

submitted by /u/SpendBCH_io
[link] [comments]

source https://www.reddit.com/r/btc/comments/9l9j1t/how_to_create_your_own_custom_badger_button/

No comments:

Post a Comment