mapGooglePayOpenResult function
- String json
Implementation
GooglePayOpenResult mapGooglePayOpenResult(String json) {
final map = jsonDecode(json);
switch (map[type]) {
case success:
return GooglePayOpenSuccess(
token: map[token],
description: map[description],
cardNetwork: map[cardNetwork],
cardTail: map[cardTail]
);
case cancelled:
return GooglePayOpenCancelled();
case unknownError:
return GooglePayOpenUnknownError();
default:
return GooglePayOpenNotConfigured();
}
}