rabin 1 year ago
parent
commit
6723373218

+ 6 - 2
src/bao/connect/lib/Func/Base.php

@@ -72,7 +72,8 @@ class Base
         if (method_exists($this, 'requestBody')) {
             $this->requestBody($body);
         }
-        $this->sign($body);
+        $sign = '';
+        $this->sign($body, $sign);
         $response = Dever::curl($url, $body, $method, $json, $header)->result();
         $test = Dever::input('test');
         if ($test && $test == 1) {
@@ -82,6 +83,7 @@ class Base
                 'header' => $header,
                 'method' => $method,
                 'json' => $json,
+                'sign' => $sign,
                 'body' => $body,
                 'response' => $response,
             );
@@ -215,7 +217,7 @@ class Base
         );
     }
 
-    protected function sign(&$body)
+    protected function sign(&$body, &$string)
     {
         if ($this->connect['sign_method'] == 1) {
             return;
@@ -313,6 +315,8 @@ class Base
             }
         }
 
+        $string = $sign;
+
         # 如果是ssl 这里需要处理一下,后续处理吧
 
         if ($this->connect['sign_method'] == 2) {

+ 1 - 1
src/bao/connect/table/manage/connect_api.php

@@ -71,7 +71,7 @@ return array
             (
                 'name' => '业务请求体',
                 'where'  => array('api_id' => 'id'),
-                'desc' => '[变量:timestamp毫秒时间戳,nonce随机值,appkey渠道的appkey, notify请求回调地址, order_num当前订单号,account当前账号,cash为当前面值,code渠道商品编码,支持函数,如果函数中需要添加变量,请用{}隔开,如{code},请求头也支持此变量]',
+                'desc' => '[变量:timestamp毫秒时间戳,nonce随机值,appkey渠道的appkey, notify请求回调地址, order_num当前订单号,account当前账号,cash为当前面值,code渠道商品编码,goods_id商品id,支持函数,如果函数中需要添加变量,请用{}隔开,如{code},请求头也支持此变量]',
             ),
             'connect/api_request_header' => array
             (

+ 1 - 0
src/dai/seller/lib/Order.php

@@ -98,6 +98,7 @@ class Order
             $param['account'] = $info['account'];
             $param['cash'] = $info['cash'];
             $param['num'] = $info['num'];
+            $param['goods_id'] = $info['goods_id'];
             if ($info['other']) {
                 $info['other'] = Dever::json_decode($info['other']);
                 $param = array_merge($info['other'], $param);