createPaymentMethod method

  1. @override
Future<PaymentMethod> createPaymentMethod(
  1. PaymentMethodParams data, [
  2. PaymentMethodOptions? options
])
override

Implementation

@override
Future<PaymentMethod> createPaymentMethod(
  PaymentMethodParams data, [
  PaymentMethodOptions? options,
]) async {
  return data.maybeWhen(
    card: (data) {
      return _createCardPaymentMethod(data);
    },
    orElse: () {
      throw UnimplementedError();
    },
  );
}