@bootpay/client-js 5.2.0-beta.9 → 5.2.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.gitmodules +3 -0
- package/dist/index.mjs +2902 -2920
- package/dist/index.umd.js +47 -64
- package/dist/src/bootpay-environment.d.ts +1 -1
- package/dist/src/bootpay-es5.d.ts +1 -1
- package/dist/src/bootpay-sdk.d.ts +2 -2
- package/dist/src/bootpay-widget.d.ts +3 -2
- package/dist/src/bootpay.d.ts +5 -5
- package/dist/src/index.d.ts +10 -12
- package/dist/src/lib/analytics.d.ts +3 -3
- package/dist/src/lib/bootpay-widget.d.ts +3 -3
- package/dist/src/lib/bootpay.d.ts +4 -4
- package/dist/src/lib/event/hooks/widget/message.d.ts +10 -3
- package/dist/src/lib/event/payment.d.ts +38 -2
- package/dist/src/lib/event/polling.d.ts +2 -2
- package/dist/src/lib/event/user-token.d.ts +7 -1
- package/dist/src/lib/event/widget.d.ts +1 -1
- package/dist/src/lib/template/brandpay.d.ts +14 -5
- package/dist/src/lib/template/payment.d.ts +27 -3
- package/dist/src/lib/template/user-token.d.ts +19 -4
- package/dist/src/lib/template/widget.d.ts +5 -6
- package/dist/src/support/event-logger.d.ts +2 -2
- package/dist/src/support/hooks/widget-hooks.d.ts +9 -0
- package/dist/src/support/stores/widget-store.d.ts +22 -4
- package/dist/src/types/bootpay-interface.d.ts +299 -0
- package/dist/src/types/bootpay-sdk-interface.d.ts +17 -0
- package/dist/src/types/bootpay-widget-interface.d.ts +121 -0
- package/dist/src/{support → vendor/components}/alfred-progress/index.d.ts +1 -1
- package/dist/src/{lib/template → vendor/components}/confirm-modal.d.ts +2 -2
- package/dist/src/{lib/template → vendor/components}/modal.d.ts +2 -2
- package/dist/src/vendor/components/slider/hooks/slider/event.d.ts +4 -0
- package/dist/src/vendor/components/slider/index.d.ts +7 -0
- package/dist/src/vendor/components/slider/template/slider.d.ts +20 -0
- package/dist/src/vendor/mixins/bootpay-commerce.d.ts +11 -0
- package/dist/src/{support → vendor/mixins}/event.d.ts +3 -1
- package/dist/src/vendor/mixins/ex-commerce.d.ts +13 -0
- package/dist/src/vendor/mixins/hook.d.ts +12 -0
- package/dist/src/{support → vendor/mixins}/resource.d.ts +1 -1
- package/dist/src/vendor/mixins/session.d.ts +16 -0
- package/dist/src/{support → vendor/mixins}/storage.d.ts +1 -1
- package/dist/src/{support → vendor/mixins}/template-manager.d.ts +8 -2
- package/dist/src/vendor/types/slider-interface.d.ts +12 -0
- package/package.json +4 -6
- package/tsconfig.json +15 -3
- package/vite.config.ts +9 -7
- package/dist/package.json.d.ts +0 -68
- package/dist/src/bootpay-store.d.ts +0 -7
- package/dist/src/lib/bootpay-store.d.ts +0 -10
- package/dist/src/lib/event/hooks/ex/router.d.ts +0 -7
- package/dist/src/lib/event/hooks/ex/window.d.ts +0 -22
- package/dist/src/lib/event/store.d.ts +0 -7
- package/dist/src/lib/hooks/store.d.ts +0 -5
- package/dist/src/lib/template/store.d.ts +0 -35
- package/dist/src/support/ex-store.d.ts +0 -13
- package/dist/src/support/stores/bootpay-store.d.ts +0 -7
- package/dist/src/support/stores/ex-store.d.ts +0 -1
- package/dist/src/support/widget-store.d.ts +0 -21
- package/dist/vite.config.d.ts +0 -2
- /package/dist/src/{support → vendor/mixins}/bootpay-manager.d.ts +0 -0
- /package/dist/src/{support → vendor/mixins}/logger.d.ts +0 -0
- /package/dist/src/{support → vendor/mixins}/util.d.ts +0 -0
- /package/dist/src/{models → vendor/models}/const.d.ts +0 -0
|
@@ -0,0 +1,299 @@
|
|
|
1
|
+
import { ResponseBootpayWidgetTermsModel } from './bootpay-widget-interface';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
interface RequestPaymentBaseModel {
|
|
6
|
+
ver?: string // version
|
|
7
|
+
sdk?: boolean // sdk 사용여부
|
|
8
|
+
sdk_version?: string
|
|
9
|
+
sdk_type?: number
|
|
10
|
+
application_id?: string // application_id
|
|
11
|
+
pg?: string // PG 명
|
|
12
|
+
method?: string | string[] // 결제 수단
|
|
13
|
+
order_name: string
|
|
14
|
+
price: number
|
|
15
|
+
tax_free?: number
|
|
16
|
+
deposit_price?: number
|
|
17
|
+
platform_type?: number
|
|
18
|
+
currency?: string // 결제 currency 화폐단위
|
|
19
|
+
uuid?: string // UUID
|
|
20
|
+
sk?: string // 세션 고유키
|
|
21
|
+
ti?: number // 재방문까지 걸린 시각
|
|
22
|
+
tk?: string // 결제 고유키
|
|
23
|
+
user_token?: string // user token 값을 보낸다
|
|
24
|
+
wallet_id?: string
|
|
25
|
+
widget_key?: string
|
|
26
|
+
commission_keys?: CommissionKeyModel
|
|
27
|
+
redirect_url?: string
|
|
28
|
+
metadata?: any // 사용자가 보내는 custom data
|
|
29
|
+
user?: UserModel
|
|
30
|
+
items?: ItemModel[]
|
|
31
|
+
extra?: ExtraModel
|
|
32
|
+
env?: EnvironmentModel
|
|
33
|
+
terms?: ResponseBootpayWidgetTermsModel[]
|
|
34
|
+
widget_sandbox?: boolean
|
|
35
|
+
widget?: 1 | 0
|
|
36
|
+
locale?: string
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* 결제 요청 모델
|
|
41
|
+
* Comment by GOSOMI
|
|
42
|
+
* @date: 2021-04-13
|
|
43
|
+
*/
|
|
44
|
+
export interface RequestPaymentModel extends RequestPaymentBaseModel {
|
|
45
|
+
order_id: string
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface RequestPaymentUrlModel {
|
|
49
|
+
application_id?: string
|
|
50
|
+
url?: string
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export interface RequestSubscriptionModel extends RequestPaymentBaseModel {
|
|
54
|
+
subscription_id: string
|
|
55
|
+
subscribe_brandpay_type?: 'sequential' | 'select' | undefined
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
export interface RequestAuthenticationModel {
|
|
59
|
+
ver?: string
|
|
60
|
+
sdk?: boolean
|
|
61
|
+
application_id: string
|
|
62
|
+
authentication_id: string
|
|
63
|
+
metadata?: any // 메타 데이터
|
|
64
|
+
pg: string
|
|
65
|
+
method?: string
|
|
66
|
+
order_name: string // 본인인증 요청명
|
|
67
|
+
redirect_url?: string
|
|
68
|
+
platform_type?: number
|
|
69
|
+
uuid?: string
|
|
70
|
+
sk?: string
|
|
71
|
+
ti?: number
|
|
72
|
+
tk?: string
|
|
73
|
+
user: UserModel
|
|
74
|
+
extra: ExtraModel
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
/**
|
|
78
|
+
* User Model
|
|
79
|
+
* Comment by GOSOMI
|
|
80
|
+
* @date: 2021-04-13
|
|
81
|
+
*/
|
|
82
|
+
export interface UserModel {
|
|
83
|
+
id?: string | undefined
|
|
84
|
+
username?: string
|
|
85
|
+
email?: string
|
|
86
|
+
addr?: string
|
|
87
|
+
phone?: string
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* Item Model
|
|
92
|
+
* Comment by GOSOMI
|
|
93
|
+
* @date: 2021-04-13
|
|
94
|
+
*/
|
|
95
|
+
export interface ItemModel {
|
|
96
|
+
id: string // 상품 고유 ID
|
|
97
|
+
code?: string // item model code
|
|
98
|
+
name: string // 상품명
|
|
99
|
+
price: number // 상품가격
|
|
100
|
+
img?: string // 이미지 경로
|
|
101
|
+
qty: number // 상품수량
|
|
102
|
+
cat1?: string
|
|
103
|
+
cat2?: string
|
|
104
|
+
cat3?: string
|
|
105
|
+
}
|
|
106
|
+
|
|
107
|
+
export interface ItemAnalyticsModel {
|
|
108
|
+
cat1?: string
|
|
109
|
+
cat2?: string
|
|
110
|
+
cat3?: string
|
|
111
|
+
img?: string
|
|
112
|
+
name?: string
|
|
113
|
+
id: string
|
|
114
|
+
price: number
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
export interface ItemAnalyticsLegacyModel {
|
|
118
|
+
cat1?: string
|
|
119
|
+
cat2?: string
|
|
120
|
+
cat3?: string
|
|
121
|
+
item_img?: string
|
|
122
|
+
item_name?: string
|
|
123
|
+
unique: string
|
|
124
|
+
price: number
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
/**
|
|
128
|
+
* 통계 일반 common model
|
|
129
|
+
* Comment by GOSOMI
|
|
130
|
+
* @date: 2022-03-02
|
|
131
|
+
*/
|
|
132
|
+
export interface BootpayAnalyticsModel {
|
|
133
|
+
application_id?: string
|
|
134
|
+
uuid?: string
|
|
135
|
+
time?: number
|
|
136
|
+
url?: string
|
|
137
|
+
referer?: string
|
|
138
|
+
sk?: string
|
|
139
|
+
user_id?: string
|
|
140
|
+
page_type?: string
|
|
141
|
+
items?: Array<ItemAnalyticsModel> | Array<ItemAnalyticsLegacyModel>
|
|
142
|
+
}
|
|
143
|
+
|
|
144
|
+
export interface BootpayAnalyticsBaseModel {
|
|
145
|
+
uuid: string
|
|
146
|
+
time: number
|
|
147
|
+
}
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* 통계 User Model
|
|
151
|
+
* Comment by GOSOMI
|
|
152
|
+
* @date: 2022-03-02
|
|
153
|
+
*/
|
|
154
|
+
export interface BootpayAnalyticsUserModel {
|
|
155
|
+
application_id?: string
|
|
156
|
+
id: string
|
|
157
|
+
username?: string
|
|
158
|
+
birth?: string
|
|
159
|
+
phone?: string
|
|
160
|
+
email?: string
|
|
161
|
+
gender?: string
|
|
162
|
+
area?: string
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
interface OpenTypeFilterModel {
|
|
166
|
+
browser: string
|
|
167
|
+
open_type: 'iframe' | 'popup' | 'redirect'
|
|
168
|
+
}
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Extra Model
|
|
172
|
+
* Comment by GOSOMI
|
|
173
|
+
* @date: 2021-04-13
|
|
174
|
+
*/
|
|
175
|
+
export interface ExtraModel {
|
|
176
|
+
open_type?: string // 결제 진행 방법, iframe, popup, redirect
|
|
177
|
+
browser_open_type?: Array<OpenTypeFilterModel>
|
|
178
|
+
escrow?: boolean // 에스크로 결제 여부
|
|
179
|
+
redirect_url?: string // 결제 진행 방법이 redirect인 경우 결제 완료시 이동한 마지막 URL
|
|
180
|
+
card_quota?: string | string[] | number[] // 카드 할부 개월수 노출 설정 ( PG 설정에 따름 )
|
|
181
|
+
seller_name?: string // 가맹점 이름 변경
|
|
182
|
+
delivery_day?: number // 배송일자
|
|
183
|
+
locale?: string // 결제 언어 선택
|
|
184
|
+
offer_period?: string // 제공기간 설정 ( PG사 마다 설정 방법이 상이 )
|
|
185
|
+
display_cash_receipt?: boolean // 현금 영수증 체크 노출 Y,N, default: true
|
|
186
|
+
deposit_expiration?: string // dateformat ('yyyy-mm-dd HH:MM:SS')
|
|
187
|
+
app_scheme?: string // 아이폰 앱 to 앱 호출
|
|
188
|
+
use_card_point?: boolean // 카드 포인트 사용 설정 ( 일부 PG만 지원 ), default: false
|
|
189
|
+
direct_card?: string // 특정 카드사로 바로 호출 ( 일부 PG만 지원 )
|
|
190
|
+
use_order_id?: boolean // PG사로 결제 데이터를 전송할때 receipt_id가 아닌 가맹점이 설정한 order_id로 전송 ,default: false
|
|
191
|
+
separately_confirmed?: boolean // 승인 분리 default: false
|
|
192
|
+
confirm_message?: string // 승인중 나오는 메세지 custom
|
|
193
|
+
display_success_result?: boolean // 결제 결과 display 옵션
|
|
194
|
+
display_error_result?: boolean // 결제 결과 display 옵션
|
|
195
|
+
test_deposit?: boolean // 테스트 모드일때 가상계좌 입금 모의 통지 여부, default: false
|
|
196
|
+
ad_id?: string // 원스토어 ThirdParty ad_id
|
|
197
|
+
sim_operator?: string // 원스토어 ThirdParty sim_operator
|
|
198
|
+
installer_package_name?: string // 원스토어 ThirdParty installer_package_name
|
|
199
|
+
timeout?: number // 분단위 결제 만료 시간 timeout ( default: 30분 )
|
|
200
|
+
common_event_webhook?: boolean // 닫기, 만료등의 이벤트 웹훅을 받을지 여부 ( default: false )
|
|
201
|
+
|
|
202
|
+
first_subscription_comment?: string // 정기결제 첫 결제 진행시 코멘트 ( price > 0 조건일 때 나오는 메세지 )
|
|
203
|
+
subscription_comment?: string // 정기결제 하단 코멘트 추가 관련 옵션
|
|
204
|
+
subscribe_test_payment?: boolean // 자동결제 카드 등록시 결제로 유효성 검사
|
|
205
|
+
|
|
206
|
+
enable_easy_payments?: Array<string> // 노출될 간편결제 리스트
|
|
207
|
+
except_card_companies?: Array<string> // 감춰질 카드사 리스트
|
|
208
|
+
enable_card_companies?: Array<string> // 보여질 카드사 리스트
|
|
209
|
+
direct_card_company?: string // 다이렉트 카드사 옵션
|
|
210
|
+
direct_card_quota?: string // 다이렉트 카드 quota 옵션
|
|
211
|
+
|
|
212
|
+
minimum_price_limit?: boolean // 최소금액 제한
|
|
213
|
+
confirm_grace_seconds?: number // 결제 승인 시간 유예 (단위, sec)
|
|
214
|
+
|
|
215
|
+
automatic_tax?: boolean // 해외결제 자동 세금 옵션
|
|
216
|
+
dynamic_tax_rates?: number // stripe tax 옵션
|
|
217
|
+
tax_rates?: number // stripe tax 옵션
|
|
218
|
+
|
|
219
|
+
show_close_button?: boolean // default false - iframe 모드일 경우 닫기 버튼을 보여줄지 체크
|
|
220
|
+
|
|
221
|
+
select_phone_carrier?: string // 휴대폰 소액결제시 통신사 prefix
|
|
222
|
+
phone_editable?: boolean // 휴대폰 소액결제시 전화번호 edit 가능 ( 다날만 적용 )
|
|
223
|
+
age_limit?: number // 본인인증시 나이 제한 설정
|
|
224
|
+
|
|
225
|
+
easy_payment_method?: 'card' | '카드' | 'point' | '포인트' // 네이버페이 결제시 point, card prefix
|
|
226
|
+
cash_receipt_type?: '소득공제' | '지출증빙' // 네이버포인트 결제시 현금영수증 발행 default - 소득공제 , option- 지출증빙
|
|
227
|
+
identity_no?: string // 현금영수증 발행 주체 ( 전화번호 or 사업자 등록증 )
|
|
228
|
+
override_global_event?: boolean
|
|
229
|
+
cash_receipt_not_published?: boolean
|
|
230
|
+
webhook_delay_duration?: number // webhook delay duration ( sec )
|
|
231
|
+
|
|
232
|
+
force_browser_mode?: 'pc' | 'mobile' // 강제로 브라우저 모드 지정 옵션 ( 현재 미구현 PG사마다 정책이 달라서 확인 이후에 업데이트 될 예정 )
|
|
233
|
+
}
|
|
234
|
+
|
|
235
|
+
export interface WidgetExtraModel extends Partial<ExtraModel> {
|
|
236
|
+
card_quota?: string | string[] | number[] // 카드 할부 개월수 노출 설정
|
|
237
|
+
direct_card_company?: string
|
|
238
|
+
direct_card_quota?: string
|
|
239
|
+
|
|
240
|
+
hide_title?: boolean
|
|
241
|
+
hide_divider_line?: boolean
|
|
242
|
+
inline_styles?: BootpayWidgetInlineStyleModel
|
|
243
|
+
}
|
|
244
|
+
|
|
245
|
+
export interface ConfirmModel {
|
|
246
|
+
event: string
|
|
247
|
+
receipt_id: string
|
|
248
|
+
gateway_url: string
|
|
249
|
+
data?: any
|
|
250
|
+
}
|
|
251
|
+
|
|
252
|
+
export interface ErrorModel {
|
|
253
|
+
event: string
|
|
254
|
+
pg_error_code?: string
|
|
255
|
+
error_code: string
|
|
256
|
+
message: string
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
interface BootpayWidgetInlineStyleModel {
|
|
260
|
+
mobile?: {
|
|
261
|
+
containerStyle?: {
|
|
262
|
+
'padding-top'?: string
|
|
263
|
+
'padding-bottom'?: string
|
|
264
|
+
'padding-left'?: string
|
|
265
|
+
'padding-right'?: string
|
|
266
|
+
}
|
|
267
|
+
}
|
|
268
|
+
pc?: {
|
|
269
|
+
containerStyle?: {
|
|
270
|
+
'padding-top'?: string
|
|
271
|
+
'padding-bottom'?: string
|
|
272
|
+
'padding-left'?: string
|
|
273
|
+
'padding-right'?: string
|
|
274
|
+
}
|
|
275
|
+
}
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
/**
|
|
279
|
+
* 사용자 환경 설정 관련 environment
|
|
280
|
+
* Comment by GOSOMI
|
|
281
|
+
* @date: 2021-12-09
|
|
282
|
+
*/
|
|
283
|
+
export interface EnvironmentModel {
|
|
284
|
+
width: number
|
|
285
|
+
height: number
|
|
286
|
+
}
|
|
287
|
+
|
|
288
|
+
export interface PopupDisplayResponseModel {
|
|
289
|
+
gatewayUrl: string
|
|
290
|
+
receiptId: string
|
|
291
|
+
name: string
|
|
292
|
+
message?: string // 메세지 정보는 아직 사용중이지 않음
|
|
293
|
+
price: number
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
export interface CommissionKeyModel {
|
|
297
|
+
commerce?: string
|
|
298
|
+
marketer?: string
|
|
299
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { RequestPaymentModel } from './bootpay-interface';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export interface BiometricDataModel {
|
|
6
|
+
userToken: string,
|
|
7
|
+
os?: string
|
|
8
|
+
token: string
|
|
9
|
+
}
|
|
10
|
+
|
|
11
|
+
export interface RequestPaymentWalletModel extends RequestPaymentModel {
|
|
12
|
+
user_token?: string
|
|
13
|
+
authenticate_type: string
|
|
14
|
+
token: string
|
|
15
|
+
wallet_id: string
|
|
16
|
+
easy_type?: string
|
|
17
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
1
|
+
import { ExtraModel, RequestPaymentModel, WidgetExtraModel } from './bootpay-interface';
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
|
|
5
|
+
export interface RequestBootpayWidgetModel extends Partial<RequestPaymentModel> {
|
|
6
|
+
subscription_id?: string
|
|
7
|
+
use_only_brandpay?: boolean
|
|
8
|
+
subscribe_brandpay_type?: 'select' | 'sequential' | null | undefined
|
|
9
|
+
use_terms?: boolean
|
|
10
|
+
sandbox?: boolean
|
|
11
|
+
use_bootpay_inapp_sdk?: boolean
|
|
12
|
+
external_terms?: ExternalBootpayWidgetTermsModel[]
|
|
13
|
+
use_popup?: boolean
|
|
14
|
+
extra?: WidgetExtraModel
|
|
15
|
+
hooks?: WidgetHookFunction
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
export interface ResponseBootpayWidgetTermsModel {
|
|
19
|
+
term_id?: string
|
|
20
|
+
pk: string
|
|
21
|
+
title: string
|
|
22
|
+
agree?: boolean
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export interface ExternalBootpayWidgetTermsModel {
|
|
26
|
+
pk: string
|
|
27
|
+
title: string
|
|
28
|
+
url: string
|
|
29
|
+
required: 'required' | 'optional'
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface ExternalBootpaySelectModel {
|
|
33
|
+
payment_type?: string
|
|
34
|
+
method_alias?: string
|
|
35
|
+
wallet_id?: string
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
export interface PaymentParametersModel {
|
|
39
|
+
pg?: string
|
|
40
|
+
method?: string
|
|
41
|
+
wallet_id?: string
|
|
42
|
+
terms?: ResponseBootpayWidgetTermsModel[]
|
|
43
|
+
widget_key?: string
|
|
44
|
+
widget_sandbox?: boolean
|
|
45
|
+
extra?: ExtraModel
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export interface WidgetStoreData {
|
|
49
|
+
el?: string
|
|
50
|
+
application_id?: string
|
|
51
|
+
order_name?: string
|
|
52
|
+
price?: number
|
|
53
|
+
tax_free?: number
|
|
54
|
+
deposit_price?: number
|
|
55
|
+
currency?: string
|
|
56
|
+
user_token?: string
|
|
57
|
+
pg?: string
|
|
58
|
+
method?: string
|
|
59
|
+
wallet_id?: string
|
|
60
|
+
use_only_brandpay?: boolean
|
|
61
|
+
use_bootpay_inapp_sdk?: boolean
|
|
62
|
+
use_terms?: boolean
|
|
63
|
+
sandbox?: boolean
|
|
64
|
+
widget_key?: string
|
|
65
|
+
widget_type?: number
|
|
66
|
+
external_terms?: ExternalBootpayWidgetTermsModel[]
|
|
67
|
+
extra?: ExtraModel
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
export interface WidgetHookFunction {
|
|
71
|
+
ready?: (data: any) => void
|
|
72
|
+
allTermsAccepted?: (data: any) => void
|
|
73
|
+
resize?: (data: any) => void
|
|
74
|
+
paymentMethodUpdated?: (data: any) => void
|
|
75
|
+
termsConsentUpdated?: (data: any) => void
|
|
76
|
+
brandpayWalletUpdated?: (data: WidgetBrandpayWalletModel[]) => void
|
|
77
|
+
brandpayManagerWindowClosed?: () => void
|
|
78
|
+
brandpayManagerWindowReady?: (data: any) => void
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
export interface WidgetBrandpayUpdateModel {
|
|
82
|
+
el?: string
|
|
83
|
+
application_id: string
|
|
84
|
+
widget_key: string
|
|
85
|
+
user_token: string
|
|
86
|
+
sandbox: boolean
|
|
87
|
+
is_popup: boolean
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
export interface WidgetBrandpayWalletModel {
|
|
91
|
+
wallet_id: string
|
|
92
|
+
type: number
|
|
93
|
+
payment_status: number
|
|
94
|
+
sandbox: boolean
|
|
95
|
+
order: number
|
|
96
|
+
name: string
|
|
97
|
+
card_code?: string
|
|
98
|
+
expired_at: string
|
|
99
|
+
latest_purchased_at: string
|
|
100
|
+
batch_data: {
|
|
101
|
+
bank_code?: string
|
|
102
|
+
bank_account?: string
|
|
103
|
+
bank_username?: string
|
|
104
|
+
card_company?: string
|
|
105
|
+
card_hash?: string
|
|
106
|
+
card_company_code?: string
|
|
107
|
+
card_no?: string
|
|
108
|
+
card_type?: number
|
|
109
|
+
}
|
|
110
|
+
}
|
|
111
|
+
|
|
112
|
+
export interface RequestBootpayBrandpayLaunchManager {
|
|
113
|
+
application_id: string
|
|
114
|
+
widget_key: string
|
|
115
|
+
user_token: string
|
|
116
|
+
el?: string
|
|
117
|
+
sandbox?: boolean
|
|
118
|
+
use_popup?: boolean
|
|
119
|
+
subscribe_brandpay_type?: 'select' | 'sequential' | null | undefined
|
|
120
|
+
hooks?: WidgetHookFunction
|
|
121
|
+
}
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { TemplateManager } from '
|
|
1
|
+
import { TemplateManager } from '../mixins/template-manager';
|
|
2
2
|
|
|
3
3
|
declare class ConfirmModalManager extends TemplateManager {
|
|
4
4
|
$windowId: string;
|
|
5
|
-
$modalWindowId: string;
|
|
6
5
|
$template: string;
|
|
6
|
+
$modalWindowId: string;
|
|
7
7
|
$additionalClass: string;
|
|
8
8
|
$title: string;
|
|
9
9
|
$message: string;
|
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { TemplateManager } from '
|
|
1
|
+
import { TemplateManager } from '../mixins/template-manager';
|
|
2
2
|
|
|
3
3
|
declare class ModalTemplateManager extends TemplateManager {
|
|
4
4
|
$windowId: string;
|
|
5
|
-
$modalWindowId: string;
|
|
6
5
|
$iFrameId: string;
|
|
7
6
|
$template: string;
|
|
7
|
+
$modalWindowId: string;
|
|
8
8
|
$additionalClass: string;
|
|
9
9
|
constructor();
|
|
10
10
|
template(): string;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { TemplateManager } from '../../../mixins/template-manager';
|
|
2
|
+
|
|
3
|
+
declare class SliderTemplateManager extends TemplateManager {
|
|
4
|
+
$windowId: string;
|
|
5
|
+
$template: string;
|
|
6
|
+
$modalWindowId: string;
|
|
7
|
+
$additionalClass: string;
|
|
8
|
+
$title: string;
|
|
9
|
+
$options: BootpaySliderOption | undefined;
|
|
10
|
+
constructor();
|
|
11
|
+
template(sliders: BootpaySliderSelectOption[]): string;
|
|
12
|
+
sliderButtonTemplate(sliders: BootpaySliderSelectOption[]): string;
|
|
13
|
+
sliderButtonId(key: string): string;
|
|
14
|
+
show(event: any, options: BootpaySliderOption): void;
|
|
15
|
+
sliderButtonClickHook(event: any): void;
|
|
16
|
+
sliderButtonClickHookDestroy(): void;
|
|
17
|
+
destroy(): void;
|
|
18
|
+
}
|
|
19
|
+
export declare const SliderTemplate: SliderTemplateManager;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export declare class BootpayCommerceManager {
|
|
2
|
+
data: any;
|
|
3
|
+
hooks: {
|
|
4
|
+
[key: string]: Function;
|
|
5
|
+
};
|
|
6
|
+
constructor();
|
|
7
|
+
encryptKey(): string;
|
|
8
|
+
encrypt(data: object | string): string;
|
|
9
|
+
decrypt(data: string): any | string;
|
|
10
|
+
callHook(name: string, ...args: any[]): any;
|
|
11
|
+
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BootpayManager } from '
|
|
1
|
+
import { BootpayManager } from './bootpay-manager';
|
|
2
2
|
|
|
3
3
|
interface EventMessage {
|
|
4
4
|
event: string;
|
|
@@ -43,6 +43,7 @@ export declare class BootpayWindowEvent extends BootpayManager {
|
|
|
43
43
|
$eventHooks: {
|
|
44
44
|
[hookName: string]: any;
|
|
45
45
|
};
|
|
46
|
+
$childInstance: any;
|
|
46
47
|
constructor(options?: {
|
|
47
48
|
messageEventName: string;
|
|
48
49
|
messageEventHooks: {
|
|
@@ -50,6 +51,7 @@ export declare class BootpayWindowEvent extends BootpayManager {
|
|
|
50
51
|
};
|
|
51
52
|
afterBind?: Function;
|
|
52
53
|
});
|
|
54
|
+
setChildInstance(childInstance: any): void;
|
|
53
55
|
bind(resolve?: Function, reject?: Function): void;
|
|
54
56
|
hookFunction(hook: string): any;
|
|
55
57
|
reject(data: any): void;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { BootpayCommerceManager } from './bootpay-commerce';
|
|
2
|
+
|
|
3
|
+
export declare class ExCommerceManager extends BootpayCommerceManager {
|
|
4
|
+
data: any | undefined;
|
|
5
|
+
el: string | undefined;
|
|
6
|
+
path: string | undefined;
|
|
7
|
+
constructor();
|
|
8
|
+
setExData(el: string, data: RequestExModel): void;
|
|
9
|
+
encryptParameters(): string;
|
|
10
|
+
encryptKey(): string;
|
|
11
|
+
currentBootpayCommerceParameters(): string;
|
|
12
|
+
}
|
|
13
|
+
export declare const ExCommerce: ExCommerceManager;
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { default as CryptoJS } from 'crypto-js';
|
|
2
|
+
|
|
3
|
+
export declare class BootpaySessionCommerceManager {
|
|
4
|
+
sessionStorage: any;
|
|
5
|
+
constructor();
|
|
6
|
+
get privateKey(): CryptoJS.lib.WordArray;
|
|
7
|
+
encrypt(data?: {}): string;
|
|
8
|
+
decrypt: (data: string) => any | string;
|
|
9
|
+
get(key: string): any;
|
|
10
|
+
set(key: string, value: any): void;
|
|
11
|
+
getDecrypt(key: string): any;
|
|
12
|
+
getItem(key: string, subKey: string, defaultValue?: any): any;
|
|
13
|
+
setEncrypt(key: string, value: any): void;
|
|
14
|
+
setItem(key: string, subKey: string, value: any): void;
|
|
15
|
+
}
|
|
16
|
+
export declare const BootpaySessionStorage: BootpaySessionCommerceManager;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BootpayManager } from '
|
|
1
|
+
import { BootpayManager } from './bootpay-manager';
|
|
2
2
|
|
|
3
3
|
export declare class TemplateManager extends BootpayManager {
|
|
4
4
|
$windowId: string;
|
|
@@ -18,9 +18,15 @@ export declare class TemplateManager extends BootpayManager {
|
|
|
18
18
|
* @date: 2022-02-16
|
|
19
19
|
*/
|
|
20
20
|
createTemplateHtml(): void;
|
|
21
|
-
bodyOpen(addClass?: string | undefined): void;
|
|
21
|
+
bodyOpen(addClass?: string | undefined, openSkip?: boolean): void;
|
|
22
22
|
bodyClose(): void;
|
|
23
23
|
templateResize(el: string, resizeData: any): void;
|
|
24
|
+
/**
|
|
25
|
+
* 엘리먼트에 스타일을 적용하는 공통 메서드
|
|
26
|
+
* Comment by GOSOMI
|
|
27
|
+
* @date: 2024-01-01
|
|
28
|
+
*/
|
|
29
|
+
protected applyStylesToElement(element: HTMLElement, styles: any): void;
|
|
24
30
|
/**
|
|
25
31
|
* render가 되었는지 체크한다
|
|
26
32
|
* Comment by GOSOMI
|
package/package.json
CHANGED
|
@@ -1,14 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bootpay/client-js",
|
|
3
|
-
"version": "5.2.0-
|
|
4
|
-
"main": "dist/index.
|
|
3
|
+
"version": "5.2.0-rc.2",
|
|
4
|
+
"main": "dist/index.mjs",
|
|
5
5
|
"exports": {
|
|
6
6
|
".": {
|
|
7
|
-
"import": "./dist/index.
|
|
8
|
-
"require": "./dist/index.cjs.js",
|
|
7
|
+
"import": "./dist/index.mjs",
|
|
9
8
|
"types": "./dist/index.d.ts"
|
|
10
|
-
}
|
|
11
|
-
"./package.json": "./package.json"
|
|
9
|
+
}
|
|
12
10
|
},
|
|
13
11
|
"styles": "dist/index.css",
|
|
14
12
|
"scripts": {
|
package/tsconfig.json
CHANGED
|
@@ -20,12 +20,24 @@
|
|
|
20
20
|
"rootDir": "./",
|
|
21
21
|
"baseUrl": "./src/",
|
|
22
22
|
"paths": {
|
|
23
|
-
"
|
|
24
|
-
"../node_modules/*",
|
|
23
|
+
"~/*": [
|
|
25
24
|
"./*"
|
|
25
|
+
],
|
|
26
|
+
"~": [
|
|
27
|
+
"./"
|
|
26
28
|
]
|
|
27
|
-
}
|
|
29
|
+
},
|
|
30
|
+
"typeRoots": [
|
|
31
|
+
"../node_modules/@types",
|
|
32
|
+
"../src/types"
|
|
33
|
+
]
|
|
28
34
|
},
|
|
35
|
+
"include": [
|
|
36
|
+
"src/**/*.ts",
|
|
37
|
+
"src/**/*.js",
|
|
38
|
+
"src/**/*.json",
|
|
39
|
+
"src/**/*.vue"
|
|
40
|
+
],
|
|
29
41
|
"exclude": [
|
|
30
42
|
"**/*.spec.ts",
|
|
31
43
|
"node_modules",
|