!function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var n;n="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:this,n.paymentjs=e()}}(function(){return function e(n,t,r){function a(o,c){if(!t[o]){if(!n[o]){var u="function"==typeof require&&require;if(!c&&u)return u(o,!0);if(i)return i(o,!0);var l=new Error("Cannot find module '"+o+"'");throw l.code="MODULE_NOT_FOUND",l}var s=t[o]={exports:{}};n[o][0].call(s.exports,function(e){var t=n[o][1][e];return a(t?t:e)},s,s.exports,e,n,t,r)}return t[o].exports}for(var i="function"==typeof require&&require,o=0;o>16,a>>8&255,255&a));switch(n){case 1:a=i(e,r)<<18|i(e,r+1)<<12|i(e,r+2)<<6,c.push(String.fromCharCode(a>>16,a>>8&255));break;case 2:a=i(e,r)<<18|i(e,r+1)<<12,c.push(String.fromCharCode(a>>16))}return c.join('')},t.getbyte=function(e,n){var r=e.charCodeAt(n);if(r>255)throw t.makeDOMException();return r},t.encode=function(e){if(1!==arguments.length)throw new SyntaxError('Not enough arguments');var n,r,a=t.PADCHAR,i=t.ALPHA,o=t.getbyte,c=[];e=''+e;var u=e.length-e.length%3;if(0===e.length)return e;for(n=0;n>18)),c.push(i.charAt(r>>12&63)),c.push(i.charAt(r>>6&63)),c.push(i.charAt(63&r));switch(e.length-u){case 1:r=o(e,n)<<16,c.push(i.charAt(r>>18)+i.charAt(r>>12&63)+a+a);break;case 2:r=o(e,n)<<16|o(e,n+1)<<8,c.push(i.charAt(r>>18)+i.charAt(r>>12&63)+i.charAt(r>>6&63)+a)}return c.join('')},e.url='pay.htm',e.pay=function(n){var i=encodeURIComponent(t.encode(n));a.call(r,'APURL')&&(e.url=r.APURL),location.href=e.url+'?goto='+i},e.decode=function(e){return t.decode(decodeURIComponent(e))},n.exports=e}()},{"../../stash":10}],6:[function(e,n,t){var r=e('../utils');({}).hasOwnProperty;n.exports={handleCharge:function(e){var n=e.params,t=e.submitUrl;r.redirectTo(t+'?params='+n)}}},{"../utils":11}],7:[function(e,n,t){arguments[4][4][0].apply(t,arguments)},{"../utils":11,dup:4}],8:[function(e,n,t){var r=e('../callbacks'),a=(e('../utils'),e('../stash')),i=e('../channelMod'),o={}.hasOwnProperty;n.exports={handleCharge:function(e){for(var n=e.params,t=['appId','timeStamp','nonceStr','package','signType','paySign'],i=0;i