xiaoyu 3 年之前
父节点
当前提交
43d009c5b0

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

@@ -2526,6 +2526,51 @@ $dashang_phone = ['name' => 'dashang', 'store_id' => 127, 'qualitys' => '2',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$yuanta_phone = ['name' => 'yuanta', 'store_id' => 128, 'qualitys' => '5',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7116, 'price' => 9.18, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7116, 'price' => 9.15, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7116, 'price' => 9.56, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7117, 'price' => 18.36, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7117, 'price' => 18.3, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7117, 'price' => 19.12, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        30 => [
+//            ['goods_id' => 7118, 'price' => 27.54, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7118, 'price' => 27.45, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7118, 'price' => 28.68, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+        50 => [
+            ['goods_id' => 7119, 'price' => 45.9, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7119, 'price' => 45.75, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7119, 'price' => 47.8, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7120, 'price' => 91.8, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7120, 'price' => 91.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7120, 'price' => 95.6, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7121, 'price' => 183.6, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7121, 'price' => 183, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7121, 'price' => 191.2, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+//            ['goods_id' => 7122, 'price' => 275.4, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7122, 'price' => 274.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7122, 'price' => 286.8, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+//            ['goods_id' => 7123, 'price' => 459, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7123, 'price' => 457.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7123, 'price' => 478, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2623,6 +2668,7 @@ $phone_providers = [
     ['name' => 'jinfeng', 'cfg' => $jinfeng_phone],
     ['name' => 'hangtong', 'cfg' => $hangtong_phone],
     ['name' => 'dashang', 'cfg' => $dashang_phone],
+    ['name' => 'yuanta', 'cfg' => $yuanta_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 

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

@@ -2526,6 +2526,51 @@ $dashang_phone = ['name' => 'dashang', 'store_id' => 127, 'qualitys' => '2',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$yuanta_phone = ['name' => 'yuanta', 'store_id' => 128, 'qualitys' => '5',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7116, 'price' => 9.18, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7116, 'price' => 9.15, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7116, 'price' => 9.56, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7117, 'price' => 18.36, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7117, 'price' => 18.3, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7117, 'price' => 19.12, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        30 => [
+//            ['goods_id' => 7118, 'price' => 27.54, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7118, 'price' => 27.45, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7118, 'price' => 28.68, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+        50 => [
+            ['goods_id' => 7119, 'price' => 45.9, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7119, 'price' => 45.75, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7119, 'price' => 47.8, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7120, 'price' => 91.8, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7120, 'price' => 91.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7120, 'price' => 95.6, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7121, 'price' => 183.6, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7121, 'price' => 183, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7121, 'price' => 191.2, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+//            ['goods_id' => 7122, 'price' => 275.4, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7122, 'price' => 274.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7122, 'price' => 286.8, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+//            ['goods_id' => 7123, 'price' => 459, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7123, 'price' => 457.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7123, 'price' => 478, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2623,6 +2668,7 @@ $phone_providers = [
     ['name' => 'jinfeng', 'cfg' => $jinfeng_phone],
     ['name' => 'hangtong', 'cfg' => $hangtong_phone],
     ['name' => 'dashang', 'cfg' => $dashang_phone],
+    ['name' => 'yuanta', 'cfg' => $yuanta_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 

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

@@ -2526,6 +2526,51 @@ $dashang_phone = ['name' => 'dashang', 'store_id' => 127, 'qualitys' => '2',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$yuanta_phone = ['name' => 'yuanta', 'store_id' => 128, 'qualitys' => '5',
+    'amount' => [
+//        10 => [
+//            ['goods_id' => 7116, 'price' => 9.18, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7116, 'price' => 9.15, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7116, 'price' => 9.56, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        20 => [
+//            ['goods_id' => 7117, 'price' => 18.36, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7117, 'price' => 18.3, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7117, 'price' => 19.12, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+//        30 => [
+//            ['goods_id' => 7118, 'price' => 27.54, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7118, 'price' => 27.45, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7118, 'price' => 28.68, 'quality' => 5, 'card_type' => 'chinatelecom']
+//        ],
+        50 => [
+            ['goods_id' => 7119, 'price' => 45.9, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7119, 'price' => 45.75, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7119, 'price' => 47.8, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        100 => [
+            ['goods_id' => 7120, 'price' => 91.8, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7120, 'price' => 91.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7120, 'price' => 95.6, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7121, 'price' => 183.6, 'quality' => 5, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7121, 'price' => 183, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7121, 'price' => 191.2, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+//            ['goods_id' => 7122, 'price' => 275.4, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7122, 'price' => 274.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7122, 'price' => 286.8, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+//            ['goods_id' => 7123, 'price' => 459, 'quality' => 5, 'card_type' => 'chinamobile'],
+//            ['goods_id' => 7123, 'price' => 457.5, 'quality' => 5, 'card_type' => 'chinaunicom'],
+//            ['goods_id' => 7123, 'price' => 478, 'quality' => 5, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -2623,6 +2668,7 @@ $phone_providers = [
     ['name' => 'jinfeng', 'cfg' => $jinfeng_phone],
     ['name' => 'hangtong', 'cfg' => $hangtong_phone],
     ['name' => 'dashang', 'cfg' => $dashang_phone],
+    ['name' => 'yuanta', 'cfg' => $yuanta_phone],
 ];
 $config['phone_providers'] = $phone_providers;
 

+ 2 - 2
helper/refill/api/xyz/yuanlai/RefillCallBack.php

@@ -1,7 +1,7 @@
 <?php
-namespace refill\yuanlai;
+namespace refill\yuanta;
 
-require_once(BASE_HELPER_RAPI_PATH . '/yuanlai/config.php');
+require_once(BASE_HELPER_RAPI_PATH . '/yuanta/config.php');
 
 use refill;
 class RefillCallBack implements refill\IRefillCallBack

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

@@ -1,8 +1,8 @@
 <?php
 
-namespace refill\yuanlai;
+namespace refill\yuanta;
 
-require_once(BASE_HELPER_RAPI_PATH . '/yuanlai/config.php');
+require_once(BASE_HELPER_RAPI_PATH . '/yuanta/config.php');
 
 use refill;
 use Log;

helper/refill/api/xyz/yuanlai/api.txt → helper/refill/api/xyz/yuanta/api.txt


+ 3 - 3
helper/refill/api/xyz/yuanlai/config.php

@@ -1,7 +1,7 @@
 <?php
 
 
-namespace refill\yuanlai;
+namespace refill\yuanta;
 
 use mtopcard;
 class config
@@ -11,8 +11,8 @@ class config
     const BALANCE_URL= 'http://59.110.225.82:10186/plat/api/old/queryBalance';
 
     const USER_ID= '200029';
-    const KEY = '15536053107';
-    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_yuanlai.php";
+    const KEY = '04096d13de0b4c9b8b491059fbb64ac1';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_yuanta.php";
     const operator = [
         mtopcard\ChinaMobileCard  => 1,
         mtopcard\ChinaUnicomCard  => 2,

+ 4 - 0
mobile/callback/refill_yuanta.php

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

+ 11 - 3
test/TestRefill.php

@@ -1011,10 +1011,18 @@ class TestRefill extends TestCase
         $resp = $providers->notify($params);
     }
 
-    public function testYuanlai()
+    public function testYuanta()
     {
-        $providers = $this->getProvider('yuanlai');
-        $resp = $providers->balance();
+        $providers = $this->getProvider('yuanta');
+//        $resp = $providers->balance();
+//        $resp = $providers->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
+        $resp = $providers->query(['order_sn' => '61501631786913519186']);
+
+//        $body = '{"szOrderId":"61501631786913519186","fSalePrice":"45.75","szAgentId":"200029","nFlag":"2","szVerifyString":"3a580a84b477efa431d78b505fd7389e","szPhoneNum":"18500608333","szRtnMsg":"110103353072109161810250286803","nDemo":"50"}';
+//        $params = json_decode($body, true);
+//        $providers = $this->getProvider('yuanta','RefillCallBack');
+//        $ret = $providers->verify($params);
+//        $resp = $providers->notify($params);
     }
 
     public function testAmingjd()