xiaoyu 3 år sedan
förälder
incheckning
ce2778ba14

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

@@ -5061,6 +5061,55 @@ $ruixundaman_phone = ['name' => 'ruixundaman', 'store_id' => 201, 'qualitys' =>
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$ruizhi_tax_phone = ['name' => 'ruizhi_tax', 'store_id' => 202, 'qualitys' => '2',
+    'amount' => [
+        5 => [
+            ['goods_id' => 7697, 'price' => 5.485, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7697, 'price' => 5.435, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        10 => [
+            ['goods_id' => 7698, 'price' => 10.67, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7698, 'price' => 10.5, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7698, 'price' => 10.62, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        20 => [
+            ['goods_id' => 7699, 'price' => 21.04, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7699, 'price' => 20.82, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7699, 'price' => 21, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        30 => [
+            ['goods_id' => 7700, 'price' => 31.41, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7700, 'price' => 31.23, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7700, 'price' => 31.41, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        50 => [
+            ['goods_id' => 7701, 'price' => 52.15, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7701, 'price' => 52.05, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7701, 'price' => 52.15, 'quality' => 2, 'card_type' => 'chinatelecom'],
+        ],
+        100 => [
+            ['goods_id' => 7702, 'price' => 104, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7702, 'price' => 103.95, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7702, 'price' => 104, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        200 => [
+            ['goods_id' => 7703, 'price' => 208, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7703, 'price' => 207.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7703, 'price' => 208, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        300 => [
+            ['goods_id' => 7704, 'price' => 312, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7704, 'price' => 311.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7704, 'price' => 312, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ],
+        500 => [
+            ['goods_id' => 7705, 'price' => 520, 'quality' => 2, 'card_type' => 'chinamobile'],
+            ['goods_id' => 7705, 'price' => 519.75, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7705, 'price' => 520, 'quality' => 2, 'card_type' => 'chinatelecom']
+        ]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -5224,6 +5273,7 @@ $phone_providers = [
     ['name' => 'feimingyunew', 'cfg' => $feimingyunew_phone],
     ['name' => 'hangtongyj', 'cfg' => $hangtongyj_phone],
     ['name' => 'ruixundaman', 'cfg' => $ruixundaman_phone],
+    ['name' => 'ruizhi_tax', 'cfg' => $ruizhi_tax_phone],
 
 ];
 $config['phone_providers'] = $phone_providers;

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

@@ -38,7 +38,7 @@ class RefillCallBack implements refill\IRefillCallBack
         $order_sn = $params['user_order'];
         $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'];
 

+ 22 - 1
helper/refill/api/xyz/ruizhi_tax/config.php

@@ -26,7 +26,28 @@ class config
             200 => 20006,
             300 => 20007,
             500 => 20008
-        ]
+        ],
+        mtopcard\ChinaUnicomCard => [
+            10  => 20009,
+            20  => 20010,
+            30  => 20011,
+            50  => 20012,
+            100 => 20013,
+            200 => 20014,
+            300 => 20015,
+            500 => 20016
+        ],
+        mtopcard\ChinaTelecomCard => [
+            5   => 20047,
+            10  => 20017,
+            20  => 20018,
+            30  => 20019,
+            50  => 20020,
+            100 => 20021,
+            200 => 20022,
+            300 => 20023,
+            500 => 20024
+        ],
     ];
     const ERRCODES = ['101', '102', '103', '104', '105', '106', '107', '108', '109', '100', '112', '115', '116', '117', '118', '119', '120'];
 }

+ 22 - 2
test/TestRefill.php

@@ -1967,10 +1967,30 @@ class TestRefill extends TestCase
 
     public function testRuixundaman()
     {
-        $provider = $this->getProvider('ruixundaman');
+//        $provider = $this->getProvider('ruixundaman');
 //        $resp = $provider->balance();
 //        $resp = $provider->add(18500608333, 5, 50, ['order_sn' => $this->make_sn()]);
-        $resp = $provider->query(['order_sn' => '98441646796808890306']);
+//        $resp = $provider->query(['order_sn' => '98441646796808890306']);
+
+        $body = '{"orderId":"220309113357355093","appId":"8tYeow0MYZ","outOrderId":"98441646796808890306","sign":"ec2619a26a11e3320fcdc71fccc7b310","orderStatus":"2","completeTime":"20220309193655","orderDesc":"\u8ba2\u5355\u6210\u529f","ext1":"2022233820220309193635"}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('ruixundaman','RefillCallBack');
+        $ret = $provider->verify($params);
+        $resp = $provider->notify($params);
+    }
+
+    public function testRuizhi_tax()
+    {
+//        $provider = $this->getProvider('ruizhi_tax');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
+//        $resp = $provider->query(['order_sn' => '36411646882603857635']);
+
+        $body = '{"userid":"10713","order_id":"22031011232910713e1bc01a6b","account":"13699279618","amount":"50","price":"52.15","state":"success","user_order":"36411646882603857635","sign":"3CEDF5DF4F8A178471FA24B07C8D9BBB","voucher":"2022031027610736554488548137"}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('ruizhi_tax','RefillCallBack');
+        $ret = $provider->verify($params);
+        $resp = $provider->notify($params);
     }
 
     public function testAmingjd()