react-native-bootpay-api 4.1.55 → 4.3.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 +37 -29
- package/lib/Bootpay.d.ts +3 -1
- package/lib/Bootpay.d.ts.map +1 -1
- package/lib/Bootpay.js +131 -95
- package/lib/BootpayTypes.d.ts +3 -0
- package/lib/BootpayTypes.d.ts.map +1 -1
- package/lib/Loader.d.ts +1 -0
- package/lib/Loader.d.ts.map +1 -0
- package/lib/Loader.js +34 -0
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/package.json +6 -5
- package/react-native-bootpay-api.podspec +1 -1
- package/lib/BootpayModal.d.ts +0 -72
- package/lib/BootpayModal.d.ts.map +0 -1
- package/lib/BootpayModal.js +0 -710
- package/lib/BootpayShared.d.ts +0 -1
- package/lib/BootpayShared.d.ts.map +0 -1
- package/lib/BootpayShared.js +0 -1
package/README.md
CHANGED
|
@@ -35,8 +35,9 @@ react-native-bootpay-api는 내부적으로 아래의 모듈에 의존합니다.
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"react-native-webview-bootpay": last_version,
|
|
38
|
-
"react-native-
|
|
39
|
-
"react-native-
|
|
38
|
+
"react-native-sensitive-info": last_version,
|
|
39
|
+
"react-native-base64": last_version,
|
|
40
|
+
"react-native-device-info": last_version
|
|
40
41
|
},
|
|
41
42
|
```
|
|
42
43
|
|
|
@@ -83,6 +84,7 @@ react-native-bootpay-api는 내부적으로 아래의 모듈에 의존합니다.
|
|
|
83
84
|
## 사용예제
|
|
84
85
|
|
|
85
86
|
```typescript
|
|
87
|
+
|
|
86
88
|
import React, { useRef } from 'react';
|
|
87
89
|
|
|
88
90
|
import {
|
|
@@ -91,8 +93,7 @@ import {
|
|
|
91
93
|
Text,
|
|
92
94
|
TouchableOpacity
|
|
93
95
|
} from 'react-native';
|
|
94
|
-
import {
|
|
95
|
-
// import { WebView } from 'react-native-webview-bootpay';
|
|
96
|
+
import { Bootpay, Extra } from 'react-native-bootpay-api';
|
|
96
97
|
|
|
97
98
|
|
|
98
99
|
export default function App() {
|
|
@@ -103,7 +104,7 @@ export default function App() {
|
|
|
103
104
|
const goBootpayTest = () => {
|
|
104
105
|
const payload = {
|
|
105
106
|
pg: '나이스페이', //['kcp', 'danal', 'inicis', 'nicepay', 'lgup', 'toss', 'payapp', 'easypay', 'jtnet', 'tpay', 'mobilians', 'payletter', 'onestore', 'welcome'] 중 택 1
|
|
106
|
-
method: '
|
|
107
|
+
method: '카드', // ['카드', '휴대폰', '계좌이체', '가상계좌', '카카오페이', '네이버페이', '페이코', '카드자동'] 중 택 1
|
|
107
108
|
order_name: '마스카라', //결제창에 보여질 상품명
|
|
108
109
|
order_id: '1234_1234', //개발사에 관리하는 주문번호
|
|
109
110
|
// subscription_id: '12345_21345', //개발사에 관리하는 주문번호 (정기결제용)
|
|
@@ -141,11 +142,13 @@ export default function App() {
|
|
|
141
142
|
|
|
142
143
|
|
|
143
144
|
//기타 설정
|
|
145
|
+
|
|
144
146
|
const extra = {
|
|
145
147
|
card_quota: "0,2,3", //결제금액이 5만원 이상시 할부개월 허용범위를 설정할 수 있음, [0(일시불), 2개월, 3개월] 허용, 미설정시 12개월까지 허용
|
|
146
148
|
app_scheme: "bootpayrnapi", //ios의 경우 카드사 앱 호출 후 되돌아오기 위한 앱 스키마명
|
|
147
|
-
show_close_button: false, // x 닫기 버튼 삽입 (닫기버튼이 없는 PG사를 위한 옵션)
|
|
148
|
-
}
|
|
149
|
+
show_close_button: false, // x 닫기 버튼 삽입 (닫기버튼이 없는 PG사를 위한 옵션)
|
|
150
|
+
}
|
|
151
|
+
|
|
149
152
|
|
|
150
153
|
if(bootpay != null && bootpay.current != null) bootpay.current.requestPayment(payload, items, user, extra);
|
|
151
154
|
}
|
|
@@ -194,7 +197,7 @@ export default function App() {
|
|
|
194
197
|
//기타 설정
|
|
195
198
|
const extra = {
|
|
196
199
|
card_quota: "0,2,3", //결제금액이 5만원 이상시 할부개월 허용범위를 설정할 수 있음, [0(일시불), 2개월, 3개월] 허용, 미설정시 12개월까지 허용
|
|
197
|
-
app_scheme: "
|
|
200
|
+
app_scheme: "bootpayrnapi2", //ios의 경우 카드사 앱 호출 후 되돌아오기 위한 앱 스키마명
|
|
198
201
|
show_close_button: false, // x 닫기 버튼 삽입 (닫기버튼이 없는 PG사를 위한 옵션)
|
|
199
202
|
}
|
|
200
203
|
|
|
@@ -220,32 +223,35 @@ export default function App() {
|
|
|
220
223
|
//기타 설정
|
|
221
224
|
const extra = {
|
|
222
225
|
app_scheme: "bootpayrnapi", //ios의 경우 카드사 앱 호출 후 되돌아오기 위한 앱 스키마명
|
|
223
|
-
show_close_button:
|
|
226
|
+
show_close_button: true, // x 닫기 버튼 삽입 (닫기버튼이 없는 PG사를 위한 옵션)
|
|
227
|
+
|
|
224
228
|
}
|
|
225
229
|
|
|
230
|
+
// const extra = new Extra();
|
|
231
|
+
|
|
226
232
|
if(bootpay != null && bootpay.current != null) bootpay.current.requestAuthentication(payload, [], {}, extra);
|
|
227
233
|
|
|
228
234
|
}
|
|
229
235
|
|
|
230
236
|
const onCancel = (data: string) => {
|
|
231
|
-
console.log('cancel', data);
|
|
237
|
+
console.log('-- cancel', data);
|
|
232
238
|
}
|
|
233
239
|
|
|
234
240
|
const onError = (data: string) => {
|
|
235
|
-
console.log('error', data);
|
|
241
|
+
console.log('-- error', data);
|
|
236
242
|
}
|
|
237
243
|
|
|
238
244
|
const onIssued = (data: string) => {
|
|
239
|
-
console.log('
|
|
245
|
+
console.log('-- issued', data);
|
|
240
246
|
}
|
|
241
247
|
|
|
242
248
|
const onConfirm = (data: string) => {
|
|
243
|
-
console.log('confirm', data);
|
|
249
|
+
console.log('-- confirm', data);
|
|
244
250
|
if(bootpay != null && bootpay.current != null) bootpay.current.transactionConfirm(data);
|
|
245
251
|
}
|
|
246
252
|
|
|
247
253
|
const onDone = (data: string) => {
|
|
248
|
-
console.log('done', data);
|
|
254
|
+
console.log('-- done', data);
|
|
249
255
|
}
|
|
250
256
|
|
|
251
257
|
const onClose = () => {
|
|
@@ -264,19 +270,21 @@ export default function App() {
|
|
|
264
270
|
>
|
|
265
271
|
<Text>일반결제 결제테스트</Text>
|
|
266
272
|
</TouchableOpacity>
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
273
|
+
|
|
274
|
+
<Bootpay
|
|
275
|
+
ref={bootpay}
|
|
276
|
+
ios_application_id={'5b8f6a4d396fa665fdc2b5e9'}
|
|
277
|
+
android_application_id={'5b8f6a4d396fa665fdc2b5e8'}
|
|
278
|
+
// ios_application_id={'5b9f51264457636ab9a07cdd'}
|
|
279
|
+
// android_application_id={'5b9f51264457636ab9a07cdc'}
|
|
280
|
+
onCancel={onCancel}
|
|
281
|
+
onError={onError}
|
|
282
|
+
onIssued={onIssued}
|
|
283
|
+
onConfirm={onConfirm}
|
|
284
|
+
onDone={onDone}
|
|
285
|
+
onClose={onClose}
|
|
286
|
+
|
|
287
|
+
/>
|
|
280
288
|
<TouchableOpacity
|
|
281
289
|
style={styles.button}
|
|
282
290
|
onPress={goBootpaySubscriptionTest}
|
|
@@ -308,14 +316,14 @@ const styles = StyleSheet.create({
|
|
|
308
316
|
padding: 10,
|
|
309
317
|
margin: 10,
|
|
310
318
|
},
|
|
311
|
-
});
|
|
319
|
+
});
|
|
312
320
|
|
|
313
321
|
```
|
|
314
322
|
|
|
315
323
|
|
|
316
324
|
## Documentation
|
|
317
325
|
|
|
318
|
-
[부트페이 개발매뉴얼](https://bootpay.
|
|
326
|
+
[부트페이 개발매뉴얼](https://docs.bootpay.co.kr/?front=react-native&backend=nodejs)을 참조해주세요
|
|
319
327
|
|
|
320
328
|
## 기술문의
|
|
321
329
|
|
package/lib/Bootpay.d.ts
CHANGED
|
@@ -10,12 +10,14 @@ export declare class Bootpay extends Component<BootpayTypesProps> {
|
|
|
10
10
|
script: string;
|
|
11
11
|
firstLoad: boolean;
|
|
12
12
|
showCloseButton: boolean;
|
|
13
|
+
isShowProgress: boolean;
|
|
13
14
|
};
|
|
14
15
|
_VERSION: string;
|
|
15
16
|
_DEBUG: boolean;
|
|
16
17
|
dismiss: () => void;
|
|
18
|
+
showProgressBar: (isShow: boolean) => void;
|
|
17
19
|
closeDismiss: () => void;
|
|
18
|
-
onMessage: (event: WebViewMessageEvent) => void
|
|
20
|
+
onMessage: (event: WebViewMessageEvent) => Promise<void>;
|
|
19
21
|
onShouldStartLoadWithRequest: (_: string) => boolean;
|
|
20
22
|
getSDKVersion: () => string;
|
|
21
23
|
getEnvironmentMode: () => "" | "Bootpay.setEnvironmentMode('development');";
|
package/lib/Bootpay.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Bootpay.d.ts","sourceRoot":"","sources":["../src/Bootpay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzC,OAAO,OAAO,EAAE,EAAC,mBAAmB,EAAC,MAAO,8BAA8B,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;
|
|
1
|
+
{"version":3,"file":"Bootpay.d.ts","sourceRoot":"","sources":["../src/Bootpay.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIzC,OAAO,OAAO,EAAE,EAAC,mBAAmB,EAAC,MAAO,8BAA8B,CAAC;AAC3E,OAAO,EAAE,iBAAiB,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAC;AAQ/E,qBAAa,OAAQ,SAAQ,SAAS,CAAC,iBAAiB,CAAC;IAGrD,OAAO,EAAE,KAAK,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;gBAEtB,KAAK,EAAE,iBAAiB;IAMpC,OAAO,CAAC,EAAE,OAAO,CAAA;IAEjB,KAAK;;;;;;MAMJ;IAED,QAAQ,SAAU;IAClB,MAAM,UAAS;IAGf,OAAO,aAMN;IAGD,eAAe,WAAY,OAAO,UAMjC;IAGD,YAAY,aAGX;IAGD,SAAS,gDAoGR;IAED,4BAA4B,MAAQ,MAAM,aAEzC;IAED,aAAa,eAUZ;IAED,kBAAkB,0DAMjB;IAED,kBAAkB,2EAQjB;IAWD,kBAAkB,aAajB;IAED,mBAAmB,aAKlB;IAED,cAAc,WAAY,MAAM,UAM/B;IAED,gBAAgB,wBASf;IAED,OAAO,eAEN;IAED,IAAI,eAEH;IAED,MAAM,eAEL;IAED,KAAK,eAEJ;IAED,MAAM,eAEL;IAED,KAAK,eAEJ;IAIK,oBAAoB;IAY1B,iBAAiB;IAIjB,MAAM;IA+DN,cAAc,YAAmB,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,IAAI,SAAS,KAAK,mBAGhF;IAED,mBAAmB,YAAmB,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,IAAI,SAAS,KAAK,mBAErF;IAED,qBAAqB,YAAmB,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,IAAI,SAAS,KAAK,mBAEvF;IAED,cAAc,YAAmB,OAAO,SAAS,CAAC,IAAI,CAAC,QAAQ,IAAI,SAAS,KAAK,iBAAiB,MAAM,mBA4BvG;IAGD,kBAAkB,wBAQjB;IAGD,cAAc,YAAY,OAAO,iBAAiB,MAAM,YAavD;CAEJ"}
|
package/lib/Bootpay.js
CHANGED
|
@@ -57,6 +57,9 @@ import WebView from 'react-native-webview-bootpay';
|
|
|
57
57
|
import { Extra, User } from './BootpayTypes';
|
|
58
58
|
import { debounce } from 'lodash';
|
|
59
59
|
import UserInfo from './UserInfo';
|
|
60
|
+
// import Loader from './Loader'
|
|
61
|
+
// import ClipLoader from "react-spinners/ClipLoader";
|
|
62
|
+
// import Spinner from 'react-native-loading-spinner-overlay';
|
|
60
63
|
var Bootpay = /** @class */ (function (_super) {
|
|
61
64
|
__extends(Bootpay, _super);
|
|
62
65
|
function Bootpay(props) {
|
|
@@ -65,111 +68,133 @@ var Bootpay = /** @class */ (function (_super) {
|
|
|
65
68
|
visibility: false,
|
|
66
69
|
script: '',
|
|
67
70
|
firstLoad: false,
|
|
68
|
-
showCloseButton: false
|
|
71
|
+
showCloseButton: false,
|
|
72
|
+
isShowProgress: false
|
|
69
73
|
};
|
|
70
74
|
// _payload = {}
|
|
71
|
-
_this._VERSION = "4.1
|
|
75
|
+
_this._VERSION = "4.3.1";
|
|
72
76
|
_this._DEBUG = false;
|
|
73
77
|
_this.dismiss = function () {
|
|
74
78
|
_this.setState({
|
|
75
79
|
visibility: false
|
|
76
80
|
});
|
|
77
81
|
};
|
|
82
|
+
_this.showProgressBar = function (isShow) {
|
|
83
|
+
_this.setState({
|
|
84
|
+
isShowProgress: isShow
|
|
85
|
+
});
|
|
86
|
+
};
|
|
78
87
|
_this.closeDismiss = function () {
|
|
79
88
|
if (_this.props.onClose != undefined)
|
|
80
89
|
_this.props.onClose();
|
|
81
90
|
_this.dismiss();
|
|
82
91
|
};
|
|
83
|
-
_this.onMessage = function (event) {
|
|
92
|
+
_this.onMessage = function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
93
|
+
var res, data, redirect, show_success, show_error;
|
|
84
94
|
var _a, _b, _c, _d;
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
// console.log(`redirect: ${JSON.stringify(data)}`);
|
|
94
|
-
var redirect = false;
|
|
95
|
-
var show_success = false;
|
|
96
|
-
var show_error = false;
|
|
97
|
-
if (((_a = _this.payload) === null || _a === void 0 ? void 0 : _a.extra) != undefined) {
|
|
98
|
-
if (((_b = _this.payload.extra) === null || _b === void 0 ? void 0 : _b.open_type) == 'redirect') {
|
|
99
|
-
redirect = true;
|
|
100
|
-
}
|
|
101
|
-
if (((_c = _this.payload.extra) === null || _c === void 0 ? void 0 : _c.display_error_result) == true) {
|
|
102
|
-
show_error = true;
|
|
95
|
+
return __generator(this, function (_e) {
|
|
96
|
+
if (event == undefined)
|
|
97
|
+
return [2 /*return*/];
|
|
98
|
+
res = JSON.parse(JSON.stringify(event.nativeEvent.data));
|
|
99
|
+
if (res == 'close') {
|
|
100
|
+
this.showProgressBar(false);
|
|
101
|
+
this.closeDismiss();
|
|
102
|
+
return [2 /*return*/];
|
|
103
103
|
}
|
|
104
|
-
|
|
105
|
-
|
|
104
|
+
data = JSON.parse(res);
|
|
105
|
+
redirect = false;
|
|
106
|
+
show_success = false;
|
|
107
|
+
show_error = false;
|
|
108
|
+
if (((_a = this.payload) === null || _a === void 0 ? void 0 : _a.extra) != undefined) {
|
|
109
|
+
if (((_b = this.payload.extra) === null || _b === void 0 ? void 0 : _b.open_type) == 'redirect') {
|
|
110
|
+
redirect = true;
|
|
111
|
+
}
|
|
112
|
+
if (((_c = this.payload.extra) === null || _c === void 0 ? void 0 : _c.display_error_result) == true) {
|
|
113
|
+
show_error = true;
|
|
114
|
+
}
|
|
115
|
+
if (((_d = this.payload.extra) === null || _d === void 0 ? void 0 : _d.display_success_result) == true) {
|
|
116
|
+
show_success = true;
|
|
117
|
+
}
|
|
106
118
|
}
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
119
|
+
if (redirect === true) {
|
|
120
|
+
switch (data.event) {
|
|
121
|
+
case 'cancel':
|
|
122
|
+
this.showProgressBar(false);
|
|
123
|
+
if (this.props.onCancel != undefined)
|
|
124
|
+
this.props.onCancel(data);
|
|
125
|
+
this.closeDismiss();
|
|
126
|
+
break;
|
|
127
|
+
case 'error':
|
|
128
|
+
this.showProgressBar(false);
|
|
129
|
+
if (this.props.onError != undefined)
|
|
130
|
+
this.props.onError(data);
|
|
131
|
+
if (show_error == false) {
|
|
132
|
+
this.closeDismiss();
|
|
133
|
+
}
|
|
134
|
+
break;
|
|
135
|
+
case 'issued':
|
|
136
|
+
this.showProgressBar(false);
|
|
137
|
+
if (this.props.onIssued != undefined)
|
|
138
|
+
this.props.onIssued(data);
|
|
139
|
+
if (show_success == false) {
|
|
140
|
+
this.closeDismiss();
|
|
141
|
+
}
|
|
142
|
+
break;
|
|
143
|
+
case 'confirm':
|
|
144
|
+
this.showProgressBar(true);
|
|
145
|
+
if (this.props.onConfirm != undefined)
|
|
146
|
+
this.props.onConfirm(data);
|
|
147
|
+
break;
|
|
148
|
+
case 'done':
|
|
149
|
+
this.showProgressBar(false);
|
|
150
|
+
if (this.props.onDone != undefined)
|
|
151
|
+
this.props.onDone(data);
|
|
152
|
+
if (show_success == false) {
|
|
153
|
+
this.closeDismiss();
|
|
154
|
+
}
|
|
155
|
+
break;
|
|
156
|
+
case 'close':
|
|
157
|
+
this.showProgressBar(false);
|
|
158
|
+
this.closeDismiss();
|
|
159
|
+
break;
|
|
160
|
+
}
|
|
143
161
|
}
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
162
|
+
else {
|
|
163
|
+
switch (data.event) {
|
|
164
|
+
case 'cancel':
|
|
165
|
+
this.showProgressBar(false);
|
|
166
|
+
if (this.props.onCancel != undefined)
|
|
167
|
+
this.props.onCancel(data);
|
|
168
|
+
break;
|
|
169
|
+
case 'error':
|
|
170
|
+
this.showProgressBar(false);
|
|
171
|
+
if (this.props.onError != undefined)
|
|
172
|
+
this.props.onError(data);
|
|
173
|
+
break;
|
|
174
|
+
case 'issued':
|
|
175
|
+
this.showProgressBar(false);
|
|
176
|
+
if (this.props.onIssued != undefined)
|
|
177
|
+
this.props.onIssued(data);
|
|
178
|
+
break;
|
|
179
|
+
case 'confirm':
|
|
180
|
+
this.showProgressBar(true);
|
|
181
|
+
if (this.props.onConfirm != undefined)
|
|
182
|
+
this.props.onConfirm(data);
|
|
183
|
+
break;
|
|
184
|
+
case 'done':
|
|
185
|
+
this.showProgressBar(false);
|
|
186
|
+
if (this.props.onDone != undefined)
|
|
187
|
+
this.props.onDone(data);
|
|
188
|
+
break;
|
|
189
|
+
case 'close':
|
|
190
|
+
this.showProgressBar(false);
|
|
191
|
+
this.closeDismiss();
|
|
192
|
+
break;
|
|
193
|
+
}
|
|
170
194
|
}
|
|
171
|
-
|
|
172
|
-
|
|
195
|
+
return [2 /*return*/];
|
|
196
|
+
});
|
|
197
|
+
}); };
|
|
173
198
|
_this.onShouldStartLoadWithRequest = function (_) {
|
|
174
199
|
return true;
|
|
175
200
|
};
|
|
@@ -208,9 +233,9 @@ var Bootpay = /** @class */ (function (_super) {
|
|
|
208
233
|
// this.injectJavaScript(fullScript);
|
|
209
234
|
// if(this.state.showCloseButton == true) {
|
|
210
235
|
// if(this.webView == null || this.webView == undefined) return;
|
|
211
|
-
// this.webView.showCloseButton();
|
|
236
|
+
// this.webView.showCloseButton( );
|
|
212
237
|
// }
|
|
213
|
-
//
|
|
238
|
+
// }
|
|
214
239
|
_this.transactionConfirm = function () {
|
|
215
240
|
var script = "Bootpay.confirm()"
|
|
216
241
|
+
|
|
@@ -295,8 +320,9 @@ var Bootpay = /** @class */ (function (_super) {
|
|
|
295
320
|
case 0:
|
|
296
321
|
payload.application_id = Platform.OS == 'ios' ? this.props.ios_application_id : this.props.android_application_id;
|
|
297
322
|
payload.items = items;
|
|
298
|
-
payload.user = user
|
|
299
|
-
payload.
|
|
323
|
+
payload.user = user;
|
|
324
|
+
payload.user = Object.assign(new User(), user); //set default value from class optional parameter value
|
|
325
|
+
payload.extra = Object.assign(new Extra(), extra); //set default value from class optional parameter value
|
|
300
326
|
this.payload = payload;
|
|
301
327
|
_a = this.setState;
|
|
302
328
|
_c = {
|
|
@@ -308,6 +334,7 @@ var Bootpay = /** @class */ (function (_super) {
|
|
|
308
334
|
_a.apply(this, [(_c.script = _b.apply("\n ", [_d.sent(), " \n "]).concat(this.generateScript(payload, requestMethod), "\n "),
|
|
309
335
|
_c.firstLoad = false,
|
|
310
336
|
_c.showCloseButton = extra.show_close_button || false,
|
|
337
|
+
_c.spinner = false,
|
|
311
338
|
_c)]);
|
|
312
339
|
UserInfo.updateInfo();
|
|
313
340
|
return [2 /*return*/];
|
|
@@ -363,7 +390,7 @@ var Bootpay = /** @class */ (function (_super) {
|
|
|
363
390
|
_this.closeDismiss();
|
|
364
391
|
// console.log(1234);
|
|
365
392
|
// this.dismiss();
|
|
366
|
-
}} visible={this.state.visibility}>
|
|
393
|
+
}} visible={this.state.visibility}>
|
|
367
394
|
<SafeAreaView style={{ flex: 1 }}>
|
|
368
395
|
{this.state.showCloseButton &&
|
|
369
396
|
<TouchableOpacity onPress={function () {
|
|
@@ -376,15 +403,24 @@ var Bootpay = /** @class */ (function (_super) {
|
|
|
376
403
|
if (_this.props.onClose != undefined)
|
|
377
404
|
_this.props.onClose();
|
|
378
405
|
_this.setState({ visibility: false });
|
|
379
|
-
|
|
406
|
+
// this.showProgressBar(true);
|
|
407
|
+
}}>
|
|
380
408
|
<Image style={[styles.overlay]} source={require('../images/close.png')}/>
|
|
381
409
|
</TouchableOpacity>}
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
416
|
+
|
|
382
417
|
<WebView ref={this.webView} originWhitelist={['*']} source={{
|
|
383
|
-
uri: 'https://webview.bootpay.co.kr/4.
|
|
418
|
+
uri: 'https://webview.bootpay.co.kr/4.2.7'
|
|
384
419
|
}} injectedJavaScript={this.state.script} javaScriptEnabled={true} javaScriptCanOpenWindowsAutomatically={true}
|
|
385
420
|
// scalesPageToFit={true}
|
|
386
421
|
onMessage={this.onMessage}/>
|
|
387
|
-
</SafeAreaView>
|
|
422
|
+
</SafeAreaView>
|
|
423
|
+
|
|
388
424
|
|
|
389
425
|
</Modal>);
|
|
390
426
|
};
|
package/lib/BootpayTypes.d.ts
CHANGED
|
@@ -9,6 +9,9 @@ export interface BootpayTypesProps extends ViewProps {
|
|
|
9
9
|
onDone?: (data: Object) => void;
|
|
10
10
|
onClose?: () => void;
|
|
11
11
|
}
|
|
12
|
+
export interface LoadingTypesProps extends ViewProps {
|
|
13
|
+
loading?: boolean;
|
|
14
|
+
}
|
|
12
15
|
export declare class User {
|
|
13
16
|
constructor();
|
|
14
17
|
id?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BootpayTypes.d.ts","sourceRoot":"","sources":["../src/BootpayTypes.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACV,MAAM,cAAc,CAAA;AAErB,MAAM,WAAW,iBAAkB,SAAQ,SAAS;IAChD,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,K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I,CAAC,CAAA;CACjB"}
|
package/lib/Loader.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
//# sourceMappingURL=Loader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Loader.d.ts","sourceRoot":"","sources":["../src/Loader.tsx"],"names":[],"mappings":""}
|
package/lib/Loader.js
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
// import React from 'react'
|
|
3
|
+
// import ClipLoader from "react-spinners/ClipLoader";
|
|
4
|
+
// import { LoadingTypesProps } from './BootpayTypes';
|
|
5
|
+
// const override: React.CSSProperties = {
|
|
6
|
+
// display: "block",
|
|
7
|
+
// margin: "0 auto",
|
|
8
|
+
// borderColor: "red",
|
|
9
|
+
// };
|
|
10
|
+
// class Loader extends React.Component<LoadingTypesProps> {
|
|
11
|
+
// constructor(props: LoadingTypesProps) {
|
|
12
|
+
// super(props);
|
|
13
|
+
// }
|
|
14
|
+
// state = {
|
|
15
|
+
// loading: true,
|
|
16
|
+
// }
|
|
17
|
+
// render() {
|
|
18
|
+
// return (
|
|
19
|
+
// <div className="sweet-loading">
|
|
20
|
+
// <ClipLoader
|
|
21
|
+
// cssOverride={override}
|
|
22
|
+
// size={150}
|
|
23
|
+
// color={"#123abc"}
|
|
24
|
+
// loading={this.state.loading}
|
|
25
|
+
// speedMultiplier={1.5}
|
|
26
|
+
// />
|
|
27
|
+
// <span>
|
|
28
|
+
// ddd
|
|
29
|
+
// </span>
|
|
30
|
+
// </div>
|
|
31
|
+
// );
|
|
32
|
+
// }
|
|
33
|
+
// }
|
|
34
|
+
// export default Loader;
|
package/lib/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAA;AACnC,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,gBAAgB,CAAA;AAK3D,OAAO,EAAG,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC"}
|
package/lib/index.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Bootpay } from './Bootpay';
|
|
2
2
|
import { Payload, Extra, Item, User } from './BootpayTypes';
|
|
3
3
|
// import { userTrace, pageTrace } from './BootpayAnalytics'
|
|
4
|
+
// import { WebView } from 'react-native-bootpay-api';
|
|
4
5
|
export { Bootpay, Payload, Extra, Item, User };
|
|
5
6
|
// export { BootpayModal, userTrace, pageTrace };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-bootpay-api",
|
|
3
|
-
"version": "4.1
|
|
3
|
+
"version": "4.3.1",
|
|
4
4
|
"description": "React Native를 위한 bootpay 라이브러리 입니다.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"main-internal": "src/index.ts",
|
|
@@ -31,7 +31,8 @@
|
|
|
31
31
|
},
|
|
32
32
|
"peerDependencies": {
|
|
33
33
|
"react": "*",
|
|
34
|
-
"react-native": "*"
|
|
34
|
+
"react-native": "*",
|
|
35
|
+
"react-native-webview-bootpay": "11.x"
|
|
35
36
|
},
|
|
36
37
|
"dependencies": {
|
|
37
38
|
"escape-string-regexp": "2.0.0",
|
|
@@ -61,7 +62,7 @@
|
|
|
61
62
|
"metro-react-native-babel-preset": "^0.67.0",
|
|
62
63
|
"react": "17.0.2",
|
|
63
64
|
"react-dom": "17.0.2",
|
|
64
|
-
"react-native": "0.68.
|
|
65
|
+
"react-native": "0.68.5",
|
|
65
66
|
"react-native-macos": "0.66.57",
|
|
66
67
|
"react-native-test-app": "1.3.8",
|
|
67
68
|
"react-native-windows": "0.68.4",
|
|
@@ -70,10 +71,10 @@
|
|
|
70
71
|
"semantic-release": "15.13.24",
|
|
71
72
|
"typescript": "^4.0.0",
|
|
72
73
|
"winappdriver": "^0.0.7",
|
|
73
|
-
"react-native-webview-bootpay": "
|
|
74
|
+
"react-native-webview-bootpay": "11.26.18",
|
|
74
75
|
"react-native-device-info": "^8.7.0",
|
|
75
76
|
"react-native-sensitive-info": "^5.5.8",
|
|
76
|
-
"react-native-base64": "^0.2.1",
|
|
77
|
+
"react-native-base64": "^0.2.1",
|
|
77
78
|
"react-native-aes-crypto": "^2.1.0",
|
|
78
79
|
"@types/lodash": "^4.14.182"
|
|
79
80
|
},
|