Package 'shinyservicebot'

Title: Servicebot 'Shiny' Integration
Description: Create in-app purchasing and subscriptions through 'Servicebot' payment using the 'Stripe' framework.
Authors: Bjorn Ole Lindseth [aut, cre], Stian Berger [ctb], Capia AS [cph]
Maintainer: Bjorn Ole Lindseth <[email protected]>
License: MIT + file LICENSE
Version: 0.1.0
Built: 2024-10-25 05:32:55 UTC
Source: https://github.com/capiaas/shinyservicebot

Help Index


INIT SERVICEBOT

Description

INIT SERVICEBOT

Usage

init(servicebot_secret = NULL, secure_setup = FALSE,
  dev_mode = FALSE)

Arguments

servicebot_secret

'Servicebot servicebot_secret'

secure_setup

'HMAC string to be generated in embeds

dev_mode

'Debug mode'


Run examples of using shinyservicebot in a Shiny app

Description

Run examples of using shinyservicebot in a Shiny app

Usage

runPortalExample()

Examples

if (interactive()) {
  runPortalExample()
}

Run examples of using shinyservicebot in a Shiny app

Description

Run examples of using shinyservicebot in a Shiny app

Usage

runPricingExample()

Examples

if (interactive()) {
  runPricingExample()
}

Run examples of using shinyservicebot in a Shiny app

Description

Run examples of using shinyservicebot in a Shiny app

Usage

runSignupExample()

Examples

if (interactive()) {
  runSignupExample()
}

Generate JWT

Description

Generate JWT

Usage

secure_setup(email, key)

Arguments

email

Valid email adress

key

Secret key

Value

JWT


Servicebot render embeds

Description

This function renders the html output for servicebot embeds

Usage

shinyservicebot(servicebot_config = e$servicebot_config,
  dev_mode = e$dev_mode, width = NULL, height = NULL,
  elementId = NULL)

Arguments

servicebot_config

This is the embed config for servicebot as described by servicebot. See https://docs.servicebot.io/subscription-portal/subscription-management-portal/subscription-management-portal-configuration for config options. See the examples section below.

dev_mode

For use in development. Set to FALSE in production

width

With of html widget

height

height of html widget

elementId

elementId Use an explicit element ID for the widget (rather than an automatically generated one). Ignored when used in a Shiny app.

Examples

# Init servicebot pr user login
shinyservicebot::init(dev_mode = TRUE)

# Config
servicebot_config = list (
 servicebot_id =  "E0OQN0P0Dort", # // LIVE & TEST MODE IDs ARE DIFFERENT
 service =   "Flat Subscription",
 email =  "[email protected]"
)

shinyservicebot::shinyservicebot(servicebot_config, width = "auto")

Customize html

Description

Customize html

Usage

shinyservicebot_html(id, style, class, ...)

Arguments

id

Id of div element

style

Style element of html

class

Class id of div element

...

Other params


Shiny bindings for shinyservicebot

Description

Output and render functions for using shinyservicebot within Shiny applications and interactive Rmd documents.

Usage

shinyservicebotOutput(outputId, width = "100%", height = "400px")

renderShinyservicebot(expr, env = parent.frame(), quoted = FALSE)

Arguments

outputId

output variable to read from

width, height

Must be a valid CSS unit (like "100%", "400px", "auto") or a number, which will be coerced to a string and have "px" appended.

expr

An expression that generates a shinyservicebot

env

The environment in which to evaluate expr.

quoted

Is expr a quoted expression (with quote())? This is useful if you want to save an expression in a variable.