param(); // 验签 try { if ($notify['msg_signature'] !== (new TouMiniProgramService)->callbackSign($notify)) { return false; } else { //获取订单信息 $order = (string)htmlspecialchars_decode($notify['msg']); $order = json_decode($order, true); //处理订单,获取订单号 $sn = $order['cp_orderno']; $data = ['err_no' => '0', 'err_tips' => 'success']; if (StoreOrderWapModel::be(['order_id' => $sn, 'paid' => 1])) { return json($data); }; if (PaymentBehavior::douyinPaySuccess($order)) { //订单同步 (new TouMiniProgramService)->pushOrder($sn); return json($data); } else { db()->rollback(); return false; } } } catch (\Throwable $th) { Log::write('抖音同步订单异常' . $th->getMessage()); } } }