|
@@ -13,6 +13,15 @@ class Yyys extends Lyapi_Controller{
|
|
|
$ip = $this->input->ip_address();
|
|
$ip = $this->input->ip_address();
|
|
|
$json_str = $this->input->raw_input_stream;
|
|
$json_str = $this->input->raw_input_stream;
|
|
|
$data = json_decode($json_str,true);
|
|
$data = json_decode($json_str,true);
|
|
|
|
|
+ if(empty($data['gsmc']) || empty($data['timestamp'])){
|
|
|
|
|
+ $this->db->insert("ysnorecords",[
|
|
|
|
|
+ 'ys_no'=>"",
|
|
|
|
|
+ 'recept_cont'=>$json_str,
|
|
|
|
|
+ 'addtime'=>time(),
|
|
|
|
|
+ ]);
|
|
|
|
|
+ echo "SUCCESS";
|
|
|
|
|
+ exit;
|
|
|
|
|
+ }
|
|
|
$jiami_str = hash_hmac('sha256', 'LYERP_'.$data['timestamp'], 'ys&ly202608261549');
|
|
$jiami_str = hash_hmac('sha256', 'LYERP_'.$data['timestamp'], 'ys&ly202608261549');
|
|
|
//$jiami_str.="&";
|
|
//$jiami_str.="&";
|
|
|
// if($gsmc != $jiami_str){
|
|
// if($gsmc != $jiami_str){
|
|
@@ -37,15 +46,7 @@ class Yyys extends Lyapi_Controller{
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
}
|
|
}
|
|
|
- if(empty($data['gsmc'])){
|
|
|
|
|
- $this->db->insert("ysnorecords",[
|
|
|
|
|
- 'ys_no'=>"",
|
|
|
|
|
- 'recept_cont'=>$json_str,
|
|
|
|
|
- 'addtime'=>time(),
|
|
|
|
|
- ]);
|
|
|
|
|
- echo "SUCCESS";
|
|
|
|
|
- exit;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+
|
|
|
if($jiami_str != $data['gsmc']){
|
|
if($jiami_str != $data['gsmc']){
|
|
|
$this->db->insert("ysnorecords",[
|
|
$this->db->insert("ysnorecords",[
|
|
|
'ys_no'=>$ys_no,
|
|
'ys_no'=>$ys_no,
|