Browse Source

青渔 签名问题

lowkeyman 3 months atrás
parent
commit
384650442c
2 changed files with 25 additions and 3 deletions
  1. 1 3
      helper/refill/api/xyz/qingyu/config.php
  2. 24 0
      test/TestRefill.php

+ 1 - 3
helper/refill/api/xyz/qingyu/config.php

@@ -45,9 +45,7 @@ class config
         ksort($params);
         $content = '';
         foreach ($params as $key => $value) {
-            if(self::check_empty($value) === false) {
-                $content .= "{$key}{$value}";
-            }
+            $content .= "{$key}{$value}";
         }
         $content .= config::CP_KEY;
         return md5($content);

+ 24 - 0
test/TestRefill.php

@@ -6345,6 +6345,30 @@ class TestRefill extends TestCase
         $provider = $this->getProvider('yeyankc002');
         $resp = $provider->balance();
     }
+
+    public function testsign()
+    {
+        $sign = function($params)
+        {
+            ksort($params);
+            $content = '';
+            foreach ($params as $key => $value) {
+                $content .= "{$key}{$value}";
+            }
+            $content .= '3845afd20883a8e16';
+            return md5($content);
+        };
+        $sgin = $sign([
+            'cpid' => '57974',
+            'order_no' => '24123018453457974331926531',
+            'mobile' => '15712899758',
+            'amount' => '100',
+            'status' => 'failed',
+            'sz_order_no' => '',
+            'ret_para' => '1434340788899534324530',
+//            'sign' => '99469ee5770c27f8a849f2cf2c652e25'
+        ]);
+    }
 }