Stripe connect
This commit is contained in:
parent
981536ffba
commit
2aed755724
|
|
@ -134,9 +134,11 @@ class _CompanyGatewayEditState extends State<CompanyGatewayEdit>
|
|||
companyGateway.gatewayId == kGatewayStripeConnect)
|
||||
AppButton(
|
||||
label: localization.stripeConnect.toUpperCase(),
|
||||
onPressed: () {
|
||||
viewModel.onStripeConnectPressed();
|
||||
},
|
||||
onPressed: viewModel.state.isSaving
|
||||
? null
|
||||
: () {
|
||||
viewModel.onStripeConnectPressed();
|
||||
},
|
||||
)
|
||||
else
|
||||
GatewayConfigSettings(
|
||||
|
|
|
|||
|
|
@ -118,11 +118,15 @@ class CompanyGatewayEditVM {
|
|||
final credentials = state.credentials;
|
||||
final url = '${credentials.url}/one_time_token';
|
||||
|
||||
store.dispatch(StartSaving());
|
||||
|
||||
webClient.post(url, credentials.token).then((dynamic response) {
|
||||
store.dispatch(StopSaving());
|
||||
print('## RESPONSE: $response');
|
||||
// TODO parse 'hash'
|
||||
//launch('${credentials.url}/stripe-connect/');
|
||||
}).catchError((dynamic error) {
|
||||
store.dispatch(StopSaving());
|
||||
showErrorDialog(
|
||||
context: navigatorKey.currentContext, message: '$error');
|
||||
});
|
||||
|
|
|
|||
Loading…
Reference in New Issue