@bootpay/client-js 5.0.0-beta.8 → 5.0.0-rc.1
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/README.md +10 -1
- package/dist/index.es.js +7103 -0
- package/dist/index.umd.js +2 -0
- package/dist/package.json.d.ts +55 -0
- package/dist/src/bootpay-es5.d.ts +0 -2
- package/dist/src/bootpay-widget.d.ts +6 -2
- package/dist/src/bootpay.d.ts +2 -1
- package/dist/src/lib/bootpay-widget.d.ts +14 -1
- package/dist/src/lib/bootpay.d.ts +1 -1
- package/dist/src/lib/event/widget.d.ts +17 -0
- package/dist/src/lib/template/modal.d.ts +16 -0
- package/dist/src/lib/template/payment.d.ts +3 -4
- package/dist/src/lib/template/widget.d.ts +6 -1
- package/dist/src/models/bootpay-interface.d.ts +18 -0
- package/dist/src/models/bootpay-widget-interface.d.ts +6 -0
- package/dist/src/support/alfred-progress/index.d.ts +0 -1
- package/dist/src/support/bootpay-manager.d.ts +2 -2
- package/dist/src/support/environment.d.ts +2 -1
- package/dist/src/support/event-logger.d.ts +42 -0
- package/dist/src/support/logger.d.ts +0 -42
- package/dist/src/support/widget-store.d.ts +4 -0
- package/dist/src/test/index.d.ts +1 -0
- package/dist/src/test/moduleRequire.d.ts +1 -0
- package/dist/vite.config.d.ts +2 -0
- package/package.json +9 -4
- package/{tsconfig-esnext.json → tsconfig.json.esnext} +8 -6
- package/vite.config.ts +27 -0
- package/dist/package.json +0 -47
- package/dist/src/bootpay-environment.js +0 -5
- package/dist/src/bootpay-environment.js.map +0 -1
- package/dist/src/bootpay-es5.js +0 -10
- package/dist/src/bootpay-es5.js.map +0 -1
- package/dist/src/bootpay-sdk.js +0 -243
- package/dist/src/bootpay-sdk.js.map +0 -1
- package/dist/src/bootpay-widget.js +0 -83
- package/dist/src/bootpay-widget.js.map +0 -1
- package/dist/src/bootpay.js +0 -319
- package/dist/src/bootpay.js.map +0 -1
- package/dist/src/index.js +0 -33
- package/dist/src/index.js.map +0 -1
- package/dist/src/lib/analytics.js +0 -137
- package/dist/src/lib/analytics.js.map +0 -1
- package/dist/src/lib/bootpay-widget.js +0 -171
- package/dist/src/lib/bootpay-widget.js.map +0 -1
- package/dist/src/lib/bootpay.js +0 -496
- package/dist/src/lib/bootpay.js.map +0 -1
- package/dist/src/lib/event/payment.js +0 -215
- package/dist/src/lib/event/payment.js.map +0 -1
- package/dist/src/lib/event/polling.js +0 -42
- package/dist/src/lib/event/polling.js.map +0 -1
- package/dist/src/lib/event/user-token.js +0 -51
- package/dist/src/lib/event/user-token.js.map +0 -1
- package/dist/src/lib/event/widget.js +0 -90
- package/dist/src/lib/event/widget.js.map +0 -1
- package/dist/src/lib/locale/message.js +0 -110
- package/dist/src/lib/locale/message.js.map +0 -1
- package/dist/src/lib/template/oopay.js +0 -66
- package/dist/src/lib/template/oopay.js.map +0 -1
- package/dist/src/lib/template/payment.js +0 -488
- package/dist/src/lib/template/payment.js.map +0 -1
- package/dist/src/lib/template/user-token.js +0 -281
- package/dist/src/lib/template/user-token.js.map +0 -1
- package/dist/src/lib/template/widget.js +0 -78
- package/dist/src/lib/template/widget.js.map +0 -1
- package/dist/src/models/bootpay-interface.js +0 -3
- package/dist/src/models/bootpay-interface.js.map +0 -1
- package/dist/src/models/bootpay-sdk-interface.js +0 -3
- package/dist/src/models/bootpay-sdk-interface.js.map +0 -1
- package/dist/src/models/bootpay-widget-interface.js +0 -3
- package/dist/src/models/bootpay-widget-interface.js.map +0 -1
- package/dist/src/models/const.js +0 -15
- package/dist/src/models/const.js.map +0 -1
- package/dist/src/support/alfred-progress/index.js +0 -64
- package/dist/src/support/alfred-progress/index.js.map +0 -1
- package/dist/src/support/bootpay-manager.js +0 -39
- package/dist/src/support/bootpay-manager.js.map +0 -1
- package/dist/src/support/environment.js +0 -89
- package/dist/src/support/environment.js.map +0 -1
- package/dist/src/support/event.js +0 -133
- package/dist/src/support/event.js.map +0 -1
- package/dist/src/support/logger.js +0 -130
- package/dist/src/support/logger.js.map +0 -1
- package/dist/src/support/resource.js +0 -125
- package/dist/src/support/resource.js.map +0 -1
- package/dist/src/support/storage.js +0 -191
- package/dist/src/support/storage.js.map +0 -1
- package/dist/src/support/template-manager.js +0 -47
- package/dist/src/support/template-manager.js.map +0 -1
- package/dist/src/support/util.js +0 -36
- package/dist/src/support/util.js.map +0 -1
- package/dist/src/support/widget-store.js +0 -73
- package/dist/src/support/widget-store.js.map +0 -1
|
@@ -1,215 +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
|
-
exports.BootpayPaymentEvent = void 0;
|
|
13
|
-
const event_1 = require("../../support/event");
|
|
14
|
-
const util_1 = require("../../support/util");
|
|
15
|
-
const logger_1 = require("../../support/logger");
|
|
16
|
-
const alfred_progress_1 = require("../../support/alfred-progress");
|
|
17
|
-
const payment_1 = require("../template/payment");
|
|
18
|
-
const polling_1 = require("./polling");
|
|
19
|
-
class BootpayPaymentEventManager extends event_1.BootpayWindowEvent {
|
|
20
|
-
constructor() {
|
|
21
|
-
super();
|
|
22
|
-
this.$messageEventName = 'message.BootpayPaymentEvent';
|
|
23
|
-
this.$eventPrefix = 'bootpay';
|
|
24
|
-
this.$pollingInterval = undefined;
|
|
25
|
-
this.$pollingData = {
|
|
26
|
-
applicationId: '',
|
|
27
|
-
gatewayUrl: '',
|
|
28
|
-
receiptId: '',
|
|
29
|
-
transactionKey: ''
|
|
30
|
-
};
|
|
31
|
-
this.$pollingEvent = polling_1.BootpayPolling;
|
|
32
|
-
this.pollingInterval = 3000;
|
|
33
|
-
this.isDone = false;
|
|
34
|
-
}
|
|
35
|
-
/**
|
|
36
|
-
* 결제 이벤트를 바인딩한다
|
|
37
|
-
* Comment by GOSOMI
|
|
38
|
-
* @date: 2021-05-11
|
|
39
|
-
* @param resolve: Function
|
|
40
|
-
* @param reject: Function
|
|
41
|
-
*/
|
|
42
|
-
bind(resolve, reject) {
|
|
43
|
-
// 아직 완료가 되지 않음을 기록
|
|
44
|
-
this.isDone = false;
|
|
45
|
-
// callback function을 instance variables에 넣는다
|
|
46
|
-
this.setCallbackFunction(resolve, reject);
|
|
47
|
-
window.resetBootpayEventListener(this.$messageEventName, (e) => {
|
|
48
|
-
const response = this.parseEvent(e.data);
|
|
49
|
-
logger_1.Logger.debug("event received", JSON.stringify(response));
|
|
50
|
-
if ((0, util_1.isPresent)(response)) {
|
|
51
|
-
logger_1.Logger.debug('event', response);
|
|
52
|
-
switch (response.event) {
|
|
53
|
-
case 'error':
|
|
54
|
-
case 'cancel':
|
|
55
|
-
return this.reject({
|
|
56
|
-
event: response.event,
|
|
57
|
-
pg_error_code: response.pg_error_code,
|
|
58
|
-
error_code: response.error_code,
|
|
59
|
-
message: response.message,
|
|
60
|
-
payload: response.payload
|
|
61
|
-
});
|
|
62
|
-
case 'confirm':
|
|
63
|
-
return this.resolve({
|
|
64
|
-
event: response.event,
|
|
65
|
-
receipt_id: response.receipt_id,
|
|
66
|
-
gateway_url: response.gateway_url,
|
|
67
|
-
order_id: response.order_id
|
|
68
|
-
});
|
|
69
|
-
case 'redirect':
|
|
70
|
-
location.replace(response.url);
|
|
71
|
-
return;
|
|
72
|
-
// return TemplatePayment.redirectPaymentUrl(response.url, response.data)
|
|
73
|
-
case 'polling':
|
|
74
|
-
if (this.$pollingData !== undefined) {
|
|
75
|
-
this.$pollingData.receiptId = response.receipt_id;
|
|
76
|
-
this.$pollingData.gatewayUrl = response.gateway_url;
|
|
77
|
-
}
|
|
78
|
-
return this.startPollingEvent();
|
|
79
|
-
case 'issued':
|
|
80
|
-
case 'done':
|
|
81
|
-
if (!this.isDone) {
|
|
82
|
-
this.isDone = true;
|
|
83
|
-
// 이벤트를 받는 즉시 polling event 를 삭제한다
|
|
84
|
-
this.clearPollingEvent();
|
|
85
|
-
return this.resolve(response);
|
|
86
|
-
}
|
|
87
|
-
break;
|
|
88
|
-
case 'iFrameStyle':
|
|
89
|
-
payment_1.TemplatePayment.iFrameSetStyle(response.styles);
|
|
90
|
-
break;
|
|
91
|
-
case 'windowStyle':
|
|
92
|
-
payment_1.TemplatePayment.windowStyle(response.styles);
|
|
93
|
-
break;
|
|
94
|
-
case 'hideProgress':
|
|
95
|
-
alfred_progress_1.AlfredProgress.hideProgress();
|
|
96
|
-
break;
|
|
97
|
-
case 'showProgress':
|
|
98
|
-
alfred_progress_1.AlfredProgress.showProgress(response.message);
|
|
99
|
-
break;
|
|
100
|
-
case 'resize':
|
|
101
|
-
payment_1.TemplatePayment.iFrameResize(response.resizeData);
|
|
102
|
-
break;
|
|
103
|
-
case 'hidePayment':
|
|
104
|
-
payment_1.TemplatePayment.closePopup();
|
|
105
|
-
payment_1.TemplatePayment.hidePaymentiFrame();
|
|
106
|
-
break;
|
|
107
|
-
case 'showPayment':
|
|
108
|
-
payment_1.TemplatePayment.showPaymentiFrame(this.$present(response.showCloseButton) ? response.showCloseButton : false);
|
|
109
|
-
break;
|
|
110
|
-
case 'popup':
|
|
111
|
-
payment_1.TemplatePayment.createPopupButton({
|
|
112
|
-
gatewayUrl: response.url,
|
|
113
|
-
receiptId: response.receipt_id,
|
|
114
|
-
name: response.name,
|
|
115
|
-
price: response.price
|
|
116
|
-
});
|
|
117
|
-
break;
|
|
118
|
-
case 'close':
|
|
119
|
-
payment_1.TemplatePayment.destroy();
|
|
120
|
-
break;
|
|
121
|
-
default:
|
|
122
|
-
return;
|
|
123
|
-
}
|
|
124
|
-
}
|
|
125
|
-
});
|
|
126
|
-
}
|
|
127
|
-
/**
|
|
128
|
-
* 결제 이벤트에 필요한 기본 값들을 받는다
|
|
129
|
-
* Comment by GOSOMI
|
|
130
|
-
* @date: 2021-12-29
|
|
131
|
-
*/
|
|
132
|
-
setDefaultPaymentData(applicationId, transactionKey) {
|
|
133
|
-
if (this.$pollingData !== undefined) {
|
|
134
|
-
this.$pollingData.applicationId = applicationId;
|
|
135
|
-
this.$pollingData.transactionKey = transactionKey;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
/**
|
|
139
|
-
* bootpay dom custom 이벤트 호출
|
|
140
|
-
* Comment by GOSOMI
|
|
141
|
-
* @date: 2021-12-24
|
|
142
|
-
* @param eventName: string
|
|
143
|
-
* @param data: any
|
|
144
|
-
*/
|
|
145
|
-
callBootpayDOMEvent(eventName, data = undefined) {
|
|
146
|
-
document.dispatchEvent(new CustomEvent([this.$eventPrefix, eventName].join(''), { detail: data }));
|
|
147
|
-
}
|
|
148
|
-
/**
|
|
149
|
-
* Polling Event를 시작한다
|
|
150
|
-
* Comment by GOSOMI
|
|
151
|
-
* @date: 2021-12-29
|
|
152
|
-
* @param
|
|
153
|
-
*/
|
|
154
|
-
startPollingEvent() {
|
|
155
|
-
this.$pollingInterval = setInterval(() => __awaiter(this, void 0, void 0, function* () {
|
|
156
|
-
if (this.$pollingData !== undefined) {
|
|
157
|
-
try {
|
|
158
|
-
const response = yield this.$pollingEvent.pollingStatus(this.$pollingData.gatewayUrl, this.$pollingData.receiptId, this.$pollingData.applicationId, this.$pollingData.transactionKey);
|
|
159
|
-
let responseData = {
|
|
160
|
-
bootpay_event: true,
|
|
161
|
-
event: '',
|
|
162
|
-
data: response.data
|
|
163
|
-
};
|
|
164
|
-
if (response.data !== undefined) {
|
|
165
|
-
logger_1.Logger.debug('polling event', `receive data: ${JSON.stringify(responseData)}`);
|
|
166
|
-
if (response.data.status === 1) {
|
|
167
|
-
// 결제 완료인 경우
|
|
168
|
-
responseData.event = 'done';
|
|
169
|
-
return window.postMessage(JSON.stringify(responseData), '*');
|
|
170
|
-
}
|
|
171
|
-
else if (response.data.status === 5) {
|
|
172
|
-
// 가상계좌발급 인 경우
|
|
173
|
-
responseData.event = 'issued';
|
|
174
|
-
return window.postMessage(JSON.stringify(responseData), '*');
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
}
|
|
178
|
-
catch (e) {
|
|
179
|
-
return this.reject({
|
|
180
|
-
error_code: 'RC_RECEIPT_POLLING_INVALID',
|
|
181
|
-
message: '결제 상태 체크에 실패하였습니다.'
|
|
182
|
-
});
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}), this.pollingInterval);
|
|
186
|
-
}
|
|
187
|
-
/**
|
|
188
|
-
* Polling Event를 초기화한다
|
|
189
|
-
* Comment by GOSOMI
|
|
190
|
-
* @date: 2021-12-29
|
|
191
|
-
*/
|
|
192
|
-
clearPollingEvent() {
|
|
193
|
-
if (this.$pollingInterval !== undefined) {
|
|
194
|
-
clearInterval(this.$pollingInterval);
|
|
195
|
-
}
|
|
196
|
-
this.$pollingInterval = undefined;
|
|
197
|
-
this.$pollingData = {
|
|
198
|
-
applicationId: '',
|
|
199
|
-
gatewayUrl: '',
|
|
200
|
-
receiptId: '',
|
|
201
|
-
transactionKey: ''
|
|
202
|
-
};
|
|
203
|
-
}
|
|
204
|
-
/**
|
|
205
|
-
* PostMessage bind 이벤트 모두 삭제하기
|
|
206
|
-
* Comment by GOSOMI
|
|
207
|
-
* @date: 2023-04-18
|
|
208
|
-
*/
|
|
209
|
-
allClearEvent() {
|
|
210
|
-
this.clearPollingEvent();
|
|
211
|
-
window.removeBootpayEventListener(this.$messageEventName);
|
|
212
|
-
}
|
|
213
|
-
}
|
|
214
|
-
exports.BootpayPaymentEvent = new BootpayPaymentEventManager();
|
|
215
|
-
//# sourceMappingURL=payment.js.map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AAI,QAAQ,CAAC,IAAI,CAAC,MAAM,KAAK,CAAC,EAAE;4BACnC,cAAc;4BACd,YAAY,CAAC,KAAK,GAAG,QAAQ,CAAA;4BAC7B,OAAO,MAAM,CAAC,WAAW,CAAC,IAAI,CAAC,SAAS,CAAC,YAAY,CAAC,EAAE,GAAG,CAAC,CAAA;yBAC/D;qBACJ;iBACJ;gBAAC,OAAO,CAAC,EAAE;oBACR,OAAO,IAAI,CAAC,MAAM,CAAC;wBACf,UAAU,EAAE,4BAA4B;wBACxC,OAAO,EAAK,oBAAoB;qBACnC,CAAC,CAAA;iBACL;aACJ;QACL,CAAC,CAAA,EAAE,IAAI,CAAC,eAAe,CAAC,CAAA;IAC5B,CAAC;IAED;;;;OAIG;IACH,iBAAiB;QACb,IAAI,IAAI,CAAC,gBAAgB,KAAK,SAAS,EAAE;YACrC,aAAa,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAA;SACvC;QACD,IAAI,CAAC,gBAAgB,GAAG,SAAS,CAAA;QACjC,IAAI,CAAC,YAAY,GAAO;YACpB,aAAa,EAAG,EAAE;YAClB,UAAU,EAAM,EAAE;YAClB,SAAS,EAAO,EAAE;YAClB,cAAc,EAAE,EAAE;SACrB,CAAA;IACL,CAAC;IAED;;;;OAIG;IACH,aAAa;QACT,IAAI,CAAC,iBAAiB,EAAE,CAAA;QACxB,MAAM,CAAC,0BAA0B,CAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;IAC7D,CAAC;CACJ;AAEY,QAAA,mBAAmB,GAAG,IAAI,0BAA0B,EAAE,CAAA"}
|
|
@@ -1,42 +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
|
-
exports.BootpayPolling = exports.BootpayPollingEvent = void 0;
|
|
13
|
-
const resource_1 = require("../../support/resource");
|
|
14
|
-
class BootpayPollingEvent extends resource_1.Resource {
|
|
15
|
-
constructor() {
|
|
16
|
-
super();
|
|
17
|
-
}
|
|
18
|
-
/**
|
|
19
|
-
* 결제 상태 정보를 지속적으로 가져온다
|
|
20
|
-
* Comment by GOSOMI
|
|
21
|
-
* @date: 2021-12-29
|
|
22
|
-
*/
|
|
23
|
-
pollingStatus(gatewayUrl, receiptId, applicationId, transactionKey) {
|
|
24
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
25
|
-
try {
|
|
26
|
-
const response = yield this.$http.get([gatewayUrl, 's', receiptId].join('/'), {
|
|
27
|
-
params: {
|
|
28
|
-
application_id: applicationId,
|
|
29
|
-
tk: transactionKey
|
|
30
|
-
}
|
|
31
|
-
});
|
|
32
|
-
return Promise.resolve(response);
|
|
33
|
-
}
|
|
34
|
-
catch (e) {
|
|
35
|
-
return Promise.reject(e);
|
|
36
|
-
}
|
|
37
|
-
});
|
|
38
|
-
}
|
|
39
|
-
}
|
|
40
|
-
exports.BootpayPollingEvent = BootpayPollingEvent;
|
|
41
|
-
exports.BootpayPolling = new BootpayPollingEvent();
|
|
42
|
-
//# sourceMappingURL=polling.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"polling.js","sourceRoot":"","sources":["../../../../src/lib/event/polling.ts"],"names":[],"mappings":";;;;;;;;;;;;AAAA,qDAAiD;AAEjD,MAAa,mBAAoB,SAAQ,mBAAQ;IAC7C;QACI,KAAK,EAAE,CAAA;IACX,CAAC;IAED;;;;OAIG;IACG,aAAa,CAAC,UAAkB,EAAE,SAAiB,EAAE,aAA4B,EAAE,cAA6B;;YAClH,IAAI;gBACA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,GAAG,CAAC,CAAC,UAAU,EAAE,GAAG,EAAE,SAAS,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE;oBAC1E,MAAM,EAAE;wBACJ,cAAc,EAAE,aAAa;wBAC7B,EAAE,EAAE,cAAc;qBACrB;iBACJ,CAAC,CAAA;gBACF,OAAO,OAAO,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;aACnC;YAAC,OAAO,CAAC,EAAE;gBACR,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAA;aAC3B;QACL,CAAC;KAAA;CACJ;AAvBD,kDAuBC;AAEY,QAAA,cAAc,GAAG,IAAI,mBAAmB,EAAE,CAAA"}
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BootpayUserTokenEventManager = void 0;
|
|
4
|
-
const event_1 = require("../../support/event");
|
|
5
|
-
const util_1 = require("../../support/util");
|
|
6
|
-
const logger_1 = require("../../support/logger");
|
|
7
|
-
const user_token_1 = require("../template/user-token");
|
|
8
|
-
class BootpayUserTokenEventManager extends event_1.BootpayWindowEvent {
|
|
9
|
-
constructor() {
|
|
10
|
-
super();
|
|
11
|
-
this.$messageEventName = 'message.BootpayUserTokenEvent';
|
|
12
|
-
}
|
|
13
|
-
bind(resolve, reject) {
|
|
14
|
-
this.setCallbackFunction(resolve, reject);
|
|
15
|
-
window.resetBootpayEventListener(this.$messageEventName, (e) => {
|
|
16
|
-
const response = this.parseEvent(e.data);
|
|
17
|
-
if ((0, util_1.isPresent)(response)) {
|
|
18
|
-
logger_1.Logger.debug('event', response);
|
|
19
|
-
switch (response.event) {
|
|
20
|
-
case 'error':
|
|
21
|
-
case 'cancel':
|
|
22
|
-
// 오류, 취소했을 경우
|
|
23
|
-
return this.reject({
|
|
24
|
-
event: response.event,
|
|
25
|
-
pg_error_code: response.pg_error_code,
|
|
26
|
-
error_code: response.error_code,
|
|
27
|
-
message: response.message,
|
|
28
|
-
payload: response.payload
|
|
29
|
-
});
|
|
30
|
-
case 'data':
|
|
31
|
-
// 일반적인 API 데이터를 리턴하는 경우
|
|
32
|
-
return this.resolve(response.data);
|
|
33
|
-
case 'confirmPasswordToken':
|
|
34
|
-
// 비밀번호 token 승인이 된 경우
|
|
35
|
-
return this.resolve(response.token);
|
|
36
|
-
case 'confirmAddCard':
|
|
37
|
-
// 카드추가가 완료된 경우
|
|
38
|
-
return this.resolve(response);
|
|
39
|
-
case 'resize':
|
|
40
|
-
// window resize event
|
|
41
|
-
user_token_1.UserTokenTemplate.iFrameResize(response.resizeData);
|
|
42
|
-
break;
|
|
43
|
-
default:
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
});
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
exports.BootpayUserTokenEventManager = BootpayUserTokenEventManager;
|
|
51
|
-
//# sourceMappingURL=user-token.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"user-token.js","sourceRoot":"","sources":["../../../../src/lib/event/user-token.ts"],"names":[],"mappings":";;;AAAA,+CAAwD;AACxD,6CAA8C;AAC9C,iDAA6C;AAC7C,uDAA0D;AAE1D,MAAa,4BAA6B,SAAQ,0BAAkB;IAGhE;QACI,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,iBAAiB,GAAG,+BAA+B,CAAA;IAC5D,CAAC;IAED,IAAI,CAAC,OAAiB,EAAE,MAAgB;QACpC,IAAI,CAAC,mBAAmB,CAAC,OAAO,EAAE,MAAM,CAAC,CAAA;QACzC,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAe,EAAE,EAAE;YACzE,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;YACxC,IAAI,IAAA,gBAAS,EAAC,QAAQ,CAAC,EAAE;gBACrB,eAAM,CAAC,KAAK,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAA;gBAC/B,QAAQ,QAAQ,CAAC,KAAK,EAAE;oBACpB,KAAK,OAAO,CAAC;oBACb,KAAK,QAAQ;wBACT,cAAc;wBACd,OAAO,IAAI,CAAC,MAAM,CAAC;4BACf,KAAK,EAAE,QAAQ,CAAC,KAAK;4BACrB,aAAa,EAAE,QAAQ,CAAC,aAAa;4BACrC,UAAU,EAAE,QAAQ,CAAC,UAAU;4BAC/B,OAAO,EAAE,QAAQ,CAAC,OAAO;4BACzB,OAAO,EAAE,QAAQ,CAAC,OAAO;yBAC5B,CAAC,CAAA;oBACN,KAAK,MAAM;wBACP,wBAAwB;wBACxB,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,IAAI,CAAC,CAAA;oBACtC,KAAK,sBAAsB;wBACvB,sBAAsB;wBACtB,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAA;oBACvC,KAAK,gBAAgB;wBACjB,eAAe;wBACf,OAAO,IAAI,CAAC,OAAO,CAAC,QAAQ,CAAC,CAAA;oBACjC,KAAK,QAAQ;wBACT,sBAAsB;wBACtB,8BAAiB,CAAC,YAAY,CAAC,QAAQ,CAAC,UAAU,CAAC,CAAA;wBACnD,MAAK;oBACT;wBACI,OAAM;iBACb;aACJ;QACL,CAAC,CAAC,CAAA;IACN,CAAC;CACJ;AA5CD,oEA4CC"}
|
|
@@ -1,90 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BootpayWidgetEvent = void 0;
|
|
4
|
-
const event_1 = require("../../support/event");
|
|
5
|
-
const util_1 = require("../../support/util");
|
|
6
|
-
const widget_1 = require("../template/widget");
|
|
7
|
-
const bootpay_widget_1 = require("../bootpay-widget");
|
|
8
|
-
const oopay_1 = require("../template/oopay");
|
|
9
|
-
class BootpayWidgetEventManager extends event_1.BootpayWindowEvent {
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
this.$messageEventName = 'message.BootpayWidgetEvent';
|
|
13
|
-
this.$eventPrefix = 'bootpay';
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* Widget 창과 통신하기 위한 이벤트 처리
|
|
17
|
-
* Comment by GOSOMI
|
|
18
|
-
* @date: 2023-06-15
|
|
19
|
-
*/
|
|
20
|
-
bind() {
|
|
21
|
-
// this.setCallbackFunction(resolve, reject)
|
|
22
|
-
window.resetBootpayEventListener(this.$messageEventName, (e) => {
|
|
23
|
-
const response = this.parseEvent(e.data);
|
|
24
|
-
if ((0, util_1.isPresent)(response)) {
|
|
25
|
-
switch (response.event) {
|
|
26
|
-
case 'bootpayWidgetSelectMethod':
|
|
27
|
-
return bootpay_widget_1.BootpayWidgetWindow.selectPayment(response.data.pg, response.data.method, response.data.wallet_id, response.data.term_passed === true, response.data.select_terms, response.data.extra);
|
|
28
|
-
case 'bootpayRequestGetEnvironment':
|
|
29
|
-
return widget_1.TemplateWidget.postMessage('bootpayResponseGetEnvironment', {
|
|
30
|
-
use_only_oopay: widget_1.TemplateWidget.$widgetStore.useOnlyOOpay,
|
|
31
|
-
user_token: widget_1.TemplateWidget.$widgetStore.userToken,
|
|
32
|
-
sandbox: widget_1.TemplateWidget.$widgetStore.sandbox,
|
|
33
|
-
use_terms: widget_1.TemplateWidget.$widgetStore.useTerms,
|
|
34
|
-
external_terms: widget_1.TemplateWidget.$widgetStore.externalTerms
|
|
35
|
-
});
|
|
36
|
-
case 'bootpayRequestGetEnvironmentOOPAY':
|
|
37
|
-
return oopay_1.OOpayTemplate.postMessage('bootpayResponseGetEnvironmentOOPAY', {
|
|
38
|
-
use_only_oopay: widget_1.TemplateWidget.$widgetStore.useOnlyOOpay,
|
|
39
|
-
user_token: widget_1.TemplateWidget.$widgetStore.userToken,
|
|
40
|
-
sandbox: widget_1.TemplateWidget.$widgetStore.sandbox,
|
|
41
|
-
use_terms: widget_1.TemplateWidget.$widgetStore.useTerms
|
|
42
|
-
});
|
|
43
|
-
case 'bootpayWidgetError':
|
|
44
|
-
return this.reject(response);
|
|
45
|
-
case 'bootpayWidgetOOpayReload':
|
|
46
|
-
return widget_1.TemplateWidget.postMessage('bootpayWidgetOOpayReload', response.data);
|
|
47
|
-
case 'bootpayWidgetResize':
|
|
48
|
-
return widget_1.TemplateWidget.resize(response.data);
|
|
49
|
-
case 'bootpayWidgetShowInterestInformation':
|
|
50
|
-
return oopay_1.OOpayTemplate.showCardInterestInformation(response.data);
|
|
51
|
-
case 'bootpayWidgetAddWallet':
|
|
52
|
-
return oopay_1.OOpayTemplate.addWallet();
|
|
53
|
-
case 'bootpayWidgetRemoveWallet':
|
|
54
|
-
return oopay_1.OOpayTemplate.removeWallet(response.data.wallet_id);
|
|
55
|
-
case 'bootpayWidgetPaymentWindowResize':
|
|
56
|
-
return oopay_1.OOpayTemplate.resize(response.data);
|
|
57
|
-
case 'bootpayWidgetOOpayWindowClose':
|
|
58
|
-
return oopay_1.OOpayTemplate.destroy();
|
|
59
|
-
case 'bootpayWidgetPaymentGetStoreData':
|
|
60
|
-
const { applicationId, price, widgetExtra, taxFree, userToken } = widget_1.TemplateWidget.$widgetStore;
|
|
61
|
-
return widget_1.TemplateWidget.postMessage('bootpayWidgetResponseStoreData', {
|
|
62
|
-
applicationId,
|
|
63
|
-
price,
|
|
64
|
-
widgetExtra,
|
|
65
|
-
taxFree,
|
|
66
|
-
userToken
|
|
67
|
-
});
|
|
68
|
-
case 'bootpayWidgetTermAllAgree':
|
|
69
|
-
this.callBootpayDOMEvent('allagreeterms', response.data);
|
|
70
|
-
return;
|
|
71
|
-
default:
|
|
72
|
-
return this.reject(response);
|
|
73
|
-
}
|
|
74
|
-
}
|
|
75
|
-
});
|
|
76
|
-
}
|
|
77
|
-
callBootpayDOMEvent(eventName, data = undefined) {
|
|
78
|
-
document.dispatchEvent(new CustomEvent([this.$eventPrefix, eventName].join(''), { detail: data }));
|
|
79
|
-
}
|
|
80
|
-
/**
|
|
81
|
-
* 관련된 모든 이벤트를 삭제
|
|
82
|
-
* Comment by GOSOMI
|
|
83
|
-
* @date: 2023-06-15
|
|
84
|
-
*/
|
|
85
|
-
destroyAllEvent() {
|
|
86
|
-
window.removeBootpayEventListener(this.$messageEventName);
|
|
87
|
-
}
|
|
88
|
-
}
|
|
89
|
-
exports.BootpayWidgetEvent = new BootpayWidgetEventManager();
|
|
90
|
-
//# sourceMappingURL=widget.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"widget.js","sourceRoot":"","sources":["../../../../src/lib/event/widget.ts"],"names":[],"mappings":";;;AAAA,+CAAwD;AACxD,6CAA8C;AAC9C,+CAAmD;AACnD,sDAAuD;AACvD,6CAAiD;AAEjD,MAAM,yBAA0B,SAAQ,0BAAkB;IAItD;QACI,KAAK,EAAE,CAAA;QACP,IAAI,CAAC,iBAAiB,GAAG,4BAA4B,CAAA;QACrD,IAAI,CAAC,YAAY,GAAQ,SAAS,CAAA;IACtC,CAAC;IAED;;;;OAIG;IACH,IAAI;QACA,4CAA4C;QAC5C,MAAM,CAAC,yBAAyB,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAe,EAAE,EAAE;YACzE,MAAM,QAAQ,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,IAAI,CAAC,CAAA;YACxC,IAAI,IAAA,gBAAS,EAAC,QAAQ,CAAC,EAAE;gBACrB,QAAQ,QAAQ,CAAC,KAAK,EAAE;oBACpB,KAAK,2BAA2B;wBAC5B,OAAO,oCAAmB,CAAC,aAAa,CACpC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAChB,QAAQ,CAAC,IAAI,CAAC,MAAM,EACpB,QA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ule", { value: true });
|
|
3
|
-
exports.BootpayMessage = void 0;
|
|
4
|
-
const util_1 = require("../../support/util");
|
|
5
|
-
exports.BootpayMessage = {
|
|
6
|
-
startProgress: {
|
|
7
|
-
PAYMENT: {
|
|
8
|
-
ko: '결제를 시작합니다',
|
|
9
|
-
en: 'Start Payment...'
|
|
10
|
-
},
|
|
11
|
-
CARD_SUBSCRIPTION: {
|
|
12
|
-
ko: '카드정기결제를 시작합니다',
|
|
13
|
-
en: 'Automatic payment will start...'
|
|
14
|
-
},
|
|
15
|
-
AUTH: {
|
|
16
|
-
ko: '본인인증을 시작합니다',
|
|
17
|
-
en: 'Authentication will start...'
|
|
18
|
-
}
|
|
19
|
-
},
|
|
20
|
-
popupLocaleMessage: {
|
|
21
|
-
message: {
|
|
22
|
-
ko: '구매 내역에 동의하면 결제를 진행해주세요',
|
|
23
|
-
en: 'If you agree with the purchase details, please proceed with the payment.'
|
|
24
|
-
},
|
|
25
|
-
button: {
|
|
26
|
-
ko: '결제계속하기',
|
|
27
|
-
en: 'Continue'
|
|
28
|
-
}
|
|
29
|
-
},
|
|
30
|
-
popupMessage: {
|
|
31
|
-
message: {
|
|
32
|
-
PAYMENT: {
|
|
33
|
-
ko: '구매 내역에 동의하면 결제를 진행해주세요',
|
|
34
|
-
en: 'If you agree with the purchase details, please proceed with the payment'
|
|
35
|
-
},
|
|
36
|
-
CARD_SUBSCRIPTION: {
|
|
37
|
-
ko: '카드 자동결제에 동의하면 "계속하기" 버튼을 눌러 진행해주세요',
|
|
38
|
-
en: 'If you agree to automatic card payment, press the "Continue" button to proceed'
|
|
39
|
-
},
|
|
40
|
-
AUTH: {
|
|
41
|
-
ko: '본인인증에 동의하면 "계속하기" 버튼을 눌러 진행해주세요',
|
|
42
|
-
en: 'If you agree to authenticate yourself, press the "Continue" button to proceed'
|
|
43
|
-
}
|
|
44
|
-
},
|
|
45
|
-
button: {
|
|
46
|
-
PAYMENT: {
|
|
47
|
-
ko: '결제계속하기',
|
|
48
|
-
en: 'Continue'
|
|
49
|
-
},
|
|
50
|
-
CARD_SUBSCRIPTION: {
|
|
51
|
-
ko: '계속하기',
|
|
52
|
-
en: 'Continue'
|
|
53
|
-
},
|
|
54
|
-
AUTH: {
|
|
55
|
-
ko: '계속하기',
|
|
56
|
-
en: 'Continue'
|
|
57
|
-
}
|
|
58
|
-
}
|
|
59
|
-
},
|
|
60
|
-
closeMessage: {
|
|
61
|
-
PAYMENT: {
|
|
62
|
-
ko: '결제창을 닫았습니다',
|
|
63
|
-
en: 'Payment window is closed'
|
|
64
|
-
},
|
|
65
|
-
CARD_SUBSCRIPTION: {
|
|
66
|
-
ko: '자동 결제창을 닫았습니다',
|
|
67
|
-
en: 'Automatic Payment window is closed'
|
|
68
|
-
},
|
|
69
|
-
AUTH: {
|
|
70
|
-
ko: '본인인증 창을 닫았습니다',
|
|
71
|
-
en: 'Authenticate window is closed'
|
|
72
|
-
}
|
|
73
|
-
},
|
|
74
|
-
confirmNotYet: {
|
|
75
|
-
PAYMENT: {
|
|
76
|
-
ko: '결제 승인준비가 되지 않았습니다',
|
|
77
|
-
en: 'Payment approval not ready '
|
|
78
|
-
},
|
|
79
|
-
CARD_SUBSCRIPTION: {
|
|
80
|
-
ko: '자동결제 승인준비가 되지 않았습니다',
|
|
81
|
-
en: 'Automatic Payment approval not ready'
|
|
82
|
-
},
|
|
83
|
-
AUTH: {
|
|
84
|
-
ko: '본인인증 승인준비가 되지 않았습니다',
|
|
85
|
-
en: 'Authenticate approval not ready'
|
|
86
|
-
}
|
|
87
|
-
},
|
|
88
|
-
notSelectPayment: {
|
|
89
|
-
ko: '어떤 방법으로 결제할지 선택해주세요',
|
|
90
|
-
en: 'Please, do select payment.'
|
|
91
|
-
},
|
|
92
|
-
termsNotAgree: {
|
|
93
|
-
ko: '필수 약관을 모두 동의해주세요',
|
|
94
|
-
en: 'Please agree to all required terms and conditions'
|
|
95
|
-
},
|
|
96
|
-
notSelectOOPay: {
|
|
97
|
-
ko: '간편결제로 결제하려면, 등록된 카드 혹은 계좌를 선택해주세요',
|
|
98
|
-
en: 'Please select a registered card or account to pay with Easy Payment'
|
|
99
|
-
},
|
|
100
|
-
getLocaleMessage: (key, locale) => {
|
|
101
|
-
const keys = key.split('.');
|
|
102
|
-
const message = keys.reduce((a, b) => a[b], exports.BootpayMessage);
|
|
103
|
-
return (0, util_1.isPresent)(message) && (0, util_1.isPresent)(message[locale]) ? message[locale] : message.ko;
|
|
104
|
-
}
|
|
105
|
-
};
|
|
106
|
-
// export const getLocaleMessage = (key: string, locale: string) => {
|
|
107
|
-
// const message = eval(`this.${ key }`)
|
|
108
|
-
// return isPresent(message) && isPresent(message[locale]) ? message[locale] : message.ko
|
|
109
|
-
// }
|
|
110
|
-
//# sourceMappingURL=message.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"message.js","sourceRoot":"","sources":["../../../../src/lib/locale/message.ts"],"names":[],"mappings":";;;AAAA,6CAA8C;AAEjC,QAAA,cAAc,GAAG;IAC1B,aAAa,EAAO;QAChB,OAAO,EAAY;YACf,EAAE,EAAE,WAAW;YACf,EAAE,EAAE,kBAAkB;SACzB;QACD,iBAAiB,EAAE;YACf,EAAE,EAAE,eAAe;YACnB,EAAE,EAAE,iCAAiC;SACxC;QACD,IAAI,EAAe;YACf,EAAE,EAAE,aAAa;YACjB,EAAE,EAAE,8BAA8B;SACrC;KACJ;IACD,kBAAkB,EAAE;QAChB,OAAO,EAAE;YACL,EAAE,EAAE,wBAAwB;YAC5B,EAAE,EAAE,0EAA0E;SACjF;QACD,MAAM,EAAG;YACL,EAAE,EAAE,QAAQ;YACZ,EAAE,EAAE,UAAU;SACjB;KACJ;IACD,YAAY,EAAQ;QAChB,OAAO,EAAE;YACL,OAAO,EAAY;gBACf,EAAE,EAAE,wBAAwB;gBAC5B,EAAE,EAAE,yEAAyE;aAChF;YACD,iBAAiB,EAAE;gBACf,EAAE,EAAE,oCAAoC;gBACxC,EAAE,EAAE,gFAAgF;aACvF;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C,CAAM,EAAE,CAAS,EAAE,EAAE,CAAC,CAAC,CAAC,CAAC,CAAC,EAAE,sBAAc,CAAC,CAAA;QAC/E,OAAO,IAAA,gBAAS,EAAC,OAAO,CAAC,IAAI,IAAA,gBAAS,EAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,EAAE,CAAA;IAC1F,CAAC;CACJ,CAAA;AAED,qEAAqE;AACrE,4CAA4C;AAC5C,6FAA6F;AAC7F,IAAI"}
|
|
@@ -1,66 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.OOpayTemplate = void 0;
|
|
4
|
-
const template_manager_1 = require("../../support/template-manager");
|
|
5
|
-
const environment_1 = require("../../support/environment");
|
|
6
|
-
const widget_store_1 = require("../../support/widget-store");
|
|
7
|
-
const logger_1 = require("../../support/logger");
|
|
8
|
-
// import '../../stylesheets/common.sass'
|
|
9
|
-
class OOpayTemplateManager extends template_manager_1.TemplateManager {
|
|
10
|
-
constructor() {
|
|
11
|
-
super();
|
|
12
|
-
this.$oopayWindowId = '__bootpay-card-easy-window';
|
|
13
|
-
this.$iFrameId = '__bootpay-card-easy-iframe';
|
|
14
|
-
this.$windowId = '__bootpay-card-easy-container-window';
|
|
15
|
-
this.$additionalClass = environment_1.Environment.isMobile() ? '' : 'rounded-iframe';
|
|
16
|
-
this.$template = this.template();
|
|
17
|
-
this.$widgetStore = widget_store_1.WidgetStore;
|
|
18
|
-
}
|
|
19
|
-
template() {
|
|
20
|
-
return `
|
|
21
|
-
<div id="${this.$windowId}" class="bootpay-payment-background">
|
|
22
|
-
<div class="bootpay-payment-window ${environment_1.Environment.isMobile() ? '__mobile' : ''}" id="${this.$oopayWindowId}">
|
|
23
|
-
<iframe class="${this.$additionalClass}" id="${this.$iFrameId}" name="${this.$iFrameId}"></iframe>
|
|
24
|
-
</div>
|
|
25
|
-
</div>
|
|
26
|
-
`;
|
|
27
|
-
}
|
|
28
|
-
createIFrame(url) {
|
|
29
|
-
this.createTemplateHtml();
|
|
30
|
-
const iframe = document.getElementById(this.$iFrameId);
|
|
31
|
-
iframe === null || iframe === void 0 ? void 0 : iframe.setAttribute('src', environment_1.Environment.toWidget(`${url}`));
|
|
32
|
-
iframe === null || iframe === void 0 ? void 0 : iframe.style.setProperty('display', 'block');
|
|
33
|
-
}
|
|
34
|
-
addWallet() {
|
|
35
|
-
this.createIFrame(`wallet/add/${this.$widgetStore.applicationId}`);
|
|
36
|
-
}
|
|
37
|
-
removeWallet(walletId) {
|
|
38
|
-
this.createIFrame(`oopay/destroy/${this.$widgetStore.applicationId}/${walletId}`);
|
|
39
|
-
}
|
|
40
|
-
showCardInterestInformation(data) {
|
|
41
|
-
this.createIFrame(`card/interest/${this.$widgetStore.applicationId}`);
|
|
42
|
-
}
|
|
43
|
-
destroy() {
|
|
44
|
-
document.body.classList.remove('bootpay-open');
|
|
45
|
-
const element = document.getElementById(this.$windowId);
|
|
46
|
-
if (element !== undefined) {
|
|
47
|
-
element.outerHTML = '';
|
|
48
|
-
element.remove();
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
resize(resizeData) {
|
|
52
|
-
logger_1.Logger.debug('resize', resizeData);
|
|
53
|
-
this.templateResize(this.$iFrameId, resizeData);
|
|
54
|
-
}
|
|
55
|
-
postMessage(event, data = undefined) {
|
|
56
|
-
var _a;
|
|
57
|
-
const element = this.byId(this.$iFrameId);
|
|
58
|
-
(_a = element === null || element === void 0 ? void 0 : element.contentWindow) === null || _a === void 0 ? void 0 : _a.postMessage(JSON.stringify({
|
|
59
|
-
bootpay_event: true,
|
|
60
|
-
event: event,
|
|
61
|
-
data: data
|
|
62
|
-
}), '*');
|
|
63
|
-
}
|
|
64
|
-
}
|
|
65
|
-
exports.OOpayTemplate = new OOpayTemplateManager();
|
|
66
|
-
//# sourceMappingURL=oopay.js.map
|
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