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