1!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{("undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this).pingpp=e()}}(function(){return function i(l,c,o){function s(n,e){if(!c[n]){if(!l[n]){var a="function"==typeof require&&require;if(!e&&a)return a(n,!0);if(u)return u(n,!0);var t=new Error("Cannot find module '"+n+"'");throw t.code="MODULE_NOT_FOUND",t}var r=c[n]={exports:{}};l[n][0].call(r.exports,function(e){return s(l[n][1][e]||e)},r,r.exports,i,l,c,o)}return c[n].exports}for(var u="function"==typeof require&&require,e=0;e<o.length;e++)s(o[e]);return s}({1:[function(e,n,a){var i={}.hasOwnProperty,l=e('./callbacks'),c=e('./utils');n.exports={signAgreement:function(e){var n;if('string'==typeof e)try{n=JSON.parse(e)}catch(e){return l.innerAgreementCallback('fail',l.error('json_decode_fail',e)),!1}else n=e;if(void 0===n)return l.innerAgreementCallback('fail',l.error('json_decode_fail')),!1;if(!i.call(n,'object')||'agreement'!==n.object||!i.call(n,'channel')||!i.call(n,'credential')||'object'!=typeof n.credential)return l.innerAgreementCallback('fail',l.error('invalid_object')),!1;if(!i.call(n.credential,n.channel))return l.innerAgreementCallback('fail',l.error('invalid_credential')),!1;var a,t=n.credential[n.channel];if('string'==typeof t?a=t:i.call(t,'credential')&&'string'==typeof t.credential&&(a=t.credential),void 0===a)return l.innerAgreementCallback('fail',l.error('invalid_credential')),!1;if('alipay'===n.channel.substring(0,6)){var r=new URL(a);a='http://d.alipay.com/i/index.htm?iframeSrc='+encodeURIComponent("alipays://platformapi/startapp?appId=60000157&appClearTop=false&startMultApp=YES&sign_params="+encodeURIComponent(r.search.substring(1)))}return setTimeout(function(){c.redirectTo(a)},0),!0}}},{"./callbacks":2,"./utils":40}],2:[function(a,e,n){e.exports={userCallback:void 0,urlReturnCallback:void 0,urlReturnChannels:['alipay_pc_direct'],userAgreementCallback:void 0,innerCallback:function(e,n){'function'==typeof this.userCallback&&(void 0===n&&(n=this.error()),this.userCallback(e,n),this.userCallback=void 0,a('./payment_elements').clear())},error:function(e,n){return{msg:e=void 0===e?'':e,extra:n=void 0===n?'':n}},triggerUrlReturnCallback:function(e,n){'function'==typeof this.urlReturnCallback&&this.urlReturnCallback(e,n)},shouldReturnUrlByCallback:function(e){return'function'==typeof this.urlReturnCallback&&-1!==this.urlReturnChannels.indexOf(e)},innerAgreementCallback:function(e,n){'function'==typeof this.userAgreementCallback&&(void 0===n&&(n=this.error()),this.userAgreementCallback(e,n),this.userAgreementCallback=void 0)}}},{"./payment_elements":37}],3:[function(e,n,a){var t=e('../callbacks');n.exports={PINGPP_NOTIFY_URL_BASE:'https://notify.pingxx.com/notify',handleCharge:function(e){var n=e.credential[e.channel];n?this.callpay(n):t.innerCallback('fail',t.error('invalid_credential','missing_alipay_lite'))},alipayLiteEnabled:function(){return'undefined'!=typeof my&&my.tradePay},callpay:function(e){if(this.alipayLiteEnabled()){var n={};n.tradeNO=e,n.complete=function(e){9e3==e.resultCode?t.innerCallback('success'):6001==e.resultCode?t.innerCallback('cancel',t.error('ç¨æ·åæ¶æ¯ä»')):t.innerCallback('fail',t.error('æ¯ä»å¤±è´¥'))},my.tradePay(n)}else console.log('è¯·å¨æ¯ä»å®å°ç¨åºä¸æå¼')},runTestMode:function(e){var n='/charges/'+e.id;my.httpRequest({url:this.PINGPP_NOTIFY_URL_BASE+n+'?livemode=false',success:function(e){'success'==e.data?t.innerCallback('success'):t.innerCallback('fail',t.error('testmode_notify_fail'))},fail:function(){t.innerCallback('fail',t.error('network_err'))}})}}},{"../callbacks":2}],4:[function(e,n,a){var i=e('../utils'),l={}.hasOwnProperty;n.exports={ALIPAY_PC_DIRECT_URL:'https://mapi.alipay.com/gateway.do',handleCharge:function(e){var n=e.channel,a=e.credential[n],t=this.ALIPAY_PC_DIRECT_URL;l.call(a,'channel_url')&&(t=a.channel_url),l.call(a,'_input_charset')||l.call(a,'service')&&'create_direct_pay_by_user'===a.service&&(a._input_charset='utf-8');var r=i.stringifyData(a,n,!0);i.redirectTo(t+'?'+r,n)}}},{"../utils":40}],5:[function(e,n,a){var t={}.hasOwnProperty,r=e('../callbacks');n.exports={handleCharge:function(e){var n=e.credential[e.channel];t.call(n,'transaction_no')?this.tradePay(n.transaction_no):r.innerCallback('fail',r.error('invalid_credential','missing_field_transaction_no'))},ready:function(e){window.AlipayJSBridge?e&&e():document.addEventListener('AlipayJSBridgeReady',e,!1)},tradePay:function(e){this.ready(function(){AlipayJSBridge.call('tradePay',{tradeNO:e},function(e){'9000'==e.resultCode?r.innerCallback('success'):'6001'==e.resultCode?r.innerCallback('c
1ancel',r.error(e.result)):r.innerCallback('fail',r.error(e.result))})})}}},{"../callbacks":2}],6:[function(e,n,a){var l=e('../utils'),c=e('../mods'),o={}.hasOwnProperty;n.exports={ALIPAY_WAP_URL_OLD:'https://wappaygw.alipay.com/service/rest.htm',ALIPAY_WAP_URL:'https://mapi.alipay.com/gateway.do',handleCharge:function(e){var n=e.channel,a=e.credential[n],t=this.ALIPAY_WAP_URL;o.call(a,'req_data')?t=this.ALIPAY_WAP_URL_OLD:o.call(a,'channel_url')&&(t=a.channel_url),o.call(a,'_input_charset')||(o.call(a,'service')&&'alipay.wap.create.direct.pay.by.user'===a.service||o.call(a,'req_data'))&&(a._input_charset='utf-8');var r=t+'?'+l.stringifyData(a,n,!0),i=c.getExtraModule('ap');l.inWeixin()&&void 0!==i?i.pay(r):l.redirectTo(r,n)}}},{"../mods":36,"../utils":40}],7:[function(e,n,a){var t=e('../utils'),r=e('../callbacks'),i={}.hasOwnProperty;n.exports={handleCharge:function(e){var n=e.channel,a=e.credential[n];i.call(a,'url')?t.redirectTo(a.url+'?'+t.stringifyData(a,n),n):r.innerCallback('fail',r.error('invalid_credential','missing_field:url'))}}},{"../callbacks":2,"../utils":40}],8:[function(e,n,a){var i=e('../utils'),l={}.hasOwnProperty;n.exports={ALIPAY_PC_DIRECT_URL:'https://intlmapi.alipay.com/gateway.do',handleCharge:function(e){var n=e.channel,a=e.credential[n],t=this.ALIPAY_PC_DIRECT_URL;l.call(a,'channel_url')&&(t=a.channel_url),l.call(a,'_input_charset')||l.call(a,'service')&&'create_forex_trade'===a.service&&(a._input_charset='utf-8');var r=i.stringifyData(a,n,!0);i.redirectTo(t+'?'+r,n)}}},{"../utils":40}],9:[function(e,n,a){var l=e('../utils'),c=e('../mods'),o={}.hasOwnProperty;n.exports={ALIPAY_WAP_URL:'https://intlmapi.alipay.com/gateway.do',handleCharge:function(e){var n=e.channel,a=e.credential[n],t=this.ALIPAY_WAP_URL;o.call(a,'channel_url')&&(t=a.channel_url),o.call(a,'_input_charset')||o.call(a,'service')&&'create_forex_trade_wap'===a.service&&(a._input_charset='utf-8');var r=t+'?'+l.stringifyData(a,n,!0),i=c.getExtraModule('ap');l.inWeixin()&&void 0!==i?i.pay(r):l.redirectTo(r,n)}}},{"../mods":36,"../utils":40}],10:[function(e,n,a){var r=e('../callbacks'),t=e('../utils'),i=e('../stash'),l=e('../mods'),c={}.hasOwnProperty;n.exports={PINGPP_NOTIFY_URL_BASE:'https://notify.pingxx.com/notify',handleCharge:function(e){for(var n=e.credential[e.channel],a=['appId','timeStamp','nonceStr','package','signType','paySign'],t=0;t<a.length;t++)if(!c.call(n,a[t]))return void r.innerCallback('fail',r.error('invalid_credential','missing_field_'+a[t]));i.jsApiParameters=n,this.callpay()},callpay:function(){var e=this,n=l.getExtraModule('wx_jssdk');if(void 0!==n&&n.jssdkEnabled())n.callpay();else if('undefined'==typeof WeixinJSBridge){var a=function(){e.jsApiCall()};document.addEventListener?document.addEventListener('WeixinJSBridgeReady',a,!1):document.attachEvent&&(document.attachEvent('WeixinJSBridgeReady',a),document.attachEvent('onWeixinJSBridgeReady',a))}else this.jsApiCall()},jsApiCall:function(){c.call(i,'jsApiParameters')&&WeixinJSBridge.invoke('getBrandWCPayRequest',i.jsApiParameters,function(e){delete i.jsApiParameters,'get_brand_wcpay_request:ok'==e.err_msg?r.innerCallback('success'):'get_brand_wcpay_request:cancel'==e.err_msg?r.innerCallback('cancel'):r.innerCallback('fail',r.error('wx_result_fail',e.err_msg))})},runTestMode:function(e){if(confirm('模æä»æ¬¾ï¼')){var n='/charges/'+e.id;t.request(this.PINGPP_NOTIFY_URL_BASE+n+'?livemode=false','GET',null,function(e,n){if(200<=n&&n<400&&'success'==e)r.innerCallback('success');else{var a='http_code:'+n+';response:'+e;r.innerCallback('fail',r.error('testmode_notify_fail',a))}},function(){r.innerCallback('fail',r.error('network_err'))})}}}},{"../callbacks":2,"../mods":36,"../stash":38,"../utils":40}],11:[function(e,n,a){var t=e('./commons/redirect_base');n.exports={handleCharge:function(e){t.handleCharge(e)}}},{"./commons/redirect_base":14}],12:[function(e,n,a){var r=e('../utils'),i={}.hasOwnProperty;n.exports={handleCharge:function(e){var n,a=e.channel,t=e.credential[a];i.call(t,'channel_url')&&(n=t.channel_url,delete t.channel_url),r.formSubmit(n,'post',t)}}},{"../utils":40}],13:[function(e,n,a){var t=e('../utils'),r={}.hasOwnProperty;n.exports={CMB_WALLET_URL:'https://netpay.cmbchina.com/netpayment/BaseHttp.dll?MB_EUserPay',handleCharge:function(e){var n=e.credential[e.channel],a=this.CMB_WALLET_URL;r.call(n,'ChannelUrl')&&(a=n.ChannelUrl,delete n.ChannelUrl),r.call(n,'channelVersion')&&delete n.channelVersion,t.formSubmit(a,'post',n)}}},{"../utils":40}],14:[function(e,n,a){var t=e('../../utils'),r=e('../../callbacks'),i={}.hasOwnProperty;n.exports={handleCharge:function(e){var n,a=e.credential[e.channel];if('string'==typeof a)n=a;else{if(!i.call(a,'url'))return void r.innerCallback('fail',r.error('invalid_credential','credential format is incorrect'));n=a.url}t.redirectTo(n,e.channel)}}},{"../../callbacks":2,"../../utils":40}],15:[function(e,n,a){var t=e('../utils');n.exports={handleCharge:function(e){var n=e.credential[e.channel];t.formSubmit(n.request_url,'post',n.request_data)}}},{"../utils":40}],16:[function(e,n,a){var t=e('../utils');n.exports={CP_B2B_URL:'https://payment.chinapay.com/CTITS/service/rest/page/nref/000000000017/0/0/0/0/0',handleCharge:function(e){var n=e.credential[e.channel];t.formSubmit(this.CP_B2B_URL,'post',n)}}},{"../utils":40}],17:[function(e,n,a){var t,o,r=e('../../stash'),i={}.hasOwnProperty;o={PADCHAR:'=',ALPHA:'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789
1+/',makeDOMException:function(){try{return new DOMException(DOMException.INVALID_CHARACTER_ERR)}catch(e){var n=new Error('DOM Exception 5');return n.code=n.number=5,n.name=n.description='INVALID_CHARACTER_ERR',n.toString=function(){return'Error: '+n.name+': '+n.message},n}},getbyte64:function(e,n){var a=o.ALPHA.indexOf(e.charAt(n));if(-1===a)throw o.makeDOMException();return a},decode:function(e){e=''+e;var n,a,t,r=o.getbyte64,i=e.length;if(0===i)return e;if(i%4!=0)throw o.makeDOMException();n=0,e.charAt(i-1)===o.PADCHAR&&(n=1,e.charAt(i-2)===o.PADCHAR&&(n=2),i-=4);var l=[];for(a=0;a<i;a+=4)t=r(e,a)<<18|r(e,a+1)<<12|r(e,a+2)<<6|r(e,a+3),l.push(String.fromCharCode(t>>16,t>>8&255,255&t));switch(n){case 1:t=r(e,a)<<18|r(e,a+1)<<12|r(e,a+2)<<6,l.push(String.fromCharCode(t>>16,t>>8&255));break;case 2:t=r(e,a)<<18|r(e,a+1)<<12,l.push(String.fromCharCode(t>>16))}return l.join('')},getbyte:function(e,n){var a=e.charCodeAt(n);if(255<a)throw o.makeDOMException();return a},encode:function(e){if(1!==arguments.length)throw new SyntaxError('Not enough arguments');var n,a,t=o.PADCHAR,r=o.ALPHA,i=o.getbyte,l=[],c=(e=''+e).length-e.length%3;if(0===e.length)return e;for(n=0;n<c;n+=3)a=i(e,n)<<16|i(e,n+1)<<8|i(e,n+2),l.push(r.charAt(a>>18)),l.push(r.charAt(a>>12&63)),l.push(r.charAt(a>>6&63)),l.push(r.charAt(63&a));switch(e.length-c){case 1:a=i(e,n)<<16,l.push(r.charAt(a>>18)+r.charAt(a>>12&63)+t+t);break;case 2:a=i(e,n)<<16|i(e,n+1)<<8,l.push(r.charAt(a>>18)+r.charAt(a>>12&63)+r.charAt(a>>6&63)+t)}return l.join('')}},(t={}).url='pay.htm',t.pay=function(e){var n=encodeURIComponent(o.encode(e));i.call(r,'APURL')&&(t.url=r.APURL),location.href=t.url+'?goto='+n},t.decode=function(e){return o.decode(decodeURIComponent(e))},n.exports=t},{"../../stash":38}],18:[function(e,n,a){var t=e('./wx_lite');n.exports=t},{"./wx_lite":26}],19:[function(e,n,a){var t=e('./commons/redirect_base'),r=e('../callbacks'),i=e('../utils'),l={}.hasOwnProperty;n.exports={handleCharge:function(e){var n=e.extra;if(l.call(n,'pay_channel')){var a=n.pay_channel;'wx'!==a||i.inWeixin()?'alipay'!==a||i.inAlipay()?t.handleCharge(e):r.innerCallback('fail',r.error('Not in the Alipay browser')):r.innerCallback('fail',r.error('Not in the WeChat browser'))}else r.innerCallback('fail',r.error('invalid_charge','charge æ ¼å¼ä¸æ£ç¡®'))}}},{"../callbacks":2,"../utils":40,"./commons/redirect_base":14}],20:[function(e,n,a){var t=e('../utils'),r={}.hasOwnProperty;n.exports={JDPAY_WAP_URL_OLD:'https://m.jdpay.com/wepay/web/pay',JDPAY_H5_URL:'https://h5pay.jd.com/jdpay/saveOrder',JDPAY_PC_URL:'https://wepay.jd.com/jdpay/saveOrder',handleCharge:function(e){var n=e.credential[e.channel],a=this.JDPAY_H5_URL;r.call(n,'channelUrl')?(a=n.channelUrl,delete n.channelUrl):r.call(n,'merchantRemark')&&(a=this.JDPAY_WAP_URL_OLD),t.formSubmit(a,'post',n)}}},{"../utils":40}],21:[function(e,n,a){var t=e('../utils');n.exports={handleCharge:function(e){var n=e.credential[e.channel];t.redirectTo(n,e.channel)}}},{"../utils":40}],22:[function(e,n,a){var t=e('../callbacks'),r=e('../utils'),i=e('../stash'),l={}.hasOwnProperty;n.exports={SRC_URL:'https://open.mobile.qq.com/sdk/qqapi.js?_bid=152',ID:'mqq_api',handleCharge:function(e){var n=e.credential[e.channel];l.call(n,'token_id')?(i.tokenId=n.token_id,r.loadUrlJs(this.ID,this.SRC_URL,this.callpay)):t.innerCallback('fail',t.error('invalid_credential','missing_token_id'))},callpay:function(){if('undefined'!=typeof mqq){if(0==mqq.QQVersion)return t.innerCallback('fail',t.error('Not in the QQ client')),void delete i.tokenId;mqq.tenpay.pay({tokenId:i.tokenId},function(e){0==e.resultCode?t.innerCallback('success'):t.innerCallback('fail',t.error(e.retmsg))})}else t.innerCallback('fail',t.error('network_err'));delete i.tokenId}}},{"../callbacks":2,"../stash":38,"../utils":40}],23:[function(e,n,a){arguments[4][12][0].apply(a,arguments)},{"../utils":40,dup:12}],24:[function(e,n,a){var t=e('../utils');n.exports={UPACP_PC_URL:'https://gateway.95516.com/gateway/api/frontTransReq.do',handleCharge:function(e){var n=e.credential[e.channel];t.formSubmit(this.UPACP_PC_URL,'post',n)}}},{"../utils":40}],25:[function(e,n,a){var t=e('../utils');n.exports={UPACP_WAP_URL:'https://gateway.95516.com/gateway/api/frontTransReq.do',handleCharge:function(e){var n=e.credential[e.channel];t.formSubmit(this.UPACP_WAP_URL,'post',n)}}},{"../utils":40}],26:[function(e,n,a){var r=e('../stash'),i=e('../callbacks'),l={}.hasOwnProperty;n.exports={PINGPP_NOTIFY_URL_BASE:'https://notify.pingxx.com/notify',handleCharge:function(e){for(var n=e.credential[e.channel],a=['appId','timeStamp','nonceStr','package','signType','paySign'],t=0;t<a.length;t++)if(!l.call(n,a[t]))return void i.innerCallback('fail',i.error('invalid_credential','missing_field_'+a[t]));r.jsApiParameters=n,this.callpay()},wxLiteEnabled:function(){return'undefined'!=typeof wx&&wx.requestPayment},callpay:function(){if(this.wxLiteEnabled()){var e=r.jsApiParameters;delete e.appId,e.complete=function(e){'requestPayment:ok'===e.errMsg&&i.innerCallback('success'),'requestPayment:cancel'!==e.errMsg&&'requestPayment:fail cancel'!==e.errMsg||i.innerCallback('c
1ancel',i.error('ç¨æ·åæ¶æ¯ä»')),'undefined'!==e.err_code&&'undefined'!==e.err_desc&&i.innerCallback('fail',i.error(e.err_desc,e))},wx.requestPayment(e)}else console.log('请å¨å¾®ä¿¡å°ç¨åºä¸æå¼')},runTestMode:function(e){var n='/charges/'+e.id;wx.request({url:this.PINGPP_NOTIFY_URL_BASE+n+'?livemode=false',success:function(e){'success'==e.data?i.innerCallback('success'):i.innerCallback('fail',i.error('testmode_notify_fail'))},fail:function(){i.innerCallback('fail',i.error('network_err'))}})}}},{"../callbacks":2,"../stash":38}],27:[function(e,n,a){arguments[4][10][0].apply(a,arguments)},{"../callbacks":2,"../mods":36,"../stash":38,"../utils":40,dup:10}],28:[function(e,n,a){var t=e('./wx_pub');t.callpay=function(){var e=this;if('undefined'==typeof WeixinJSBridge){var n=function(){e.jsApiCall()};document.addEventListener?document.addEventListener('WeixinJSBridgeReady',n,!1):document.attachEvent&&(document.attachEvent('WeixinJSBridgeReady',n),document.attachEvent('onWeixinJSBridgeReady',n))}else this.jsApiCall()},n.exports=t},{"./wx_pub":27}],29:[function(e,n,a){var t=e('../utils'),r=e('../callbacks'),i={}.hasOwnProperty;n.exports={handleCharge:function(e){var n=e.credential[e.channel];'string'==typeof n?t.redirectTo(n,e.channel):'object'==typeof n&&i.call(n,'url')?t.redirectTo(n.url,e.channel):r.innerCallback('fail',r.error('invalid_credential','credential æ ¼å¼ä¸æ£ç¡®'))}}},{"../callbacks":2,"../utils":40}],30:[function(e,n,a){var l=e('../utils'),c=e('../callbacks'),o={}.hasOwnProperty;n.exports={YEEPAY_WAP_URL:'https://ok.yeepay.com/paymobile/api/pay/request',YEEPAY_WAP_TEST_URL:'http://mobiletest.yeepay.com/paymobile/api/pay/request',handleCharge:function(e){for(var n,a=e.channel,t=e.credential[a],r=['merchantaccount','encryptkey','data'],i=0;i<r.length;i++)if(!o.call(t,r[i]))return void c.innerCallback('fail',c.error('invalid_credential','missing_field_'+r[i]));n=o.call(t,'mode')&&'test'==t.mode?this.YEEPAY_WAP_TEST_URL:this.YEEPAY_WAP_URL,l.redirectTo(n+'?'+l.stringifyData(t,a,!0),e.channel)}}},{"../callbacks":2,"../utils":40}],31:[function(e,n,a){var i=e('./utils'),r=e('./stash'),l=e('./libs/md5'),t={seperator:'###',limit:1,report_url:'https://statistics.pingxx.com/one_stats',timeout:100},c=function(e,n){var a=new RegExp('(^|&)'+n+'=([^&]*)(&|$)','i'),t=e.substring(0).match(a);return null!==t?unescape(t[2]):null};t.store=function(e){if('undefined'!=typeof localStorage&&null!==localStorage){var n={};n.app_id=e.app_id||r.app_id||'app_not_defined',n.ch_id=e.ch_id||'',n.channel=e.channel||'',n.type=e.type||'',n.user_agent=navigator.userAgent,n.host=window.location.host,n.time=(new Date).getTime(),n.puid=r.puid;var a='app_id='+n.app_id+'&channel='+n.channel+'&ch_id='+n.ch_id+'&host='+n.host+'&time='+n.time+'&type='+n.type+'&user_agent='+n.user_agent+'&puid='+n.pu
1id,t=a;null!==localStorage.getItem('PPP_ONE_STATS')&&0!==localStorage.getItem('PPP_ONE_STATS').length&&(t=localStorage.getItem('PPP_ONE_STATS')+this.seperator+a);try{localStorage.setItem('PPP_ONE_STATS',t)}catch(e){}}},t.send=function(){if('undefined'!=typeof localStorage&&null!==localStorage){var e=localStorage.getItem('PPP_ONE_STATS');if(!(null===e||e.split(this.seperator).length<this.limit))try{for(var n=[],a=e.split(this.seperator),t=l(a.join('&')),r=0;r<a.length;r++)n.push({app_id:c(a[r],'app_id'),channel:c(a[r],'channel'),ch_id:c(a[r],'ch_id'),host:c(a[r],'host'),time:c(a[r],'time'),type:c(a[r],'type'),user_agent:c(a[r],'user_agent'),puid:c(a[r],'puid')});i.request(this.report_url,'POST',n,function(e,n){200==n&&localStorage.removeItem('PPP_ONE_STATS')},void 0,{'X-Pingpp-Report-Token':t})}catch(e){}}},t.report=function(e){var n=this;n.store(e),setTimeout(function(){!i.inWxLite()&&n.send()},n.timeout)},n.exports=t},{"./libs/md5":34,"./stash":38,"./utils":40}],32:[function(e,n,a){n.exports={Error:function(e,n){this.message=e,this.extra=n}}},{}],33:[function(e,n,a){var t=e('./stash'),r=e('./utils'),i=e('./collection');n.exports={SRC_URL:'https://cookie.pingxx.com',init:function(){var e=this;r.documentReady(function(){try{!r.inWxLite()&&!r.inAlipayLite()&&e.initPuid()}catch(e){}})},initPuid:function(){if('undefined'!=typeof window&&'undefined'!=typeof localStorage&&null!==localStorage){var e=localStorage.getItem('pingpp_uid');if(null===e){e=r.randomString();try{localStorage.setItem('pingpp_uid',e)}catch(e){}}if(t.puid=e,!document.getElementById('p_analyse_iframe')){var n;try{n=document.createElement('iframe')}catch(e){n=document.createElement('<iframe name="ifr"></iframe>')}n.id='p_analyse_iframe',n.src=this.SRC_URL+'/?puid='+e,n.style.display='none',document.body.appendChild(n)}setTimeout(function(){i.send()},0)}}}},{"./collection":31,"./stash":38,"./utils":40}],34:[function(e,n,a){!function(){function d(e,n){var a=(65535&e)+(65535&n);return(e>>16)+(n>>16)+(a>>16)<<16|65535&a}function c(e,n,a,t,r,i){return d((l=d(d(n,e),d(t,i)))<<(c=r)|l>>>32-c,a);var l,c}function p(e,n,a,t,r,i,l){return c(n&a|~n&t,e,n,r,i,l)}function h(e,n,a,t,r,i,l){return c(n&t|a&~t,e,n,r,i,l)}function f(e,n,a,t,r,i,l){return c(n^a^t,e,n,r,i,l)}function _(e,n,a,t,r,i,l){return c(a^(n|~t),e,n,r,i,l)}function o(e,n){var a,t,r,i,l;e[n>>5]|=128<<n%32,e[14+(n+64>>>9<<4)]=n;var c=1732584193,o=-271733879,s=-1732584194,u=271733878;for(a=0;a<e.length;a+=16)o=_(o=_(o=_(o=_(o=f(o=f(o=f(o=f(o=h(o=h(o=h(o=h(o=p(o=p(o=p(o=p(r=o,s=p(i=s,u=p(l=u,c=p(t=c,o,s,u,e[a],7,-680876936),o,s,e[a+1],12,-389564586),c,o,e[a+2],17,606105819),u,c,e[a+3],22,-1044525330),s=p(s,u=p(u,c=p(c,o,s,u,e[a+4],7,-176418897),o,s,e[a+5],12,1200080426),c,o,e[a+6],17,-1473231341),u,c,e[a+7],22,-45705983),s=p(s,u=p(u,c=p(c,o,s,u,e[a+8],7,1770035416),o,s,e[a+9],12,-1958414417),c,o,e[a+10],17,-42063),u,c,e[a+11],22,-1990404162),s=p(s,u=p(u,c=p(c,o,s,u,e[a+12],7,1804603682),o,s,e[a+13],12,-40341101),c,o,e[a+14],17,-1502002290),u,c,e[a+15],22,1236535329),s=h(s,u=h(u,c=h(c,o,s,u,e[a+1],5,-165796510),o,s,e[a+6],9,-1069501632),c,o,e[a+11],14,643717713),u,c,e[a],20,-373897302),s=h(s,u=h(u,c=h(c,o,s,u,e[a+5],5,-701558691),o,s,e[a+10],9,38016083),c,o,e[a+15],14,-660478335),u,c,e[a+4],20,-405537848),s=h(s,u=h(u,c=h(c,o,s,u,e[a+9],5,568446438),o,s,e[a+14],9,-1019803690),c,o,e[a+3],14,-187363961),u,c,e[a+8],20,1163531501),s=h(s,u=h(u,c=h(c,o,s,u,e[a+13],5,-1444681467),o,s,e[a+2],9,-51403784),c,o,e[a+7],14,1735328473),u,c,e[a+12],20,-1926607734),s=f(s,u=f(u,c=f(c,o,s,u,e[a+5],4,-378558),o,s,e[a+8],11,-2022574463),c,o,e[a+11],16,1839030562),u,c,e[a+14],23,-35309556),s=f(s,u=f(u,c=f(c,o,s,u,e[a+1],4,-1530992060),o,s,e[a+4],11,1272893353),c,o,e[a+7],16,-155497632),u,c,e[a+10],23,-1094730640),s=f(s,u=f(u,c=f(c,o,s,u,e[a+13],4,681279174),o,s,e[a],11,-358537222),c,o,e[a+3],16,-722521979),u,c,e[a+6],23,76029189),s=f(s,u=f(u,c=f(c,o,s,u,e[a+9],4,-640364487),o,s,e[a+12],11,-421815835),c,o,e[a+15],16,530742520),u,c,e[a+2],23,-995338651),s=_(s,u=_(u,c=_(c,o,s,u,e[a],6,-198630844),o,s,e[a+7],10,1126891415),c,o,e[a+14],15,-1416354905),u,c,e[a+5],21,-57434055),s=_(s,u=_(u,c=_(c,o,s,u,e[a+12],6,1700485571),o,s,e[a+3],10,-1894986606),c,o,e[a+10],15,-1051523),u,c,e[a+1],21,-2054922799),s=_(s,u=_(u,c=_(c,o,s,u,e[a+8],6,1873313359),o,s,e[a+15],10,-30611744),c,o,e[a+6],15,-1560198380),u,c,e[a+13],21,1309151649),s=_(s,u=_(u,c=_(c,o,s,u,e[a+4],6,-145523070),o,s,e[a+11],10,-1120210379),c,o,e[a+2],15,718787259),u,c,e[a+9],21,-343485551),c=d(c,t),o=d(o,r),s=d(s,i),u=d(u,l);return[c,o,s,u]}function s(e){var n,a='';for(n=0;n<32*e.length;n+=8)a+=String.fromCharCode(e[n>>5]>>>n%32&255);return a}function u(e){var n,a=[];for(a[(e.length>>2)-1]=void 0,n=0;n<a.length;n+=1)a[n]=0;for(n=0;n<8*e.length;n+=8)a[n>>5]|=(255&e.charCodeAt(n/8))<<n%32;return a}function t(e){var n,a,t='0123456789abcdef',r='';for(a=0;a<e.length;a+=1)n=e.charCodeAt(a),r+=t.charAt(n>>>4&15)+t.charAt(15&n);return r}function a(e){return unescape(encodeURIComponent(e))}function r(e){return s(o(u(n=a(e)),8*n.length));var n}function i(e,n){return function(e,n){var a,t,r=u(e),i=[],l=[];for(i[15]=l[15]=void 0,16<r.length&&(r=o(r,8*e.length)),a=0;a<16;a+=1)i[a]=909522486^r[a],l[a]=1549556828^r[a];return t=o(i.concat(u(n)),512+8*n.length),s(o(l.concat(t),640))}(a(e),a(n))}n.exports=function(e,n,a){return n?a?i(n,e):t(i(n,e)):a?r(e):t(r(e))}}()},{}],35:[function(e,n,a){var t=e('./version').v,l={}.hasOwnProperty,PingppSDK=function(){e('./init').init()};
1PingppSDK.prototype.version=t,n.exports=new PingppSDK;var c=e('./testmode'),o=e('./callbacks'),s=e('./errors').Error,u=e('./mods'),d=e('./stash'),p=e('./collection'),h=e('./payment_elements');PingppSDK.prototype.createPayment=function(e,n,a,t){'function'==typeof n&&(o.userCallback=n);try{h.init(e)}catch(e){if(e instanceof s)return void o.innerCallback('fail',o.error(e.message,e.extra));throw e}if(l.call(h,'id'))if(l.call(h,'channel')){l.call(h,'app')&&('string'==typeof h.app?d.app_id=h.app:'object'==typeof h.app&&'string'==typeof h.app.id&&(d.app_id=h.app.id)),p.report({type:d.type||'pure_sdk_click',channel:h.channel,ch_id:h.id});var r=h.channel;if(l.call(h,'credential'))if(h.credential)if(l.call(h.credential,r))if(l.call(h,'livemode')){var i=u.getChannelModule(r);if(void 0===i)return console.error('channel module "'+r+'" is undefined'),void o.innerCallback('fail',o.error('invalid_channel','channel module "'+r+'" is undefined'));!1!==h.livemode?(void 0!==a&&(d.signature=a),'boolean'==typeof t&&(d.debug=t),i.handleCharge(h)):l.call(i,'runTestMode')?i.runTestMode(h):c.runTestMode(h)}else o.innerCallback('fail',o.error('invalid_charge','no_livemode_field'));else o.innerCallback('fail',o.error('invalid_credential','credential_is_incorrect'));else o.innerCallback('fail',o.error('invalid_credential','credential_is_undefined'));else o.innerCallback('fail',o.error('invalid_charge','no_credential'))}else o.innerCallback('fail',o.error('invalid_charge','no_channel'));else o.innerCallback('fail',o.error('invalid_charge','no_charge_id'))},PingppSDK.prototype.setAPURL=function(e){d.APURL=e},PingppSDK.prototype.setUrlReturnCallback=function(e,n){if('function'!=typeof e)throw'callback need to be a function';if(o.urlReturnCallback=e,void 0!==n){if(!Array.isArray(n))throw'channels need to be an array';o.urlReturnChannels=n}},PingppSDK.prototype.signAgreement=function(e,n){'function'==typeof n&&(o.userAgreementCallback=n);var a=u.getExtraModule('agreement');return void 0===a?(console.error('module "agreement" is undefined'),o.innerCallback('fail',o.error('invalid_module','module "agreement" is undefined')),!1):a.signAgreement(e)}},{"./callbacks":2,"./collection":31,"./errors":32,"./init":33,"./mods":36,"./payment_elements":37,"./stash":38,"./testmode":39,"./version":41}],36:[function(e,n,a){var t={}.hasOwnProperty,r={};(n.exports=r).channels={alipay_lite:e('./channels/alipay_lite'),alipay_pc_direct:e('./channels/alipay_pc_direct'),alipay_qr:e('./channels/alipay_qr'),alipay_wap:e('./channels/alipay_wap'),bfb_wap:e('./channels/bfb_wap'),cb_alipay_pc_direct:e('./channels/cb_alipay_pc_direct'),cb_alipay_wap:e('./channels/cb_alipay_wap'),cb_wx_pub:e('./channels/cb_wx_pub'),ccb_qr:e('./channels/ccb_qr'),cmb_pc_qr:e('./channels/cmb_pc_qr'),cmb_wallet:e('./channels/cmb_wallet'),coolcredit:e('./channels/coolcredit'),cp_b2b:e('./channels/cp_b2b'),isv_lite:e('./channels/isv_lite'),isv_wap:e('./channels/isv_wap'),jdpay_wap:e('./channels/jdpay_wap'),paypal:e('./channels/paypal'),qpay_pub:e('./channels/qpay_pub'),upacp_b2b:e('./channels/upacp_b2b'),upacp_pc:e('./channels/upacp_pc'),upacp_wap:e('./channels/upacp_wap'),wx_lite:e('./channels/wx_lite'),wx_pub:e('./channels/wx_pub'),wx_pub_hzbank:e('./channels/wx_pub_hzbank'),wx_wap:e('./channels/wx_wap'),yeepay_wap:e('./channels/yeepay_wap')},r.extras={ap:e('./channels/extras/ap'),agreement:e('./agreement')},r.getChannelModule=function(e){if(t.call(r.channels,e))return r.channels[e]},r.getExtraModule=function(e){if(t.call(r.extras,e))return r.extras[e]}},{"./agreement":1,"./channels/alipay_lite":3,"./channels/alipay_pc_direct":4,"./channels/alipay_qr":5,"./channels/alipay_wap":6,"./channels/bfb_wap":7,"./channels/cb_alipay_pc_direct":8,"./channels/cb_alipay_wap":9,"./channels/cb_wx_pub":10,"./channels/ccb_qr":11,"./channels/cmb_pc_qr":12,"./channels/cmb_wallet":13,"./channels/coolcredit":15,"./channels/cp_b2b":16,"./channels/extras/ap":17,"./channels/isv_lite":18,"./channels/isv_wap":19,"./channels/jdpay_wap":20,"./channels/paypal":21,"./channels/qpay_pub":22,"./channels/upacp_b2b":23,"./channels/upacp_pc":24,"./channels/upacp_wap":25,"./channels/wx_lite":26,"./channels/wx_pub":27,"./channels/wx_pub_hzbank":28,"./channels/wx_wap":29,"./channels/yeepay_wap":30}],37:[function(e,n,a){var i=e('./errors').Error,l={}.hasOwnProperty;n.exports={id:null,or_id:null,channel:null,app:null,credential:{},extra:null,livemode:null,order_no:null,time_expire:null,init:function(e){var n;if('string'==typeof e)try{n=JSON.parse(e)}catch(e){throw new i('json_decode_fail',e)}else n=e;if(void 0===n)throw new i('json_decode_fail');if(l.call(n,'object')&&'order'==n.object){n.or_id=n.id,n.order_no=n.merchant_order_no;var a=n.charge_essentials;
1if(n.channel=a.channel,n.credential=a.credential,n.extra=a.extra,l.call(n,'charge')&&null!=n.charge)n.id=n.charge;else if(l.call(a,'id')&&null!=a.id)n.id=a.id;else if(l.call(n,'charges'))for(var t=0;t<n.charges.data.length;t++)if(n.charges.data[t].channel===a.channel){n.id=n.charges.data[t].id;break}}else l.call(n,'object')&&'recharge'==n.object&&(n=n.charge);for(var r in this)l.call(n,r)&&(this[r]=n[r]);return this},clear:function(){for(var e in this)'function'!=typeof this[e]&&(this[e]=null)}}},{"./errors":32}],38:[function(e,n,a){n.exports={}},{}],39:[function(e,n,a){var t=e('./utils'),r={}.hasOwnProperty;n.exports={PINGPP_MOCK_URL:'http://sissi.pingxx.com/mock.php',runTestMode:function(e){var n={ch_id:e.id,scheme:'http',channel:e.channel};r.call(e,'order_no')?n.order_no=e.order_no:r.call(e,'orderNo')&&(n.order_no=e.orderNo),r.call(e,'time_expire')?n.time_expire=e.time_expire:r.call(e,'timeExpire')&&(n.time_expire=e.timeExpire),r.call(e,'extra')&&(n.extra=encodeURIComponent(JSON.stringify(e.extra))),t.redirectTo(this.PINGPP_MOCK_URL+'?'+t.stringifyData(n),e.channel)}}},{"./utils":40}],40:[function(e,n,a){var t=e('./callbacks'),o={}.hasOwnProperty,s=n.exports={stringifyData:function(e,n,a){void 0===a&&(a=!1);var t=[];for(var r in e)o.call(e,r)&&'function'!=typeof e[r]&&('bfb_wap'==n&&'url'==r||'yeepay_wap'==n&&'mode'==r||'channel_url'!=r&&t.push(r+'='+(a?encodeURIComponent(e[r]):e[r])));return t.join('&')},request:function(e,n,a,t,r,i){if('undefined'!=typeof XMLHttpRequest){var l=new XMLHttpRequest;if(void 0!==l.timeout&&(l.timeout=6e3),'GET'===(n=n.toUpperCase())&&'object'==typeof a&&a&&(e+='?'+s.stringifyData(a,'',!0)),l.open(n,e,!0),void 0!==i)for(var c in i)o.call(i,c)&&l.setRequestHeader(c,i[c]);'POST'===n?(l.setRequestHeader('Content-type','application/json; charset=utf-8'),l.send(JSON.stringify(a))):l.send(),void 0===t&&(t=function(){}),void 0===r&&(r=function(){}),l.onreadystatechange=function(){4==l.readyState&&t(l.responseText,l.status,l)},l.onerror=function(e){r(l,0,e)}}else console.log('Function XMLHttpRequest is undefined.')},formSubmit:function(e,n,a){if('undefined'!=typeof window){var t=document.createElement('form');for(var r in t.setAttribute('method',n),t.setAttribute('action',e),a)if(o.call(a,r)){var i=document.createElement('input');i.setAttribute('type','hidden'),i.setAttribute('name',r),i.setAttribute('value',a[r]),t.appendChild(i)}document.body.appendChild(t),t.submit()}else console.log('Not a browser, form submit url: '+e)},randomString:function(e){void 0===e&&(e=32);for(var n='ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789',a=n.length,t='',r=0;r<e;r++)t+=n.charAt(Math.floor(Math.random()*a));return t},redirectTo:function(e,n){t.shouldReturnUrlByCallback(n)?t.triggerUrlReturnCallback(null,e):'undefined'!=typeof window?window.location.href=e:console.log('Not a browser, redirect url: '+e)},inWeixin:function(){return'undefined'!=typeof navigator&&-1!==navigator.userAgent.toLowerCase().indexOf('micromessenger')},inAlipay:function(){return'undefined'!=typeof navigator&&-1!==navigator.userAgent.toLowerCase().indexOf('alipayclient')},inWxLite:function(){return'undefined'!=typeof wx&&(wx.miniProgram||wx.requestPayment)},inAlipayLite:function(){return'undefined'!=typeof my&&my.tradePay},documentReady:function(e){'undefined'!=typeof document?'loading'!=document.readyState?e():document.addEventListener('DOMContentLoaded',e):e()},loadUrlJs:function(e,n,a){var t=document.getElementsByTagName('head')[0],r=null;null==document.getElementById(e)?((r=document.createElement('script')).setAttribute('type','text/javascript'),r.setAttribute('src',n),r.setAttribute('id',e),r.async=!0,null!=a&&( 2r.onload=r.onreadystatechange=function(){if(r.ready)return!1;r.readyState&&'loaded'!=r.readyState&&'complete'!=r.readyState||(r.ready=!0,a())}),t.appendChild(r)):null!=a&&a()}}},{"./callbacks":2}],41:[function(e,n,a){n.exports={v:'2.2.14'}},{}]},{},[35])(35)}); 3//# sourceMappingURL=pingpp.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.