diff --git a/molpay.js b/molpay.js index fb7afb7..f260263 100644 --- a/molpay.js +++ b/molpay.js @@ -1 +1 @@ -var _0x02d4=['slice','index','substring','test','parse','tranID','transactionRequestWithTransactionId','data:text/html;base64,','_blank','contentWindow','exit','addEventListener','url','loadstop','nativeWebRequestUrlUpdates','executeScript','document.body.innerHTML','removeEventListener','loadstart','close','plugins','toast','showWithOptions','Image\x20saved\x20success!','bottom','requestPermission','WRITE_EXTERNAL_STORAGE','indexOf','replace','atob','base64ImageUrlData','filename','PNG','imageSaver','saveBase64Image','innerHTML','cordova/exec','module_id','getElementById','padding','border','createElement','iframe','updateSdkData','stringify','load','mainUiFrame','allowScriptAccess','always','appendChild','transactionRequest','wrapper_version','molpayTransactionRequestFrame','setAttribute','src','closemolpay','testMerchantCredentials','testMerchantChannels','body','open','prototype','remove','parentElement','removeChild','length','molpay-mobile-xdk-www/index.html','mpopenmolpaywindow://','mptransactionresults://','mprunscriptonpopup://','mpcloseallwindows://','mppinstructioncapture://','MOLPay/result.php','\x22msgType\x22:\x22B4\x22','style','visibility','hidden','absolute','width','0px','height','position','100%','=0x0;_0xb1cf9b--)this[_0xb1cf9b]&&this[_0xb1cf9b][_0x402d('0x3')]&&this[_0xb1cf9b][_0x402d('0x3')][_0x402d('0x4')](this[_0xb1cf9b]);};var isInternalDebugging=!0x1,moduleId='molpay-mobile-xdk-cordova',wrapperVersion='1',molpaySdkUrl=_0x402d('0x6'),mpopenmolpaywindow=_0x402d('0x7'),mptransactionresults=_0x402d('0x8'),mprunscriptonpopup=_0x402d('0x9'),mpcloseallwindows=_0x402d('0xa'),mppinstructioncapture=_0x402d('0xb'),molpayresulturl=_0x402d('0xc'),molpaynbepayurl='MOLPay/nbepay.php',b4results=_0x402d('0xd'),c6results='\x22msgType\x22:\x22C6\x22',molpayPaymentDetails,transactionResultCallback,molpayDiv,mainUiFrame,bankUiWindow,molpayTransactionRequestFrame,isClosingMolpay=!0x1,hideFrame=function(_0xd69944){_0xd69944[_0x402d('0xe')][_0x402d('0xf')]=_0x402d('0x10'),_0xd69944[_0x402d('0xe')]['position']=_0x402d('0x11'),_0xd69944[_0x402d('0xe')][_0x402d('0x12')]=_0x402d('0x13'),_0xd69944['style'][_0x402d('0x14')]=_0x402d('0x13');},showFrame=function(_0x8ec99f){_0x8ec99f['style'][_0x402d('0xf')]='visible',_0x8ec99f[_0x402d('0xe')][_0x402d('0x15')]=_0x402d('0x11'),_0x8ec99f[_0x402d('0xe')]['width']=_0x402d('0x16'),_0x8ec99f[_0x402d('0xe')][_0x402d('0x14')]=_0x402d('0x16');},postMolpayResultHandler=function(_0x58877e){var _0x588f65=_0x58877e;if(_0x588f65){var _0x2a5e29=new RegExp(_0x402d('0x17')),_0x208170=_0x2a5e29[_0x402d('0x18')](_0x588f65);_0x208170&&(_0x588f65=_0x588f65[_0x402d('0x19')](0x0,_0x208170[_0x402d('0x1a')]));var _0x17ebe0=function(_0x57deaf){var _0x166292,_0x41a731,_0x15e4f9=_0x57deaf,_0x4002ba=new RegExp('<','g'),_0x28003d=new RegExp('<'),_0x484e14=new RegExp('>'),_0x30abc4=_0x15e4f9['match'](_0x4002ba);if(_0x15e4f9&&_0x30abc4&&_0x28003d[_0x402d('0x18')](_0x15e4f9)&&_0x484e14[_0x402d('0x18')](_0x15e4f9))for(var _0x5be49b=_0x30abc4['length']-0x1;_0x5be49b>=0x0;_0x5be49b--)_0x166292=_0x28003d['exec'](_0x15e4f9)[_0x402d('0x1a')],_0x41a731=_0x484e14[_0x402d('0x18')](_0x15e4f9)['index'],_0x15e4f9=_0x15e4f9['substring'](0x0,_0x166292)+''+_0x15e4f9[_0x402d('0x1b')](_0x41a731+0x1);return _0x15e4f9;};_0x588f65=_0x17ebe0(_0x588f65);var _0x2caf11,_0x6b7fd6;if(_0x2caf11=new RegExp(b4results),_0x2caf11[_0x402d('0x1c')](_0x588f65)&&(_0x6b7fd6=JSON[_0x402d('0x1d')](_0x588f65))){var _0x194f43=_0x6b7fd6[_0x402d('0x1e')];_0x194f43&&mainUiFrame['contentWindow'][_0x402d('0x1f')](_0x194f43);}}},isBankUiWindowClosedByCloseWindowEvent=!0x1,createBankUiWindow=function(_0xd3d037){var _0x3314f9=_0x402d('0x20')+_0xd3d037;bankUiWindow=window[_0x402d('0x0')](_0x3314f9,_0x402d('0x21'),'location=no,hardwareback=no,disallowoverscroll=yes,toolbarposition=top,transitionstyle=crossdissolve');var _0x5e182c=function(_0x3fbab8){isBankUiWindowClosedByCloseWindowEvent||mainUiFrame[_0x402d('0x22')]['transactionRequest'](),bankUiWindow['removeEventListener'](_0x402d('0x23'),_0x5e182c);};bankUiWindow[_0x402d('0x24')](_0x402d('0x23'),_0x5e182c);var _0x5b8c97=function(_0x4268a9){var _0xeea865;_0xeea865=new RegExp(molpaynbepayurl),_0x4268a9&&_0xeea865[_0x402d('0x1c')](_0x4268a9[_0x402d('0x25')])&&(bankUiWindow['executeScript']({'code':'window.open\x20=\x20function\x20(open)\x20{\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20function\x20(url,\x20name,\x20features)\x20{\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.location\x20=\x20url\x20;\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20return\x20window;\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20}\x20(window.open);'},function(_0x5e073c){}),bankUiWindow['executeScript']({'code':'window.close\x20=\x20function\x20()\x20{\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.location.assign(window.location);\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};'},function(_0x353a0e){}));};bankUiWindow[_0x402d('0x24')](_0x402d('0x26'),_0x5b8c97);var _0x31f624=function(_0x27c007){var _0x11810e;if(mainUiFrame[_0x402d('0x22')][_0x402d('0x27')]({'requestPath':_0x27c007['url']}),_0x11810e=new RegExp(molpaynbepayurl),_0x27c007&&_0x11810e[_0x402d('0x1c')](_0x27c007[_0x402d('0x25')]))var _0x52896a=0xa,_0x3f58ef=0x0,_0x56ce04=setInterval(function(){_0x4fe874();},0x3e8),_0x4fe874=function(){_0x3f58ef++,_0x3f58ef>_0x52896a?clearInterval(_0x56ce04):bankUiWindow[_0x402d('0x28')]({'code':_0x402d('0x29')},function(_0x1d8114){var _0x555134=_0x1d8114[0x0],_0x39c119=new RegExp(b4results);_0x39c119[_0x402d('0x1c')](_0x555134)&&(postMolpayResultHandler(_0x555134),bankUiWindow[_0x402d('0x2a')](_0x402d('0x2b'),_0x31f624),bankUiWindow[_0x402d('0x2c')](),clearInterval(_0x56ce04));});};};bankUiWindow['addEventListener'](_0x402d('0x2b'),_0x31f624);},inAppCallback=function(_0x2f6d41){function _0x243d0d(){window[_0x402d('0x2d')][_0x402d('0x2e')][_0x402d('0x2f')]({'message':_0x402d('0x30'),'duration':0x3e8,'position':_0x402d('0x31')});}function _0x3144c5(){window[_0x402d('0x2d')][_0x402d('0x2e')][_0x402d('0x2f')]({'message':'Image\x20saved\x20fail!','duration':0x3e8,'position':_0x402d('0x31')});}function _0x5afdb2(){var _0x2f6d41=cordova[_0x402d('0x2d')]['permissions'];_0x3144c5();var _0x1cd6a7=function(){_0x3144c5();};_0x2f6d41[_0x402d('0x32')](_0x2f6d41[_0x402d('0x33')],function(_0x5390cf){_0x5390cf['hasPermission']?_0x134d7a():_0x1cd6a7();},_0x1cd6a7);}var _0x769f5c,_0xda93b8;if(_0x2f6d41&&_0x2f6d41[_0x402d('0x34')](mpopenmolpaywindow)>-0x1)_0xda93b8=new RegExp(mpopenmolpaywindow,'g'),_0x769f5c=_0x2f6d41['replace'](_0xda93b8,''),_0x769f5c&&_0x769f5c[_0x402d('0x5')]>0x0&&createBankUiWindow(_0x769f5c);else if(_0x2f6d41&&_0x2f6d41[_0x402d('0x34')](mpcloseallwindows)>-0x1)isBankUiWindowClosedByCloseWindowEvent=!0x0,bankUiWindow[_0x402d('0x2c')]();else if(_0x2f6d41&&_0x2f6d41[_0x402d('0x34')](mptransactionresults)>-0x1){if(_0xda93b8=new RegExp(mptransactionresults,'g'),_0x769f5c=_0x2f6d41[_0x402d('0x35')](_0xda93b8,''),_0x769f5c&&_0x769f5c[_0x402d('0x5')]>0x0){var _0x56ea26=window[_0x402d('0x36')](_0x769f5c),_0x3bb458=JSON['stringify'](JSON['parse'](_0x56ea26));transactionResultCallback(_0x3bb458),isClosingMolpay&&(molpayDiv['innerHTML']='',isClosingMolpay=!0x1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame[_0x402d('0x2')]();}}else if(_0x2f6d41&&_0x2f6d41[_0x402d('0x34')](mppinstructioncapture)>-0x1){_0xda93b8=new RegExp(mppinstructioncapture,'g'),_0x769f5c=_0x2f6d41['replace'](_0xda93b8,'');var _0x4bdc45=JSON[_0x402d('0x1d')](atob(_0x769f5c)),_0x345906={'data':_0x4bdc45[_0x402d('0x37')],'prefix':_0x4bdc45[_0x402d('0x38')],'format':_0x402d('0x39'),'quality':0x64,'mediaScanner':!0x0};window['imageSaver']['saveBase64Image'](_0x345906,function(_0x5bea1f){_0x243d0d();},_0x5afdb2);var _0x134d7a=function(){window[_0x402d('0x3a')][_0x402d('0x3b')](_0x345906,function(_0x26dc42){_0x243d0d();},function(_0x2875f2){_0x3144c5();});};}if(_0x2f6d41&&_0x2f6d41['indexOf'](mprunscriptonpopup)>-0x1&&(_0xda93b8=new RegExp(mprunscriptonpopup,'g'),_0x769f5c=_0x2f6d41[_0x402d('0x35')](_0xda93b8,''),_0x769f5c&&_0x769f5c[_0x402d('0x5')]>0x0)){var _0x5303b4=window[_0x402d('0x36')](_0x769f5c);bankUiWindow[_0x402d('0x28')]({'code':_0x5303b4},function(_0xc3900d){});}},molpayCredentialsRequestFrame,testMerchantCredentialsCallback,onTestMerchantCredentialsDone=function(_0x484a96,_0x4fc225){testMerchantCredentialsCallback(_0x484a96,_0x4fc225),isClosingMolpay&&(molpayDiv['innerHTML']='',isClosingMolpay=!0x1),molpayCredentialsRequestFrame&&molpayCredentialsRequestFrame[_0x402d('0x2')]();},molpayChannelsRequestFrame,testMerchantChannelsCallback,onTestMerchantChannelsDone=function(_0x53dd02,_0x1419eb){testMerchantChannelsCallback&&testMerchantChannelsCallback(_0x53dd02,_0x1419eb),isClosingMolpay&&(molpayDiv[_0x402d('0x3c')]='',isClosingMolpay=!0x1),molpayChannelsRequestFrame&&molpayChannelsRequestFrame[_0x402d('0x2')]();},exec=require(_0x402d('0x3d'));MOLPay['prototype']['startMolpay']=function(_0x540093,_0x541a88){isClosingMolpay=!0x1,isBankUiWindowClosedByCloseWindowEvent=!0x1;try{molpayPaymentDetails=JSON[_0x402d('0x1d')](_0x540093);}catch(_0x49f121){molpayPaymentDetails=_0x540093;}molpayPaymentDetails[_0x402d('0x3e')]=moduleId,molpayPaymentDetails['wrapper_version']=wrapperVersion,transactionResultCallback=_0x541a88,molpayDiv=document[_0x402d('0x3f')]('molpay'),molpayDiv[_0x402d('0xe')]['width']='100%',molpayDiv[_0x402d('0xe')][_0x402d('0x40')]='0px',molpayDiv[_0x402d('0xe')][_0x402d('0x41')]=_0x402d('0x13'),mainUiFrame=document[_0x402d('0x42')](_0x402d('0x43'));var _0x2d235a=function(_0x5d7873){mainUiFrame[_0x402d('0x22')][_0x402d('0x44')](JSON[_0x402d('0x45')](molpayPaymentDetails),inAppCallback),mainUiFrame[_0x402d('0x2a')](_0x402d('0x46'),_0x2d235a);};mainUiFrame[_0x402d('0xe')][_0x402d('0x41')]=_0x402d('0x13'),mainUiFrame[_0x402d('0xe')][_0x402d('0x40')]=_0x402d('0x13'),mainUiFrame[_0x402d('0xe')][_0x402d('0x12')]=_0x402d('0x16'),mainUiFrame[_0x402d('0xe')][_0x402d('0x14')]=_0x402d('0x16'),mainUiFrame['id']=_0x402d('0x47'),mainUiFrame[_0x402d('0x48')]=_0x402d('0x49'),mainUiFrame['setAttribute']('src',molpaySdkUrl),molpayDiv[_0x402d('0x4a')](mainUiFrame),mainUiFrame['addEventListener'](_0x402d('0x46'),_0x2d235a);},MOLPay[_0x402d('0x1')][_0x402d('0x4b')]=function(_0x185862,_0x4523ce){try{molpayPaymentDetails=JSON[_0x402d('0x1d')](_0x185862);}catch(_0x512ad6){molpayPaymentDetails=_0x185862;}molpayPaymentDetails[_0x402d('0x3e')]=moduleId,molpayPaymentDetails[_0x402d('0x4c')]=wrapperVersion,transactionResultCallback=_0x4523ce,molpayTransactionRequestFrame=document[_0x402d('0x42')](_0x402d('0x43'));var _0x267a02=function(_0xb29811){molpayTransactionRequestFrame[_0x402d('0x22')][_0x402d('0x44')](molpayPaymentDetails,inAppCallback),molpayTransactionRequestFrame['removeEventListener']('load',_0x267a02);};molpayTransactionRequestFrame['id']=_0x402d('0x4d'),molpayTransactionRequestFrame[_0x402d('0x48')]=_0x402d('0x49'),molpayTransactionRequestFrame[_0x402d('0x4e')](_0x402d('0x4f'),molpaySdkUrl),hideFrame(molpayTransactionRequestFrame),document['body'][_0x402d('0x4a')](molpayTransactionRequestFrame),molpayTransactionRequestFrame['addEventListener']('load',_0x267a02);},MOLPay[_0x402d('0x1')]['closeMolpay']=function(){mainUiFrame[_0x402d('0x22')][_0x402d('0x50')]();},MOLPay[_0x402d('0x1')][_0x402d('0x51')]=function(_0x29399b,_0x224981){_0x224981&&(testMerchantCredentialsCallback=_0x224981),molpayCredentialsRequestFrame=document[_0x402d('0x42')](_0x402d('0x43'));var _0x3decda=function(_0x1f7e58){molpayCredentialsRequestFrame[_0x402d('0x22')]['testMerchantCredentials'](_0x29399b,onTestMerchantCredentialsDone),molpayCredentialsRequestFrame[_0x402d('0x2a')](_0x402d('0x46'),_0x3decda);};molpayCredentialsRequestFrame['allowScriptAccess']=_0x402d('0x49'),molpayCredentialsRequestFrame[_0x402d('0x4e')](_0x402d('0x4f'),molpaySdkUrl),hideFrame(molpayCredentialsRequestFrame),document['body']['appendChild'](molpayCredentialsRequestFrame),molpayCredentialsRequestFrame[_0x402d('0x24')](_0x402d('0x46'),_0x3decda);},MOLPay[_0x402d('0x1')]['testMerchantChannels']=function(_0xa9cca2,_0x3f2810){_0x3f2810&&(testMerchantChannelsCallback=_0x3f2810),molpayChannelsRequestFrame=document[_0x402d('0x42')](_0x402d('0x43'));var _0x6556d5=function(_0x70eb25){molpayChannelsRequestFrame['contentWindow'][_0x402d('0x52')](_0xa9cca2,onTestMerchantChannelsDone),molpayChannelsRequestFrame[_0x402d('0x2a')](_0x402d('0x46'),_0x6556d5);};molpayChannelsRequestFrame['allowScriptAccess']=_0x402d('0x49'),molpayChannelsRequestFrame[_0x402d('0x4e')]('src',molpaySdkUrl),hideFrame(molpayChannelsRequestFrame),document[_0x402d('0x53')]['appendChild'](molpayChannelsRequestFrame),molpayChannelsRequestFrame['addEventListener'](_0x402d('0x46'),_0x6556d5);};var molpay=new MOLPay();module['exports']=molpay; \ No newline at end of file +var _0x818b=['toast','showWithOptions','bottom','requestPermission','WRITE_EXTERNAL_STORAGE','hasPermission','indexOf','replace','atob','innerHTML','base64ImageUrlData','filename','saveBase64Image','cordova/exec','startMolpay','module_id','wrapper_version','getElementById','molpay','padding','border','createElement','iframe','updateSdkData','load','mainUiFrame','allowScriptAccess','always','setAttribute','src','transactionRequest','body','closeMolpay','closemolpay','testMerchantCredentials','appendChild','testMerchantChannels','exports','open','InAppBrowser','prototype','remove','removeChild','length','parentElement','molpay-mobile-xdk-cordova','mptransactionresults://','mprunscriptonpopup://','mpcloseallwindows://','mppinstructioncapture://','MOLPay/result.php','MOLPay/nbepay.php','\x22msgType\x22:\x22B4\x22','\x22msgType\x22:\x22C6\x22','style','visibility','hidden','position','absolute','width','0px','height','visible','100%','=0x0;_0xa1aca4--)this[_0xa1aca4]&&this[_0xa1aca4][_0xb818('0x6')]&&this[_0xa1aca4][_0xb818('0x6')][_0xb818('0x4')](this[_0xa1aca4]);};var isInternalDebugging=!0x1,moduleId=_0xb818('0x7'),wrapperVersion='2',molpaySdkUrl='molpay-mobile-xdk-www/index.html',mpopenmolpaywindow='mpopenmolpaywindow://',mptransactionresults=_0xb818('0x8'),mprunscriptonpopup=_0xb818('0x9'),mpcloseallwindows=_0xb818('0xa'),mppinstructioncapture=_0xb818('0xb'),molpayresulturl=_0xb818('0xc'),molpaynbepayurl=_0xb818('0xd'),b4results=_0xb818('0xe'),c6results=_0xb818('0xf'),molpayPaymentDetails,transactionResultCallback,molpayDiv,mainUiFrame,bankUiWindow,molpayTransactionRequestFrame,isClosingMolpay=!0x1,hideFrame=function(_0x1e65e1){_0x1e65e1[_0xb818('0x10')][_0xb818('0x11')]=_0xb818('0x12'),_0x1e65e1[_0xb818('0x10')][_0xb818('0x13')]=_0xb818('0x14'),_0x1e65e1['style'][_0xb818('0x15')]=_0xb818('0x16'),_0x1e65e1[_0xb818('0x10')][_0xb818('0x17')]=_0xb818('0x16');},showFrame=function(_0x28814b){_0x28814b[_0xb818('0x10')][_0xb818('0x11')]=_0xb818('0x18'),_0x28814b[_0xb818('0x10')][_0xb818('0x13')]=_0xb818('0x14'),_0x28814b[_0xb818('0x10')]['width']=_0xb818('0x19'),_0x28814b['style'][_0xb818('0x17')]='100%';},postMolpayResultHandler=function(_0x281f7c){var _0x348891=_0x281f7c;if(_0x348891){var _0x294224=new RegExp(_0xb818('0x1a')),_0x171db2=_0x294224[_0xb818('0x1b')](_0x348891);_0x171db2&&(_0x348891=_0x348891['slice'](0x0,_0x171db2[_0xb818('0x1c')]));var _0x23a63a=function(_0x5d76d1){var _0x15ecde,_0x1fe302,_0x2d0799=_0x5d76d1,_0x3d2a51=new RegExp('<','g'),_0x1160c3=new RegExp('<'),_0x270f4d=new RegExp('>'),_0x7bba17=_0x2d0799[_0xb818('0x1d')](_0x3d2a51);if(_0x2d0799&&_0x7bba17&&_0x1160c3[_0xb818('0x1b')](_0x2d0799)&&_0x270f4d[_0xb818('0x1b')](_0x2d0799))for(var _0x2258a5=_0x7bba17[_0xb818('0x5')]-0x1;_0x2258a5>=0x0;_0x2258a5--)_0x15ecde=_0x1160c3[_0xb818('0x1b')](_0x2d0799)[_0xb818('0x1c')],_0x1fe302=_0x270f4d[_0xb818('0x1b')](_0x2d0799)[_0xb818('0x1c')],_0x2d0799=_0x2d0799['substring'](0x0,_0x15ecde)+''+_0x2d0799['substring'](_0x1fe302+0x1);return _0x2d0799;};_0x348891=_0x23a63a(_0x348891);var _0x4d6407,_0x3d3200;if(_0x4d6407=new RegExp(b4results),_0x4d6407[_0xb818('0x1e')](_0x348891)&&(_0x3d3200=JSON[_0xb818('0x1f')](_0x348891))){var _0x325f54=_0x3d3200[_0xb818('0x20')];_0x325f54&&mainUiFrame[_0xb818('0x21')]['transactionRequestWithTransactionId'](_0x325f54);}}},isBankUiWindowClosedByCloseWindowEvent=!0x1,createBankUiWindow=function(_0x29fe9a){var _0x1fd6b2='data:text/html;base64,'+_0x29fe9a;bankUiWindow=window[_0xb818('0x0')](_0x1fd6b2,_0xb818('0x22'),_0xb818('0x23'));var _0x253268=function(_0x12a1cb){isBankUiWindowClosedByCloseWindowEvent||mainUiFrame[_0xb818('0x21')]['transactionRequest'](),bankUiWindow[_0xb818('0x24')]('exit',_0x253268);};bankUiWindow[_0xb818('0x25')](_0xb818('0x26'),_0x253268);var _0x2b5926=function(_0x56e81f){var _0x729d0d;_0x729d0d=new RegExp(molpaynbepayurl),_0x56e81f&&_0x729d0d['test'](_0x56e81f[_0xb818('0x27')])&&(bankUiWindow[_0xb818('0x28')]({'code':_0xb818('0x29')},function(_0x136c24){}),bankUiWindow[_0xb818('0x28')]({'code':'window.close\x20=\x20function\x20()\x20{\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20window.location.assign(window.location);\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20\x20};'},function(_0x4bac2e){}));};bankUiWindow[_0xb818('0x25')]('loadstop',_0x2b5926);var _0x23246e=function(_0x5ae4a1){var _0x4ff115;if(mainUiFrame[_0xb818('0x21')][_0xb818('0x2a')]({'requestPath':_0x5ae4a1[_0xb818('0x27')]}),_0x4ff115=new RegExp(molpaynbepayurl),_0x5ae4a1&&_0x4ff115[_0xb818('0x1e')](_0x5ae4a1[_0xb818('0x27')]))var _0x40bcf1=0xa,_0x5e4087=0x0,_0x14794c=setInterval(function(){_0x30f31d();},0x3e8),_0x30f31d=function(){_0x5e4087++,_0x5e4087>_0x40bcf1?clearInterval(_0x14794c):bankUiWindow['executeScript']({'code':'document.body.innerHTML'},function(_0x319bbf){var _0x58c9bb=_0x319bbf[0x0],_0x4384ef=new RegExp(b4results);_0x4384ef[_0xb818('0x1e')](_0x58c9bb)&&(postMolpayResultHandler(_0x58c9bb),bankUiWindow['removeEventListener'](_0xb818('0x2b'),_0x23246e),bankUiWindow[_0xb818('0x2c')](),clearInterval(_0x14794c));});};};bankUiWindow[_0xb818('0x25')](_0xb818('0x2b'),_0x23246e);},inAppCallback=function(_0x4ff1a6){function _0x2bf682(){window[_0xb818('0x2d')][_0xb818('0x2e')][_0xb818('0x2f')]({'message':'Image\x20saved\x20success!','duration':0x3e8,'position':_0xb818('0x30')});}function _0x40a3a4(){window[_0xb818('0x2d')][_0xb818('0x2e')]['showWithOptions']({'message':'Image\x20saved\x20fail!','duration':0x3e8,'position':_0xb818('0x30')});}function _0x3cccc2(){var _0x4ff1a6=cordova['plugins']['permissions'];_0x40a3a4();var _0x2fef0e=function(){_0x40a3a4();};_0x4ff1a6[_0xb818('0x31')](_0x4ff1a6[_0xb818('0x32')],function(_0x17e81c){_0x17e81c[_0xb818('0x33')]?_0x3bebe1():_0x2fef0e();},_0x2fef0e);}var _0x4d00e4,_0x3690b2;if(_0x4ff1a6&&_0x4ff1a6[_0xb818('0x34')](mpopenmolpaywindow)>-0x1)_0x3690b2=new RegExp(mpopenmolpaywindow,'g'),_0x4d00e4=_0x4ff1a6[_0xb818('0x35')](_0x3690b2,''),_0x4d00e4&&_0x4d00e4[_0xb818('0x5')]>0x0&&createBankUiWindow(_0x4d00e4);else if(_0x4ff1a6&&_0x4ff1a6['indexOf'](mpcloseallwindows)>-0x1)isBankUiWindowClosedByCloseWindowEvent=!0x0,bankUiWindow[_0xb818('0x2c')]();else if(_0x4ff1a6&&_0x4ff1a6[_0xb818('0x34')](mptransactionresults)>-0x1){if(_0x3690b2=new RegExp(mptransactionresults,'g'),_0x4d00e4=_0x4ff1a6[_0xb818('0x35')](_0x3690b2,''),_0x4d00e4&&_0x4d00e4[_0xb818('0x5')]>0x0){var _0x25bc3c=window[_0xb818('0x36')](_0x4d00e4),_0x5c78e8=JSON['stringify'](JSON[_0xb818('0x1f')](_0x25bc3c));transactionResultCallback(_0x5c78e8),isClosingMolpay&&(molpayDiv[_0xb818('0x37')]='',isClosingMolpay=!0x1),molpayTransactionRequestFrame&&molpayTransactionRequestFrame[_0xb818('0x3')]();}}else if(_0x4ff1a6&&_0x4ff1a6[_0xb818('0x34')](mppinstructioncapture)>-0x1){_0x3690b2=new RegExp(mppinstructioncapture,'g'),_0x4d00e4=_0x4ff1a6[_0xb818('0x35')](_0x3690b2,'');var _0x22a5c9=JSON[_0xb818('0x1f')](atob(_0x4d00e4)),_0x530cfe={'data':_0x22a5c9[_0xb818('0x38')],'prefix':_0x22a5c9[_0xb818('0x39')],'format':'PNG','quality':0x64,'mediaScanner':!0x0};window['imageSaver'][_0xb818('0x3a')](_0x530cfe,function(_0x507bfb){_0x2bf682();},_0x3cccc2);var _0x3bebe1=function(){window['imageSaver'][_0xb818('0x3a')](_0x530cfe,function(_0x5250cb){_0x2bf682();},function(_0x1ca08a){_0x40a3a4();});};}if(_0x4ff1a6&&_0x4ff1a6[_0xb818('0x34')](mprunscriptonpopup)>-0x1&&(_0x3690b2=new RegExp(mprunscriptonpopup,'g'),_0x4d00e4=_0x4ff1a6[_0xb818('0x35')](_0x3690b2,''),_0x4d00e4&&_0x4d00e4['length']>0x0)){var _0x2d1258=window[_0xb818('0x36')](_0x4d00e4);bankUiWindow[_0xb818('0x28')]({'code':_0x2d1258},function(_0x34142b){});}},molpayCredentialsRequestFrame,testMerchantCredentialsCallback,onTestMerchantCredentialsDone=function(_0x4d3d8a,_0x2d4053){testMerchantCredentialsCallback(_0x4d3d8a,_0x2d4053),isClosingMolpay&&(molpayDiv['innerHTML']='',isClosingMolpay=!0x1),molpayCredentialsRequestFrame&&molpayCredentialsRequestFrame[_0xb818('0x3')]();},molpayChannelsRequestFrame,testMerchantChannelsCallback,onTestMerchantChannelsDone=function(_0xee5a6f,_0x2e9b57){testMerchantChannelsCallback&&testMerchantChannelsCallback(_0xee5a6f,_0x2e9b57),isClosingMolpay&&(molpayDiv[_0xb818('0x37')]='',isClosingMolpay=!0x1),molpayChannelsRequestFrame&&molpayChannelsRequestFrame[_0xb818('0x3')]();},exec=require(_0xb818('0x3b'));MOLPay[_0xb818('0x2')][_0xb818('0x3c')]=function(_0x1b877d,_0x302774){isClosingMolpay=!0x1,isBankUiWindowClosedByCloseWindowEvent=!0x1;try{molpayPaymentDetails=JSON[_0xb818('0x1f')](_0x1b877d);}catch(_0x1b5fd2){molpayPaymentDetails=_0x1b877d;}molpayPaymentDetails[_0xb818('0x3d')]=moduleId,molpayPaymentDetails[_0xb818('0x3e')]=wrapperVersion,transactionResultCallback=_0x302774,molpayDiv=document[_0xb818('0x3f')](_0xb818('0x40')),molpayDiv['style']['width']=_0xb818('0x19'),molpayDiv['style'][_0xb818('0x41')]=_0xb818('0x16'),molpayDiv['style'][_0xb818('0x42')]=_0xb818('0x16'),mainUiFrame=document[_0xb818('0x43')](_0xb818('0x44'));var _0x7d1a6e=function(_0x8ab40c){mainUiFrame['contentWindow'][_0xb818('0x45')](JSON['stringify'](molpayPaymentDetails),inAppCallback),mainUiFrame['removeEventListener'](_0xb818('0x46'),_0x7d1a6e);};mainUiFrame['style'][_0xb818('0x42')]='0px',mainUiFrame[_0xb818('0x10')][_0xb818('0x41')]=_0xb818('0x16'),mainUiFrame[_0xb818('0x10')]['width']=_0xb818('0x19'),mainUiFrame[_0xb818('0x10')][_0xb818('0x17')]=_0xb818('0x19'),mainUiFrame['id']=_0xb818('0x47'),mainUiFrame[_0xb818('0x48')]=_0xb818('0x49'),mainUiFrame[_0xb818('0x4a')](_0xb818('0x4b'),molpaySdkUrl),molpayDiv['appendChild'](mainUiFrame),mainUiFrame[_0xb818('0x25')](_0xb818('0x46'),_0x7d1a6e);},MOLPay['prototype'][_0xb818('0x4c')]=function(_0x4c4e8c,_0x2a7fc3){try{molpayPaymentDetails=JSON['parse'](_0x4c4e8c);}catch(_0x1b3ba7){molpayPaymentDetails=_0x4c4e8c;}molpayPaymentDetails[_0xb818('0x3d')]=moduleId,molpayPaymentDetails[_0xb818('0x3e')]=wrapperVersion,transactionResultCallback=_0x2a7fc3,molpayTransactionRequestFrame=document['createElement']('iframe');var _0x4031be=function(_0x2cb048){molpayTransactionRequestFrame[_0xb818('0x21')][_0xb818('0x45')](molpayPaymentDetails,inAppCallback),molpayTransactionRequestFrame[_0xb818('0x24')]('load',_0x4031be);};molpayTransactionRequestFrame['id']='molpayTransactionRequestFrame',molpayTransactionRequestFrame[_0xb818('0x48')]='always',molpayTransactionRequestFrame[_0xb818('0x4a')](_0xb818('0x4b'),molpaySdkUrl),hideFrame(molpayTransactionRequestFrame),document[_0xb818('0x4d')]['appendChild'](molpayTransactionRequestFrame),molpayTransactionRequestFrame[_0xb818('0x25')]('load',_0x4031be);},MOLPay[_0xb818('0x2')][_0xb818('0x4e')]=function(){mainUiFrame[_0xb818('0x21')][_0xb818('0x4f')]();},MOLPay[_0xb818('0x2')][_0xb818('0x50')]=function(_0x555e43,_0x1458c2){_0x1458c2&&(testMerchantCredentialsCallback=_0x1458c2),molpayCredentialsRequestFrame=document[_0xb818('0x43')](_0xb818('0x44'));var _0x4cb98b=function(_0x4a8416){molpayCredentialsRequestFrame[_0xb818('0x21')][_0xb818('0x50')](_0x555e43,onTestMerchantCredentialsDone),molpayCredentialsRequestFrame['removeEventListener'](_0xb818('0x46'),_0x4cb98b);};molpayCredentialsRequestFrame[_0xb818('0x48')]=_0xb818('0x49'),molpayCredentialsRequestFrame[_0xb818('0x4a')](_0xb818('0x4b'),molpaySdkUrl),hideFrame(molpayCredentialsRequestFrame),document[_0xb818('0x4d')][_0xb818('0x51')](molpayCredentialsRequestFrame),molpayCredentialsRequestFrame[_0xb818('0x25')](_0xb818('0x46'),_0x4cb98b);},MOLPay['prototype']['testMerchantChannels']=function(_0x44ad99,_0x56e61c){_0x56e61c&&(testMerchantChannelsCallback=_0x56e61c),molpayChannelsRequestFrame=document[_0xb818('0x43')](_0xb818('0x44'));var _0x28e3b0=function(_0x5b7083){molpayChannelsRequestFrame[_0xb818('0x21')][_0xb818('0x52')](_0x44ad99,onTestMerchantChannelsDone),molpayChannelsRequestFrame[_0xb818('0x24')](_0xb818('0x46'),_0x28e3b0);};molpayChannelsRequestFrame['allowScriptAccess']=_0xb818('0x49'),molpayChannelsRequestFrame[_0xb818('0x4a')](_0xb818('0x4b'),molpaySdkUrl),hideFrame(molpayChannelsRequestFrame),document[_0xb818('0x4d')][_0xb818('0x51')](molpayChannelsRequestFrame),molpayChannelsRequestFrame['addEventListener'](_0xb818('0x46'),_0x28e3b0);};var molpay=new MOLPay();module[_0xb818('0x53')]=molpay; \ No newline at end of file diff --git a/package.json b/package.json index 72afeda..c21533c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "molpay-mobile-xdk-cordova", - "version": "3.18.1", + "version": "3.18.2", "description": "MOLPay official in-app payment module for Cordova", "cordova": { "id": "molpay-mobile-xdk-cordova", diff --git a/plugin.xml b/plugin.xml index 404fc67..ae37c6a 100644 --- a/plugin.xml +++ b/plugin.xml @@ -1,7 +1,7 @@ + version="3.18.2"> MOLPay XDK for Cordova MOLPay official in-app payment module for Cordova MOLPay Mobile Division