react-native-bootpay-api 13.13.46 → 13.14.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/lib/Bootpay.js +3 -3
- package/lib/BootpayCommerce.js +1 -1
- package/lib/BootpayWidget.js +5 -5
- package/package.json +2 -2
- package/react-native-bootpay-api.podspec +2 -2
- package/src/Bootpay.tsx +13 -5
- package/src/BootpayTypes.ts +2 -0
- package/src/BootpayWidget.tsx +36 -11
- package/src/WidgetTypes.ts +2 -0
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/
|
|
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-commerce/multi-sdk/client/react-native/react-native-bootpay-api/src/Bootpay.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}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 SDK_VERSION='13.13.4';var DEBUG_MODE=false;var Bootpay=exports.Bootpay=function(_Component){function Bootpay(props){var _this;(0,_classCallCheck2.default)(this,Bootpay);_this=_callSuper(this,Bootpay,[props]);_this.getMountJavascript=(0,_asyncToGenerator2.default)(function*(){return`
|
|
2
2
|
${_this.getSDKVersion()}
|
|
3
3
|
${_this.getEnvironmentMode()}
|
|
4
4
|
${_this.getBootpayPlatform()}
|
|
@@ -24,7 +24,7 @@ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault
|
|
|
24
24
|
${_this.error()}
|
|
25
25
|
${_this.cancel()}
|
|
26
26
|
});
|
|
27
|
-
`;};_this.getSDKVersion=function(){var os=_reactNative.Platform.OS;return`Bootpay.setVersion('${SDK_VERSION}', '${os}_react_native')`;};_this.getEnvironmentMode=function(){return DEBUG_MODE?"Bootpay.setEnvironmentMode('development');":'';};_this.getBootpayPlatform=function(){return _reactNative.Platform.OS==='ios'?"Bootpay.setDevice('IOS');":"Bootpay.setDevice('ANDROID');";};_this.removePaymentWindow=function(){_this.dismiss();};_this.getAnalyticsData=(0,_asyncToGenerator2.default)(function*(){var uuid=yield _UserInfo.default.getBootpayUUID();var bootpaySK=yield _UserInfo.default.getBootpaySK();var bootLastTime=yield _UserInfo.default.getBootpayLastTime();var elaspedTime=Date.now()-bootLastTime;if(DEBUG_MODE)console.log('analytics:',uuid,bootpaySK,bootLastTime);return`window.Bootpay.$analytics.setAnalyticsData({uuid:'${uuid}',sk:'${bootpaySK}',time:${elaspedTime}});`;});_this.requestPayment=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(payload,items,user,extra){_this.bootpayRequest(payload,items,user,extra,'requestPayment');});return function(_x2,_x3,_x4,_x5){return _ref4.apply(this,arguments);};}();_this.requestSubscription=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(payload,items,user,extra){_this.bootpayRequest(payload,items,user,extra,'requestSubscription');});return function(_x6,_x7,_x8,_x9){return _ref5.apply(this,arguments);};}();_this.requestAuthentication=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(payload,items,user,extra){_this.bootpayRequest(payload,items,user,extra,'requestAuthentication');});return function(_x0,_x1,_x10,_x11){return _ref6.apply(this,arguments);};}();_this.bootpayRequest=function(){var _ref7=(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:`
|
|
27
|
+
`;};_this.getSDKVersion=function(){var os=_reactNative.Platform.OS;return`Bootpay.setVersion('${SDK_VERSION}', '${os}_react_native')`;};_this.getEnvironmentMode=function(){return DEBUG_MODE?"Bootpay.setEnvironmentMode('development');":'';};_this.getBootpayPlatform=function(){return _reactNative.Platform.OS==='ios'?"Bootpay.setDevice('IOS');":"Bootpay.setDevice('ANDROID');";};_this.removePaymentWindow=function(){_this.dismiss();};_this.getAnalyticsData=(0,_asyncToGenerator2.default)(function*(){var uuid=yield _UserInfo.default.getBootpayUUID();var bootpaySK=yield _UserInfo.default.getBootpaySK();var bootLastTime=yield _UserInfo.default.getBootpayLastTime();var elaspedTime=Date.now()-bootLastTime;if(DEBUG_MODE)console.log('analytics:',uuid,bootpaySK,bootLastTime);return`window.Bootpay.$analytics.setAnalyticsData({uuid:'${uuid}',sk:'${bootpaySK}',time:${elaspedTime}});`;});_this.requestPayment=function(){var _ref4=(0,_asyncToGenerator2.default)(function*(payload,items,user,extra){_this.bootpayRequest(payload,items,user,extra,'requestPayment');});return function(_x2,_x3,_x4,_x5){return _ref4.apply(this,arguments);};}();_this.requestSubscription=function(){var _ref5=(0,_asyncToGenerator2.default)(function*(payload,items,user,extra){_this.bootpayRequest(payload,items,user,extra,'requestSubscription');});return function(_x6,_x7,_x8,_x9){return _ref5.apply(this,arguments);};}();_this.requestAuthentication=function(){var _ref6=(0,_asyncToGenerator2.default)(function*(payload,items,user,extra){_this.bootpayRequest(payload,items,user,extra,'requestAuthentication');});return function(_x0,_x1,_x10,_x11){return _ref6.apply(this,arguments);};}();_this.bootpayRequest=function(){var _ref7=(0,_asyncToGenerator2.default)(function*(payload,items,user,extra,requestMethod){if(_this.props.client_key){payload.client_key=_this.props.client_key;}else if(!payload.client_key){payload.application_id=_reactNative.Platform.OS==='ios'?_this.props.ios_application_id||payload.ios_application_id:_this.props.android_application_id||payload.android_application_id;}delete payload.android_application_id;delete payload.ios_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:`
|
|
28
28
|
${yield _this.getMountJavascript()}
|
|
29
29
|
${_this.generateScript(payload,requestMethod)}
|
|
30
|
-
`,firstLoad:false,showCloseButton:extra.show_close_button||false,spinner:false});_UserInfo.default.updateInfo();});return function(_x12,_x13,_x14,_x15,_x16){return _ref7.apply(this,arguments);};}();_this.webView=_react.default.createRef();return _this;}(0,_inherits2.default)(Bootpay,_Component);return(0,_createClass2.default)(Bootpay,[{key:"componentWillUnmount",value:function componentWillUnmount(){this.setState({visibility:false,firstLoad:false,showCloseButton:false});_UserInfo.default.setBootpayLastTime(Date.now());}},{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,visible:this.state.visibility,onRequestClose:this.closeDismiss,children:(0,_jsxRuntime.jsxs)(_reactNative.SafeAreaView,{style:{flex:1},children:[this.state.showCloseButton&&(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:this.closeDismiss,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.
|
|
30
|
+
`,firstLoad:false,showCloseButton:extra.show_close_button||false,spinner:false});_UserInfo.default.updateInfo();});return function(_x12,_x13,_x14,_x15,_x16){return _ref7.apply(this,arguments);};}();_this.webView=_react.default.createRef();return _this;}(0,_inherits2.default)(Bootpay,_Component);return(0,_createClass2.default)(Bootpay,[{key:"componentWillUnmount",value:function componentWillUnmount(){this.setState({visibility:false,firstLoad:false,showCloseButton:false});_UserInfo.default.setBootpayLastTime(Date.now());}},{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,visible:this.state.visibility,onRequestClose:this.closeDismiss,children:(0,_jsxRuntime.jsxs)(_reactNative.SafeAreaView,{style:{flex:1},children:[this.state.showCloseButton&&(0,_jsxRuntime.jsx)(_reactNative.TouchableOpacity,{onPress:this.closeDismiss,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.3.0'},injectedJavaScript:this.state.script,javaScriptEnabled:true,javaScriptCanOpenWindowsAutomatically:true,useSharedProcessPool:true,sharedCookiesEnabled:true,onMessage:this.onMessage,onError:function onError(syntheticEvent){var nativeEvent=syntheticEvent.nativeEvent;if(nativeEvent.code===3){_this2.showProgressBar(false);if(_this2.props.onError)_this2.props.onError({event:'error',code:nativeEvent.code,message:nativeEvent.description});_this2.closeDismiss();}}})]})});}}]);}(_react.Component);var styles=_reactNative.StyleSheet.create({overlay:{width:25,height:25,right:5,alignSelf:'flex-end'}});
|
package/lib/BootpayCommerce.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.BootpayCommerce=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));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 _lodash=require("lodash");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/taesupyoon/bootpay/client/react-native/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.BootpayCommerce=void 0;var _asyncToGenerator2=_interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));var _slicedToArray2=_interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));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 _lodash=require("lodash");var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/taesupyoon/bootpay-commerce/multi-sdk/client/react-native/react-native-bootpay-api/src/BootpayCommerce.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}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 COMMERCE_URL='https://webview.bootpay.co.kr/commerce/1.0.5/index.html';var DEBUG_MODE=false;var BootpayCommerce=exports.BootpayCommerce=function(_Component){function BootpayCommerce(props){var _this;(0,_classCallCheck2.default)(this,BootpayCommerce);_this=_callSuper(this,BootpayCommerce,[props]);_this.isScriptInjected=false;_this.state={visibility:false,script:'',firstLoad:false,showCloseButton:true,isShowProgress:false};_this.dismiss=function(){_this.setState({visibility:false});};_this.showProgressBar=function(isShow){_this.setState({isShowProgress:isShow});};_this.closeDismiss=function(){_this.callJavaScript('BootpayCommerce.destroy();');if(_this.props.onClose)_this.props.onClose();_this.dismiss();};_this.callJavaScript=function(script){var _this$webView$current;(_this$webView$current=_this.webView.current)==null||_this$webView$current.injectJavaScript(`setTimeout(function() { ${script} }, 30);`);};_this.getEnvironmentMode=function(){return DEBUG_MODE?"BootpayCommerce.setEnvironmentMode('development');":'';};_this.generateCommerceScript=function(payload){var scripts=[];if(DEBUG_MODE){scripts.push('BootpayCommerce.setLogLevel(1);');}scripts.push("document.addEventListener('bootpayclose', function(e) { "+"window.BootpayRNWebView.postMessage('close'); "+'});');scripts.push('BootpayCommerce.requestCheckout(');scripts.push(payload.toJSONString());scripts.push(')');scripts.push('.then(function(res) {');scripts.push(' window.BootpayRNWebView.postMessage(JSON.stringify(res));');scripts.push('}).catch(function(err) {');scripts.push(" window.BootpayRNWebView.postMessage(JSON.stringify({event: 'error', data: err}));");scripts.push('});');return scripts.join('');};_this.getMountJavascript=function(){return`
|
|
2
2
|
${_this.getEnvironmentMode()}
|
|
3
3
|
`;};_this.removePaymentWindow=function(){_this.dismiss();};_this.requestCheckout=function(payload){_this.payload=payload;_this.isScriptInjected=false;_this.setState({visibility:true,script:`
|
|
4
4
|
${_this.getMountJavascript()}
|
package/lib/BootpayWidget.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.BootpayWidget=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 _reactNativeGestureHandler=require("react-native-gesture-handler");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/
|
|
1
|
+
var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault");Object.defineProperty(exports,"__esModule",{value:true});exports.default=exports.BootpayWidget=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 _reactNativeGestureHandler=require("react-native-gesture-handler");var _BootpayTypes=require("./BootpayTypes");var _lodash=require("lodash");var _UserInfo=_interopRequireDefault(require("./UserInfo"));var _jsxRuntime=require("react/jsx-runtime");var _jsxFileName="/Users/taesupyoon/bootpay-commerce/multi-sdk/client/react-native/react-native-bootpay-api/src/BootpayWidget.tsx";function _interopRequireWildcard(e,t){if("function"==typeof WeakMap)var r=new WeakMap(),n=new WeakMap();return(_interopRequireWildcard=function _interopRequireWildcard(e,t){if(!t&&e&&e.__esModule)return e;var o,i,f={__proto__:null,default:e};if(null===e||"object"!=typeof e&&"function"!=typeof e)return f;if(o=t?n:r){if(o.has(e))return o.get(e);o.set(e,f);}for(var _t in e)"default"!==_t&&{}.hasOwnProperty.call(e,_t)&&((i=(o=Object.defineProperty)&&Object.getOwnPropertyDescriptor(e,_t))&&(i.get||i.set)?o(f,_t,i):f[_t]=e[_t]);return f;})(e,t);}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 SDK_VERSION='13.13.4';var DEBUG_MODE=false;var WIDGET_URL='https://webview.bootpay.co.kr/5.3.0/widget.html';var BootpayWidget=exports.BootpayWidget=function(_Component){function BootpayWidget(props){var _this;(0,_classCallCheck2.default)(this,BootpayWidget);_this=_callSuper(this,BootpayWidget,[props]);_this.isValidSwipe=false;_this.swipeStartX=0;_this.getBridgeHelperJS=function(){return`
|
|
2
2
|
window.bridgePost = function(message) {
|
|
3
3
|
// iOS WebKit MessageHandler
|
|
4
4
|
if (window.webkit && window.webkit.messageHandlers && window.webkit.messageHandlers.BootpayRNWebView) {
|
|
@@ -37,7 +37,7 @@ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault
|
|
|
37
37
|
});
|
|
38
38
|
})();
|
|
39
39
|
true;
|
|
40
|
-
`;};_this.setupBackHandler=function(){if(_reactNative.Platform.OS==='android'){_this.backHandler=_reactNative.BackHandler.addEventListener('hardwareBackPress',function(){if(_this.state.isFullScreen){_this.revertToWidget();return true;}return false;});}};_this.removeBackHandler=function(){if(_this.backHandler){_this.backHandler.remove();_this.backHandler=undefined;}};_this.goFullScreen=function(){console.log('[Fullscreen] >>> goFullScreen called');_this.setupBackHandler();_this.setState({isFullScreen:true,paymentResult:'NONE'});};_this.revertToWidget=function(){var shouldReload=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;console.log('[Fullscreen] <<< revertToWidget called, paymentResult:',_this.state.paymentResult,'shouldReload:',shouldReload);var paymentResult=_this.state.paymentResult;_this._widgetRendered=false;_this._isProcessingPayment=false;_this.removeBackHandler();if(shouldReload){console.log('[Fullscreen] reloading widget URL before collapse animation');_this.reloadWidget();}setTimeout(function(){_this.setState({isFullScreen:false,isReady:false});if(paymentResult==='NONE'){if(_this.props.onCancel){_this.props.onCancel({action:'BootpayCancel',status:-100,message:'사용자에 의한 취소'});}}_this.setState({paymentResult:'NONE'});},100);};_this.closeDismiss=function(){console.log('[Fullscreen] closeDismiss called');if(_this.state.isFullScreen){_this.revertToWidget();}if(_this.props.onClose){_this.props.onClose();}};_this.callJavaScript=function(script){var _this$webView$current;if(DEBUG_MODE){console.log('[BootpayWidget] callJavaScript:',script.substring(0,200));}(_this$webView$current=_this.webView.current)==null||_this$webView$current.injectJavaScript(`setTimeout(function() { ${script} }, 30); true;`);};_this.reloadWidget=function(){console.log('[BootpayWidget] reloadWidget called');_this._widgetRendered=false;_this.setState({isReady:false});_this.callJavaScript(`window.location.href = '${WIDGET_URL}';`);};_this.updateWidget=function(payload){var refresh=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;_this.payload=payload;_this.callJavaScript(`BootpayWidget.update(${JSON.stringify(payload)}, ${refresh});`);};_this._widgetRendered=false;_this.renderWidget=function(payload){if(_this._widgetRendered){if(DEBUG_MODE){console.log('[BootpayWidget] renderWidget ignored - already rendered');}return;}if(DEBUG_MODE){console.log('[BootpayWidget] ===== renderWidget called =====');console.log('[BootpayWidget] isReady:',_this.state.isReady);console.log('[BootpayWidget] payload:',JSON.stringify(payload).substring(0,200));}_this.payload=payload;payload.application_id=_reactNative.Platform.OS==='ios'?_this.props.ios_application_id:_this.props.android_application_id;_UserInfo.default.updateInfo();if(_this.state.isReady){if(DEBUG_MODE){console.log('[BootpayWidget] isReady=true, injecting render script');console.log('[BootpayWidget] payload.application_id:',payload.application_id);console.log('[BootpayWidget] Full payload:',JSON.stringify(payload));}_this._widgetRendered=true;_this.runDeviceSetup();var renderScript=_this.getRenderWidgetScript();if(DEBUG_MODE){console.log('[BootpayWidget] Render script:',renderScript);}_this.callJavaScript(renderScript);}else{if(DEBUG_MODE){console.log('[BootpayWidget] isReady=false, will render on next onLoadEnd');console.log('[BootpayWidget] payload.application_id:',payload.application_id);console.log('[BootpayWidget] Full payload:',JSON.stringify(payload));}}};_this.runDeviceSetup=function(){if(DEBUG_MODE){console.log('[BootpayWidget] runDeviceSetup - calling setDevice/setVersion');}_this.callJavaScript(_this.getBootpayPlatform());_this.callJavaScript(_this.getSDKVersion());};_this.getRenderWidgetScript=function(){var widgetPayload=_this.getWidgetPayloadForRender();var payloadJson=JSON.stringify(widgetPayload);return`
|
|
40
|
+
`;};_this.setupBackHandler=function(){if(_reactNative.Platform.OS==='android'){_this.backHandler=_reactNative.BackHandler.addEventListener('hardwareBackPress',function(){if(_this.state.isFullScreen){_this.revertToWidget();return true;}return false;});}};_this.removeBackHandler=function(){if(_this.backHandler){_this.backHandler.remove();_this.backHandler=undefined;}};_this.goFullScreen=function(){console.log('[Fullscreen] >>> goFullScreen called');_this.setupBackHandler();_this.setState({isFullScreen:true,paymentResult:'NONE'});};_this.revertToWidget=function(){var shouldReload=arguments.length>0&&arguments[0]!==undefined?arguments[0]:true;console.log('[Fullscreen] <<< revertToWidget called, paymentResult:',_this.state.paymentResult,'shouldReload:',shouldReload);var paymentResult=_this.state.paymentResult;_this._widgetRendered=false;_this._isProcessingPayment=false;_this.removeBackHandler();if(shouldReload){console.log('[Fullscreen] reloading widget URL before collapse animation');_this.reloadWidget();}setTimeout(function(){_this.setState({isFullScreen:false,isReady:false});if(paymentResult==='NONE'){if(_this.props.onCancel){_this.props.onCancel({action:'BootpayCancel',status:-100,message:'사용자에 의한 취소'});}}_this.setState({paymentResult:'NONE'});},100);};_this.closeDismiss=function(){console.log('[Fullscreen] closeDismiss called');if(_this.state.isFullScreen){_this.revertToWidget();}if(_this.props.onClose){_this.props.onClose();}};_this.callJavaScript=function(script){var _this$webView$current;if(DEBUG_MODE){console.log('[BootpayWidget] callJavaScript:',script.substring(0,200));}(_this$webView$current=_this.webView.current)==null||_this$webView$current.injectJavaScript(`setTimeout(function() { ${script} }, 30); true;`);};_this.reloadWidget=function(){console.log('[BootpayWidget] reloadWidget called');_this._widgetRendered=false;_this.setState({isReady:false});_this.callJavaScript(`window.location.href = '${WIDGET_URL}';`);};_this.updateWidget=function(payload){var refresh=arguments.length>1&&arguments[1]!==undefined?arguments[1]:false;_this.payload=payload;_this.callJavaScript(`BootpayWidget.update(${JSON.stringify(payload)}, ${refresh});`);};_this._widgetRendered=false;_this.renderWidget=function(payload){if(_this._widgetRendered){if(DEBUG_MODE){console.log('[BootpayWidget] renderWidget ignored - already rendered');}return;}if(DEBUG_MODE){console.log('[BootpayWidget] ===== renderWidget called =====');console.log('[BootpayWidget] isReady:',_this.state.isReady);console.log('[BootpayWidget] payload:',JSON.stringify(payload).substring(0,200));}_this.payload=payload;if(_this.props.client_key){payload.client_key=_this.props.client_key;}else if(!payload.client_key){payload.application_id=_reactNative.Platform.OS==='ios'?_this.props.ios_application_id||payload.ios_application_id:_this.props.android_application_id||payload.android_application_id;}delete payload.android_application_id;delete payload.ios_application_id;_UserInfo.default.updateInfo();if(_this.state.isReady){if(DEBUG_MODE){console.log('[BootpayWidget] isReady=true, injecting render script');console.log('[BootpayWidget] payload.application_id:',payload.application_id);console.log('[BootpayWidget] Full payload:',JSON.stringify(payload));}_this._widgetRendered=true;_this.runDeviceSetup();var renderScript=_this.getRenderWidgetScript();if(DEBUG_MODE){console.log('[BootpayWidget] Render script:',renderScript);}_this.callJavaScript(renderScript);}else{if(DEBUG_MODE){console.log('[BootpayWidget] isReady=false, will render on next onLoadEnd');console.log('[BootpayWidget] payload.application_id:',payload.application_id);console.log('[BootpayWidget] Full payload:',JSON.stringify(payload));}}};_this.runDeviceSetup=function(){if(DEBUG_MODE){console.log('[BootpayWidget] runDeviceSetup - calling setDevice/setVersion');}_this.callJavaScript(_this.getBootpayPlatform());_this.callJavaScript(_this.getSDKVersion());};_this.getRenderWidgetScript=function(){var widgetPayload=_this.getWidgetPayloadForRender();var payloadJson=JSON.stringify(widgetPayload);return`
|
|
41
41
|
// Flutter waitForBootpayWidget과 동일
|
|
42
42
|
${_this.getWaitForBootpayWidgetJS()}
|
|
43
43
|
|
|
@@ -69,7 +69,7 @@ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault
|
|
|
69
69
|
BootpayWidget.render('#bootpay-widget', ${payloadJson});
|
|
70
70
|
console.log('[WebView JS] BootpayWidget.render called');
|
|
71
71
|
});
|
|
72
|
-
`;};_this.requestPayment=function(){var _ref=(0,_asyncToGenerator2.default)(function*(payload,items,user,extra){console.log('[Fullscreen] requestPayment called');if(payload){payload.application_id=_reactNative.Platform.OS==='ios'?_this.props.ios_application_id:_this.props.android_application_id;if(items)payload.items=items;if(user)payload.user=Object.assign(new _BootpayTypes.User(),user);if(extra)payload.extra=Object.assign(new _BootpayTypes.Extra(),extra);}var payloadToUse=payload||_this.payload;_this._isProcessingPayment=true;_this.goFullScreen();setTimeout(function(){_this.executeRequestPayment(payloadToUse);},400);});return function(_x,_x2,_x3,_x4){return _ref.apply(this,arguments);};}();_this.executeRequestPayment=function(payload){if(!payload){console.log('[Fullscreen] executeRequestPayment - payload is null');return;}console.log('[Fullscreen] executeRequestPayment called');_this.callJavaScript(_this.getBootpayPlatform());_this.callJavaScript(_this.getSDKVersion());var requestScript=`
|
|
72
|
+
`;};_this.requestPayment=function(){var _ref=(0,_asyncToGenerator2.default)(function*(payload,items,user,extra){console.log('[Fullscreen] requestPayment called');if(payload){if(_this.props.client_key){payload.client_key=_this.props.client_key;}else if(!payload.client_key){payload.application_id=_reactNative.Platform.OS==='ios'?_this.props.ios_application_id||payload.ios_application_id:_this.props.android_application_id||payload.android_application_id;}delete payload.android_application_id;delete payload.ios_application_id;if(items)payload.items=items;if(user)payload.user=Object.assign(new _BootpayTypes.User(),user);if(extra)payload.extra=Object.assign(new _BootpayTypes.Extra(),extra);}var payloadToUse=payload||_this.payload;_this._isProcessingPayment=true;_this.goFullScreen();setTimeout(function(){_this.executeRequestPayment(payloadToUse);},400);});return function(_x,_x2,_x3,_x4){return _ref.apply(this,arguments);};}();_this.executeRequestPayment=function(payload){if(!payload){console.log('[Fullscreen] executeRequestPayment - payload is null');return;}console.log('[Fullscreen] executeRequestPayment called');_this.callJavaScript(_this.getBootpayPlatform());_this.callJavaScript(_this.getSDKVersion());var requestScript=`
|
|
73
73
|
${_this.getBridgeHelperJS()}
|
|
74
74
|
BootpayWidget.requestPayment(${JSON.stringify(_this.getRequestPaymentPayload(payload))})
|
|
75
75
|
.then(function(res) {
|
|
@@ -82,7 +82,7 @@ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault
|
|
|
82
82
|
${_this.errorEventHandler()}
|
|
83
83
|
${_this.cancelEventHandler()}
|
|
84
84
|
});
|
|
85
|
-
`;_this.callJavaScript(requestScript);};_this.getRequestPaymentPayload=function(payload){var result={};if('order_name'in payload&&payload.order_name)result.order_name=payload.order_name;if('order_id'in payload&&payload.order_id)result.order_id=payload.order_id;if('metadata'in payload&&payload.metadata)result.metadata=payload.metadata;var extra={};var payloadExtra='extra'in payload?payload.extra:undefined;if(payloadExtra){if('app_scheme'in payloadExtra&&payloadExtra.app_scheme)extra.app_scheme=payloadExtra.app_scheme;extra.show_close_button='show_close_button'in payloadExtra?payloadExtra.show_close_button:false;extra.display_success_result='display_success_result'in payloadExtra?payloadExtra.display_success_result:false;extra.display_error_result='display_error_result'in payloadExtra?payloadExtra.display_error_result:true;if('separately_confirmed'in payloadExtra&&payloadExtra.separately_confirmed){extra.separately_confirmed=true;}}extra.redirect_url=payloadExtra&&'redirect_url'in payloadExtra&&payloadExtra.redirect_url?payloadExtra.redirect_url:'https://api.bootpay.co.kr/v2/callback';extra.use_bootpay_inapp_sdk=payloadExtra&&'use_bootpay_inapp_sdk'in payloadExtra?payloadExtra.use_bootpay_inapp_sdk:true;result.extra=extra;if('user'in payload&&payload.user){var user={};if(payload.user.id)user.id=payload.user.id;if(payload.user.username)user.username=payload.user.username;if(payload.user.email)user.email=payload.user.email;if(payload.user.phone)user.phone=payload.user.phone;if(Object.keys(user).length>0)result.user=user;}if('items'in payload&&payload.items&&payload.items.length>0){result.items=payload.items;}return result;};_this._isProcessingPayment=false;_this._widgetData=null;_this.transactionConfirm=function(){var script=`
|
|
85
|
+
`;_this.callJavaScript(requestScript);};_this.getRequestPaymentPayload=function(payload){var result={};if('client_key'in payload&&payload.client_key){result.client_key=payload.client_key;}else if('application_id'in payload&&payload.application_id){result.application_id=payload.application_id;}if('order_name'in payload&&payload.order_name)result.order_name=payload.order_name;if('order_id'in payload&&payload.order_id)result.order_id=payload.order_id;if('metadata'in payload&&payload.metadata)result.metadata=payload.metadata;var extra={};var payloadExtra='extra'in payload?payload.extra:undefined;if(payloadExtra){if('app_scheme'in payloadExtra&&payloadExtra.app_scheme)extra.app_scheme=payloadExtra.app_scheme;extra.show_close_button='show_close_button'in payloadExtra?payloadExtra.show_close_button:false;extra.display_success_result='display_success_result'in payloadExtra?payloadExtra.display_success_result:false;extra.display_error_result='display_error_result'in payloadExtra?payloadExtra.display_error_result:true;if('separately_confirmed'in payloadExtra&&payloadExtra.separately_confirmed){extra.separately_confirmed=true;}}extra.redirect_url=payloadExtra&&'redirect_url'in payloadExtra&&payloadExtra.redirect_url?payloadExtra.redirect_url:'https://api.bootpay.co.kr/v2/callback';extra.use_bootpay_inapp_sdk=payloadExtra&&'use_bootpay_inapp_sdk'in payloadExtra?payloadExtra.use_bootpay_inapp_sdk:true;result.extra=extra;if('user'in payload&&payload.user){var user={};if(payload.user.id)user.id=payload.user.id;if(payload.user.username)user.username=payload.user.username;if(payload.user.email)user.email=payload.user.email;if(payload.user.phone)user.phone=payload.user.phone;if(Object.keys(user).length>0)result.user=user;}if('items'in payload&&payload.items&&payload.items.length>0){result.items=payload.items;}return result;};_this._isProcessingPayment=false;_this._widgetData=null;_this.transactionConfirm=function(){var script=`
|
|
86
86
|
Bootpay.confirm()
|
|
87
87
|
.then(function(res) {
|
|
88
88
|
${_this.confirmEventHandler()}
|
|
@@ -100,4 +100,4 @@ var _interopRequireDefault=require("@babel/runtime/helpers/interopRequireDefault
|
|
|
100
100
|
setTimeout(function() { waitForBootpayWidget(callback); }, 50);
|
|
101
101
|
}
|
|
102
102
|
}
|
|
103
|
-
`;};_this.getWidgetPayloadForRender=function(){if(!_this.payload)return{};var payload=_this.payload;var result={};if(payload.application_id)result.application_id=payload.application_id;if(payload.pg)result.pg=payload.pg;if(payload.method)result.method=payload.method;if(payload.methods&&payload.methods.length>0){result.method=payload.methods;}if(payload.order_name)result.order_name=payload.order_name;if(payload.price!==undefined)result.price=payload.price;if(payload.tax_free!==undefined)result.tax_free=payload.tax_free;if(payload.order_id)result.order_id=payload.order_id;if(payload.subscription_id)result.subscription_id=payload.subscription_id;if(payload.metadata)result.metadata=payload.metadata;if(payload.extra)result.extra=payload.extra;if(payload.widget_use_terms!==undefined){result.use_terms=payload.widget_use_terms;}if(payload.widget_sandbox!==undefined){result.sandbox=payload.widget_sandbox;}if(payload.widget_key){result.key=payload.widget_key;result.widget=1;result.use_bootpay_inapp_sdk=true;}return result;};_this.getRenderWidgetJS=function(){if(!_this.payload)return'';var widgetPayload=_this.getWidgetPayloadForRender();return`BootpayWidget.render('#bootpay-widget', ${JSON.stringify(widgetPayload)});`;};_this.onLoadEnd=(0,_asyncToGenerator2.default)(function*(){if(DEBUG_MODE){console.log('[BootpayWidget] ===== onLoadEnd called =====');console.log('[BootpayWidget] payload:',_this.payload?'set':'null');console.log('[BootpayWidget] isReady:',_this.state.isReady);console.log('[BootpayWidget] webView ref:',_this.webView.current?'exists':'null');}});_this.onMessage=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(event){var _data$detail;if(DEBUG_MODE){var _event$nativeEvent;console.log('[BootpayWidget] ===== onMessage received =====');console.log('[BootpayWidget] raw data:',event==null||(_event$nativeEvent=event.nativeEvent)==null?void 0:_event$nativeEvent.data);}if(!event)return;try{var data=JSON.parse(event.nativeEvent.data);if(DEBUG_MODE){console.log('[BootpayWidget] parsed data:',JSON.stringify(data));}switch(data.event){case'widgetReady':_this.setState({isReady:true},function(){if(_this.props.onWidgetReady){_this.props.onWidgetReady();}});break;case'widgetResize':if((_data$detail=data.detail)!=null&&_data$detail.height){var height=parseFloat(data.detail.height);if(Math.abs(height-_this.state.widgetHeight)>1){if(DEBUG_MODE){console.log('[BootpayWidget] Height changed:',_this.state.widgetHeight,'->',height);}_this.setState({widgetHeight:height});if(!_this.state.isFullScreen){_reactNative.Animated.timing(_this.animatedHeight,{toValue:height,duration:100,useNativeDriver:false}).start();}if(_this.props.onWidgetResize){_this.props.onWidgetResize(height);}}}break;case'widgetChangePayment':{var widgetData=data.detail||null;_this._widgetData=widgetData;if(_this.props.onWidgetChangePayment){_this.props.onWidgetChangePayment(widgetData);}}break;case'widgetChangeTerms':{var _widgetData=data.detail||null;_this._widgetData=_widgetData;if(_this.props.onWidgetChangeTerms){_this.props.onWidgetChangeTerms(_widgetData);}}break;case'bootpayWidgetFullSizeScreen':_this.goFullScreen();break;case'bootpayWidgetRevertScreen':_this.revertToWidget();break;case'cancel':_this._isProcessingPayment=false;_this.setState({paymentResult:'CANCEL'});if(_this.props.onCancel){_this.props.onCancel(data);}_this.closeDismiss();break;case'error':_this._isProcessingPayment=false;_this.setState({paymentResult:'ERROR'});if(_this.props.onError){_this.props.onError(data);}_this.closeDismiss();break;case'issued':_this._isProcessingPayment=false;if(_this.props.onIssued){_this.props.onIssued(data);}_this.closeDismiss();break;case'confirm':if(_this.props.onConfirm&&_this.props.onConfirm(data)){_this.transactionConfirm();}break;case'done':_this._isProcessingPayment=false;_this.setState({paymentResult:'DONE'});if(_this.props.onDone){_this.props.onDone(data);}_this.closeDismiss();break;case'close':console.log('[Fullscreen] close event received, _isProcessingPayment:',_this._isProcessingPayment);if(_this._isProcessingPayment){break;}_this.closeDismiss();break;default:if(DEBUG_MODE){console.warn('Unknown event:',data.event);}break;}}catch(error){if(DEBUG_MODE){console.error('Error parsing message:',error);}}});return function(_x5){return _ref3.apply(this,arguments);};}();_this.renderWebView=function(){return(0,_jsxRuntime.jsx)(_reactNativeWebviewBootpay.default,{ref:_this.webView,originWhitelist:['*'],source:{uri:WIDGET_URL},javaScriptEnabled:true,javaScriptCanOpenWindowsAutomatically:true,useSharedProcessPool:true,sharedCookiesEnabled:true,injectedJavaScript:_this.initialScript,onLoadStart:function onLoadStart(){if(DEBUG_MODE){console.log('[BootpayWidget] WebView onLoadStart');}},onLoad:function onLoad(){if(DEBUG_MODE){console.log('[BootpayWidget] WebView onLoad');}},onLoadEnd:_this.onLoadEnd,onMessage:_this.onMessage,style:styles.webview,onError:function onError(syntheticEvent){var nativeEvent=syntheticEvent.nativeEvent;if(DEBUG_MODE){console.error('[BootpayWidget] WebView error:',nativeEvent);}if(_this.props.onError){_this.props.onError({event:'error',code:nativeEvent.code,message:nativeEvent.description});}}});};_this.webView=_react.default.createRef();var _Dimensions$get=_reactNative.Dimensions.get('window'),width=_Dimensions$get.width,_height=_Dimensions$get.height;var initialHeight=props.height||200;_this.animatedTop=new _reactNative.Animated.Value(0);_this.animatedLeft=new _reactNative.Animated.Value(0);_this.animatedWidth=new _reactNative.Animated.Value(width);_this.animatedHeight=new _reactNative.Animated.Value(initialHeight);_this.swipeAnimatedValue=new _reactNative.Animated.Value(0);_this.state={isFullScreen:false,widgetHeight:initialHeight,isReady:false,paymentResult:'NONE',screenWidth:width,screenHeight:_height,isSwiping:false};_this.initialScript=_this.buildInitialScript();_this.panGesture=_reactNativeGestureHandler.Gesture.Pan().activeOffsetX(10).failOffsetX(-10).failOffsetY([-20,20]).onBegin(function(event){_this.swipeStartX=event.x;_this.isValidSwipe=event.x<70;if(DEBUG_MODE){console.log('[Gesture] onBegin x:',event.x,'isValid:',_this.isValidSwipe);}}).onStart(function(){if(_this.isValidSwipe){_this.setState({isSwiping:true});}}).onUpdate(function(event){if(_this.isValidSwipe&&event.translationX>0){_this.swipeAnimatedValue.setValue(event.translationX);}}).onEnd(function(event){if(!_this.isValidSwipe){_this.setState({isSwiping:false});return;}var screenWidth=_this.state.screenWidth;var translationX=event.translationX||0;if(DEBUG_MODE){console.log('[Gesture] onEnd translationX:',translationX,'threshold:',screenWidth*0.4);}if(translationX>screenWidth*0.4){_this._widgetRendered=false;_this.callJavaScript(`window.location.href = '${WIDGET_URL}';`);_reactNative.Animated.timing(_this.swipeAnimatedValue,{toValue:screenWidth,duration:200,useNativeDriver:true}).start(function(){_this.swipeAnimatedValue.setValue(0);_this.setState({isSwiping:false,isFullScreen:false,isReady:false});_this._isProcessingPayment=false;_this.removeBackHandler();if(_this.props.onClose){_this.props.onClose();}});}else{_reactNative.Animated.spring(_this.swipeAnimatedValue,{toValue:0,useNativeDriver:true}).start(function(){_this.setState({isSwiping:false});});}_this.isValidSwipe=false;}).onFinalize(function(){if(_this.state.isSwiping){_reactNative.Animated.spring(_this.swipeAnimatedValue,{toValue:0,useNativeDriver:true}).start(function(){_this.setState({isSwiping:false});});}_this.isValidSwipe=false;});return _this;}(0,_inherits2.default)(BootpayWidget,_Component);return(0,_createClass2.default)(BootpayWidget,[{key:"componentDidMount",value:function componentDidMount(){var _this2=this;if(DEBUG_MODE){console.log('[BootpayWidget] ===== componentDidMount =====');console.log('[BootpayWidget] WIDGET_URL:',WIDGET_URL);}this.closeDismiss=(0,_lodash.debounce)(this.closeDismiss,30);var subscription=_reactNative.Dimensions.addEventListener('change',function(_ref4){var window=_ref4.window;_this2.setState({screenWidth:window.width,screenHeight:window.height});});this._dimensionsSubscription=subscription;}},{key:"componentWillUnmount",value:function componentWillUnmount(){var _this$_dimensionsSubs;this.removeBackHandler();(_this$_dimensionsSubs=this._dimensionsSubscription)==null||_this$_dimensionsSubs.remove();_UserInfo.default.setBootpayLastTime(Date.now());}},{key:"render",value:function render(){var _this$state=this.state,isFullScreen=_this$state.isFullScreen,screenWidth=_this$state.screenWidth,screenHeight=_this$state.screenHeight;var _this$props=this.props,style=_this$props.style,widgetTop=_this$props.widgetTop;return(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView,{style:[styles.gestureRootBase,isFullScreen?styles.gestureRootFullScreen:{top:widgetTop||0,height:this.state.widgetHeight,zIndex:1}],children:(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{style:[styles.container,style,{flex:1,width:screenWidth},isFullScreen&&{transform:[{translateX:this.swipeAnimatedValue}]}],children:[isFullScreen&&(0,_jsxRuntime.jsx)(_reactNative.SafeAreaView,{style:styles.fullScreenHeader}),this.renderWebView(),isFullScreen&&_reactNative.Platform.OS==='ios'&&(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:this.panGesture,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.swipeEdge})})]})});}}]);}(_react.Component);var styles=_reactNative.StyleSheet.create({gestureRootBase:{position:'absolute',left:0,right:0},gestureRootFullScreen:{top:0,bottom:0,zIndex:9999},container:{width:'100%',backgroundColor:'#fff',overflow:'hidden'},hidden:{height:0,opacity:0},fullScreenHeader:{backgroundColor:'#fff'},swipeEdge:{position:'absolute',left:0,top:0,bottom:0,width:70,backgroundColor:DEBUG_MODE?'rgba(255, 0, 0, 0.1)':'transparent'},webview:{flex:1,backgroundColor:DEBUG_MODE?'#f0f0f0':'transparent',borderWidth:DEBUG_MODE?1:0,borderColor:'blue'}});var _default=exports.default=BootpayWidget;
|
|
103
|
+
`;};_this.getWidgetPayloadForRender=function(){if(!_this.payload)return{};var payload=_this.payload;var result={};if(payload.client_key){result.client_key=payload.client_key;}else if(payload.application_id){result.application_id=payload.application_id;}if(payload.pg)result.pg=payload.pg;if(payload.method)result.method=payload.method;if(payload.methods&&payload.methods.length>0){result.method=payload.methods;}if(payload.order_name)result.order_name=payload.order_name;if(payload.price!==undefined)result.price=payload.price;if(payload.tax_free!==undefined)result.tax_free=payload.tax_free;if(payload.order_id)result.order_id=payload.order_id;if(payload.subscription_id)result.subscription_id=payload.subscription_id;if(payload.metadata)result.metadata=payload.metadata;if(payload.extra)result.extra=payload.extra;if(payload.widget_use_terms!==undefined){result.use_terms=payload.widget_use_terms;}if(payload.widget_sandbox!==undefined){result.sandbox=payload.widget_sandbox;}if(payload.widget_key){result.key=payload.widget_key;result.widget=1;result.use_bootpay_inapp_sdk=true;}return result;};_this.getRenderWidgetJS=function(){if(!_this.payload)return'';var widgetPayload=_this.getWidgetPayloadForRender();return`BootpayWidget.render('#bootpay-widget', ${JSON.stringify(widgetPayload)});`;};_this.onLoadEnd=(0,_asyncToGenerator2.default)(function*(){if(DEBUG_MODE){console.log('[BootpayWidget] ===== onLoadEnd called =====');console.log('[BootpayWidget] payload:',_this.payload?'set':'null');console.log('[BootpayWidget] isReady:',_this.state.isReady);console.log('[BootpayWidget] webView ref:',_this.webView.current?'exists':'null');}});_this.onMessage=function(){var _ref3=(0,_asyncToGenerator2.default)(function*(event){var _data$detail;if(DEBUG_MODE){var _event$nativeEvent;console.log('[BootpayWidget] ===== onMessage received =====');console.log('[BootpayWidget] raw data:',event==null||(_event$nativeEvent=event.nativeEvent)==null?void 0:_event$nativeEvent.data);}if(!event)return;try{var data=JSON.parse(event.nativeEvent.data);if(DEBUG_MODE){console.log('[BootpayWidget] parsed data:',JSON.stringify(data));}switch(data.event){case'widgetReady':_this.setState({isReady:true},function(){if(_this.props.onWidgetReady){_this.props.onWidgetReady();}});break;case'widgetResize':if((_data$detail=data.detail)!=null&&_data$detail.height){var height=parseFloat(data.detail.height);if(Math.abs(height-_this.state.widgetHeight)>1){if(DEBUG_MODE){console.log('[BootpayWidget] Height changed:',_this.state.widgetHeight,'->',height);}_this.setState({widgetHeight:height});if(!_this.state.isFullScreen){_reactNative.Animated.timing(_this.animatedHeight,{toValue:height,duration:100,useNativeDriver:false}).start();}if(_this.props.onWidgetResize){_this.props.onWidgetResize(height);}}}break;case'widgetChangePayment':{var widgetData=data.detail||null;_this._widgetData=widgetData;if(_this.props.onWidgetChangePayment){_this.props.onWidgetChangePayment(widgetData);}}break;case'widgetChangeTerms':{var _widgetData=data.detail||null;_this._widgetData=_widgetData;if(_this.props.onWidgetChangeTerms){_this.props.onWidgetChangeTerms(_widgetData);}}break;case'bootpayWidgetFullSizeScreen':_this.goFullScreen();break;case'bootpayWidgetRevertScreen':_this.revertToWidget();break;case'cancel':_this._isProcessingPayment=false;_this.setState({paymentResult:'CANCEL'});if(_this.props.onCancel){_this.props.onCancel(data);}_this.closeDismiss();break;case'error':_this._isProcessingPayment=false;_this.setState({paymentResult:'ERROR'});if(_this.props.onError){_this.props.onError(data);}_this.closeDismiss();break;case'issued':_this._isProcessingPayment=false;if(_this.props.onIssued){_this.props.onIssued(data);}_this.closeDismiss();break;case'confirm':if(_this.props.onConfirm&&_this.props.onConfirm(data)){_this.transactionConfirm();}break;case'done':_this._isProcessingPayment=false;_this.setState({paymentResult:'DONE'});if(_this.props.onDone){_this.props.onDone(data);}_this.closeDismiss();break;case'close':console.log('[Fullscreen] close event received, _isProcessingPayment:',_this._isProcessingPayment);if(_this._isProcessingPayment){break;}_this.closeDismiss();break;default:if(DEBUG_MODE){console.warn('Unknown event:',data.event);}break;}}catch(error){if(DEBUG_MODE){console.error('Error parsing message:',error);}}});return function(_x5){return _ref3.apply(this,arguments);};}();_this.renderWebView=function(){return(0,_jsxRuntime.jsx)(_reactNativeWebviewBootpay.default,{ref:_this.webView,originWhitelist:['*'],source:{uri:WIDGET_URL},javaScriptEnabled:true,javaScriptCanOpenWindowsAutomatically:true,useSharedProcessPool:true,sharedCookiesEnabled:true,injectedJavaScript:_this.initialScript,onLoadStart:function onLoadStart(){if(DEBUG_MODE){console.log('[BootpayWidget] WebView onLoadStart');}},onLoad:function onLoad(){if(DEBUG_MODE){console.log('[BootpayWidget] WebView onLoad');}},onLoadEnd:_this.onLoadEnd,onMessage:_this.onMessage,style:styles.webview,onError:function onError(syntheticEvent){var nativeEvent=syntheticEvent.nativeEvent;if(DEBUG_MODE){console.error('[BootpayWidget] WebView error:',nativeEvent);}if(_this.props.onError){_this.props.onError({event:'error',code:nativeEvent.code,message:nativeEvent.description});}}});};_this.webView=_react.default.createRef();var _Dimensions$get=_reactNative.Dimensions.get('window'),width=_Dimensions$get.width,_height=_Dimensions$get.height;var initialHeight=props.height||200;_this.animatedTop=new _reactNative.Animated.Value(0);_this.animatedLeft=new _reactNative.Animated.Value(0);_this.animatedWidth=new _reactNative.Animated.Value(width);_this.animatedHeight=new _reactNative.Animated.Value(initialHeight);_this.swipeAnimatedValue=new _reactNative.Animated.Value(0);_this.state={isFullScreen:false,widgetHeight:initialHeight,isReady:false,paymentResult:'NONE',screenWidth:width,screenHeight:_height,isSwiping:false};_this.initialScript=_this.buildInitialScript();_this.panGesture=_reactNativeGestureHandler.Gesture.Pan().activeOffsetX(10).failOffsetX(-10).failOffsetY([-20,20]).onBegin(function(event){_this.swipeStartX=event.x;_this.isValidSwipe=event.x<70;if(DEBUG_MODE){console.log('[Gesture] onBegin x:',event.x,'isValid:',_this.isValidSwipe);}}).onStart(function(){if(_this.isValidSwipe){_this.setState({isSwiping:true});}}).onUpdate(function(event){if(_this.isValidSwipe&&event.translationX>0){_this.swipeAnimatedValue.setValue(event.translationX);}}).onEnd(function(event){if(!_this.isValidSwipe){_this.setState({isSwiping:false});return;}var screenWidth=_this.state.screenWidth;var translationX=event.translationX||0;if(DEBUG_MODE){console.log('[Gesture] onEnd translationX:',translationX,'threshold:',screenWidth*0.4);}if(translationX>screenWidth*0.4){_this._widgetRendered=false;_this.callJavaScript(`window.location.href = '${WIDGET_URL}';`);_reactNative.Animated.timing(_this.swipeAnimatedValue,{toValue:screenWidth,duration:200,useNativeDriver:true}).start(function(){_this.swipeAnimatedValue.setValue(0);_this.setState({isSwiping:false,isFullScreen:false,isReady:false});_this._isProcessingPayment=false;_this.removeBackHandler();if(_this.props.onClose){_this.props.onClose();}});}else{_reactNative.Animated.spring(_this.swipeAnimatedValue,{toValue:0,useNativeDriver:true}).start(function(){_this.setState({isSwiping:false});});}_this.isValidSwipe=false;}).onFinalize(function(){if(_this.state.isSwiping){_reactNative.Animated.spring(_this.swipeAnimatedValue,{toValue:0,useNativeDriver:true}).start(function(){_this.setState({isSwiping:false});});}_this.isValidSwipe=false;});return _this;}(0,_inherits2.default)(BootpayWidget,_Component);return(0,_createClass2.default)(BootpayWidget,[{key:"componentDidMount",value:function componentDidMount(){var _this2=this;if(DEBUG_MODE){console.log('[BootpayWidget] ===== componentDidMount =====');console.log('[BootpayWidget] WIDGET_URL:',WIDGET_URL);}this.closeDismiss=(0,_lodash.debounce)(this.closeDismiss,30);var subscription=_reactNative.Dimensions.addEventListener('change',function(_ref4){var window=_ref4.window;_this2.setState({screenWidth:window.width,screenHeight:window.height});});this._dimensionsSubscription=subscription;}},{key:"componentWillUnmount",value:function componentWillUnmount(){var _this$_dimensionsSubs;this.removeBackHandler();(_this$_dimensionsSubs=this._dimensionsSubscription)==null||_this$_dimensionsSubs.remove();_UserInfo.default.setBootpayLastTime(Date.now());}},{key:"render",value:function render(){var _this$state=this.state,isFullScreen=_this$state.isFullScreen,screenWidth=_this$state.screenWidth,screenHeight=_this$state.screenHeight;var _this$props=this.props,style=_this$props.style,widgetTop=_this$props.widgetTop;return(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureHandlerRootView,{style:[styles.gestureRootBase,isFullScreen?styles.gestureRootFullScreen:{top:widgetTop||0,height:this.state.widgetHeight,zIndex:1}],children:(0,_jsxRuntime.jsxs)(_reactNative.Animated.View,{style:[styles.container,style,{flex:1,width:screenWidth},isFullScreen&&{transform:[{translateX:this.swipeAnimatedValue}]}],children:[isFullScreen&&(0,_jsxRuntime.jsx)(_reactNative.SafeAreaView,{style:styles.fullScreenHeader}),this.renderWebView(),isFullScreen&&_reactNative.Platform.OS==='ios'&&(0,_jsxRuntime.jsx)(_reactNativeGestureHandler.GestureDetector,{gesture:this.panGesture,children:(0,_jsxRuntime.jsx)(_reactNative.View,{style:styles.swipeEdge})})]})});}}]);}(_react.Component);var styles=_reactNative.StyleSheet.create({gestureRootBase:{position:'absolute',left:0,right:0},gestureRootFullScreen:{top:0,bottom:0,zIndex:9999},container:{width:'100%',backgroundColor:'#fff',overflow:'hidden'},hidden:{height:0,opacity:0},fullScreenHeader:{backgroundColor:'#fff'},swipeEdge:{position:'absolute',left:0,top:0,bottom:0,width:70,backgroundColor:DEBUG_MODE?'rgba(255, 0, 0, 0.1)':'transparent'},webview:{flex:1,backgroundColor:DEBUG_MODE?'#f0f0f0':'transparent',borderWidth:DEBUG_MODE?1:0,borderColor:'blue'}});var _default=exports.default=BootpayWidget;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native-bootpay-api",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.14.1",
|
|
4
4
|
"description": "React Native를 위한 bootpay 라이브러리 입니다.",
|
|
5
5
|
"main": "index.tsx",
|
|
6
6
|
"main-internal": "src/index.tsx",
|
|
@@ -42,7 +42,7 @@
|
|
|
42
42
|
"react-native-device-info": "^15.0.1",
|
|
43
43
|
"react-native-gesture-handler": "^2.20.0",
|
|
44
44
|
"react-native-keychain": "^10.0.0",
|
|
45
|
-
"react-native-webview-bootpay": "13.
|
|
45
|
+
"react-native-webview-bootpay": "13.14.0"
|
|
46
46
|
},
|
|
47
47
|
"devDependencies": {
|
|
48
48
|
"@babel/cli": "^7.26.0",
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
require 'json'
|
|
2
2
|
|
|
3
3
|
new_arch_enabled = ENV['RCT_NEW_ARCH_ENABLED'] == '1'
|
|
4
|
-
ios_platform = new_arch_enabled ? '
|
|
4
|
+
ios_platform = new_arch_enabled ? '15.0' : '15.0'
|
|
5
5
|
|
|
6
6
|
package = JSON.parse(File.read(File.join(__dir__, 'package.json')))
|
|
7
7
|
|
|
@@ -14,7 +14,7 @@ Pod::Spec.new do |s|
|
|
|
14
14
|
|
|
15
15
|
s.authors = package['author']
|
|
16
16
|
s.homepage = package['homepage']
|
|
17
|
-
s.platforms = { :ios => "
|
|
17
|
+
s.platforms = { :ios => "15.0", :osx => "11.0" }
|
|
18
18
|
|
|
19
19
|
s.source = { :git => "https://github.com/bootpay/react-native-bootpay-api.git", :tag => "#{s.version}" }
|
|
20
20
|
s.source_files = "apple/**/*.{h,m,mm,swift}"
|
package/src/Bootpay.tsx
CHANGED
|
@@ -267,10 +267,18 @@ export class Bootpay extends Component<BootpayTypesProps> {
|
|
|
267
267
|
extra: Extra,
|
|
268
268
|
requestMethod: string
|
|
269
269
|
) => {
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
270
|
+
if (this.props.client_key) {
|
|
271
|
+
payload.client_key = this.props.client_key;
|
|
272
|
+
} else if (!payload.client_key) {
|
|
273
|
+
payload.application_id =
|
|
274
|
+
Platform.OS === 'ios'
|
|
275
|
+
? (this.props.ios_application_id || payload.ios_application_id)
|
|
276
|
+
: (this.props.android_application_id || payload.android_application_id);
|
|
277
|
+
}
|
|
278
|
+
// WebView JS SDK에 불필요한 플랫폼별 필드 전달 방지
|
|
279
|
+
delete payload.android_application_id;
|
|
280
|
+
delete payload.ios_application_id;
|
|
281
|
+
|
|
274
282
|
payload.items = items;
|
|
275
283
|
payload.user = user;
|
|
276
284
|
|
|
@@ -313,7 +321,7 @@ export class Bootpay extends Component<BootpayTypesProps> {
|
|
|
313
321
|
<WebView
|
|
314
322
|
ref={this.webView}
|
|
315
323
|
originWhitelist={['*']}
|
|
316
|
-
source={{ uri: 'https://webview.bootpay.co.kr/5.
|
|
324
|
+
source={{ uri: 'https://webview.bootpay.co.kr/5.3.0' }}
|
|
317
325
|
injectedJavaScript={this.state.script}
|
|
318
326
|
javaScriptEnabled
|
|
319
327
|
javaScriptCanOpenWindowsAutomatically
|
package/src/BootpayTypes.ts
CHANGED
|
@@ -16,6 +16,7 @@ export interface BootpayTypesProps extends ViewProps {
|
|
|
16
16
|
ref?: React.RefObject<unknown>;
|
|
17
17
|
ios_application_id?: string;
|
|
18
18
|
android_application_id?: string;
|
|
19
|
+
client_key?: string;
|
|
19
20
|
onCancel?: (data: BootpayEventData) => void;
|
|
20
21
|
onError?: (data: BootpayEventData) => void;
|
|
21
22
|
onIssued?: (data: BootpayEventData) => void;
|
|
@@ -111,6 +112,7 @@ export class Extra {
|
|
|
111
112
|
|
|
112
113
|
export class Payload {
|
|
113
114
|
application_id?: string;
|
|
115
|
+
client_key?: string;
|
|
114
116
|
android_application_id?: string;
|
|
115
117
|
ios_application_id?: string;
|
|
116
118
|
pg?: string;
|
package/src/BootpayWidget.tsx
CHANGED
|
@@ -25,7 +25,7 @@ import UserInfo from './UserInfo';
|
|
|
25
25
|
|
|
26
26
|
const SDK_VERSION = '13.13.4';
|
|
27
27
|
const DEBUG_MODE = false; // 디버그 모드 비활성화
|
|
28
|
-
const WIDGET_URL = 'https://webview.bootpay.co.kr/5.
|
|
28
|
+
const WIDGET_URL = 'https://webview.bootpay.co.kr/5.3.0/widget.html';
|
|
29
29
|
|
|
30
30
|
type PaymentResult = 'DONE' | 'ERROR' | 'CANCEL' | 'NONE';
|
|
31
31
|
|
|
@@ -397,10 +397,17 @@ export class BootpayWidget extends Component<
|
|
|
397
397
|
}
|
|
398
398
|
|
|
399
399
|
this.payload = payload;
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
400
|
+
if (this.props.client_key) {
|
|
401
|
+
payload.client_key = this.props.client_key;
|
|
402
|
+
} else if (!payload.client_key) {
|
|
403
|
+
payload.application_id =
|
|
404
|
+
Platform.OS === 'ios'
|
|
405
|
+
? (this.props.ios_application_id || payload.ios_application_id)
|
|
406
|
+
: (this.props.android_application_id || payload.android_application_id);
|
|
407
|
+
}
|
|
408
|
+
// WebView JS SDK에 불필요한 플랫폼별 필드 전달 방지
|
|
409
|
+
delete payload.android_application_id;
|
|
410
|
+
delete payload.ios_application_id;
|
|
404
411
|
|
|
405
412
|
UserInfo.updateInfo();
|
|
406
413
|
|
|
@@ -510,10 +517,17 @@ export class BootpayWidget extends Component<
|
|
|
510
517
|
|
|
511
518
|
// payload 업데이트
|
|
512
519
|
if (payload) {
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
520
|
+
if (this.props.client_key) {
|
|
521
|
+
payload.client_key = this.props.client_key;
|
|
522
|
+
} else if (!payload.client_key) {
|
|
523
|
+
payload.application_id =
|
|
524
|
+
Platform.OS === 'ios'
|
|
525
|
+
? (this.props.ios_application_id || payload.ios_application_id)
|
|
526
|
+
: (this.props.android_application_id || payload.android_application_id);
|
|
527
|
+
}
|
|
528
|
+
// WebView JS SDK에 불필요한 플랫폼별 필드 전달 방지
|
|
529
|
+
delete payload.android_application_id;
|
|
530
|
+
delete payload.ios_application_id;
|
|
517
531
|
if (items) payload.items = items;
|
|
518
532
|
if (user) payload.user = Object.assign(new User(), user);
|
|
519
533
|
if (extra) payload.extra = Object.assign(new Extra(), extra);
|
|
@@ -572,6 +586,13 @@ export class BootpayWidget extends Component<
|
|
|
572
586
|
): Record<string, unknown> => {
|
|
573
587
|
const result: Record<string, unknown> = {};
|
|
574
588
|
|
|
589
|
+
// 인증 정보
|
|
590
|
+
if ('client_key' in payload && payload.client_key) {
|
|
591
|
+
result.client_key = payload.client_key;
|
|
592
|
+
} else if ('application_id' in payload && payload.application_id) {
|
|
593
|
+
result.application_id = payload.application_id;
|
|
594
|
+
}
|
|
595
|
+
|
|
575
596
|
// 주문 정보
|
|
576
597
|
if ('order_name' in payload && payload.order_name)
|
|
577
598
|
result.order_name = payload.order_name;
|
|
@@ -736,8 +757,12 @@ export class BootpayWidget extends Component<
|
|
|
736
757
|
const payload = this.payload;
|
|
737
758
|
const result: Record<string, unknown> = {};
|
|
738
759
|
|
|
739
|
-
// application_id
|
|
740
|
-
if (payload.
|
|
760
|
+
// client_key or application_id
|
|
761
|
+
if (payload.client_key) {
|
|
762
|
+
result.client_key = payload.client_key;
|
|
763
|
+
} else if (payload.application_id) {
|
|
764
|
+
result.application_id = payload.application_id;
|
|
765
|
+
}
|
|
741
766
|
|
|
742
767
|
// 기본 필드
|
|
743
768
|
if (payload.pg) result.pg = payload.pg;
|
package/src/WidgetTypes.ts
CHANGED
|
@@ -42,6 +42,7 @@ export interface BootpayWidgetProps {
|
|
|
42
42
|
// 앱 ID
|
|
43
43
|
ios_application_id?: string;
|
|
44
44
|
android_application_id?: string;
|
|
45
|
+
client_key?: string;
|
|
45
46
|
|
|
46
47
|
// Widget 전용 콜백
|
|
47
48
|
onWidgetReady?: WidgetReadyCallback;
|
|
@@ -70,6 +71,7 @@ export class WidgetPayload {
|
|
|
70
71
|
|
|
71
72
|
// 기본 Payload 필드
|
|
72
73
|
application_id?: string;
|
|
74
|
+
client_key?: string;
|
|
73
75
|
pg?: string;
|
|
74
76
|
method?: string;
|
|
75
77
|
methods?: string[];
|