UNPKG

iamport-react-native

Version:

리액트 네이티브용 아임포트 결제/본인인증 연동 라이브러리

104 lines (103 loc) 3.3 kB
"use strict"; class Validation { constructor(userCode, loading, callback, data) { this.userCode = userCode; this.loading = loading; this.callback = callback; this.data = data; this.isValid = true; this.message = ''; this.validateUserCode(); } validateUserCode() { if (!this.userCode) { this.isValid = false; this.message = '가맹점 식별코드(userCode)는 필수입력입니다.'; return; } this.validateLoading(); } validateLoading() { if (this.loading !== undefined && typeof this.loading !== 'object') { this.isValid = false; this.message = '로딩(loading) 컴포넌트가 올바르지 않습니다.'; return; } this.validateCallback(); } validateCallback() { if (this.callback !== undefined && typeof this.callback !== 'function') { this.isValid = false; this.message = '콜백 함수(callback)가 올바르지 않습니다.'; return; } this.validateData(); } validateData() { if (this.data?.popup) { this.isValid = false; this.message = '해당 모듈은 팝업을 지원하지 않습니다.'; return; } } getIsValid() { return this.isValid; } getMessage() { return this.message; } } let IMPData; (function (_IMPData) { class CertificationData { constructor(carrier, company, merchant_uid, name, phone, pg, min_age, popup, m_redirect_url) { this.carrier = carrier; this.company = company; this.merchant_uid = merchant_uid; this.name = name; this.phone = phone; this.pg = pg; this.min_age = min_age; this.popup = popup; this.m_redirect_url = m_redirect_url; } } _IMPData.CertificationData = CertificationData; class PaymentData { constructor(amount, buyer_email, buyer_name, buyer_tel, escrow, merchant_uid, name, pay_method, pg, language, naverPopupMode, naverProducts, naverUseCfm, niceMobileV2, notice_url, m_redirect_url, currency, custom_data, customer_uid, digital, display, buyer_postcode, app_scheme, biz_num, buyer_addr, popup, tax_free, vbank_due, bypass) { this.amount = amount; this.app_scheme = app_scheme; this.biz_num = biz_num; this.buyer_addr = buyer_addr; this.buyer_email = buyer_email; this.buyer_name = buyer_name; this.buyer_postcode = buyer_postcode; this.buyer_tel = buyer_tel; this.currency = currency; this.custom_data = custom_data; this.customer_uid = customer_uid; this.digital = digital; this.display = display; this.escrow = escrow; this.language = language; this.m_redirect_url = m_redirect_url; this.merchant_uid = merchant_uid; this.name = name; this.naverPopupMode = naverPopupMode; this.naverProducts = naverProducts; this.naverUseCfm = naverUseCfm; this.niceMobileV2 = niceMobileV2; this.notice_url = notice_url; this.pay_method = pay_method; this.pg = pg; this.popup = popup; this.tax_free = tax_free; this.vbank_due = vbank_due; this.bypass = bypass; } niceMobileV2 = true; } _IMPData.PaymentData = PaymentData; })(IMPData || (IMPData = {})); export { Validation, IMPData }; //# sourceMappingURL=Validation.js.map