Browse Source

xyz yl dezhi

xiaoyu 2 years ago
parent
commit
57084e0d87
4 changed files with 112 additions and 0 deletions
  1. 46 0
      data/config/xyz/refill.ini.php
  2. 46 0
      data/config/yl/refill.ini.php
  3. 14 0
      test/TestRefill.php
  4. 6 0
      test/TestRefillYl.php

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

@@ -6216,6 +6216,51 @@ $xinruiheng_phone = ['name' => 'xinruiheng', 'store_id' => 235, 'qualitys' => '1
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$dezhi_phone = ['name' => 'dezhi', 'store_id' => 236, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7951, 'price' => 9.67, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7951, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7951, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7952, 'price' => 19.34, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7952, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7952, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 7953, 'price' => 29.01, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7953, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7953, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7954, 'price' => 48.35, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7954, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7954, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7955, 'price' => 96.7, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7955, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7955, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7956, 'price' => 193.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7956, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7956, 'price' => 191, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7957, 'price' => 290.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7957, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7957, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7958, 'price' => 483.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7958, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7958, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -6407,6 +6452,7 @@ $phone_providers = [
     ['name' => 'yuke_dx', 'cfg' => $yuke_dx_phone],
     ['name' => 'huoshenguo_yd', 'cfg' => $huoshenguo_yd_phone],
     ['name' => 'xinruiheng', 'cfg' => $xinruiheng_phone],
+    ['name' => 'dezhi', 'cfg' => $dezhi_phone],
 
 ];
 $config['phone_providers'] = $phone_providers;

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

@@ -6039,6 +6039,51 @@ $xinruiheng_phone = ['name' => 'xinruiheng', 'store_id' => 226, 'qualitys' => '1
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$dezhi_phone = ['name' => 'dezhi', 'store_id' => 227, 'qualitys' => '1',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7906, 'price' => 9.67, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7906, 'price' => 9.53, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7906, 'price' => 9.55, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7907, 'price' => 19.34, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7907, 'price' => 19.06, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7907, 'price' => 19.1, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+        30 => [
+            ['goods_id' => 7908, 'price' => 29.01, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7908, 'price' => 28.59, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7908, 'price' => 28.65, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7909, 'price' => 48.35, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7909, 'price' => 47.65, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7909, 'price' => 47.75, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7910, 'price' => 96.7, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7910, 'price' => 95.3, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7910, 'price' => 95.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7911, 'price' => 193.4, 'quality' => 1, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7911, 'price' => 190.6, 'quality' => 1, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7911, 'price' => 191, 'quality' => 1, 'card_type' => 'chinatelecom']
+        ],
+//        300 => [
+//            ['goods_id' => 7912, 'price' => 290.1, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7912, 'price' => 285.9, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7912, 'price' => 286.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ],
+//        500 => [
+//            ['goods_id' => 7913, 'price' => 483.5, 'quality' => 1, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7913, 'price' => 476.5, 'quality' => 1, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7913, 'price' => 477.5, 'quality' => 1, 'card_type' => 'chinatelecom']
+//        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -6226,6 +6271,7 @@ $phone_providers = [
     ['name' => 'guitong', 'cfg' => $guitong_phone],
     ['name' => 'huoshenguo_yd', 'cfg' => $huoshenguo_yd_phone],
     ['name' => 'xinruiheng', 'cfg' => $xinruiheng_phone],
+    ['name' => 'dezhi', 'cfg' => $dezhi_phone],
 
 ];
 $config['phone_providers'] = $phone_providers;

+ 14 - 0
test/TestRefill.php

@@ -2397,6 +2397,20 @@ class TestRefill extends TestCase
         $resp = $provider->notify($params);
     }
 
+    public function testDezhi()
+    {
+//        $provider = $this->getProvider('dezhi');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
+//        $resp = $provider->query(['order_sn' => '86811656400057476279']);
+
+        $body = '{"szOrderId":"61171656397023525645","fSalePrice":"28.59","szAgentId":"200002","nFlag":"3","szVerifyString":"1a56ff14e3edae6e526d0f8418050530","szPhoneNum":"18500608333","szRtnMsg":"","nDemo":"30"}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('dezhi','RefillCallBack');
+        $ret = $provider->verify($params);
+        $resp = $provider->notify($params);
+    }
+
     public function testAmingjd()
     {
 //        $provider = new refill\amingjd\RefillPhone([]);

+ 6 - 0
test/TestRefillYl.php

@@ -754,4 +754,10 @@ class TestRefillYl extends TestCase
         $provider = $this->getProvider('xinruiheng');
         $resp = $provider->balance();
     }
+
+    public function testDezhi()
+    {
+        $provider = $this->getProvider('dezhi');
+        $resp = $provider->balance();
+    }
 }