@bootpay/client-js 4.3.1 → 4.3.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/bootpay-environment.js +1 -1
- package/bootpay-sdk.js +2 -1
- package/bootpay-sdk.js.LICENSE.txt +1 -0
- package/bootpay-widget.d.ts +18 -0
- package/bootpay-widget.js +2 -0
- package/bootpay-widget.js.LICENSE.txt +1 -0
- package/bootpay.d.ts +2 -1
- package/bootpay.js +2 -1
- package/bootpay.js.LICENSE.txt +1 -0
- package/index.d.ts +4 -3
- package/index.js +2 -1
- package/lib/bootpay-widget.d.ts +112 -0
- package/lib/event/widget.d.ts +19 -0
- package/lib/locale/message.d.ts +8 -0
- package/lib/template/card-easy.d.ts +18 -0
- package/lib/template/payment.d.ts +6 -0
- package/lib/template/widget.d.ts +41 -0
- package/models/bootpay-interface.d.ts +1 -0
- package/models/bootpay-widget-interface.d.ts +8 -0
- package/package.json +25 -23
- package/support/environment.d.ts +2 -0
- package/support/template-manager.d.ts +1 -0
- package/support/widget-store.d.ts +29 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
|
package/index.d.ts
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
export default Bootpay;
|
|
2
|
-
import Bootpay from
|
|
3
|
-
import BootpaySDK from
|
|
2
|
+
import Bootpay from './bootpay';
|
|
3
|
+
import BootpaySDK from './bootpay-sdk';
|
|
4
4
|
import BootpayEnvironment from "./bootpay-environment";
|
|
5
|
-
|
|
5
|
+
import BootpayWidget from './bootpay-widget';
|
|
6
|
+
export { Bootpay, BootpaySDK, BootpayEnvironment, BootpayWidget };
|
package/index.js
CHANGED
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import Bootpay from './bootpay'
|
|
2
2
|
import BootpaySDK from './bootpay-sdk'
|
|
3
3
|
import BootpayEnvironment from "./bootpay-environment"
|
|
4
|
+
import BootpayWidget from './bootpay-widget'
|
|
4
5
|
|
|
5
|
-
export { Bootpay, BootpaySDK, BootpayEnvironment }
|
|
6
|
+
export { Bootpay, BootpaySDK, BootpayEnvironment, BootpayWidget }
|
|
6
7
|
|
|
7
8
|
export default Bootpay
|
|
@@ -0,0 +1,112 @@
|
|
|
1
|
+
import { BootpayManager } from '../support/bootpay-manager';
|
|
2
|
+
import { RequestBootpayWidgetModel } from '../models/bootpay-widget-interface';
|
|
3
|
+
import { RequestPaymentModel } from '../models/bootpay-interface';
|
|
4
|
+
export declare class BootpayWidgetWindowManager extends BootpayManager {
|
|
5
|
+
message: {
|
|
6
|
+
startProgress: {
|
|
7
|
+
PAYMENT: {
|
|
8
|
+
ko: string;
|
|
9
|
+
en: string;
|
|
10
|
+
};
|
|
11
|
+
CARD_SUBSCRIPTION: {
|
|
12
|
+
ko: string;
|
|
13
|
+
en: string;
|
|
14
|
+
};
|
|
15
|
+
AUTH: {
|
|
16
|
+
ko: string;
|
|
17
|
+
en: string;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
popupLocaleMessage: {
|
|
21
|
+
message: {
|
|
22
|
+
ko: string;
|
|
23
|
+
en: string;
|
|
24
|
+
};
|
|
25
|
+
button: {
|
|
26
|
+
ko: string;
|
|
27
|
+
en: string;
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
popupMessage: {
|
|
31
|
+
message: {
|
|
32
|
+
PAYMENT: {
|
|
33
|
+
ko: string;
|
|
34
|
+
en: string;
|
|
35
|
+
};
|
|
36
|
+
CARD_SUBSCRIPTION: {
|
|
37
|
+
ko: string;
|
|
38
|
+
en: string;
|
|
39
|
+
};
|
|
40
|
+
AUTH: {
|
|
41
|
+
ko: string;
|
|
42
|
+
en: string;
|
|
43
|
+
};
|
|
44
|
+
};
|
|
45
|
+
button: {
|
|
46
|
+
PAYMENT: {
|
|
47
|
+
ko: string;
|
|
48
|
+
en: string;
|
|
49
|
+
};
|
|
50
|
+
CARD_SUBSCRIPTION: {
|
|
51
|
+
ko: string;
|
|
52
|
+
en: string;
|
|
53
|
+
};
|
|
54
|
+
AUTH: {
|
|
55
|
+
ko: string;
|
|
56
|
+
en: string;
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
closeMessage: {
|
|
61
|
+
PAYMENT: {
|
|
62
|
+
ko: string;
|
|
63
|
+
en: string;
|
|
64
|
+
};
|
|
65
|
+
CARD_SUBSCRIPTION: {
|
|
66
|
+
ko: string;
|
|
67
|
+
en: string;
|
|
68
|
+
};
|
|
69
|
+
AUTH: {
|
|
70
|
+
ko: string;
|
|
71
|
+
en: string;
|
|
72
|
+
};
|
|
73
|
+
};
|
|
74
|
+
confirmNotYet: {
|
|
75
|
+
PAYMENT: {
|
|
76
|
+
ko: string;
|
|
77
|
+
en: string;
|
|
78
|
+
};
|
|
79
|
+
CARD_SUBSCRIPTION: {
|
|
80
|
+
ko: string;
|
|
81
|
+
en: string;
|
|
82
|
+
};
|
|
83
|
+
AUTH: {
|
|
84
|
+
ko: string;
|
|
85
|
+
en: string;
|
|
86
|
+
};
|
|
87
|
+
};
|
|
88
|
+
notSelectPayment: {
|
|
89
|
+
ko: string;
|
|
90
|
+
en: string;
|
|
91
|
+
};
|
|
92
|
+
termsNotAgree: {
|
|
93
|
+
ko: string;
|
|
94
|
+
en: string;
|
|
95
|
+
};
|
|
96
|
+
getLocaleMessage: (key: string, locale: string) => any;
|
|
97
|
+
};
|
|
98
|
+
constructor();
|
|
99
|
+
initialize(): void;
|
|
100
|
+
render(el: string, data: RequestBootpayWidgetModel): void;
|
|
101
|
+
update(data: RequestBootpayWidgetModel): void;
|
|
102
|
+
rerender(): void;
|
|
103
|
+
destroy(): void;
|
|
104
|
+
selectPayment(pg: string | undefined, method: string | undefined, wallet_id: string | undefined, terms?: boolean): void;
|
|
105
|
+
/**
|
|
106
|
+
* 부트페이 결제 요청을 한다
|
|
107
|
+
* Comment by GOSOMI
|
|
108
|
+
* @date: 2023-06-21
|
|
109
|
+
*/
|
|
110
|
+
requestPayment(data: RequestPaymentModel): Promise<any>;
|
|
111
|
+
}
|
|
112
|
+
export declare const BootpayWidgetWindow: BootpayWidgetWindowManager;
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { BootpayWindowEvent } from '../../support/event';
|
|
2
|
+
declare class BootpayWidgetEventManager extends BootpayWindowEvent {
|
|
3
|
+
$messageEventName: string;
|
|
4
|
+
constructor();
|
|
5
|
+
/**
|
|
6
|
+
* Widget 창과 통신하기 위한 이벤트 처리
|
|
7
|
+
* Comment by GOSOMI
|
|
8
|
+
* @date: 2023-06-15
|
|
9
|
+
*/
|
|
10
|
+
bind(): void;
|
|
11
|
+
/**
|
|
12
|
+
* 관련된 모든 이벤트를 삭제
|
|
13
|
+
* Comment by GOSOMI
|
|
14
|
+
* @date: 2023-06-15
|
|
15
|
+
*/
|
|
16
|
+
destroyAllEvent(): void;
|
|
17
|
+
}
|
|
18
|
+
export declare const BootpayWidgetEvent: BootpayWidgetEventManager;
|
|
19
|
+
export {};
|
package/lib/locale/message.d.ts
CHANGED
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { TemplateManager } from '../../support/template-manager';
|
|
2
|
+
import { WidgetStoreModel } from '../../support/widget-store';
|
|
3
|
+
import '../../stylesheets/common.sass';
|
|
4
|
+
declare class CardEasyTemplateManager extends TemplateManager {
|
|
5
|
+
$cardEasyWindowId: string;
|
|
6
|
+
$iFrameId: string;
|
|
7
|
+
$template: string;
|
|
8
|
+
$windowId: string;
|
|
9
|
+
$widgetStore: WidgetStoreModel;
|
|
10
|
+
$additionalClass: string;
|
|
11
|
+
constructor();
|
|
12
|
+
template(): string;
|
|
13
|
+
addCardWallet(): void;
|
|
14
|
+
destroy(): void;
|
|
15
|
+
resize(resizeData: any): void;
|
|
16
|
+
}
|
|
17
|
+
export declare const CardEasyTemplate: CardEasyTemplateManager;
|
|
18
|
+
export {};
|
|
@@ -132,6 +132,12 @@ declare class TemplatePaymentManager extends TemplateManager {
|
|
|
132
132
|
* @date: 2022-09-30
|
|
133
133
|
*/
|
|
134
134
|
iFrameSetStyle(styles: any): void;
|
|
135
|
+
/**
|
|
136
|
+
* Window Style 정리
|
|
137
|
+
* Comment by GOSOMI
|
|
138
|
+
* @date: 2023-07-17
|
|
139
|
+
*/
|
|
140
|
+
windowStyle(styles: any): void;
|
|
135
141
|
/**
|
|
136
142
|
* 결제 iFrame창을 감춘다
|
|
137
143
|
* Comment by GOSOMI
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { TemplateManager } from '../../support/template-manager';
|
|
2
|
+
import { WidgetStoreModel } from '../../support/widget-store';
|
|
3
|
+
declare class TemplateWidgetManager extends TemplateManager {
|
|
4
|
+
$template: string;
|
|
5
|
+
$iFrameId: string;
|
|
6
|
+
$widgetStore: WidgetStoreModel;
|
|
7
|
+
constructor();
|
|
8
|
+
/**
|
|
9
|
+
* 첫 Rendering을 진행한다
|
|
10
|
+
* Comment by GOSOMI
|
|
11
|
+
* @date: 2023-06-15
|
|
12
|
+
*/
|
|
13
|
+
render(): void;
|
|
14
|
+
/**
|
|
15
|
+
* 렌더링 공통 함수
|
|
16
|
+
* Comment by GOSOMI
|
|
17
|
+
* @date: 2023-06-15
|
|
18
|
+
*/
|
|
19
|
+
templateRender(): void;
|
|
20
|
+
resize(resizeData: any): void;
|
|
21
|
+
/**
|
|
22
|
+
* widget을 재 렌더링한다
|
|
23
|
+
* Comment by GOSOMI
|
|
24
|
+
* @date: 2023-06-15
|
|
25
|
+
*/
|
|
26
|
+
rerender(): void;
|
|
27
|
+
/**
|
|
28
|
+
* 창을 삭제한다
|
|
29
|
+
* Comment by GOSOMI
|
|
30
|
+
* @date: 2023-06-15
|
|
31
|
+
*/
|
|
32
|
+
destroy(): void;
|
|
33
|
+
/**
|
|
34
|
+
* child iframe에 PostMessage를 보낸다
|
|
35
|
+
* Comment by GOSOMI
|
|
36
|
+
* @date: 2023-06-15
|
|
37
|
+
*/
|
|
38
|
+
postMessage(event: string, data?: any): void;
|
|
39
|
+
}
|
|
40
|
+
export declare const TemplateWidget: TemplateWidgetManager;
|
|
41
|
+
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@bootpay/client-js",
|
|
3
|
-
"version": "4.3.
|
|
3
|
+
"version": "4.3.2",
|
|
4
4
|
"main": "index.js",
|
|
5
5
|
"types": "index.d.ts",
|
|
6
6
|
"scripts": {
|
|
@@ -9,31 +9,33 @@
|
|
|
9
9
|
"deploy": "NODE_ENV=production ./node_modules/.bin/webpack --output-path=./dist --mode=production && gzip -kf dist/*.min.js && ./webview.sh $npm_package_version"
|
|
10
10
|
},
|
|
11
11
|
"dependencies": {
|
|
12
|
-
"typescript": "^
|
|
12
|
+
"typescript": "^5.1.6"
|
|
13
13
|
},
|
|
14
14
|
"devDependencies": {
|
|
15
|
-
"@
|
|
16
|
-
"
|
|
17
|
-
"webpack": "^
|
|
18
|
-
"webpack-
|
|
15
|
+
"@types/ws": "^8.5.5",
|
|
16
|
+
"@types/node": "^18.15.3",
|
|
17
|
+
"@webpack-cli/serve": "^2.0.5",
|
|
18
|
+
"webpack-dev-server": "^4.15.1",
|
|
19
|
+
"webpack": "^5.87.0",
|
|
20
|
+
"webpack-cli": "^5.1.4",
|
|
19
21
|
"axios": "^0.27.2",
|
|
20
|
-
"crypto-js": "^
|
|
21
|
-
"@types/crypto-js": "^4.
|
|
22
|
-
"@
|
|
23
|
-
"@babel/
|
|
24
|
-
"@babel/plugin-transform-
|
|
25
|
-
"@babel/plugin-transform-
|
|
26
|
-
"@babel/plugin-
|
|
27
|
-
"@babel/preset-env": "^7.
|
|
28
|
-
"@babel/preset-typescript": "^7.
|
|
29
|
-
"@babel/runtime-corejs3": "^7.
|
|
30
|
-
"@babel/plugin-transform-classes": "^7.
|
|
31
|
-
"core-js": "^3.
|
|
32
|
-
"babel-loader": "^
|
|
33
|
-
"css-loader": "^6.
|
|
34
|
-
"sass": "^1.
|
|
35
|
-
"sass-loader": "^
|
|
36
|
-
"style-loader": "^3.3.
|
|
22
|
+
"crypto-js": "^4.1.1",
|
|
23
|
+
"@types/crypto-js": "^4.1.1",
|
|
24
|
+
"@babel/core": "^7.22.5",
|
|
25
|
+
"@babel/plugin-transform-regenerator": "^7.22.5",
|
|
26
|
+
"@babel/plugin-transform-runtime": "^7.22.5",
|
|
27
|
+
"@babel/plugin-transform-object-assign": "^7.22.5",
|
|
28
|
+
"@babel/plugin-proposal-class-properties": "^7.18.6",
|
|
29
|
+
"@babel/preset-env": "^7.22.5",
|
|
30
|
+
"@babel/preset-typescript": "^7.22.5",
|
|
31
|
+
"@babel/runtime-corejs3": "^7.22.5",
|
|
32
|
+
"@babel/plugin-transform-classes": "^7.22.5",
|
|
33
|
+
"core-js": "^3.31.0",
|
|
34
|
+
"babel-loader": "^9.1.2",
|
|
35
|
+
"css-loader": "^6.8.1",
|
|
36
|
+
"sass": "^1.63.4",
|
|
37
|
+
"sass-loader": "^13.3.2",
|
|
38
|
+
"style-loader": "^3.3.3"
|
|
37
39
|
},
|
|
38
40
|
"resolutions": {
|
|
39
41
|
"@webpack-cli/serve": "^1.3.1"
|
package/support/environment.d.ts
CHANGED
|
@@ -25,6 +25,7 @@ export interface EnvironmentInterface {
|
|
|
25
25
|
API_URL: EnvironmentMode;
|
|
26
26
|
ANALYTICS_URL: EnvironmentMode;
|
|
27
27
|
DOOR_URL: EnvironmentMode;
|
|
28
|
+
WIDGET_URL: EnvironmentMode;
|
|
28
29
|
sdkNames: SdkNameInterface;
|
|
29
30
|
sdkVersion: string;
|
|
30
31
|
sdkName: number;
|
|
@@ -36,6 +37,7 @@ export interface EnvironmentInterface {
|
|
|
36
37
|
setVersion(version: string, name: SdkKeyType): void;
|
|
37
38
|
toApi(uri: string): string;
|
|
38
39
|
toDoor(uri: string): string;
|
|
40
|
+
toWidget(uri: string): string;
|
|
39
41
|
isMobile(): boolean;
|
|
40
42
|
isMobileSafari(): any;
|
|
41
43
|
toAnalytics(uri: string): string;
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
export interface WidgetStoreModel {
|
|
2
|
+
el: string | undefined;
|
|
3
|
+
applicationId: string | undefined;
|
|
4
|
+
price: number;
|
|
5
|
+
taxFree: number | undefined;
|
|
6
|
+
currency: string | undefined;
|
|
7
|
+
userToken: string | undefined;
|
|
8
|
+
pg: string | undefined;
|
|
9
|
+
method: string | undefined;
|
|
10
|
+
walletId?: string;
|
|
11
|
+
useOnlyOOpay: boolean;
|
|
12
|
+
termsPassed: boolean;
|
|
13
|
+
setWidgetData(data: WidgetStoreData): void;
|
|
14
|
+
setPayment(pg: string | undefined, method: string | undefined, wallet_id: string | undefined, terms: boolean): void;
|
|
15
|
+
updateOnProcessing(data: WidgetStoreData): void;
|
|
16
|
+
}
|
|
17
|
+
export interface WidgetStoreData {
|
|
18
|
+
el?: string;
|
|
19
|
+
application_id?: string;
|
|
20
|
+
price?: number;
|
|
21
|
+
tax_free?: number;
|
|
22
|
+
currency?: string;
|
|
23
|
+
user_token?: string;
|
|
24
|
+
pg?: string;
|
|
25
|
+
method?: string;
|
|
26
|
+
wallet_id?: string;
|
|
27
|
+
use_only_oopay?: boolean;
|
|
28
|
+
}
|
|
29
|
+
export declare const WidgetStore: WidgetStoreModel;
|