Nordigen
This commit is contained in:
parent
69398d0c29
commit
c8f18df96b
|
|
@ -127,12 +127,22 @@ class BankAccountScreen extends StatelessWidget {
|
||||||
webClient
|
webClient
|
||||||
.post(url, credentials.token,
|
.post(url, credentials.token,
|
||||||
data: jsonEncode({
|
data: jsonEncode({
|
||||||
'context': {'return_url': ''}
|
'context':
|
||||||
|
integrationType == BankAccountEntity.INTEGRATION_TYPE_YODLEE
|
||||||
|
? {'return_url': ''}
|
||||||
|
: 'nordigen',
|
||||||
}))
|
}))
|
||||||
.then((dynamic response) {
|
.then((dynamic response) {
|
||||||
store.dispatch(StopSaving());
|
store.dispatch(StopSaving());
|
||||||
launchUrl(Uri.parse(
|
|
||||||
'${cleanApiUrl(credentials.url)}/yodlee/onboard/${response['hash']}'));
|
String connectUrl = cleanApiUrl(credentials.url);
|
||||||
|
if (integrationType == BankAccountEntity.INTEGRATION_TYPE_YODLEE) {
|
||||||
|
connectUrl += '/yodlee/onboard/${response['hash']}';
|
||||||
|
} else {
|
||||||
|
connectUrl += '/nordigen/connect/${response['hash']}';
|
||||||
|
}
|
||||||
|
|
||||||
|
launchUrl(Uri.parse(connectUrl));
|
||||||
}).catchError((dynamic error) {
|
}).catchError((dynamic error) {
|
||||||
store.dispatch(StopSaving());
|
store.dispatch(StopSaving());
|
||||||
showErrorDialog(message: '$error');
|
showErrorDialog(message: '$error');
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue