getAllowedUPIApps static method

Future<(List<String>, bool, bool)> getAllowedUPIApps({
  1. required String orderId,
})

Implementation

static Future<
    (
      List<String> allowedApps,
      bool isGatewayPhonepay,
      bool collectRequestEnabled
    )> getAllowedUPIApps({required String orderId}) async {
  final IPaymentRepo paymentRepo = getObject<IPaymentRepo>();
  return await paymentRepo.getOrder(orderId).toData().then((order) => (
        order.checkoutPageConfig?.upi?.allowedApps ?? [],
        order.provider == PaymentProvider.phonePe,
        order.checkoutPageConfig?.upi?.collectRequestEnabled ?? false,
      ));
}