????tp????м???????????????????????demo???????????λ??ExtendVendorAlipay

???????????????
/**
*???????
*/
publicfunctionpay(){
header("Content-Type:text/html;charset=utf-8");
$id=I('post.oid'??''??'htmlspecialchars');
$DAO=M('order');
$order=$DAO->where("id=".$id)->find();
$error="";
if(!isset($order)){
$error="??????????";
}elseif($order['PaymentStatus']==1){
$error="????????????????????????";
}elseif($order['PaymentStatus']==2){
$error="????????????????????????????μ???";
}
if($error!=""){
$this->_FAIL("??????"??$error??$this->getErrorLinks());
return;
}
$payType=I('post.payType'??''??'htmlspecialchars');
#?????
if($payType=='alipay'){
$this->payWithAlipay($order);
}
}