call method

Implementation

@override
Future<Either<Failure, PayResponseModel>> call(
    PayUseCaseParams params) async {
  Either<Failure, CowpayResponseModel<PayResponseModel>> response =
      await repository.payCall(
    requestModel: PayRequestModel(
      paymentOptions: params.paymentOptions,
      merchantReferenceId: params.merchantReferenceId,
      customerMerchantProfileId: params.customerMerchantProfileId,
      amount: params.amount,
      signature: params.signature,
      customerMobile: params.customerMobile,
      customerEmail: params.customerEmail,
      isfeesOnCustomer: params.isfeesOnCustomer,
      description: params.description,
      customerFirstName: params.customerFirstName,
      customerLastName: params.customerLastName,
      cardData: params.cardPaymentData,
      tokenizedCard: params.tokenizedCard,
    ),
  );
  return response.fold((l) => Left(l), (r) => Right(r.data!));
}