瀏覽代碼

lingzhman update quality 4 30-200 96

xiaoyu 3 年之前
父節點
當前提交
c3f242d2ac
共有 3 個文件被更改,包括 20 次插入18 次删除
  1. 10 10
      data/config/xyz/refill.ini.php
  2. 2 2
      helper/refill/api/xyz/lingzhman/config.php
  3. 8 6
      test/TestRefill.php

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

@@ -1450,16 +1450,16 @@ $yunlingds_phone = ['name' => 'yunlingds', 'store_id' => 73, 'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
-$lingzhman_phone = ['name' => 'lingzhman', 'store_id' => 74, 'qualitys' => '5',
-    'amount' => [
-        10 => [['goods_id' => 6716, 'price' => 9, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        20 => [['goods_id' => 6717, 'price' => 18, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        30 => [['goods_id' => 6718, 'price' => 27, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        50 => [['goods_id' => 6719, 'price' => 45, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        100 => [['goods_id' => 6720, 'price' => 90, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        200 => [['goods_id' => 6721, 'price' => 180, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        300 => [['goods_id' => 6722, 'price' => 270, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
-        500 => [['goods_id' => 6723, 'price' => 450, 'quality' => 5, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+$lingzhman_phone = ['name' => 'lingzhman', 'store_id' => 74, 'qualitys' => '4',
+    'amount' => [
+        10 => [['goods_id' => 6716, 'price' => 9.6, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 6717, 'price' => 19.2, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 6718, 'price' => 28.8, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 6719, 'price' => 48, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 6720, 'price' => 96, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 6721, 'price' => 192, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 6722, 'price' => 288, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 6723, 'price' => 480, 'quality' => 4, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 

+ 2 - 2
helper/refill/api/xyz/lingzhman/config.php

@@ -14,10 +14,10 @@ class config
     const KEY = 'b225132ca8fc47d98c245fc231623dbb';
 
     const ProductIDS = [
-        mtopcard\ChinaMobileCard  => [
+        mtopcard\ChinaMobileCard => [
             30 => 'CMCCALLr30r', 50 => 'CMCCALLr50r', 100 => 'CMCCALLr100r', 200 => 'CMCCALLr200r'
         ],
-        mtopcard\ChinaUnicomCard  => [
+        mtopcard\ChinaUnicomCard => [
             30 => 'CUCCALLr30r', 50 => 'CUCCALLr50r', 100 => 'CUCCALLr100r', 200 => 'CUCCALLr200r'
         ],
         mtopcard\ChinaTelecomCard => [

+ 8 - 6
test/TestRefill.php

@@ -491,13 +491,15 @@ class TestRefill extends TestCase
 
     public function testLingzhmanPhone()
     {
-        $provider = $this->getProvider('lingzhman');
+//        $provider = $this->getProvider('lingzhman');
 //        $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
-//        $resp = $provider->query(['order_sn' => '29771625215707976538']);
-//        $data = '{"orderNo":"F2107021536431562574","status":"019","consumerNo":"60191625211393862930","voucherNo":null,"mobile":"18500608333"}';
-//        $params = json_decode($data, true);
-//        refill\RefillFactory::instance()->notify('lingzhman',$params);
-        $resp = $provider->balance();
+//        $resp = $provider->query(['order_sn' => '91641644558361512676']);
+//        $resp = $provider->balance();
+
+        $body = '{"orderNo":"F2202111346304162782","status":"001","consumerNo":"91641644558361512676","voucherNo":null,"mobile":"18500608333"}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('lingzhman', 'RefillCallback');
+        $resp = $provider->notify($params);
     }
 
     public function testQijutangPhone()