react-native-bootpay-api 4.1.54 → 4.2.6
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 +8 -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/package.json +2 -2
- package/react-native-bootpay-api.podspec +1 -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,UAQjC;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
|
@@ -54,8 +54,12 @@ import { SafeAreaView, Modal, TouchableOpacity, Image, StyleSheet, Platform } fr
|
|
|
54
54
|
// import { StyleSheet, Platform } from 'react-native';
|
|
55
55
|
// import { Platform, StyleSheet, Dimensions } from 'react-native';
|
|
56
56
|
import WebView from 'react-native-webview-bootpay';
|
|
57
|
+
import { Extra, User } from './BootpayTypes';
|
|
57
58
|
import { debounce } from 'lodash';
|
|
58
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';
|
|
59
63
|
var Bootpay = /** @class */ (function (_super) {
|
|
60
64
|
__extends(Bootpay, _super);
|
|
61
65
|
function Bootpay(props) {
|
|
@@ -64,7 +68,8 @@ var Bootpay = /** @class */ (function (_super) {
|
|
|
64
68
|
visibility: false,
|
|
65
69
|
script: '',
|
|
66
70
|
firstLoad: false,
|
|
67
|
-
showCloseButton: false
|
|
71
|
+
showCloseButton: false,
|
|
72
|
+
isShowProgress: false
|
|
68
73
|
};
|
|
69
74
|
// _payload = {}
|
|
70
75
|
_this._VERSION = "4.1.5";
|
|
@@ -74,101 +79,121 @@ var Bootpay = /** @class */ (function (_super) {
|
|
|
74
79
|
visibility: false
|
|
75
80
|
});
|
|
76
81
|
};
|
|
82
|
+
_this.showProgressBar = function (isShow) {
|
|
83
|
+
_this.setState({
|
|
84
|
+
isShowProgress: isShow
|
|
85
|
+
});
|
|
86
|
+
};
|
|
77
87
|
_this.closeDismiss = function () {
|
|
78
|
-
if
|
|
79
|
-
_this.props.onClose();
|
|
88
|
+
// if(this.props.onClose != undefined) this.props.onClose();
|
|
80
89
|
_this.dismiss();
|
|
81
90
|
};
|
|
82
|
-
_this.onMessage = function (event) {
|
|
91
|
+
_this.onMessage = function (event) { return __awaiter(_this, void 0, void 0, function () {
|
|
92
|
+
var res, data, redirect, show_success, show_error;
|
|
83
93
|
var _a, _b, _c, _d;
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
// console.log(`redirect: ${JSON.stringify(data)}`);
|
|
93
|
-
var redirect = false;
|
|
94
|
-
var show_success = false;
|
|
95
|
-
var show_error = false;
|
|
96
|
-
if (((_a = _this.payload) === null || _a === void 0 ? void 0 : _a.extra) != undefined) {
|
|
97
|
-
if (((_b = _this.payload.extra) === null || _b === void 0 ? void 0 : _b.open_type) == 'redirect') {
|
|
98
|
-
redirect = true;
|
|
99
|
-
}
|
|
100
|
-
if (((_c = _this.payload.extra) === null || _c === void 0 ? void 0 : _c.display_error_result) == true) {
|
|
101
|
-
show_error = true;
|
|
94
|
+
return __generator(this, function (_e) {
|
|
95
|
+
if (event == undefined)
|
|
96
|
+
return [2 /*return*/];
|
|
97
|
+
res = JSON.parse(JSON.stringify(event.nativeEvent.data));
|
|
98
|
+
if (res == 'close') {
|
|
99
|
+
this.showProgressBar(false);
|
|
100
|
+
this.closeDismiss();
|
|
101
|
+
return [2 /*return*/];
|
|
102
102
|
}
|
|
103
|
-
|
|
104
|
-
|
|
103
|
+
data = JSON.parse(res);
|
|
104
|
+
redirect = false;
|
|
105
|
+
show_success = false;
|
|
106
|
+
show_error = false;
|
|
107
|
+
if (((_a = this.payload) === null || _a === void 0 ? void 0 : _a.extra) != undefined) {
|
|
108
|
+
if (((_b = this.payload.extra) === null || _b === void 0 ? void 0 : _b.open_type) == 'redirect') {
|
|
109
|
+
redirect = true;
|
|
110
|
+
}
|
|
111
|
+
if (((_c = this.payload.extra) === null || _c === void 0 ? void 0 : _c.display_error_result) == true) {
|
|
112
|
+
show_error = true;
|
|
113
|
+
}
|
|
114
|
+
if (((_d = this.payload.extra) === null || _d === void 0 ? void 0 : _d.display_success_result) == true) {
|
|
115
|
+
show_success = true;
|
|
116
|
+
}
|
|
105
117
|
}
|
|
106
|
-
|
|
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
|
-
|
|
118
|
+
if (redirect === true) {
|
|
119
|
+
switch (data.event) {
|
|
120
|
+
case 'cancel':
|
|
121
|
+
this.showProgressBar(false);
|
|
122
|
+
if (this.props.onCancel != undefined)
|
|
123
|
+
this.props.onCancel(data);
|
|
124
|
+
this.closeDismiss();
|
|
125
|
+
break;
|
|
126
|
+
case 'error':
|
|
127
|
+
this.showProgressBar(false);
|
|
128
|
+
if (this.props.onError != undefined)
|
|
129
|
+
this.props.onError(data);
|
|
130
|
+
if (show_error == false) {
|
|
131
|
+
this.closeDismiss();
|
|
132
|
+
}
|
|
133
|
+
break;
|
|
134
|
+
case 'issued':
|
|
135
|
+
this.showProgressBar(false);
|
|
136
|
+
if (this.props.onIssued != undefined)
|
|
137
|
+
this.props.onIssued(data);
|
|
138
|
+
if (show_success == false) {
|
|
139
|
+
this.closeDismiss();
|
|
140
|
+
}
|
|
141
|
+
break;
|
|
142
|
+
case 'confirm':
|
|
143
|
+
this.showProgressBar(true);
|
|
144
|
+
if (this.props.onConfirm != undefined)
|
|
145
|
+
this.props.onConfirm(data);
|
|
146
|
+
break;
|
|
147
|
+
case 'done':
|
|
148
|
+
this.showProgressBar(false);
|
|
149
|
+
if (this.props.onDone != undefined)
|
|
150
|
+
this.props.onDone(data);
|
|
151
|
+
if (show_success == false) {
|
|
152
|
+
this.closeDismiss();
|
|
153
|
+
}
|
|
154
|
+
break;
|
|
155
|
+
case 'close':
|
|
156
|
+
this.showProgressBar(false);
|
|
157
|
+
this.closeDismiss();
|
|
158
|
+
break;
|
|
159
|
+
}
|
|
142
160
|
}
|
|
143
|
-
|
|
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
|
-
|
|
161
|
+
else {
|
|
162
|
+
switch (data.event) {
|
|
163
|
+
case 'cancel':
|
|
164
|
+
this.showProgressBar(false);
|
|
165
|
+
if (this.props.onCancel != undefined)
|
|
166
|
+
this.props.onCancel(data);
|
|
167
|
+
break;
|
|
168
|
+
case 'error':
|
|
169
|
+
this.showProgressBar(false);
|
|
170
|
+
if (this.props.onError != undefined)
|
|
171
|
+
this.props.onError(data);
|
|
172
|
+
break;
|
|
173
|
+
case 'issued':
|
|
174
|
+
this.showProgressBar(false);
|
|
175
|
+
if (this.props.onIssued != undefined)
|
|
176
|
+
this.props.onIssued(data);
|
|
177
|
+
break;
|
|
178
|
+
case 'confirm':
|
|
179
|
+
this.showProgressBar(true);
|
|
180
|
+
if (this.props.onConfirm != undefined)
|
|
181
|
+
this.props.onConfirm(data);
|
|
182
|
+
break;
|
|
183
|
+
case 'done':
|
|
184
|
+
this.showProgressBar(false);
|
|
185
|
+
if (this.props.onDone != undefined)
|
|
186
|
+
this.props.onDone(data);
|
|
187
|
+
break;
|
|
188
|
+
case 'close':
|
|
189
|
+
this.showProgressBar(false);
|
|
190
|
+
this.closeDismiss();
|
|
191
|
+
break;
|
|
192
|
+
}
|
|
169
193
|
}
|
|
170
|
-
|
|
171
|
-
|
|
194
|
+
return [2 /*return*/];
|
|
195
|
+
});
|
|
196
|
+
}); };
|
|
172
197
|
_this.onShouldStartLoadWithRequest = function (_) {
|
|
173
198
|
return true;
|
|
174
199
|
};
|
|
@@ -207,9 +232,9 @@ var Bootpay = /** @class */ (function (_super) {
|
|
|
207
232
|
// this.injectJavaScript(fullScript);
|
|
208
233
|
// if(this.state.showCloseButton == true) {
|
|
209
234
|
// if(this.webView == null || this.webView == undefined) return;
|
|
210
|
-
// this.webView.showCloseButton();
|
|
235
|
+
// this.webView.showCloseButton( );
|
|
211
236
|
// }
|
|
212
|
-
//
|
|
237
|
+
// }
|
|
213
238
|
_this.transactionConfirm = function () {
|
|
214
239
|
var script = "Bootpay.confirm()"
|
|
215
240
|
+
|
|
@@ -295,7 +320,8 @@ var Bootpay = /** @class */ (function (_super) {
|
|
|
295
320
|
payload.application_id = Platform.OS == 'ios' ? this.props.ios_application_id : this.props.android_application_id;
|
|
296
321
|
payload.items = items;
|
|
297
322
|
payload.user = user;
|
|
298
|
-
payload.
|
|
323
|
+
payload.user = Object.assign(new User(), user); //set default value from class optional parameter value
|
|
324
|
+
payload.extra = Object.assign(new Extra(), extra); //set default value from class optional parameter value
|
|
299
325
|
this.payload = payload;
|
|
300
326
|
_a = this.setState;
|
|
301
327
|
_c = {
|
|
@@ -307,6 +333,7 @@ var Bootpay = /** @class */ (function (_super) {
|
|
|
307
333
|
_a.apply(this, [(_c.script = _b.apply("\n ", [_d.sent(), " \n "]).concat(this.generateScript(payload, requestMethod), "\n "),
|
|
308
334
|
_c.firstLoad = false,
|
|
309
335
|
_c.showCloseButton = extra.show_close_button || false,
|
|
336
|
+
_c.spinner = false,
|
|
310
337
|
_c)]);
|
|
311
338
|
UserInfo.updateInfo();
|
|
312
339
|
return [2 /*return*/];
|
|
@@ -362,7 +389,7 @@ var Bootpay = /** @class */ (function (_super) {
|
|
|
362
389
|
_this.closeDismiss();
|
|
363
390
|
// console.log(1234);
|
|
364
391
|
// this.dismiss();
|
|
365
|
-
}} visible={this.state.visibility}>
|
|
392
|
+
}} visible={this.state.visibility}>
|
|
366
393
|
<SafeAreaView style={{ flex: 1 }}>
|
|
367
394
|
{this.state.showCloseButton &&
|
|
368
395
|
<TouchableOpacity onPress={function () {
|
|
@@ -375,15 +402,24 @@ var Bootpay = /** @class */ (function (_super) {
|
|
|
375
402
|
if (_this.props.onClose != undefined)
|
|
376
403
|
_this.props.onClose();
|
|
377
404
|
_this.setState({ visibility: false });
|
|
378
|
-
|
|
405
|
+
// this.showProgressBar(true);
|
|
406
|
+
}}>
|
|
379
407
|
<Image style={[styles.overlay]} source={require('../images/close.png')}/>
|
|
380
408
|
</TouchableOpacity>}
|
|
409
|
+
|
|
410
|
+
|
|
411
|
+
|
|
412
|
+
|
|
413
|
+
|
|
414
|
+
|
|
415
|
+
|
|
381
416
|
<WebView ref={this.webView} originWhitelist={['*']} source={{
|
|
382
|
-
uri: 'https://webview.bootpay.co.kr/4.
|
|
417
|
+
uri: 'https://webview.bootpay.co.kr/4.2.6'
|
|
383
418
|
}} injectedJavaScript={this.state.script} javaScriptEnabled={true} javaScriptCanOpenWindowsAutomatically={true}
|
|
384
419
|
// scalesPageToFit={true}
|
|
385
420
|
onMessage={this.onMessage}/>
|
|
386
|
-
</SafeAreaView>
|
|
421
|
+
</SafeAreaView>
|
|
422
|
+
|
|
387
423
|
|
|
388
424
|
</Modal>);
|
|
389
425
|
};
|
package/lib/BootpayTypes.d.ts
CHANGED
|
@@ -9,7 +9,11 @@ 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 {
|
|
16
|
+
constructor();
|
|
13
17
|
id?: string;
|
|
14
18
|
username?: string;
|
|
15
19
|
email?: string;
|
|
@@ -20,6 +24,7 @@ export declare class User {
|
|
|
20
24
|
addr?: string;
|
|
21
25
|
}
|
|
22
26
|
export declare class Item {
|
|
27
|
+
constructor();
|
|
23
28
|
name?: string;
|
|
24
29
|
qty?: number;
|
|
25
30
|
id?: string;
|
|
@@ -29,6 +34,7 @@ export declare class Item {
|
|
|
29
34
|
cat3?: string;
|
|
30
35
|
}
|
|
31
36
|
export declare class StatItem {
|
|
37
|
+
constructor();
|
|
32
38
|
item_name?: string;
|
|
33
39
|
item_img?: string;
|
|
34
40
|
unique?: string;
|
|
@@ -38,11 +44,13 @@ export declare class StatItem {
|
|
|
38
44
|
cat3?: string;
|
|
39
45
|
}
|
|
40
46
|
export declare class Onestore {
|
|
47
|
+
constructor();
|
|
41
48
|
ad_id?: string;
|
|
42
49
|
sim_operator?: string;
|
|
43
50
|
installer_package_name?: string;
|
|
44
51
|
}
|
|
45
52
|
export declare class Extra {
|
|
53
|
+
constructor();
|
|
46
54
|
card_quota?: string;
|
|
47
55
|
seller_name?: string;
|
|
48
56
|
delivery_day?: number;
|
|
@@ -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,KAAK,IAAI,CAAA;IACjC,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAChC,QAAQ,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IACjC,SAAS,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAA;IACrC,MAAM,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/B,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;CACvB;AAED,qBAAa,IAAI
|
|
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,KAAK,IA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AqB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAA;IAChC,oBAAoB,CAAC,EAAE,CAAC,MAAM,CAAC,CAAA;IAC/B,qBAAqB,CAAC,EAAE,MAAM,CAAI;IAClC,iBAAiB,EAAE,OAAO,CAAQ;CACrC;AAED,qBAAa,OAAO;IAEhB,cAAc,CAAC,EAAE,MAAM,CAAA;IACvB,sBAAsB,CAAC,EAAE,MAAM,CAAA;IAC/B,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAC3B,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,OAAO,CAAC,EAAE,CAAC,MAAM,CAAC,CAAA;IAClB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,eAAe,CAAC,EAAE,MAAM,CAAA;IACxB,iBAAiB,CAAC,EAAE,MAAM,CAAA;IAC1B,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,KAAK,CAAC,EAAE,KAAK,CAAA;IACb,IAAI,CAAC,EAAE,IAAI,CAAA;IACX,KAAK,CAAC,EAAE,CAAC,IAAI,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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-bootpay-api",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.2.6",
|
|
4
4
|
"description": "React Native를 위한 bootpay 라이브러리 입니다.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"main-internal": "src/index.ts",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"react-native-webview-bootpay": "^11.22.85",
|
|
74
74
|
"react-native-device-info": "^8.7.0",
|
|
75
75
|
"react-native-sensitive-info": "^5.5.8",
|
|
76
|
-
"react-native-base64": "^0.2.1",
|
|
76
|
+
"react-native-base64": "^0.2.1",
|
|
77
77
|
"react-native-aes-crypto": "^2.1.0",
|
|
78
78
|
"@types/lodash": "^4.14.182"
|
|
79
79
|
},
|