onez.Event.prototype.event__TOKEN__pay=function(token,item,ui,_page_){
  onez.post(onez.myaction('_PTOKEN_','request'),item,function(o){
    WeixinJSBridge.invoke(
    	'getBrandWCPayRequest',
    	o.jsApiParameters,
    	function(res){
        if(res.err_code && res.err_code!=0){
          if(res.err_desc){
            alert(res.err_desc);
          }else if(res.err_msg){
            alert(res.err_msg);
          }else{
            alert('error');
          }
        }else if(res.err_msg){
          item.orderno=o.orderno;
          item.msg=res.err_msg;
          if(typeof _page_=='undefined' || _page_==null){
            _page_=onez.page.findByUI(ui);
            if(!_page_){
              _page_=onez.pages[onez.pages.length-1];
            }
          }
          onez.post(onez.myaction('_PTOKEN_','callback'),item,function(o2){
            _page_.datas=o2;
            _page_.parse();
          });
        }else{
          alert('error');
        }
    	}
    );
  });
};