private function procAlipay() { $post = I('post.', '', ''); if ($post['service'] == 'alipay.service.check') { $this->platform->touchCheck(); } if ($post['service'] == 'alipay.mobile.public.message.notify') { $xml = '<?xml version="1.0" encoding="utf-8"?>' . iconv('gbk', 'utf-8', $post['biz_content']); $message = $this->platform->parse($xml); //Log::write(var_export($message, true), Log::INFO); // booking 登记会员 $this->platform->booking($message); $this->route($message); } }
public function touchCheck() { $pub = Utility::sslTrimKey($this->account['public_key']); $ret = "<biz_content>{$pub}</biz_content><success>true</success>"; $dat = $this->client->encryptAndSign($ret, false, true); parent::touchCheck(); $message = $this->parse($this->params['biz_content']); $rec = array(); $rec['appid'] = $message['to']; $m = new Model(); $m->table('__PLATFORM_ALIPAY__')->data($rec)->where("`id`='{$this->account['id']}'")->save(); exit($dat); }