getPaymentOptions method

  1. @override
Future<String> getPaymentOptions({
  1. required String requestJson,
})
override

Implementation

@override
Future<String> getPaymentOptions({required String requestJson}) async {
  try {
    final result = await methodChannel.invokeMethod<String>(
      'getPaymentOptions',
      requestJson,
    );
    debugPrint('[$runtimeType] ✅ getPaymentOptions: $result');
    return result!;
  } on PlatformException catch (e) {
    debugPrint('[$runtimeType] ❌ getPaymentOptions: $e');
    throw GetPaymentOptionsError(
      code: e.code,
      message: e.message?.replaceFirst('v1=', ''),
      details: e.details,
      stacktrace: e.stacktrace,
    );
  }
}