startInPayPurchase method

void startInPayPurchase(
  1. String? token,
  2. String? orderId,
  3. String? productID, {
  4. String? sign,
  5. String? price,
  6. bool first = false,
  7. int index = 1,
  8. int indexNum = 1,
  9. int indexNumNext = 1,
})

Implementation

void startInPayPurchase(String? token, String? orderId, String? productID,
    {String? sign,
    String? price,
    bool first = false,
    int index = 1,
    int indexNum = 1,
    int indexNumNext = 1}) async {
  if (!showLoading) {
    if (!first) {
      showLoading = true;
      delegate.showLoadingDialog();
      if (productID!.startsWith(RechargeConfig.subStart)) {
        checkInPayPurchaseVip(token, orderId, productID,
            sign: sign,
            price: price,
            first: first,
            index: index,
            indexNum: indexNum,
            indexNumNext: indexNumNext);
      } else {
        checkInPayPurchase(token, orderId, productID,
            sign: sign,
            price: price,
            first: first,
            index: index,
            indexNum: indexNum,
            indexNumNext: indexNumNext);
      }
    } else {
      if (productID!.startsWith(RechargeConfig.subStart)) {
        checkInPayPurchaseVip(token, orderId, productID,
            sign: sign,
            price: price,
            first: first,
            index: index,
            indexNum: indexNum,
            indexNumNext: indexNumNext);
      } else {
        checkInPayPurchase(token, orderId, productID,
            sign: sign,
            price: price,
            first: first,
            index: index,
            indexNum: indexNum,
            indexNumNext: indexNumNext);
      }
    }
  }
}