requestAuthentication method

  1. @override
void requestAuthentication({
  1. Key? key,
  2. BuildContext? context,
  3. Payload? payload,
  4. bool? showCloseButton,
  5. Widget? closeButton,
  6. BootpayDefaultCallback? onCancel,
  7. BootpayDefaultCallback? onError,
  8. BootpayCloseCallback? onClose,
  9. BootpayDefaultCallback? onIssued,
  10. BootpayConfirmCallback? onConfirm,
  11. BootpayAsyncConfirmCallback? onConfirmAsync,
  12. BootpayDefaultCallback? onDone,
  13. String? userAgent,
  14. int? requestType,
})
override

Implementation

@override
void requestAuthentication(
    {
      Key? key,
      BuildContext? context,
      Payload? payload,
      bool? showCloseButton,
      Widget? closeButton,
      BootpayDefaultCallback? onCancel,
      BootpayDefaultCallback? onError,
      BootpayCloseCallback? onClose,
      BootpayDefaultCallback? onIssued,
      BootpayConfirmCallback? onConfirm,
      BootpayAsyncConfirmCallback? onConfirmAsync,
      BootpayDefaultCallback? onDone,
      String? userAgent, //사용되진 않음
      int? requestType
    }) {


  this._callbackCancel = onCancel;
  this._callbackError = onError;
  this._callbackClose = onClose;
  this._callbackIssued = onIssued;
  this._callbackConfirm = onConfirm;
  this._callbackAsyncConfirm = onConfirmAsync;
  this._callbackDone = onDone;


  if(payload != null) {
    if(payload.subscriptionId == null || payload.subscriptionId?.length == 0) {
      payload.subscriptionId = payload.orderId ?? "";
    }
    _jsBeforeLoad();
    _requestAuthentication(jsonEncode(payload.toJson()));
  }
}