xiaoyu 3 年之前
父節點
當前提交
c2cd639b8d

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

@@ -1076,28 +1076,28 @@ $zanzanquick_phone = ['name' => 'zanzanquick', 'store_id' => 66, 'qualitys' => '
 $fengyeman_phone = ['name' => 'fengyeman', 'store_id' => 67, 'qualitys' => '6',
     'amount' => [
         10 => [
-            ['goods_id' => 6660, 'price' => 8.9, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6660, 'price' => 8.85, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         20 => [
-            ['goods_id' => 6661, 'price' => 17.8, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6661, 'price' => 17.7, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         30 => [
-            ['goods_id' => 6662, 'price' => 26.7, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6662, 'price' => 26.55, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         50 => [
-            ['goods_id' => 6663, 'price' => 44.5, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6663, 'price' => 44.25, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         100 => [
-            ['goods_id' => 6664, 'price' => 89, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6664, 'price' => 88.5, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6665, 'price' => 178, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6665, 'price' => 177, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6666, 'price' => 267, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6666, 'price' => 265.5, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         500 => [
-            ['goods_id' => 6667, 'price' => 445, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6667, 'price' => 442.5, 'quality' => 6, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -1105,28 +1105,28 @@ $fengyeman_phone = ['name' => 'fengyeman', 'store_id' => 67, 'qualitys' => '6',
 $fengyeman24_phone = ['name' => 'fengyeman24', 'store_id' => 68, 'qualitys' => '5',
     'amount' => [
         10 => [
-            ['goods_id' => 6668, 'price' => 8.9, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6668, 'price' => 8.85, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         20 => [
-            ['goods_id' => 6669, 'price' => 17.8, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6669, 'price' => 17.7, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         30 => [
-            ['goods_id' => 6670, 'price' => 26.7, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6670, 'price' => 26.55, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         50 => [
-            ['goods_id' => 6671, 'price' => 44.5, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6671, 'price' => 44.25, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         100 => [
-            ['goods_id' => 6672, 'price' => 89, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6672, 'price' => 88.5, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         200 => [
-            ['goods_id' => 6673, 'price' => 178, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6673, 'price' => 177, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         300 => [
-            ['goods_id' => 6674, 'price' => 267, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6674, 'price' => 265.5, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
         500 => [
-            ['goods_id' => 6675, 'price' => 445, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
+            ['goods_id' => 6675, 'price' => 442.5, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']
         ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
@@ -1189,16 +1189,16 @@ $xingzy_phone = ['name' => 'xingzy', 'store_id' => 70, 'qualitys' => '5',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$yuanmai_phone = ['name' => 'yuanmai', 'store_id' => 45, 'qualitys' => '2',
+$yuanmai_phone = ['name' => 'yuanmai', 'store_id' => 71, 'qualitys' => '2',
     'amount' => [
-        10 => [['goods_id' => 6512, 'price' => 8.9, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6513, 'price' => 17.8, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6514, 'price' => 26.7, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6515, 'price' => 44.5, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6516, 'price' => 89, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6517, 'price' => 178, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6518, 'price' => 267, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6519, 'price' => 445, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+        10 => [['goods_id' => 6692, 'price' => 9.85, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6693, 'price' => 19.7, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6694, 'price' => 29.55, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6695, 'price' => 49.25, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6696, 'price' => 98.5, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6697, 'price' => 197, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6698, 'price' => 295.5, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6699, 'price' => 492.5, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 

+ 15 - 1
data/config/xyz/refill.ini.php

@@ -1189,6 +1189,19 @@ $xingzy_phone = ['name' => 'xingzy', 'store_id' => 70, 'qualitys' => '5',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$yuanmai_phone = ['name' => 'yuanmai', 'store_id' => 71, 'qualitys' => '2',
+    'amount' => [
+        10 => [['goods_id' => 6692, 'price' => 9.85, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6693, 'price' => 19.7, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6694, 'price' => 29.55, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6695, 'price' => 49.25, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6696, 'price' => 98.5, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6697, 'price' => 197, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6698, 'price' => 295.5, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6699, 'price' => 492.5, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -1234,7 +1247,8 @@ $phone_providers = [
     ['name' => 'fengyeman', 'cfg' => $fengyeman_phone],
     ['name' => 'fengyeman24', 'cfg' => $fengyeman24_phone],
     ['name' => 'moxj_yd', 'cfg' => $moxj_yd_phone],
-    ['name' => 'xingzy', 'cfg' => $xingzy_phone]
+    ['name' => 'xingzy', 'cfg' => $xingzy_phone],
+    ['name' => 'yuanmai', 'cfg' => $yuanmai_phone]
 ];
 $config['phone_providers'] = $phone_providers;
 

+ 1 - 1
helper/refill/api/xyz/yuanmai/RefillCallBack.php

@@ -34,7 +34,7 @@ class RefillCallBack implements refill\IRefillCallBack
         $order_sn = $params['orderid'];
         $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
         if (empty($order_info)) {
-//            return [false, false, false,false];
+            return [false, false, false,false];
         }
         $order_id = $order_info['order_id'];
 

+ 11 - 11
helper/refill/api/xyz/yuanmai/config.php

@@ -7,18 +7,18 @@ use mtopcard;
 class config
 {
     //985 2
-//    const ORDER_URL = 'https://esales.iyuanmai.com:28001/charge/recharge.do';
-//    const QUERY_URL= 'https://esales.iyuanmai.com:28001/charge/mobileOrderQuery.do';
-//    const USER_ID= '202106261336161975';
-//    const KEY = 'a6f5b39a9ff14fc599a325b98dfc5308dd0dbf1829b044e18d1ea95ecf2f7ec46475be4ccf3e4855b8d9456766659f7b193293e8d67543cb824c523f34e16321';
-//    const NOTIFY_URL = BASE_SITE_URL . "/mobile/refill_yuanmai.php";
+    const ORDER_URL = 'https://esales.iyuanmai.com:28001/charge/recharge.do';
+    const QUERY_URL= 'https://esales.iyuanmai.com:28001/charge/mobileOrderQuery.do';
+    const USER_ID= '202106261336161975';
+    const KEY = 'a6f5b39a9ff14fc599a325b98dfc5308dd0dbf1829b044e18d1ea95ecf2f7ec46475be4ccf3e4855b8d9456766659f7b193293e8d67543cb824c523f34e16321';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/refill_yuanmai.php";
 
-
-    const ORDER_URL = 'http://223.93.131.115:18080/charge/recharge.do';
-    const QUERY_URL= 'http://223.93.131.115:18080/charge/mobileOrderQuery.do';
-    const USER_ID= '201511251649031105';
-    const KEY = '500f307b84844cb9b05e04d7baef545126179a88f89d4b44bfbdbfbf99eedd75ef82e5b5412d42f9981d4921e6b0537f78201357200d412797e4582d79bc8215';
-    const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
+//      测试环境
+//    const ORDER_URL = 'http://223.93.131.115:18080/charge/recharge.do';
+//    const QUERY_URL= 'http://223.93.131.115:18080/charge/mobileOrderQuery.do';
+//    const USER_ID= '201511251649031105';
+//    const KEY = '500f307b84844cb9b05e04d7baef545126179a88f89d4b44bfbdbfbf99eedd75ef82e5b5412d42f9981d4921e6b0537f78201357200d412797e4582d79bc8215';
+//    const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
     const operator = [
         mtopcard\ChinaMobileCard  => 1,
         mtopcard\ChinaUnicomCard  => 0,

+ 4 - 0
mobile/callback/refill_yuanmai.php

@@ -0,0 +1,4 @@
+<?php
+
+refill\util::push_notify('yuanmai',$_POST);
+echo ('0000');

+ 4 - 4
test/TestRefill.php

@@ -412,11 +412,11 @@ class TestRefill extends TestCase
     public function testYuanmaiPhone()
     {
         $providers = new refill\yuanmai\RefillPhone([]);
-//        $resp = $providers->add(18500608330, 5, 10, ['order_sn' => $this->make_sn()]);
-        $resp = $providers->query(['order_sn' => '38961624852492322076', 'ch_trade_no' => '210623174333941000']);
-        $data = '{"orderid":"38961624852492322076","status":"2","ordermoney":"10","sign":"61223f4f1ddb982c197cac69df35c2b5","spsno":"SP_012106281154508922"}';
+//        $resp = $providers->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '24231624865882625203', 'ch_trade_no' => '210623174333941000']);
+        $data = '{"orderid":"24231624865882625203","status":"2","ordermoney":"50","sign":"94be5b1754ffcc7f0fe1551072146941","spsno":""}';
         $params = json_decode($data, true);
-//        refill\RefillFactory::instance()->notify('yuanmai',$params);
+        refill\RefillFactory::instance()->notify('yuanmai',$params);
     }
 
     public function testTongluPhone()