react-native-bootpay-api 13.8.43 → 13.13.4
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/index.tsx +4 -2
- package/lib/Bootpay.js +2 -2
- package/package.json +8 -7
- package/react-native.config.js +44 -51
- package/src/Bootpay.tsx +3 -6
package/index.tsx
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
-
import { Bootpay } from './src/Bootpay';
|
|
2
|
-
import { Payload, Extra, Item, User } from './src/BootpayTypes';
|
|
1
|
+
// import { Bootpay } from './src/Bootpay';
|
|
2
|
+
// import { Payload, Extra, Item, User } from './src/BootpayTypes';
|
|
3
|
+
import { Bootpay } from './lib/Bootpay';
|
|
4
|
+
import { Payload, Extra, Item, User } from './lib/BootpayTypes';
|
|
3
5
|
export { Bootpay, Payload, Extra, Item, User };
|
|
4
6
|
export default Bootpay;
|
package/lib/Bootpay.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Bootpay=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeWebviewBootpay=_interopRequireDefault(require("react-native-webview-bootpay"));var _BootpayTypes=require("./BootpayTypes");var _lodash=require("lodash");var _UserInfo=_interopRequireDefault(require("./UserInfo"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/taesupyoon/bootpay/client/react-native/react-native-bootpay-api/src/Bootpay.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}function _callSuper(t,o,e){return o=(0,_getPrototypeOf2.default)(o),(0,_possibleConstructorReturn2.default)(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2.default)(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}var Bootpay=exports.Bootpay=function(_Component){function Bootpay(props){var _this;(0,_classCallCheck2.default)(this,Bootpay);_this=_callSuper(this,Bootpay,[props]);_this.state={visibility:false,script:'',firstLoad:false,showCloseButton:false,isShowProgress:false};_this._VERSION="13.
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.Bootpay=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _classCallCheck2=_interopRequireDefault(require("@babel/runtime/helpers/classCallCheck"));var _createClass2=_interopRequireDefault(require("@babel/runtime/helpers/createClass"));var _possibleConstructorReturn2=_interopRequireDefault(require("@babel/runtime/helpers/possibleConstructorReturn"));var _getPrototypeOf2=_interopRequireDefault(require("@babel/runtime/helpers/getPrototypeOf"));var _inherits2=_interopRequireDefault(require("@babel/runtime/helpers/inherits"));var _react=_interopRequireWildcard(require("react"));var _reactNative=require("react-native");var _reactNativeWebviewBootpay=_interopRequireDefault(require("react-native-webview-bootpay"));var _BootpayTypes=require("./BootpayTypes");var _lodash=require("lodash");var _UserInfo=_interopRequireDefault(require("./UserInfo"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/taesupyoon/bootpay/client/react-native/react-native-bootpay-api/src/Bootpay.tsx";function _getRequireWildcardCache(e){if("function"!=typeof WeakMap)return null;var r=new WeakMap(),t=new WeakMap();return(_getRequireWildcardCache=function _getRequireWildcardCache(e){return e?t:r;})(e);}function _interopRequireWildcard(e,r){if(!r&&e&&e.__esModule)return e;if(null===e||"object"!=typeof e&&"function"!=typeof e)return{default:e};var t=_getRequireWildcardCache(r);if(t&&t.has(e))return t.get(e);var n={__proto__:null},a=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var u in e)if("default"!==u&&{}.hasOwnProperty.call(e,u)){var i=a?Object.getOwnPropertyDescriptor(e,u):null;i&&(i.get||i.set)?Object.defineProperty(n,u,i):n[u]=e[u];}return n.default=e,t&&t.set(e,n),n;}function _callSuper(t,o,e){return o=(0,_getPrototypeOf2.default)(o),(0,_possibleConstructorReturn2.default)(t,_isNativeReflectConstruct()?Reflect.construct(o,e||[],(0,_getPrototypeOf2.default)(t).constructor):o.apply(t,e));}function _isNativeReflectConstruct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){}));}catch(t){}return(_isNativeReflectConstruct=function _isNativeReflectConstruct(){return!!t;})();}var Bootpay=exports.Bootpay=function(_Component){function Bootpay(props){var _this;(0,_classCallCheck2.default)(this,Bootpay);_this=_callSuper(this,Bootpay,[props]);_this.state={visibility:false,script:'',firstLoad:false,showCloseButton:false,isShowProgress:false};_this._VERSION="13.13.4";_this._DEBUG=false;_this.dismiss=function(){_this.setState({visibility:false});};_this.showProgressBar=function(isShow){_this.setState({isShowProgress:isShow});};_this.closeDismiss=function(){if(_this.props.onClose!=undefined)_this.props.onClose();_this.dismiss();};_this.onMessage=function(){var _ref=(0,_asyncToGenerator2.default)(function*(event){var _this$payload;if(event==undefined)return;console.log(event.nativeEvent.data);var res=JSON.parse(JSON.stringify(event.nativeEvent.data));console.log(res);if(res=='close'){_this.showProgressBar(false);_this.closeDismiss();return;}var data=JSON.parse(res);var redirect=false;var show_success=false;var show_error=false;if(((_this$payload=_this.payload)==null?void 0:_this$payload.extra)!=undefined){var _this$payload$extra,_this$payload$extra2,_this$payload$extra3;if(((_this$payload$extra=_this.payload.extra)==null?void 0:_this$payload$extra.open_type)=='redirect'){redirect=true;}if(((_this$payload$extra2=_this.payload.extra)==null?void 0:_this$payload$extra2.display_error_result)==true){show_error=true;}if(((_this$payload$extra3=_this.payload.extra)==null?void 0:_this$payload$extra3.display_success_result)==true){show_success=true;}}if(redirect===true){switch(data.event){case'cancel':_this.showProgressBar(false);if(_this.props.onCancel!=undefined)_this.props.onCancel(data);_this.closeDismiss();break;case'error':_this.showProgressBar(false);if(_this.props.onError!=undefined)_this.props.onError(data);if(show_error==false){_this.closeDismiss();}break;case'issued':_this.showProgressBar(false);if(_this.props.onIssued!=undefined)_this.props.onIssued(data);if(show_success==false){_this.closeDismiss();}break;case'confirm':_this.showProgressBar(true);if(_this.props.onConfirm!=undefined){if(_this.props.onConfirm(data)){_this.transactionConfirm();}}break;case'done':_this.showProgressBar(false);if(_this.props.onDone!=undefined)_this.props.onDone(data);if(show_success==false){_this.closeDismiss();}break;case'close':_this.showProgressBar(false);_this.closeDismiss();break;}}else{switch(data.event){case'cancel':_this.showProgressBar(false);if(_this.props.onCancel!=undefined)_this.props.onCancel(data);break;case'error':_this.showProgressBar(false);if(_this.props.onError!=undefined)_this.props.onError(data);break;case'issued':_this.showProgressBar(false);if(_this.props.onIssued!=undefined)_this.props.onIssued(data);break;case'confirm':_this.showProgressBar(true);if(_this.props.onConfirm!=undefined){if(_this.props.onConfirm(data)){_this.transactionConfirm();}}break;case'done':_this.showProgressBar(false);if(_this.props.onDone!=undefined)_this.props.onDone(data);break;case'close':_this.showProgressBar(false);_this.closeDismiss();break;}}});return function(_x){return _ref.apply(this,arguments);};}();_this.onShouldStartLoadWithRequest=function(_){return true;};_this.getSDKVersion=function(){if(_reactNative.Platform.OS=='ios'){return"Bootpay.setVersion('"+_this._VERSION+"', 'ios_react_native')";}else if(_reactNative.Platform.OS=='android'){return"Bootpay.setVersion('"+_this._VERSION+"', 'android_react_native')";}else{return"";}};_this.getEnvironmentMode=function(){if(_this._DEBUG){return"Bootpay.setEnvironmentMode('development');";}return"";};_this.getBootpayPlatform=function(){if(_reactNative.Platform.OS=='ios'){return"Bootpay.setDevice('IOS');";}else if(_reactNative.Platform.OS=='android'){return"Bootpay.setDevice('ANDROID');";}else{return"";}};_this.transactionConfirm=function(){var script="Bootpay.confirm()"+".then( function (res) {"+_this.confirm()+_this.issued()+_this.done()+"}, function (res) {"+_this.error()+_this.cancel()+"})";_this.callJavaScript(script);};_this.removePaymentWindow=function(){_this.dismiss();};_this.callJavaScript=function(script){var _this$webView$current;if(_this.webView==null||_this.webView==undefined)return;(_this$webView$current=_this.webView.current)==null?void 0:_this$webView$current.injectJavaScript(`
|
|
2
2
|
setTimeout(function() { ${script} }, 30);
|
|
3
3
|
`);};_this.getAnalyticsData=(0,_asyncToGenerator2.default)(function*(){var uuid=yield _UserInfo.default.getBootpayUUID();var bootLastTime=yield _UserInfo.default.getBootpayLastTime();var elaspedTime=Date.now()-bootLastTime;return`window.Bootpay.$analytics.setAnalyticsData({uuid:'${uuid}', time:${elaspedTime}});`;});_this.confirm=function(){return"if (res.event === 'confirm') { window.BootpayRNWebView.postMessage( JSON.stringify(res) ); }";};_this.done=function(){return"else if (res.event === 'done') { window.BootpayRNWebView.postMessage( JSON.stringify(res) ); }";};_this.issued=function(){return"else if (res.event === 'issued') { window.BootpayRNWebView.postMessage( JSON.stringify(res) ); }";};_this.error=function(){return"if (res.event === 'error') { window.BootpayRNWebView.postMessage( JSON.stringify(res) ); }";};_this.cancel=function(){return"else if (res.event === 'cancel') { window.BootpayRNWebView.postMessage( JSON.stringify(res) ); }";};_this.close=function(){return"document.addEventListener('bootpayclose', function (e) { window.BootpayRNWebView.postMessage('close'); });";};_this.requestPayment=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(payload,items,user,extra){_this.bootpayRequest(payload,items,user,extra,"requestPayment");});return function(_x2,_x3,_x4,_x5){return _ref3.apply(this,arguments);};}();_this.requestSubscription=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(payload,items,user,extra){_this.bootpayRequest(payload,items,user,extra,"requestSubscription");});return function(_x6,_x7,_x8,_x9){return _ref4.apply(this,arguments);};}();_this.requestAuthentication=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(payload,items,user,extra){_this.bootpayRequest(payload,items,user,extra,"requestAuthentication");});return function(_x10,_x11,_x12,_x13){return _ref5.apply(this,arguments);};}();_this.bootpayRequest=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(payload,items,user,extra,requestMethod){payload.application_id=_reactNative.Platform.OS=='ios'?_this.props.ios_application_id:_this.props.android_application_id;payload.items=items;payload.user=user;payload.user=Object.assign(new _BootpayTypes.User(),user);payload.extra=Object.assign(new _BootpayTypes.Extra(),extra);_this.payload=payload;_this.setState({visibility:true,script:`
|
|
4
4
|
${yield _this.getMountJavascript()}
|
|
@@ -9,4 +9,4 @@ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault
|
|
|
9
9
|
${_this.getBootpayPlatform()}
|
|
10
10
|
${_this.close()}
|
|
11
11
|
${yield _this.getAnalyticsData()}
|
|
12
|
-
`;});_this.generateScript=function(payload,requestMethod){var script="Bootpay."+requestMethod+`(${JSON.stringify(payload)})`+".then( function (res) {"+_this.confirm()+_this.issued()+_this.done()+"}, function (res) {"+_this.error()+_this.cancel()+"}); void(0);";return script;};_this.webView=_react.default.createRef();return _this;}(0,_inherits2.default)(Bootpay,_Component);return(0,_createClass2.default)(Bootpay,[{key:"componentWillUnmount",value:function(){var _componentWillUnmount=(0,_asyncToGenerator2.default)(function*(){this.setState({visibility:false,firstLoad:false,showCloseButton:false});_UserInfo.default.setBootpayLastTime(Date.now());});function componentWillUnmount(){return _componentWillUnmount.apply(this,arguments);}return componentWillUnmount;}()},{key:"componentDidMount",value:function componentDidMount(){this.closeDismiss=(0,_lodash.debounce)(this.closeDismiss,30);}},{key:"render",value:function render(){var _this2=this;return(0,_jsxRuntime.jsx)(_reactNative.Modal,{animationType:'slide',transparent:false,onRequestClose:function onRequestClose(){_this2.closeDismiss();},visible:this.state.visibility,children:(0,_jsxRuntime.jsxs)(_reactNative.SafeAreaView,{style:{flex:1},children:[this.state.showCloseButton&&(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:function onPress(){var cancelData={action:'BootpayCancel',message:'사용자에 의해 취소되었습니다'};if(_this2.props.onCancel!=undefined)_this2.props.onCancel(cancelData);if(_this2.props.onClose!=undefined)_this2.props.onClose();_this2.setState({visibility:false});},children:(0,_jsxRuntime.jsx)(_reactNative.Image,{style:[styles.overlay],source:require('../images/close.png')})}),(0,_jsxRuntime.jsx)(_reactNativeWebviewBootpay.default,{ref:this.webView,originWhitelist:['*'],source:{uri:'https://webview.bootpay.co.kr/5.
|
|
12
|
+
`;});_this.generateScript=function(payload,requestMethod){var script="Bootpay."+requestMethod+`(${JSON.stringify(payload)})`+".then( function (res) {"+_this.confirm()+_this.issued()+_this.done()+"}, function (res) {"+_this.error()+_this.cancel()+"}); void(0);";return script;};_this.webView=_react.default.createRef();return _this;}(0,_inherits2.default)(Bootpay,_Component);return(0,_createClass2.default)(Bootpay,[{key:"componentWillUnmount",value:function(){var _componentWillUnmount=(0,_asyncToGenerator2.default)(function*(){this.setState({visibility:false,firstLoad:false,showCloseButton:false});_UserInfo.default.setBootpayLastTime(Date.now());});function componentWillUnmount(){return _componentWillUnmount.apply(this,arguments);}return componentWillUnmount;}()},{key:"componentDidMount",value:function componentDidMount(){this.closeDismiss=(0,_lodash.debounce)(this.closeDismiss,30);}},{key:"render",value:function render(){var _this2=this;return(0,_jsxRuntime.jsx)(_reactNative.Modal,{animationType:'slide',transparent:false,onRequestClose:function onRequestClose(){_this2.closeDismiss();},visible:this.state.visibility,children:(0,_jsxRuntime.jsxs)(_reactNative.SafeAreaView,{style:{flex:1},children:[this.state.showCloseButton&&(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:function onPress(){var cancelData={action:'BootpayCancel',message:'사용자에 의해 취소되었습니다'};if(_this2.props.onCancel!=undefined)_this2.props.onCancel(cancelData);if(_this2.props.onClose!=undefined)_this2.props.onClose();_this2.setState({visibility:false});},children:(0,_jsxRuntime.jsx)(_reactNative.Image,{style:[styles.overlay],source:require('../images/close.png')})}),(0,_jsxRuntime.jsx)(_reactNativeWebviewBootpay.default,{ref:this.webView,originWhitelist:['*'],source:{uri:'https://webview.bootpay.co.kr/5.1.0'},injectedJavaScript:this.state.script,javaScriptEnabled:true,javaScriptCanOpenWindowsAutomatically:true,onMessage:this.onMessage,onError:function onError(syntheticEvent){var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.code==3){_this2.showProgressBar(false);if(_this2.props.onError!=undefined)_this2.props.onError({code:nativeEvent.code,message:nativeEvent.description});_this2.closeDismiss();}}})]})});}}]);}(_react.Component);var styles=_reactNative.StyleSheet.create({container:{flex:1,justifyContent:'center',alignItems:'center',backgroundColor:'#F5FCFF'},welcome:{fontSize:20,textAlign:'center',margin:10},overlay:{width:25,height:25,right:5,alignSelf:'flex-end'}});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-bootpay-api",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.13.4",
|
|
4
4
|
"description": "React Native를 위한 bootpay 라이브러리 입니다.",
|
|
5
5
|
"main": "index.tsx",
|
|
6
6
|
"main-internal": "src/index.tsx",
|
|
@@ -35,23 +35,24 @@
|
|
|
35
35
|
"react-native": "*"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"escape-string-regexp": "
|
|
38
|
+
"escape-string-regexp": "^4.0.0",
|
|
39
39
|
"invariant": "2.2.4",
|
|
40
|
-
"react-native-device-info": "^
|
|
40
|
+
"react-native-device-info": "^14.0.4",
|
|
41
41
|
"react-native-sensitive-info": "^5.5.8",
|
|
42
42
|
"@types/react-native-base64": "^0.2.2",
|
|
43
|
-
"react-native-aes-crypto": "^3.
|
|
44
|
-
"react-native-webview-bootpay": "^13.
|
|
43
|
+
"react-native-aes-crypto": "^3.2.1",
|
|
44
|
+
"react-native-webview-bootpay": "^13.13.423"
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@babel/cli": "^7.20.0",
|
|
48
48
|
"@babel/core": "^7.20.0",
|
|
49
49
|
"@babel/runtime": "^7.20.0",
|
|
50
|
+
"@callstack/react-native-visionos": "0.73.8",
|
|
50
51
|
"@react-native/babel-preset": "0.73.21",
|
|
51
52
|
"@react-native/eslint-config": "0.73.2",
|
|
52
53
|
"@react-native/metro-config": "0.73.5",
|
|
53
54
|
"@react-native/typescript-config": "0.73.1",
|
|
54
|
-
"@rnx-kit/metro-config": "1.3.
|
|
55
|
+
"@rnx-kit/metro-config": "1.3.15",
|
|
55
56
|
"@semantic-release/git": "7.0.16",
|
|
56
57
|
"@types/invariant": "^2.2.30",
|
|
57
58
|
"@types/jest": "^29.5.12",
|
|
@@ -64,7 +65,7 @@
|
|
|
64
65
|
"react": "18.2.0",
|
|
65
66
|
"react-native": "0.73.5",
|
|
66
67
|
"react-native-macos": "0.73.17",
|
|
67
|
-
"react-native-test-app": "3.2
|
|
68
|
+
"react-native-test-app": "3.7.2",
|
|
68
69
|
"react-native-windows": "0.73.8",
|
|
69
70
|
"selenium-appium": "1.0.2",
|
|
70
71
|
"selenium-webdriver": "4.0.0-alpha.7",
|
package/react-native.config.js
CHANGED
|
@@ -1,24 +1,56 @@
|
|
|
1
|
+
const project = (() => {
|
|
2
|
+
const path = require('path');
|
|
3
|
+
try {
|
|
4
|
+
const { configureProjects } = require('react-native-test-app');
|
|
5
|
+
return configureProjects({
|
|
6
|
+
android: {
|
|
7
|
+
sourceDir: path.join('example', 'android'),
|
|
8
|
+
},
|
|
9
|
+
ios: {
|
|
10
|
+
sourceDir: 'example/ios',
|
|
11
|
+
},
|
|
12
|
+
});
|
|
13
|
+
} catch (e) {
|
|
14
|
+
return undefined;
|
|
15
|
+
}
|
|
16
|
+
})();
|
|
17
|
+
|
|
18
|
+
module.exports = {
|
|
19
|
+
dependencies: {
|
|
20
|
+
// Help rn-cli find and autolink this library
|
|
21
|
+
'react-native-bootpay-api': {
|
|
22
|
+
root: __dirname,
|
|
23
|
+
},
|
|
24
|
+
},
|
|
25
|
+
...(project ? { project } : undefined),
|
|
26
|
+
};
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
1
30
|
// const project = (() => {
|
|
2
31
|
// const fs = require('fs');
|
|
3
32
|
// const path = require('path');
|
|
4
33
|
// try {
|
|
5
|
-
// const {
|
|
6
|
-
|
|
7
|
-
//
|
|
34
|
+
// const {
|
|
35
|
+
// androidManifestPath,
|
|
36
|
+
// // iosProjectPath,
|
|
37
|
+
// windowsProjectPath,
|
|
38
|
+
// } = require('react-native-test-app');
|
|
39
|
+
// return {
|
|
8
40
|
// android: {
|
|
9
41
|
// sourceDir: path.join('example', 'android'),
|
|
10
|
-
// manifestPath:
|
|
42
|
+
// manifestPath: androidManifestPath(
|
|
43
|
+
// path.join(__dirname, 'example', 'android'),
|
|
44
|
+
// ),
|
|
11
45
|
// },
|
|
12
46
|
// ios: {
|
|
13
47
|
// sourceDir: 'example/ios',
|
|
14
48
|
// },
|
|
15
|
-
//
|
|
16
|
-
//
|
|
17
|
-
//
|
|
18
|
-
//
|
|
19
|
-
//
|
|
20
|
-
// });
|
|
21
|
-
// } catch (e) {
|
|
49
|
+
// // ios: {
|
|
50
|
+
// // project: iosProjectPath('example/ios'),
|
|
51
|
+
// // },
|
|
52
|
+
// };
|
|
53
|
+
// } catch (_) {
|
|
22
54
|
// return undefined;
|
|
23
55
|
// }
|
|
24
56
|
// })();
|
|
@@ -29,45 +61,6 @@
|
|
|
29
61
|
// 'react-native-bootpay-api': {
|
|
30
62
|
// root: __dirname,
|
|
31
63
|
// },
|
|
32
|
-
// },
|
|
64
|
+
// },
|
|
33
65
|
// ...(project ? { project } : undefined),
|
|
34
66
|
// };
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
const project = (() => {
|
|
38
|
-
const fs = require('fs');
|
|
39
|
-
const path = require('path');
|
|
40
|
-
try {
|
|
41
|
-
const {
|
|
42
|
-
androidManifestPath,
|
|
43
|
-
// iosProjectPath,
|
|
44
|
-
windowsProjectPath,
|
|
45
|
-
} = require('react-native-test-app');
|
|
46
|
-
return {
|
|
47
|
-
android: {
|
|
48
|
-
sourceDir: path.join('example', 'android'),
|
|
49
|
-
manifestPath: androidManifestPath(
|
|
50
|
-
path.join(__dirname, 'example', 'android'),
|
|
51
|
-
),
|
|
52
|
-
},
|
|
53
|
-
ios: {
|
|
54
|
-
sourceDir: 'example/ios',
|
|
55
|
-
},
|
|
56
|
-
// ios: {
|
|
57
|
-
// project: iosProjectPath('example/ios'),
|
|
58
|
-
// },
|
|
59
|
-
};
|
|
60
|
-
} catch (_) {
|
|
61
|
-
return undefined;
|
|
62
|
-
}
|
|
63
|
-
})();
|
|
64
|
-
|
|
65
|
-
module.exports = {
|
|
66
|
-
dependencies: {
|
|
67
|
-
// Help rn-cli find and autolink this library
|
|
68
|
-
'react-native-bootpay-api': {
|
|
69
|
-
root: __dirname,
|
|
70
|
-
},
|
|
71
|
-
},
|
|
72
|
-
...(project ? { project } : undefined),
|
|
73
|
-
};
|
package/src/Bootpay.tsx
CHANGED
|
@@ -8,10 +8,7 @@ import WebView, {WebViewMessageEvent} from 'react-native-webview-bootpay';
|
|
|
8
8
|
import { BootpayTypesProps, Payload, Extra, Item, User } from './BootpayTypes';
|
|
9
9
|
import {debounce} from 'lodash';
|
|
10
10
|
import UserInfo from './UserInfo'
|
|
11
|
-
|
|
12
|
-
// import Loader from './Loader'
|
|
13
|
-
// import ClipLoader from "react-spinners/ClipLoader";
|
|
14
|
-
// import Spinner from 'react-native-loading-spinner-overlay';
|
|
11
|
+
|
|
15
12
|
|
|
16
13
|
|
|
17
14
|
export class Bootpay extends Component<BootpayTypesProps> {
|
|
@@ -35,7 +32,7 @@ export class Bootpay extends Component<BootpayTypesProps> {
|
|
|
35
32
|
isShowProgress: false
|
|
36
33
|
}
|
|
37
34
|
// _payload = {}
|
|
38
|
-
_VERSION = "13.
|
|
35
|
+
_VERSION = "13.13.4"
|
|
39
36
|
_DEBUG = false;
|
|
40
37
|
|
|
41
38
|
|
|
@@ -344,7 +341,7 @@ export class Bootpay extends Component<BootpayTypesProps> {
|
|
|
344
341
|
ref={this.webView}
|
|
345
342
|
originWhitelist={['*']}
|
|
346
343
|
source={{
|
|
347
|
-
uri: 'https://webview.bootpay.co.kr/5.
|
|
344
|
+
uri: 'https://webview.bootpay.co.kr/5.1.0'
|
|
348
345
|
}}
|
|
349
346
|
injectedJavaScript={this.state.script}
|
|
350
347
|
javaScriptEnabled={true}
|