getPaymentOptions method

Future<PaymentOptionsResponse> getPaymentOptions({
  1. required GetPaymentOptionsRequest request,
})

Implementation

Future<PaymentOptionsResponse> getPaymentOptions({
  required GetPaymentOptionsRequest request,
}) async {
  try {
    final requestJson = jsonEncode(request.toJson());
    final channelResponse = await _platformInstance.getPaymentOptions(
      requestJson: requestJson,
    );
    final json = jsonDecode(channelResponse) as Map<String, dynamic>;
    return PaymentOptionsResponse.fromJson(json);
  } catch (e) {
    rethrow;
  }
}