|
|
@@ -46,12 +46,32 @@ class MeiTuanNotifyController extends BaseApiController
|
|
|
|
|
|
|
|
|
|
|
|
-// public function test()
|
|
|
-// {
|
|
|
-//// $data = array("businessId"=>"58","charset" => "utf-8","code"=>"828227b6489b14300c682e7b787d9afc", "developerId" => "114657","grantType"=>"authorization_code", "timestamp" => "1741664392");
|
|
|
+ public function test()
|
|
|
+ {
|
|
|
+ $data = array("businessId"=>"58","charset" => "utf-8","code"=>"7355f0a0d01f31e7963f23f6e20519f5", "developerId" => "114657","grantType"=>"authorization_code", "timestamp" => "1744107897");
|
|
|
// $data = array("businessId"=>"58","charset" => "utf-8","appAuthToken"=>"V2-26f91ef8b515c59b97b9b4404e77dc2b2fc14b9715e3be7edb9f3f86178e193ec380e1ef5a9ab7a877120a94bcae4586707c51ab5e56cfeb4cd91d4fb2983babbbfd2fda0f77353eb21b105fd14299aea392a706589a422baec961b6cc255191", "developerId" => "114657","version"=>"2", "timestamp" => "1741663560",'biz'=>'{ "orderId": "61427436", "bookStatus": 2, "code": 200,"type":2}');
|
|
|
-// echo $this->get_sign("8471lgvnv0qcjpx6", $data);
|
|
|
-// }
|
|
|
+ echo $this->get_sign("8471lgvnv0qcjpx6", $data);
|
|
|
+ }
|
|
|
+
|
|
|
+ public static function get_sign($sign_key, $data)
|
|
|
+ {
|
|
|
+ if ($data == null) {
|
|
|
+ return null;
|
|
|
+ }
|
|
|
+ ksort($data);
|
|
|
+ $result_str = "";
|
|
|
+ foreach ($data as $key => $val) {
|
|
|
+ if ($key != "sign" && $val != null && $val != "") {
|
|
|
+ $result_str = $result_str . $key . $val;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ $result_str = $sign_key . $result_str;
|
|
|
+
|
|
|
+
|
|
|
+ $ret = bin2hex(sha1($result_str, true));
|
|
|
+
|
|
|
+ return $ret;
|
|
|
+ }
|
|
|
|
|
|
//到店综合
|
|
|
/**
|
|
|
@@ -294,7 +314,7 @@ class MeiTuanNotifyController extends BaseApiController
|
|
|
//尾款结算1 //尾款结算3
|
|
|
//获取工单信息
|
|
|
$request = $this->request->param();
|
|
|
-// $request = json_decode('{"opBizCode":"AE7MKOJAV67338LIC3UD0K5TGIO","msgType":"5810031","developerId":"114657","businessId":"58","sign":"013a53f59601e5f7dd5fa1f716127384e24dbdd3","msgId":"-7483972612472674819","message":"{\"orderId\":\"62737288\",\"verifyStatus\":\"2\",\"verifyChannel\":\"1\",\"type\":\"2\",\"serialNumber\":\"1315233958\"}","timestamp":"1742907756"}',true);
|
|
|
+// $request = json_decode('{"opBizCode":"AE7MKOJAV67338LIC3UD0K5TGIO","msgType":"5810031","developerId":"114657","businessId":"58","sign":"70e9ab334024101d8601276e5e3a24f459005a1e","msgId":"8401776939815074952","message":"{\"orderId\":\"63702731\",\"verifyStatus\":\"2\",\"verifyChannel\":\"1\",\"type\":\"2\",\"serialNumber\":\"4078677902\"}","timestamp":"1743944824"}',true);
|
|
|
Log::write('预订核销同步:'.json_encode($this->request->param(),JSON_UNESCAPED_UNICODE));
|
|
|
if(!empty($request['message'])){
|
|
|
Db::startTrans();
|
|
|
@@ -382,7 +402,8 @@ class MeiTuanNotifyController extends BaseApiController
|
|
|
|
|
|
public function bookresultcallback()
|
|
|
{
|
|
|
- ThirdOrderLogic::bookresultcallback('61427436',2);
|
|
|
+ $a = ThirdOrderLogic::bookresultcallback('AE7MKOJAV67338LIC3UD0K5TGIO','63950625',2);
|
|
|
+ dd($a);
|
|
|
}
|
|
|
|
|
|
|