rabin 2 年之前
父節點
當前提交
6a9be58dcc
共有 3 個文件被更改,包括 9 次插入9 次删除
  1. 1 1
      app/mshop/src/Out.php
  2. 3 0
      app/shop/lib/Info.php
  3. 5 8
      app/shop/src/Yspay.php

+ 1 - 1
app/mshop/src/Out.php

@@ -10,7 +10,7 @@ class Out extends Core
     # 获取所有商品列表
     public function getGoods()
     {
-        $this->data['data'] = Dever::load('shop/lib/info')->getGoods($this->shop_id, false, '1,2,3', false, false, -1, 2);
+        $this->data['data'] = Dever::load('shop/lib/info')->getGoods($this->shop_id, false, '1,2,3', false, false, -1, 3);
 
         return $this->data;
     }

+ 3 - 0
app/shop/lib/Info.php

@@ -177,6 +177,9 @@ class Info
                         if (!isset($d['buy_type'])) {
                             $d['buy_type'] = 1;
                         }
+                        if ($buy_type == 3) {
+                            $d['buy_type'] = 1;
+                        }
                         if ($d['buy_type'] == 1) {
                             if ($d['total'] <= 0) {
                                 $result_2[] = $d;

+ 5 - 8
app/shop/src/Yspay.php

@@ -173,18 +173,15 @@ class Chinaums
             'sysId' => $this->sys_id,
             'mchntNo' => $mid,
             'timestamp' => date('YmdHis'),
-            //'page' => 1,
+            'page' => '1',
             'beginDate' => $start,
             'endDate' => $end,
         ];
         //设置签名并加密
         $body['content'] = $this->createSignature($content);
-        print_r($url);
         $result = Dever::curl($url, $body, 'post');
-        print_r($result);die;
-
-        $decryptData = $this->privateDecrypt($result);
-        print_r($content);
+        $result = Dever::json_decode($result);
+        $decryptData = $this->privateDecrypt($result['result']);
         print_r($decryptData);die;
 
         return 0;
@@ -266,13 +263,13 @@ class Chinaums
         }
         //整理加密字符串
         $signature_string = rtrim($signature_string, '&');
-        echo $signature_string;
+        //echo $signature_string;
         //获取加密数组
         $array_json = $this->rsaEncrypt($signature_string);
         //设置签名
         $body['sign'] = bin2hex($array_json);
 
-        print_r($body);
+        //print_r($body);
         //json序列化
         $json_data = json_encode($body);
         //加密RSA