getDetail static method

Future<List<YKStorePayDetail>> getDetail(
  1. List<String> orderIds
)

正在维护,暂停使用

Implementation

// static Future subscriptionOrder({required String subscriptionOrderId, required String customerId}) async {
//   return YKStoreKit._getInstance()._order(subscriptionOrderId, customerId, true);
// }

static Future<List<YKStorePayDetail>> getDetail(List<String> orderIds) async {
  Set<String> kIds = <String>{};

  for (String order in orderIds) {
    kIds.add(order);
  }

  try {
    final ProductDetailsResponse response = await InAppPurchase.instance.queryProductDetails(kIds);

    if (response.error == null) {
      var list = List<YKStorePayDetail>.from(response.productDetails.map((e) => YKStorePayDetail._make(e)));

      return list;
    }
  } catch (e) {}

  return [];
}