新增功能

This commit is contained in:
Your Name
2026-03-14 11:16:04 +08:00
parent eb283f008b
commit 4ddee40675
264 changed files with 5039 additions and 2813 deletions
+19 -1
View File
@@ -84,5 +84,23 @@ class PayNotifyLogic extends BaseLogic
$order->save();
}
/**
* @notes 订单支付回调
* @param $orderSn
* @param array $extra
*/
public static function order($orderSn, array $extra = [])
{
$order = \app\common\model\Order::where('order_no', $orderSn)->findOrEmpty();
if ($order->isEmpty()) {
throw new \Exception('订单不存在: ' . $orderSn);
}
if ($order->status == 2) {
return;
}
$order->status = 2;
$order->pay_time = date('Y-m-d H:i:s');
$order->transaction_id = $extra['transaction_id'] ?? '';
$order->save();
}
}