decrypt($message); // 校验签名,然后进行业务处理 $result = $jubaopay->verify($signature); if($result==1) { $order_info = array( "out_trade_no"=>$jubaopay->getEncrypt("payid"), "trade_no"=>$jubaopay->getEncrypt("orderNo"), 'status'=>$jubaopay->getEncrypt("state") ); if($order_info['status']=="2"){ $pay_where = substr($jubaopay->getEncrypt("payid"),0,2); $result = false; switch ($pay_where) { case 'SP': $result = $this->set_spend($order_info); break; case 'PF': $result = $this->set_deposit($order_info); break; case 'AG': $result = $this->set_agent($order_info); break; default: $this->record_logs("accident order data"); exit('accident order data'); break; } } echo "success"; // 像服务返回 "success" } else { $this->record_logs("验签失败"); echo "verify failed"; } } }