@bootpay/client-js 5.0.0-beta.8 → 5.0.0-beta.9

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.
Files changed (87) hide show
  1. package/dist/index.es.js +8458 -0
  2. package/dist/index.umd.js +1 -0
  3. package/dist/package.json.d.ts +53 -0
  4. package/dist/src/bootpay-es5.d.ts +0 -2
  5. package/dist/src/lib/template/payment.d.ts +0 -1
  6. package/dist/src/support/alfred-progress/index.d.ts +0 -1
  7. package/dist/src/support/bootpay-manager.d.ts +2 -2
  8. package/dist/src/test/index.d.ts +1 -0
  9. package/dist/src/test/moduleRequire.d.ts +1 -0
  10. package/dist/style.css +1 -0
  11. package/dist/test/payment/css/style.css +52 -0
  12. package/dist/test/payment/ehowlsla.html +92 -0
  13. package/dist/test/payment/iframe.html +71 -0
  14. package/dist/test/payment/index.html +285 -0
  15. package/dist/test/payment/js/development-ehowlsla.js +286 -0
  16. package/dist/test/payment/js/development.js +971 -0
  17. package/dist/test/payment/js/widget.js +369 -0
  18. package/dist/test/payment/widget.html +164 -0
  19. package/dist/vite.config.d.ts +2 -0
  20. package/package.json +7 -4
  21. package/{tsconfig-esnext.json → tsconfig.build.json} +8 -6
  22. package/vite.config.ts +23 -0
  23. package/dist/package.json +0 -47
  24. package/dist/src/bootpay-environment.js +0 -5
  25. package/dist/src/bootpay-environment.js.map +0 -1
  26. package/dist/src/bootpay-es5.js +0 -10
  27. package/dist/src/bootpay-es5.js.map +0 -1
  28. package/dist/src/bootpay-sdk.js +0 -243
  29. package/dist/src/bootpay-sdk.js.map +0 -1
  30. package/dist/src/bootpay-widget.js +0 -83
  31. package/dist/src/bootpay-widget.js.map +0 -1
  32. package/dist/src/bootpay.js +0 -319
  33. package/dist/src/bootpay.js.map +0 -1
  34. package/dist/src/index.js +0 -33
  35. package/dist/src/index.js.map +0 -1
  36. package/dist/src/lib/analytics.js +0 -137
  37. package/dist/src/lib/analytics.js.map +0 -1
  38. package/dist/src/lib/bootpay-widget.js +0 -171
  39. package/dist/src/lib/bootpay-widget.js.map +0 -1
  40. package/dist/src/lib/bootpay.js +0 -496
  41. package/dist/src/lib/bootpay.js.map +0 -1
  42. package/dist/src/lib/event/payment.js +0 -215
  43. package/dist/src/lib/event/payment.js.map +0 -1
  44. package/dist/src/lib/event/polling.js +0 -42
  45. package/dist/src/lib/event/polling.js.map +0 -1
  46. package/dist/src/lib/event/user-token.js +0 -51
  47. package/dist/src/lib/event/user-token.js.map +0 -1
  48. package/dist/src/lib/event/widget.js +0 -90
  49. package/dist/src/lib/event/widget.js.map +0 -1
  50. package/dist/src/lib/locale/message.js +0 -110
  51. package/dist/src/lib/locale/message.js.map +0 -1
  52. package/dist/src/lib/template/oopay.js +0 -66
  53. package/dist/src/lib/template/oopay.js.map +0 -1
  54. package/dist/src/lib/template/payment.js +0 -488
  55. package/dist/src/lib/template/payment.js.map +0 -1
  56. package/dist/src/lib/template/user-token.js +0 -281
  57. package/dist/src/lib/template/user-token.js.map +0 -1
  58. package/dist/src/lib/template/widget.js +0 -78
  59. package/dist/src/lib/template/widget.js.map +0 -1
  60. package/dist/src/models/bootpay-interface.js +0 -3
  61. package/dist/src/models/bootpay-interface.js.map +0 -1
  62. package/dist/src/models/bootpay-sdk-interface.js +0 -3
  63. package/dist/src/models/bootpay-sdk-interface.js.map +0 -1
  64. package/dist/src/models/bootpay-widget-interface.js +0 -3
  65. package/dist/src/models/bootpay-widget-interface.js.map +0 -1
  66. package/dist/src/models/const.js +0 -15
  67. package/dist/src/models/const.js.map +0 -1
  68. package/dist/src/support/alfred-progress/index.js +0 -64
  69. package/dist/src/support/alfred-progress/index.js.map +0 -1
  70. package/dist/src/support/bootpay-manager.js +0 -39
  71. package/dist/src/support/bootpay-manager.js.map +0 -1
  72. package/dist/src/support/environment.js +0 -89
  73. package/dist/src/support/environment.js.map +0 -1
  74. package/dist/src/support/event.js +0 -133
  75. package/dist/src/support/event.js.map +0 -1
  76. package/dist/src/support/logger.js +0 -130
  77. package/dist/src/support/logger.js.map +0 -1
  78. package/dist/src/support/resource.js +0 -125
  79. package/dist/src/support/resource.js.map +0 -1
  80. package/dist/src/support/storage.js +0 -191
  81. package/dist/src/support/storage.js.map +0 -1
  82. package/dist/src/support/template-manager.js +0 -47
  83. package/dist/src/support/template-manager.js.map +0 -1
  84. package/dist/src/support/util.js +0 -36
  85. package/dist/src/support/util.js.map +0 -1
  86. package/dist/src/support/widget-store.js +0 -73
  87. package/dist/src/support/widget-store.js.map +0 -1
@@ -1 +0,0 @@
1
- {"version":3,"file":"bootpay-environment.js","sourceRoot":"","sources":["../../src/bootpay-environment.ts"],"names":[],"mappings":";;AAAA,uDAAmD;AAEnD,kBAAe,yBAAW,CAAA"}
@@ -1,10 +0,0 @@
1
- "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
- Object.defineProperty(exports, "__esModule", { value: true });
6
- require("core-js/es/promise");
7
- require("regenerator-runtime/runtime");
8
- const bootpay_1 = __importDefault(require("./bootpay"));
9
- exports.default = bootpay_1.default;
10
- //# sourceMappingURL=bootpay-es5.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bootpay-es5.js","sourceRoot":"","sources":["../../src/bootpay-es5.ts"],"names":[],"mappings":";;;;;AAAA,8BAA2B;AAC3B,uCAAoC;AACpC,wDAA+B;AAE/B,kBAAe,iBAAO,CAAA"}
@@ -1,243 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const user_token_1 = require("./lib/template/user-token");
13
- const environment_1 = require("./support/environment");
14
- const alfred_progress_1 = require("./support/alfred-progress");
15
- const util_1 = require("./support/util");
16
- const logger_1 = require("./support/logger");
17
- const storage_1 = require("./support/storage");
18
- const payment_1 = require("./lib/event/payment");
19
- const const_1 = require("./models/const");
20
- const BootpaySDK = {
21
- $templateUserToken: user_token_1.UserTokenTemplate,
22
- /**
23
- * Password Token을 가져온다
24
- * Comment by GOSOMI
25
- * @date: 2022-02-16
26
- * @param userToken: string
27
- */
28
- requestPasswordToken(userToken) {
29
- return __awaiter(this, void 0, void 0, function* () {
30
- try {
31
- const response = yield this.$templateUserToken.request('passwordToken', userToken);
32
- this.$templateUserToken.destroy();
33
- return Promise.resolve(response);
34
- }
35
- catch (e) {
36
- this.$templateUserToken.destroy();
37
- return Promise.reject(this.errorHandler(e));
38
- }
39
- });
40
- },
41
- /**
42
- * 간편결제 비밀번호 변경 SDK
43
- * Comment by GOSOMI
44
- * @date: 2022-02-17
45
- */
46
- requestChangePassword(userToken) {
47
- return __awaiter(this, void 0, void 0, function* () {
48
- try {
49
- const response = yield this.$templateUserToken.request('changePasswordToken', userToken);
50
- this.$templateUserToken.destroy();
51
- return Promise.resolve(response);
52
- }
53
- catch (e) {
54
- this.$templateUserToken.destroy();
55
- return Promise.reject(this.errorHandler(e));
56
- }
57
- });
58
- },
59
- /**
60
- * 카드 등록 SDK
61
- * Comment by GOSOMI
62
- * @date: 2022-02-18
63
- * @param
64
- * @returns
65
- */
66
- requestAddCard(userToken) {
67
- return __awaiter(this, void 0, void 0, function* () {
68
- try {
69
- const response = yield this.$templateUserToken.addCard(userToken);
70
- this.$templateUserToken.destroy();
71
- return Promise.resolve(response);
72
- }
73
- catch (e) {
74
- this.$templateUserToken.destroy();
75
- return Promise.reject(this.errorHandler(e));
76
- }
77
- });
78
- },
79
- wallets(userToken) {
80
- return __awaiter(this, void 0, void 0, function* () {
81
- try {
82
- const response = yield this.$templateUserToken.wallets(userToken);
83
- this.$templateUserToken.destroy();
84
- return Promise.resolve(response);
85
- }
86
- catch (e) {
87
- this.$templateUserToken.destroy();
88
- return Promise.reject(this.errorHandler(e));
89
- }
90
- });
91
- },
92
- destroyWallet(data) {
93
- return __awaiter(this, void 0, void 0, function* () {
94
- try {
95
- const response = yield this.$templateUserToken.destroyWallet(data);
96
- this.$templateUserToken.destroy();
97
- return Promise.resolve(response);
98
- }
99
- catch (e) {
100
- this.$templateUserToken.destroy();
101
- return Promise.reject(this.errorHandler(e));
102
- }
103
- });
104
- },
105
- createBiometricAuthenticate(biometricData) {
106
- return __awaiter(this, void 0, void 0, function* () {
107
- try {
108
- const response = yield this.$templateUserToken.createBiometricAuthenticate(biometricData);
109
- this.$templateUserToken.destroy();
110
- return Promise.resolve(response);
111
- }
112
- catch (e) {
113
- this.$templateUserToken.destroy();
114
- return Promise.reject(this.errorHandler(e));
115
- }
116
- });
117
- },
118
- destroyBiometricAuthenticate(biometricData) {
119
- return __awaiter(this, void 0, void 0, function* () {
120
- try {
121
- const response = yield this.$templateUserToken.destroyBiometricAuthenticate(biometricData);
122
- this.$templateUserToken.destroy();
123
- return Promise.resolve(response);
124
- }
125
- catch (e) {
126
- this.$templateUserToken.destroy();
127
- return Promise.reject(this.errorHandler(e));
128
- }
129
- });
130
- },
131
- requestWalletPayment(data) {
132
- return __awaiter(this, void 0, void 0, function* () {
133
- try {
134
- const response = yield this.$templateUserToken.requestWalletPayment(data);
135
- this.$templateUserToken.destroy();
136
- return Promise.resolve(response);
137
- }
138
- catch (e) {
139
- this.$templateUserToken.destroy();
140
- return Promise.reject(this.errorHandler(e));
141
- }
142
- });
143
- },
144
- /**
145
- * 환경 설정
146
- * Comment by GOSOMI
147
- * @date: 2021-05-11
148
- * @param env: string
149
- * @param hostname: string | undefined
150
- * @returns void
151
- */
152
- setEnvironmentMode(env, hostname = undefined) {
153
- environment_1.Environment.set(env);
154
- if (hostname !== undefined) {
155
- environment_1.Environment.setDevelopmentHost(hostname);
156
- }
157
- },
158
- /**
159
- * DeviceType을 설정
160
- * Comment by GOSOMI
161
- * @date: 2021-12-23
162
- * @param deviceType: string
163
- * @returns number
164
- */
165
- setDevice(deviceType) {
166
- let device = const_1.Const.PLATFORM.JS;
167
- switch (deviceType.toUpperCase()) {
168
- case 'IOS':
169
- device = const_1.Const.PLATFORM.IOS;
170
- break;
171
- case 'ANDROID':
172
- device = const_1.Const.PLATFORM.ANDROID;
173
- break;
174
- default:
175
- break;
176
- }
177
- return this.$templateUserToken.setDevice(device);
178
- },
179
- /**
180
- * 이벤트 오류를 받아서 처리한다
181
- * Comment by GOSOMI
182
- * @date: 2021-05-12
183
- * @param e: any
184
- */
185
- errorHandler(e) {
186
- let response = undefined;
187
- // 일단 오류가 나면 Progress를 감춘다
188
- alfred_progress_1.AlfredProgress.hideProgress();
189
- switch (e.name) {
190
- case 'BootpayEventError':
191
- response = e.eventMessage;
192
- break;
193
- default:
194
- if ((0, util_1.isPresent)(e.event)) {
195
- response = e;
196
- }
197
- else {
198
- throw e;
199
- // response = {
200
- // event: 'error',
201
- // error_code: 10,
202
- // message: e.message
203
- // }
204
- }
205
- }
206
- return response;
207
- },
208
- /**
209
- * 로그 레벨을 설정한다
210
- * Comment by GOSOMI
211
- * @date: 2021-05-12
212
- * @param level: number
213
- * @returns void
214
- */
215
- setLogLevel(level) {
216
- logger_1.Logger.setLogLevel(level);
217
- },
218
- /**
219
- * UUID 설정
220
- * Comment by GOSOMI
221
- * @date: 2021-12-22
222
- * @param uuid: string
223
- * @returns string
224
- */
225
- setUUID(uuid) {
226
- return storage_1.SessionStorage.setUUID(uuid);
227
- },
228
- /**
229
- * 결제창을 닫는다
230
- * Comment by GOSOMI
231
- * @date: 2021-12-29
232
- */
233
- dismiss() {
234
- payment_1.BootpayPaymentEvent.reject({
235
- event: 'cancel',
236
- error_code: 'RC_CLOSE_WINDOW',
237
- message: '사용자가 결제창을 닫았습니다.'
238
- });
239
- }
240
- };
241
- window.BootpaySDK = BootpaySDK;
242
- exports.default = BootpaySDK;
243
- //# sourceMappingURL=bootpay-sdk.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bootpay-sdk.js","sourceRoot":"","sources":["../../src/bootpay-sdk.ts"],"names":[],"mappings":";;;;;;;;;;;AAAA,0DAAuF;AACvF,uDAAmD;AACnD,+DAA0D;AAC1D,yCAA0C;AAC1C,6CAAyC;AACzC,+CAAkD;AAClD,iDAAyD;AACzD,0CAAsC;AAyCtC,MAAM,UAAU,GAAwB;IACpC,kBAAkB,EAAE,8BAAiB;IACrC;;;;;OAKG;IACG,oBAAoB,CAAC,SAAiB;;YACxC,IAAI;gBACA,MAAM,QAAQ,GAAW,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,eAAe,EAAE,SAAS,CAAC,CAAA;gBAC1F,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAA;gBACjC,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;aACnC;YAAC,OAAO,CAAC,EAAE;gBACR,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAA;gBACjC,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAA;aAC9C;QACL,CAAC;KAAA;IAED;;;;OAIG;IACG,qBAAqB,CAAC,SAAiB;;YACzC,IAAI;gBACA,MAAM,QAAQ,GAAW,MAAM,IAAI,CAAC,kBAAkB,CAAC,OAAO,CAAC,qBAAqB,EAAE,SAAS,CAAC,CAAA;gBAChG,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAA;gBACjC,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;aACnC;YAAC,OAAO,CAAC,EAAE;gBACR,IAAI,CAAC,kBAAkB,CAAC,OAAO,EAAE,CAAA;gBACjC,OAAO,OAAO,CAAC,MAAM,CAAC,IAAI,C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AAsB;oBACtB,sBAAsB;oBACtB,yBAAyB;oBACzB,IAAI;iBACP;SAER;QACD,OAAO,QAAQ,CAAA;IACnB,CAAC;IAED;;;;;;OAMG;IACH,WAAW,CAAC,KAAa;QACrB,eAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAA;IAC7B,CAAC;IAED;;;;;;OAMG;IACH,OAAO,CAAC,IAAY;QAChB,OAAO,wBAAc,CAAC,OAAO,CAAC,IAAI,CAAC,CAAA;IACvC,CAAC;IAED;;;;OAIG;IACH,OAAO;QACH,6BAAmB,CAAC,MAAM,CAAC;YACvB,KAAK,EAAE,QAAQ;YACf,UAAU,EAAE,iBAAiB;YAC7B,OAAO,EAAE,kBAAkB;SAC9B,CAAC,CAAA;IACN,CAAC;CACJ,CAAA;AAED,MAAM,CAAC,UAAU,GAAG,UAAU,CAAA;AAE9B,kBAAe,UAAU,CAAA"}
@@ -1,83 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- var __importDefault = (this && this.__importDefault) || function (mod) {
12
- return (mod && mod.__esModule) ? mod : { "default": mod };
13
- };
14
- Object.defineProperty(exports, "__esModule", { value: true });
15
- const bootpay_widget_1 = require("./lib/bootpay-widget");
16
- const environment_1 = require("./support/environment");
17
- const bootpay_1 = __importDefault(require("./bootpay"));
18
- const alfred_progress_1 = require("./support/alfred-progress");
19
- const util_1 = require("./support/util");
20
- const BootpayWidget = {
21
- render(el, data) {
22
- bootpay_widget_1.BootpayWidgetWindow.render(el, data);
23
- },
24
- rerender() {
25
- bootpay_widget_1.BootpayWidgetWindow.rerender();
26
- },
27
- setEnvironmentMode(env, hostname) {
28
- bootpay_1.default.setEnvironmentMode(env, hostname);
29
- environment_1.Environment.set(env);
30
- },
31
- requestPayment(data) {
32
- return __awaiter(this, void 0, void 0, function* () {
33
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
34
- try {
35
- const response = yield bootpay_widget_1.BootpayWidgetWindow.requestPayment(data);
36
- return resolve(response);
37
- }
38
- catch (e) {
39
- return reject(this.errorHandler(e));
40
- }
41
- }));
42
- });
43
- },
44
- errorHandler(e) {
45
- let response = undefined;
46
- // 일단 오류가 나면 Progress를 감춘다
47
- alfred_progress_1.AlfredProgress.hideProgress();
48
- switch (e.name) {
49
- case 'BootpayEventError':
50
- response = e.eventMessage;
51
- break;
52
- default:
53
- if ((0, util_1.isPresent)(e.event)) {
54
- response = e;
55
- }
56
- else {
57
- throw e;
58
- // response = {
59
- // event: 'error',
60
- // error_code: 10,
61
- // message: e.message
62
- // }
63
- }
64
- }
65
- return response;
66
- },
67
- update(data) {
68
- bootpay_widget_1.BootpayWidgetWindow.update(data);
69
- this.rerender();
70
- },
71
- currentTermsCondition() {
72
- return bootpay_widget_1.BootpayWidgetWindow.currentTermsCondition();
73
- },
74
- destroy() {
75
- bootpay_widget_1.BootpayWidgetWindow.destroy();
76
- },
77
- isRendered() {
78
- return bootpay_widget_1.BootpayWidgetWindow.isRendered();
79
- }
80
- };
81
- window.BootpayWidget = BootpayWidget;
82
- exports.default = BootpayWidget;
83
- //# sourceMappingURL=bootpay-widget.js.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"bootpay-widget.js","sourceRoot":"","sources":["../../src/bootpay-widget.ts"],"names":[],"mappings":";;;;;;;;;;;;;;AACA,yDAA0D;AAC1D,uDAAmD;AACnD,wDAA+B;AAE/B,+DAA0D;AAC1D,yCAA0C;AA4B1C,MAAM,aAAa,GAA2B;IAC1C,MAAM,CAAC,EAA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AC,MAAM,CAAC,IAAI,CAAC,CAAA;QAChC,IAAI,CAAC,QAAQ,EAAE,CAAA;IACnB,CAAC;IACD,qBAAqB;QACjB,OAAO,oCAAmB,CAAC,qBAAqB,EAAE,CAAA;IACtD,CAAC;IACD,OAAO;QACH,oCAAmB,CAAC,OAAO,EAAE,CAAA;IACjC,CAAC;IACD,UAAU;QACN,OAAO,oCAAmB,CAAC,UAAU,EAAE,CAAA;IAC3C,CAAC;CACJ,CAAA;AAED,MAAM,CAAC,aAAa,GAAG,aAAa,CAAA;AAEpC,kBAAe,aAAa,CAAA"}
@@ -1,319 +0,0 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- const const_1 = require("./models/const");
13
- const environment_1 = require("./support/environment");
14
- const bootpay_1 = require("./lib/bootpay");
15
- const alfred_progress_1 = require("./support/alfred-progress");
16
- const util_1 = require("./support/util");
17
- const logger_1 = require("./support/logger");
18
- const payment_1 = require("./lib/template/payment");
19
- const payment_2 = require("./lib/event/payment");
20
- const storage_1 = require("./support/storage");
21
- const analytics_1 = require("./lib/analytics");
22
- /**
23
- * IE 11 Event
24
- * Comment by GOSOMI
25
- * @date: 2021-12-29
26
- */
27
- (function () {
28
- if (typeof window.CustomEvent === "function")
29
- return false;
30
- function CustomEvent(event, params) {
31
- params = params || { bubbles: false, cancelable: false, detail: undefined };
32
- let evt = document.createEvent('CustomEvent');
33
- evt.initCustomEvent(event, params.bubbles, params.cancelable, params.detail);
34
- return evt;
35
- }
36
- CustomEvent.prototype = window.Event.prototype;
37
- window.CustomEvent = CustomEvent;
38
- })();
39
- const Bootpay = {
40
- $payment: bootpay_1.BootpayRequestPayment,
41
- $analytics: analytics_1.BootpayAnalytics,
42
- $environment: environment_1.Environment,
43
- /**
44
- * 결제 요청
45
- * Comment by GOSOMI
46
- * @date: 2021-05-11
47
- * @param data: RequestPaymentModel
48
- * @returns Promise<any>
49
- */
50
- requestPayment(data) {
51
- return __awaiter(this, void 0, void 0, function* () {
52
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
53
- try {
54
- const response = yield this.$payment.requestPayment(data);
55
- setTimeout(() => {
56
- resolve(response);
57
- if (['done', 'issued'].indexOf(response.event) > -1) {
58
- this.$payment.eventDone(response);
59
- }
60
- }, 100);
61
- }
62
- catch (e) {
63
- setTimeout(() => {
64
- reject(this.errorHandler(e));
65
- }, 100);
66
- }
67
- }));
68
- });
69
- },
70
- /**
71
- * 결제 승인 요청
72
- * Comment by GOSOMI
73
- * @date: 2021-05-20
74
- */
75
- confirm() {
76
- return __awaiter(this, void 0, void 0, function* () {
77
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
78
- try {
79
- const response = yield this.$payment.confirm();
80
- setTimeout(() => {
81
- resolve(response);
82
- this.$payment.eventDone(response);
83
- }, 100);
84
- }
85
- catch (e) {
86
- setTimeout(() => {
87
- return reject(this.errorHandler(e));
88
- }, 100);
89
- }
90
- }));
91
- });
92
- },
93
- /**
94
- * 정기결제창 요청
95
- * Comment by GOSOMI
96
- * @date: 2021-10-28
97
- * @param data: RequestSubscriptionModel
98
- */
99
- requestSubscription(data) {
100
- return __awaiter(this, void 0, void 0, function* () {
101
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
102
- try {
103
- const response = yield this.$payment.requestSubscription(data);
104
- resolve(response);
105
- this.$payment.eventDone(response);
106
- }
107
- catch (e) {
108
- return reject(this.errorHandler(e));
109
- }
110
- }));
111
- });
112
- },
113
- /**
114
- * 본인인증 요청
115
- * Comment by GOSOMI
116
- * @date: 2021-12-06
117
- * @param data: RequestAuthenticationModel
118
- */
119
- requestAuthentication(data) {
120
- return __awaiter(this, void 0, void 0, function* () {
121
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
122
- try {
123
- const response = yield this.$payment.requestAuthentication(data);
124
- resolve(response);
125
- this.$payment.eventDone(response);
126
- }
127
- catch (e) {
128
- return reject(this.errorHandler(e));
129
- }
130
- }));
131
- });
132
- },
133
- requestPaymentUrl(data) {
134
- return __awaiter(this, void 0, void 0, function* () {
135
- return new Promise((resolve, reject) => __awaiter(this, void 0, void 0, function* () {
136
- try {
137
- const response = yield this.$payment.requestPaymentUrl(data);
138
- setTimeout(() => {
139
- resolve(response);
140
- if (['done', 'issued'].indexOf(response.event) > -1) {
141
- this.$payment.eventDone(response);
142
- }
143
- }, 100);
144
- }
145
- catch (e) {
146
- setTimeout(() => {
147
- reject(this.errorHandler(e));
148
- }, 100);
149
- }
150
- }));
151
- });
152
- },
153
- /**
154
- * 환경 설정
155
- * Comment by GOSOMI
156
- * @date: 2021-05-11
157
- * @param env: string
158
- * @param hostname: string | undefined
159
- * @returns void
160
- */
161
- setEnvironmentMode(env, hostname = undefined) {
162
- this.$environment.set(env);
163
- if (hostname !== undefined) {
164
- this.$environment.setDevelopmentHost(hostname);
165
- }
166
- },
167
- /**
168
- * ApplicationID를 지정
169
- * Comment by GOSOMI
170
- * @date: 2022-03-02
171
- */
172
- setApplicationId(applicationId) {
173
- return this.$environment.setApplicationId(applicationId);
174
- },
175
- /**
176
- * SDK 버전과 SDK 이름 기록
177
- * Comment by GOSOMI
178
- * @date: 2022-05-15
179
- */
180
- setVersion(version, name) {
181
- return this.$environment.setVersion(version, name);
182
- },
183
- /**
184
- * DeviceType을 설정
185
- * Comment by GOSOMI
186
- * @date: 2021-12-23
187
- * @param deviceType: string
188
- * @returns number
189
- */
190
- setDevice(deviceType) {
191
- switch (deviceType) {
192
- case 'IOS':
193
- this.$payment.platformType = const_1.Const.PLATFORM.IOS;
194
- break;
195
- case 'ANDROID':
196
- this.$payment.platformType = const_1.Const.PLATFORM.ANDROID;
197
- break;
198
- default:
199
- this.$payment.platformType = const_1.Const.PLATFORM.JS;
200
- }
201
- return this.$payment.platformType;
202
- },
203
- /**
204
- * 이벤트 오류를 받아서 처리한다
205
- * Comment by GOSOMI
206
- * @date: 2021-05-12
207
- * @param e: any
208
- */
209
- errorHandler(e) {
210
- let response = undefined;
211
- // 일단 오류가 나면 Progress를 감춘다
212
- alfred_progress_1.AlfredProgress.hideProgress();
213
- switch (e.name) {
214
- case 'BootpayEventError':
215
- response = e.eventMessage;
216
- break;
217
- default:
218
- if ((0, util_1.isPresent)(e.event)) {
219
- response = e;
220
- }
221
- else {
222
- throw e;
223
- // response = {
224
- // event: 'error',
225
- // error_code: 10,
226
- // message: e.message
227
- // }
228
- }
229
- }
230
- return response;
231
- },
232
- /**
233
- * 팝업을 준비한다
234
- * Comment by GOSOMI
235
- * @date: 2021-06-23
236
- */
237
- readyToPopup() {
238
- payment_1.TemplatePayment.readyToPopup();
239
- },
240
- /**
241
- * 로그 레벨을 설정한다
242
- * Comment by GOSOMI
243
- * @date: 2021-05-12
244
- * @param level: number
245
- * @returns void
246
- */
247
- setLogLevel(level) {
248
- logger_1.Logger.setLogLevel(level);
249
- },
250
- /**
251
- * UUID 설정
252
- * Comment by GOSOMI
253
- * @date: 2021-12-22
254
- * @param uuid: string
255
- * @returns string
256
- */
257
- setUUID(uuid) {
258
- return storage_1.SessionStorage.setUUID(uuid);
259
- },
260
- /**
261
- * 페이지 통계 데이터를 전송
262
- * Comment by GOSOMI
263
- * @date: 2022-03-02
264
- */
265
- send(data = undefined) {
266
- return this.$analytics.send(data !== undefined ? data : {});
267
- },
268
- login(data) {
269
- return this.$analytics.login(data);
270
- },
271
- logout() {
272
- return this.$analytics.logout();
273
- },
274
- /**
275
- * Locale 설정
276
- * Comment by GOSOMI
277
- * @date: 2022-06-09
278
- */
279
- setLocale(locale) {
280
- environment_1.Environment.setLocale(locale);
281
- payment_1.TemplatePayment.templateReload();
282
- },
283
- /**
284
- * 결제창을 닫는다
285
- * Comment by GOSOMI
286
- * @date: 2021-12-29
287
- */
288
- dismiss(closedEvent = false) {
289
- return __awaiter(this, void 0, void 0, function* () {
290
- if (closedEvent) {
291
- try {
292
- yield logger_1.EventLogger.sendCloseEvent();
293
- }
294
- catch (e) {
295
- logger_1.Logger.debug('error', e.message);
296
- }
297
- }
298
- payment_2.BootpayPaymentEvent.reject({
299
- event: 'cancel',
300
- error_code: 'RC_CLOSE_WINDOW',
301
- message: '사용자가 결제창을 닫았습니다.'
302
- });
303
- });
304
- },
305
- getCurrentUUID() {
306
- return storage_1.SessionStorage.currentUserUUID();
307
- },
308
- /**
309
- * 결제창을 닫는다
310
- * Comment by GOSOMI
311
- * @date: 2022-06-14
312
- */
313
- destroy() {
314
- payment_1.TemplatePayment.destroy();
315
- }
316
- };
317
- window.Bootpay = Bootpay;
318
- exports.default = Bootpay;
319
- //# sourceMappingURL=bootpay.js.map