|
|
|
@ -127,10 +127,34 @@ class PayController extends Controller
|
|
|
|
$key = request('key');
|
|
|
|
$key = request('key');
|
|
|
|
if($key != "dfsd2Ajd256SDI02") return \Yz::echoError1("权限校验错误");
|
|
|
|
if($key != "dfsd2Ajd256SDI02") return \Yz::echoError1("权限校验错误");
|
|
|
|
if(!isset($id)) return \Yz::echoError1("id不能为空");
|
|
|
|
if(!isset($id)) return \Yz::echoError1("id不能为空");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$orderInfo = DB::table('orders')->where(['id' => $id])->first();
|
|
|
|
|
|
|
|
$person=DB::table('web_user_person')->where(['id' => $orderInfo->person_id])->first();
|
|
|
|
|
|
|
|
|
|
|
|
$service = new OrderService();
|
|
|
|
$service = new OrderService();
|
|
|
|
$res=$service->Refund($id);
|
|
|
|
$res=$service->Refund($id);
|
|
|
|
if(!$res['status']) return \Yz::echoError1($res['msg']);
|
|
|
|
if(!$res['status']) return \Yz::echoError1($res['msg']);
|
|
|
|
if($res['status']) return \Yz::Return(true, "自动退款成功", []);
|
|
|
|
if($res['status']){
|
|
|
|
|
|
|
|
//婚检发送提醒
|
|
|
|
|
|
|
|
$keshi="健康管理中心";
|
|
|
|
|
|
|
|
if($person->sex==1) $keshi="健康管理中心(1楼男宾区)";
|
|
|
|
|
|
|
|
if($person->sex==2) $keshi="健康管理中心(2楼女宾区)";
|
|
|
|
|
|
|
|
$data = [
|
|
|
|
|
|
|
|
"ghzid" => $person->ghzid,
|
|
|
|
|
|
|
|
"yyid" => 6,
|
|
|
|
|
|
|
|
"type" => "15",
|
|
|
|
|
|
|
|
"msg1" => $person->name,
|
|
|
|
|
|
|
|
"msg2" => $keshi,
|
|
|
|
|
|
|
|
"msg3" => $orderInfo->doctor,
|
|
|
|
|
|
|
|
"msg4" => $orderInfo->appointment_date.' '.$orderInfo->appointment_time,
|
|
|
|
|
|
|
|
"msg5" => "",
|
|
|
|
|
|
|
|
"msg6" => "",
|
|
|
|
|
|
|
|
"url" => ""
|
|
|
|
|
|
|
|
];
|
|
|
|
|
|
|
|
$dnet = new AspNetZhuanController();
|
|
|
|
|
|
|
|
$dnet->WeiXinSend($data);
|
|
|
|
|
|
|
|
return \Yz::Return(true, "自动退款成功", []);
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static function nonce($l = 16)
|
|
|
|
public static function nonce($l = 16)
|
|
|
|
|