xiaoyu 3 年之前
父节点
当前提交
9f56342416

+ 9 - 9
data/config/win/refill.ini.php

@@ -555,35 +555,35 @@ $afandfs_phone = ['name' => 'afandfs', 'store_id' => 41, 'qualitys' => '1',
 $yunling_phone = ['name' => 'yunling', 'store_id' => 37, 'qualitys' => '1',
     'amount' => [
         10 => [
-            ['goods_id' => 6456, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6456, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6456, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         20 => [
-            ['goods_id' => 6457, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6457, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6457, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6457, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         30 => [
-            ['goods_id' => 6458, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6458, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6458, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         50 => [
-            ['goods_id' => 6459, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6459, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6459, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         100 => [
-            ['goods_id' => 6460, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6460, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6460, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6461, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6461, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6461, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6462, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6462, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6462, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         500 => [
-            ['goods_id' => 6463, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6463, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6463, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ]
     ],

+ 40 - 10
data/config/xyz/refill.ini.php

@@ -555,35 +555,35 @@ $afandfs_phone = ['name' => 'afandfs', 'store_id' => 41, 'qualitys' => '1',
 $yunling_phone = ['name' => 'yunling', 'store_id' => 37, 'qualitys' => '1',
     'amount' => [
         10 => [
-            ['goods_id' => 6456, 'price' => 9.56, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6456, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6456, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         20 => [
-            ['goods_id' => 6457, 'price' => 19.12, 'quality' => 1, 'card_type' => 'chinamobile'],
-            ['goods_id' => 6457, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
+            ['goods_id' => 6457, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6457, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         30 => [
-            ['goods_id' => 6458, 'price' => 28.68, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6458, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6458, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         50 => [
-            ['goods_id' => 6459, 'price' => 47.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6459, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6459, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         100 => [
-            ['goods_id' => 6460, 'price' => 95.6, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6460, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6460, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6461, 'price' => 191.2, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6461, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6461, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6462, 'price' => 286.8, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6462, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6462, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ],
         500 => [
-            ['goods_id' => 6463, 'price' => 478, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 6463, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinamobile'],
             ['goods_id' => 6463, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinaunicom,chinatelecom']
         ]
     ],
@@ -1160,6 +1160,35 @@ $moxj_yd_phone = ['name' => 'moxj_yd', 'store_id' => 69, 'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$xingzy_phone = ['name' => 'xingzy', 'store_id' => 70, 'qualitys' => '5',
+    'amount' => [
+        10 => [
+            ['goods_id' => 6684, 'price' => 8.9, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 6685, 'price' => 17.8, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 6686, 'price' => 26.7, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 6687, 'price' => 44.5, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 6688, 'price' => 89, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 6689, 'price' => 178, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 6690, 'price' => 267, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 6691, 'price' => 445, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+        ],
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -1204,7 +1233,8 @@ $phone_providers = [
     ['name' => 'zanzanquick', 'cfg' => $zanzanquick_phone],
     ['name' => 'fengyeman', 'cfg' => $fengyeman_phone],
     ['name' => 'fengyeman24', 'cfg' => $fengyeman24_phone],
-    ['name' => 'moxj_yd', 'cfg' => $moxj_yd_phone]
+    ['name' => 'moxj_yd', 'cfg' => $moxj_yd_phone],
+    ['name' => 'xingzy', 'cfg' => $xingzy_phone]
 ];
 $config['phone_providers'] = $phone_providers;
 

+ 2 - 2
helper/refill/api/xyz/xingzy/RefillPhone.php

@@ -20,7 +20,7 @@ class RefillPhone extends refill\IRefillPhone
         $params['access_key'] = config::ACCESS_KEY;
         $params['par_value'] = $amount;
         $params['code'] = config::product_code[$card_type][$amount];
-        $params['producttype'] = $amount;
+        $params['producttype'] = 0;
         $params['out_trade_no'] = $order_sn;
         $params['timestamp'] = time();
 
@@ -57,6 +57,7 @@ class RefillPhone extends refill\IRefillPhone
     public function query($refill_info)
     {
         $params['out_trade_no'] = $refill_info['order_sn'];
+        $params['orderid'] = $refill_info['ch_trade_no'];
         $params['access_key'] = config::ACCESS_KEY;
         $params['timestamp'] = time();
         $params['sign'] = $this->sign($params);
@@ -90,7 +91,6 @@ class RefillPhone extends refill\IRefillPhone
                 }
                 return [true, $order_state];
             }
-
         }
     }
 

+ 1 - 2
helper/refill/api/xyz/xingzy/config.php

@@ -9,8 +9,7 @@ class config
 
     const ACCESS_KEY = '211394702';
     const ACCESS_SECRET = 'WgpRyYE2h0ydedUay1t+Sg==';
-//    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_xingzy.php";
-    const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_xingzy.php";
     const ExtHeaders = ['Content-Type: application/json; charset=utf-8'];
 
     const product_code = [

+ 8 - 0
mobile/callback/refill_xingzy.php

@@ -0,0 +1,8 @@
+<?php
+$content = $_SERVER['post_content'];
+$input = json_decode($content,true);
+refill\util::push_notify('xingzy',$input);
+
+$response = ["code" => "0"];
+$body = json_encode($response);
+echo($body);

+ 5 - 1
test/TestRefill.php

@@ -402,7 +402,11 @@ class TestRefill extends TestCase
     public function testXingzyPhone()
     {
         $providers = new refill\xingzy\RefillPhone([]);
-        $sign = $providers->ct_sign();
+//        $resp = $providers->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
+        $resp = $providers->query(['order_sn' => '76791624441423287373', 'ch_trade_no' => '210623174333941000']);
+        $data = '{"access_key":"211394702","code":3,"data":{"sellprice":26.7,"phone":"18500608333","pass":null,"official_id":null,"official_ch":null},"orderid":210623173427222000,"out_trade_no":"40441624440876653628","sign":"E1g7uHAaJI056jb1fK1DQztkpN4=","timestamp":1624441437918}';
+        $params = json_decode($data , true);
+//        refill\RefillFactory::instance()->notify('xingzy',$params);
     }
 
     public function testTongluPhone()