stripeRShiny: stripeRShiny

Description Usage Arguments Details Value Examples

View source: R/shiny.R

Description

Shiny Module for use with stripeRShinyUI

Usage

1
2
3
stripeRShiny(input, output, session, amount, plan, formAmount, formText,
  bottom_left = "Powered by StripeR", thanks = shiny::p("Thanks!"),
  currency = "gbp", live = FALSE, metadata = NULL)

Arguments

input

shiny input

output

shiny output

session

shiny session

amount

Amount to charge, reactive

plan

reactive - If to place the customer on a plan configured in Stripe

formAmount

reactive - Text to display for amount in form

formText

reactive - Custom text for form

bottom_left

What to see in the bottom left of form

thanks

What to see once the form is successfully submitted

currency

The currency the amount is in

live

Whether to charge against the live Stripe account.

metadata

reactive - A named list of other data to send into stripeR

Details

Call via status <- shiny::callModule(stripeRShiny, "your_id")

Value

A reactive status object

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
## Not run: 
## server.R
library(shiny)
library(stripeR)
function(input, output, session){

callModule(stripeRShiny, "stripe1",
           amount=2000,
           plan="example",
           formAmount=reactive("$20.00"),
           formText=reactive("Please pay $20.00"))
           }

## ui.R
library(shiny)
library(stripeR)
fluidPage(
titlePanel("StripeR Demo"),
# A Stripe Form
sidebarLayout(
  sidebarPanel(
    stripeRShinyUI("stripe1")
 ),

mainPanel(...)))


## End(Not run)

MarkEdmondson1234/stripeR documentation built on Nov. 6, 2019, 3:21 p.m.