getPaymentProduct method

dynamic getPaymentProduct({
  1. required String paymentProductId,
  2. required void onSuccess(
    1. PaymentProduct paymentProduct
    ),
  3. required void onApiError(
    1. ApiErrorResponse apiError
    ),
  4. required void onFailure(
    1. NativeException e
    ),
})

Retrieves the PaymentProduct as identified by the provided paymentProductId from the Connect Gateway.

Implementation

getPaymentProduct({
  required String paymentProductId,
  required void Function(PaymentProduct paymentProduct) onSuccess,
  required void Function(ApiErrorResponse apiError) onApiError,
  required void Function(NativeException e) onFailure,
}) {
  final request = PaymentProductRequest(productId: paymentProductId);
  return _communicator
      .getPaymentProduct(
          request,
          _NativeFutureListener(
              success: onSuccess, apiError: onApiError, failure: onFailure))
      .awaitJob();
}