MarkEdmondson1234 / stripeR

Interface between Stripe API and R
Other
8 stars 7 forks source link

add condition to update customer with new plan in Shiny helper #5

Open MarkEdmondson1234 opened 8 years ago

MarkEdmondson1234 commented 8 years ago
 ## A recurring charge to a pre-made payment plan in Stripe settings
    if(!is.null(plan)){
      message("Customer created with plan")
      customer <- try(create_customer(idempotency=idempotency,
                                      source = token$id,
                                      email = email,
                                      plan = plan,
                                      account_balance = status$account_balance,
                                      coupon = status$coupon,
                                      quantity = status$quantity,
                                      trial_end = status$trial_end,
                                      metadata = metadata))

      updateStatus(customer, status)

      ## TODO: add condition to update customer with new plan