param(); $orderid = $result['data']['out_order_no']; //订单号 $kwaisign = isset($_SERVER['HTTP_KWAISIGN']) ? $_SERVER['HTTP_KWAISIGN'] : ''; if ($result['data']['status'] == 'SUCCESS') { $appSecret = SystemConfigService::get('kuai_mini_secret'); $result2 = json_encode($result); $notify = md5($result2 . $appSecret); //签名 if ($notify == $kwaisign) { //更新你的数据库 $data = [ 'result' => 1, 'message_id' => $result['message_id'] ]; if (StoreOrderWapModel::be(['order_id' => $orderid, 'paid' => 1])) { return json($data); }; if (PaymentBehavior::kuaishouPaySuccess($result['data'])) { return json($data); } else { db()->rollback(); return 'Signature error'; } return json($data); } else { return 'Signature error'; } } else { return 'Signature error'; } } catch (\Throwable $th) { Log::write('快手订单支付回调异常' . $th->getMessage()); } } /** * 退款 异步回调 */ public function refundNotify() { $result = \request()->param(); Log::write('快手同步订单异常' . $result); /* try { $result = \request()->param(); $orderid = $result['data']['out_order_no']; //订单号 $kwaisign = isset($__SERVER['HTTP_KWAISIGN']) ? $__SERVER['HTTP_KWAISIGN'] : ''; if ($result['data']['status'] == 'SUCCESS') { $appSecret = SystemConfigService::get('kuai_mini_secret'); $result = json_encode($result); $notify = md5($result . $appSecret); //签名 if ($notify == $kwaisign) { //更新你的数据库 $data = [ 'result' => 1, 'message_id' => $result['message_id'] ]; if (StoreOrderWapModel::be(['order_id' => $orderid, 'paid' => 1])) { return json($data); }; if (PaymentBehavior::douyinPaySuccess($result['data'])) { return json($data); } else { db()->rollback(); return 'Signature error'; } return json($data); } else { return 'Signature error'; } } else { return 'Signature error'; } } catch (\Throwable $th) { Log::write('快手同步订单异常' . $th->getMessage()); } */ } }