xiaoyu 3 سال پیش
والد
کامیت
4c83f7b79d

+ 46 - 0
data/config/xyz/refill.ini.php

@@ -5155,6 +5155,51 @@ $pengxinda_phone = ['name' => 'pengxinda', 'store_id' => 203,'qualitys' => '2',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$huazhong_phone = ['name' => 'huazhong', 'store_id' => 204, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7714, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7714, 'price' => 9.42, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7714, 'price' => 9.51, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7715, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7715, 'price' => 18.84, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7715, 'price' => 19.02, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+//            ['goods_id' => 7716, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7716, 'price' => 28.26, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7716, 'price' => 28.53, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7717, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7717, 'price' => 47.1, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7717, 'price' => 47.55, 'quality' => 1, 'card_type' => 'chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 7718, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7718, 'price' => 94.2, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7718, 'price' => 95.1, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7719, 'price' => 191, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7719, 'price' => 188.4, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7719, 'price' => 190.2, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7720, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7720, 'price' => 282.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7720, 'price' => 285.3, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7721, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7721, 'price' => 471, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7721, 'price' => 475.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -5320,6 +5365,7 @@ $phone_providers = [
     ['name' => 'ruixundaman', 'cfg' => $ruixundaman_phone],
     ['name' => 'ruizhi_tax', 'cfg' => $ruizhi_tax_phone],
     ['name' => 'pengxinda', 'cfg' => $pengxinda_phone],
+    ['name' => 'huazhong', 'cfg' => $huazhong_phone],
 
 ];
 $config['phone_providers'] = $phone_providers;

+ 3 - 17
helper/refill/api/xyz/huazhong/config.php

@@ -26,30 +26,16 @@ class config
     const ProductIdS = [
         mtopcard\ChinaMobileCard =>
             [
-                30  => '101687',
-                50  => '101688',
+                50 => '101688',
                 100 => '101689',
                 200 => '101690',
-                300 => '101691',
-                500 => '101692',
-            ],
-        mtopcard\ChinaUnicomCard =>
-            [
-                30  => '101705',
-                50  => '101706',
-                100 => '101707',
-                200 => '101708',
-                300 => '101709',
-                500 => '101710',
             ],
         mtopcard\ChinaTelecomCard =>
             [
-                30  => '101723',
-                50  => '101724',
+                30 => '101723',
+                50 => '101724',
                 100 => '101725',
                 200 => '101726',
-                300 => '101727',
-                500 => '101728',
             ]
     ];
 }

+ 12 - 1
helper/refill/api/xyz/huazhong/对接文档-yezi.txt

@@ -6,4 +6,15 @@ http://123.60.38.169:9086/onlinepay.do 下单地址
 http://123.60.38.169:9086/searchbalance.do 余额查询
 http://123.60.38.169:9086/searchpay.do 订单主动查询地址
 
-api接口文档地址:https://www.showdoc.com.cn/AQL666666/
+api接口文档地址:https://www.showdoc.com.cn/AQL666666/
+
+移动编码
+50面值:101688
+100面值:101689
+200面值:101690
+
+电信商品编码
+ 30面值   101723
+ 50面值   101724
+100面值   101725
+200面值   101726

+ 4 - 0
mobile/callback/refill_huazhong.php

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

mobile/callback/refill_mingxinda.php → mobile/callback/refill_pengxinda.php


+ 14 - 0
test/TestRefill.php

@@ -2007,6 +2007,20 @@ class TestRefill extends TestCase
 //        $resp = $provider->notify($params);
     }
 
+    public function testHuazhong()
+    {
+        $provider = $this->getProvider('huazhong');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
+        $resp = $provider->query(['order_sn' => '58581646984524382528']);
+
+//        $body = ' {"orderid":"GCN22031115279906665","sporderid":"54011646983613476599","userid":"10002763","merchantsubmittime":"20220311153014","resultno":"9","parvalue":"50","remark1":"","payno":"","fundbalance":"-47.65","sign":"198392B102B9B9FB60D52EF93EF2BDCC"}';
+//        $params = json_decode($body, true);
+//        $provider = $this->getProvider('huazhong','RefillCallBack');
+//        $ret = $provider->verify($params);
+//        $resp = $provider->notify($params);
+    }
+
     public function testAmingjd()
     {
 //        $provider = new refill\amingjd\RefillPhone([]);