startPayWithSelectedCard method

dynamic startPayWithSelectedCard()

Implementation

startPayWithSelectedCard() async {
  BootpayPrint("startPayWithSelectedCard : ${widget.c.requestType.value}");

  // BootpayPrint("widget.c.selectedCardIndex: ${widget.c.selectedCardIndex}, wallets: ${widget.c.resWallet.value.wallets.length}");
  widget.payload?.walletId = widget.c.resWallet.value.wallets[widget.c.selectedCardIndex].wallet_id;
  widget.c.payload?.walletId = widget.c.resWallet.value.wallets[widget.c.selectedCardIndex].wallet_id;

  if(widget.isEditMode == true) {
    alertDialogDeleteConfirm(widget.c.resWallet.value.wallets[widget.c.selectedCardIndex]);
    return;
  }

  if(widget.c.easyType == BioConstants.EASY_TYPE_PASSWORD) {
    requestPasswordForPay();
    return;
  } else  if(widget.c.easyType == BioConstants.EASY_TYPE_PASSWORD_NO_BILL) {
    requestPasswordForPay();
    return;
  }

  // widget.c.requestType.value = BioConstants.REQUEST_BIO_FOR_PAY;

  if(!await isAblePasswordToken()) {
    // widget.c.requestType.value = BioConstants.REQUEST_PASSWORD_TOKEN_FOR_BIO_FOR_PAY;
    // showWebView();
    showWebView();
    widget.c.requestPasswordToken(type: BioConstants.REQUEST_PASSWORD_TOKEN_FOR_BIO_FOR_PAY, doWorkNow: false);

    return;
  }

  if(await isAbleBioAuthDevice()) {
    goBioForPay();
    return;
  } else if(nowAbleBioAuthDevice()) {
    //기기활성화 먼저해야함
    goBioForEnableDevice();
    return;
  }
  requestPasswordForPay();
}