VRFS-4193 - pop open system browser for Stripe Connect when in app

This commit is contained in:
Seth Call 2016-06-03 10:14:29 -05:00
parent c6b11e64ad
commit 9db218d518
1 changed files with 18 additions and 0 deletions

View File

@ -12,6 +12,9 @@ UserStore = context.UserStore
clicked:false
}
openBrowser: () ->
context.JK.popExternalLink("https://www.jamkazam.com/client#/jamclass")
onStripeConnect: (e) ->
if this.state.clicked
@ -19,6 +22,21 @@ UserStore = context.UserStore
e.preventDefault()
if window.jamClient.IsNativeClient()
buttons = []
buttons.push({name: 'CLOSE', buttonStyle: 'button-grey'})
buttons.push({
name: 'OPEN BROWSER',
buttonStyle: 'button-orange',
click: (() => (@openBrowser()))
})
context.JK.Banner.show({
title: "Browser Needed",
html: "You must connect to Stripe in a normal browser.<br/><br/>Please select the OPEN BROWSER button to open this page in your system browser.",
buttons: buttons
})
return
this.setState({clicked: true})
StripeActions.connect(this.props.purpose, this.props.user)