1.最近更新

This commit is contained in:
xucong 2024-09-09 14:09:23 +08:00
parent 51be69f326
commit 5af266500f
4 changed files with 38 additions and 30 deletions

@ -150,7 +150,12 @@ class Pay extends Api
$config = WeChatServer::getPayConfig(Client_::mnp);
return WeChatPayServer::notify($config);
}
public function notifyMnp1()
{
//$user_id = $this->user_id;
$config = WeChatServer::getPayConfig(Client_::mnp);
return WeChatPayServer::notify1($config);
}
/**
* @notes 公众号回调

@ -105,7 +105,7 @@ class WithdrawLogic extends Logic
'bank' => $post['bank'] ?? '',
'subbank' => $post['subbank'] ?? '',
'poundage' => $poundage,
'status' => 1, // 待提现
'status' => 3, // 待提现
'create_time' => time(),
];
$withdraw_id = WithdrawApply::insertGetId($data);
@ -171,7 +171,7 @@ class WithdrawLogic extends Logic
'bank' => $post['bank'] ?? '',
'subbank' => $post['subbank'] ?? '',
'poundage' => $poundage,
'status' => 1, // 待提现
'status' => 3, // 待提现
'create_time' => time(),
];
$withdraw_id = BalanceWithdrawApply::insertGetId($data);
@ -319,7 +319,7 @@ class WithdrawLogic extends Logic
'bank' => $post['bank'] ?? '',
'subbank' => $post['subbank'] ?? '',
'poundage' => $poundage,
'status' => 1, // 待提现
'status' => 3, // 待提现
'create_time' => time(),
];
$withdraw_id = WithdrawApply::insertGetId($das);
@ -419,7 +419,7 @@ class WithdrawLogic extends Logic
'bank' => $post['bank'] ?? '',
'subbank' => $post['subbank'] ?? '',
'poundage' => $poundage,
'status' => 1, // 待提现
'status' => 3, // 待提现
'create_time' => time(),
];
$withdraw_id = BalanceWithdrawApply::insertGetId($d);

@ -230,33 +230,33 @@ class PayNotifyLogic
if (isset($extra['transaction_id'])) {
$d['transaction_id'] = $extra['transaction_id'];
}
$result = Db::name("local_pay")->where("order_sn",$order_sn)->find();
if($result['pay_status'] == 0){
$local_store = Db::name('local_store')->where(['lstore_id' => $result['local_id']])->find();
if ($local_store['empowerPhone']) {
event('Notice', [
'scene' => NoticeEnum::LOCAL_SHOP_COLLECTION_NOTICE,
'mobile' => $local_store['empowerPhone'],
'params' => [
'user_id' => $local_store['user_id'],
'money' => round($result['order_amount']*0.6,2),
'time' => date("Y-m-d H:i:s"),
'order' => $order_sn,
]
]);
}
$local_store = Db::name('local_store')->where(['lstore_id' => $result['local_id']])->find();
if ($local_store['empowerPhone']) {
event('Notice', [
'scene' => NoticeEnum::LOCAL_SHOP_COLLECTION_NOTICE,
'mobile' => $local_store['empowerPhone'],
'params' => [
'user_id' => $local_store['user_id'],
'money' => round($result['order_amount']*0.6,2),
'time' => date("Y-m-d H:i:s"),
'order' => $order_sn,
]
]);
if($result != null){
$d['pay_time'] = date("Y-m-d H:i:s");
$d['pay_status'] = 1;
$order['lstore_id']= $result['local_id'];
$r = Db::name("local_pay")->where("id",$result['id'])->update($d);
}
$order['id']= 0;
$order['order_amount']= $result['order_amount'];
$order['order_sn']= $order_sn;
return self::recharge_billions($order, $result['user_id']);
}
if($result != null){
$d['pay_time'] = date("Y-m-d H:i:s");
$d['pay_status'] = 1;
$order['lstore_id']= $result['local_id'];
$r = Db::name("local_pay")->where("id",$result['id'])->update($d);
}
$order['id']= 0;
$order['order_amount']= $result['order_amount'];
$order['order_sn']= $order_sn;
return self::recharge_billions($order, $result['user_id']);
}
/**
* @notes 子订单回调

@ -391,7 +391,10 @@ class WeChatPayServer
return $order_log_data;
}
public static function notify1($config)
{
PayNotifyLogic::handle('trade', $message['out_trade_no'], "$extra");
}
/**
* @notes 支付回调
* @param $config