支付bug

This commit is contained in:
wangjinlei
2025-11-27 16:32:03 +08:00
parent 2ddc30aa3d
commit 01293220ef
2 changed files with 23 additions and 13 deletions

View File

@@ -756,14 +756,16 @@ class Preaccept extends Base
$article_info = $this->article_obj->where("article_id",$data['article_id'])->find();
$journal_info = $this->journal_obj->where("journal_id",$article_info['journal_id'])->find();
$order_info = $this->order_obj->where("article_id",$article_info['article_id'])->find();
$paystation = $this->paystation_obj->where("ps_id",$order_info['ps_id'])->find();
$order_info['paystation'] = $paystation;
if($order_info['state']==0){
$res = xml_to_array(paystationLookup($paystation['merchant_session']));
if(isset($res['PaystationQuickLookup']['LookupResponse']['Authentication']['auth_Status'])&&$res['PaystationQuickLookup']['LookupResponse']['Authentication']['auth_Status']=="Y"){
$this->article_obj->where("article_id",$order_info['article_id'])->update(['is_buy'=>1]);
$this->order_obj->where("order_id",$order_info['order_id'])->update(['state'=>1]);
$article_info = $this->article_obj->where("article_id",$data['article_id'])->find();
if($order_info){
$paystation = $this->paystation_obj->where("ps_id",$order_info['ps_id'])->find();
$order_info['paystation'] = $paystation;
if($order_info['state']==0){
$res = xml_to_array(paystationLookup($paystation['merchant_session']));
if(isset($res['PaystationQuickLookup']['LookupResponse']['PaystationErrorMessage'])&&$res['PaystationQuickLookup']['LookupResponse']['PaystationErrorMessage']=="Transaction successful"&&$res['PaystationQuickLookup']['LookupResponse']['PaystationErrorCode']==0){
$this->article_obj->where("article_id",$order_info['article_id'])->update(['is_buy'=>1]);
$this->order_obj->where("order_id",$order_info['order_id'])->update(['state'=>1]);
$article_info = $this->article_obj->where("article_id",$data['article_id'])->find();
}
}
}
$re['state'] = $article_info['is_buy'];