process method
Process the paiement
timeout is the duration after which the process will timeout and the
process will be cancelled.
If not specified, the process will not timeout.
options allows to customize the labels of the payment form.
Implementation
Future<String> process(
String formToken, {
Duration? timeout,
LyraProcessOptions? options,
}) async {
try {
final lyraResponse = await _platform.process(
formToken,
timeout: timeout,
options: options == null
? null
: LyraProcessOptionsConverter.toInterface(options),
);
return lyraResponse;
} catch (error, stackTrace) {
try {
_platform.parseError(error, stackTrace);
} catch (interfaceError, interfaceStackTrace) {
adaptErrors(
error: interfaceError,
stackTrace: interfaceStackTrace,
);
}
}
}