showInPayDialog method

void showInPayDialog(
  1. String? token,
  2. String? orderId,
  3. String? productID, {
  4. String? sign,
  5. String? price,
  6. bool showLeft = true,
  7. bool restored = false,
})

Implementation

void showInPayDialog(String? token, String? orderId, String? productID,
    {String? sign,
    String? price,
    bool showLeft = true,
    bool restored = false}) {
  if (showInPay || restored) {
    return;
  }
  showInPay = true;
  delegate.showDialogBase(showLeft ? 3 : 4).then((value) async {
    showInPay = false;
    if (value == true) {
      startInPayPurchase(token, orderId, productID, sign: sign, price: price);
    } else if (value == null) {
      if (!showLoading) {
        showLoading = true;
        delegate.showLoadingDialog();
        RechargeDao.rechargeFailLog(token, sign, orderId, rechargeError)
            .then((res) async {
          popDialog();
          if (!res.result) {
            delegate.showErrorToast(res);
          }
        });
      }
    }
  });
}