Explorar o código

Merge branch 'raccount' of 39.97.239.116:gyfl/xyzshop into raccount

stanley-king %!s(int64=3) %!d(string=hai) anos
pai
achega
b9927735f1

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

@@ -2582,27 +2582,27 @@ $guochuang_nation_phone = ['name' => 'guochuang_nation', 'store_id' => 121, 'qua
         ],
         30 => [
             ['goods_id' => 7062, 'price' => 30.33, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7062, 'price' => 30, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7062, 'price' => 29.985, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7062, 'price' => 30.33, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         50 => [
             ['goods_id' => 7063, 'price' => 50.125, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7063, 'price' => 50, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7063, 'price' => 49.975, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7063, 'price' => 50.35, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         100 => [
             ['goods_id' => 7064, 'price' => 100.2, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7064, 'price' => 100, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7064, 'price' => 99.95, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7064, 'price' => 100.4, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         200 => [
             ['goods_id' => 7065, 'price' => 200.4, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7065, 'price' => 200, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7065, 'price' => 199.9, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7065, 'price' => 200.46, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         300 => [
             ['goods_id' => 7066, 'price' => 300.6, 'quality' => 2, 'card_type' => 'chinamobile'],
-            ['goods_id' => 7066, 'price' => 300, 'quality' => 2, 'card_type' => 'chinaunicom'],
+            ['goods_id' => 7066, 'price' => 299.85, 'quality' => 2, 'card_type' => 'chinaunicom'],
             ['goods_id' => 7066, 'price' => 300.69, 'quality' => 2, 'card_type' => 'chinatelecom']
         ],
         500 => [
@@ -2809,12 +2809,12 @@ $yuanta_phone = ['name' => 'yuanta', 'store_id' => 128, 'qualitys' => '5',
         100 => [
 //            ['goods_id' => 7120, 'price' => 91.8, 'quality' => 5, 'card_type' => 'chinamobile'],
             ['goods_id' => 7120, 'price' => 90.3, 'quality' => 5, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7120, 'price' => 95.6, 'quality' => 5, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7120, 'price' => 92.5, 'quality' => 5, 'card_type' => 'chinatelecom']
         ],
         200 => [
 //            ['goods_id' => 7121, 'price' => 183.6, 'quality' => 5, 'card_type' => 'chinamobile'],
             ['goods_id' => 7121, 'price' => 180.6, 'quality' => 5, 'card_type' => 'chinaunicom'],
-//            ['goods_id' => 7121, 'price' => 191.2, 'quality' => 5, 'card_type' => 'chinatelecom']
+            ['goods_id' => 7121, 'price' => 185, 'quality' => 5, 'card_type' => 'chinatelecom']
         ]
 //        300 => [
 //            ['goods_id' => 7122, 'price' => 275.4, 'quality' => 5, 'card_type' => 'chinamobile'],

+ 3 - 2
helper/refill/api/xyz/shuoruan/RefillPhone.php

@@ -29,19 +29,20 @@ class RefillPhone extends refill\IRefillPhone
 
     public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
     {
-        $params_getter = function ($order_sn,$phone,$amount) {
+        $params_getter = function ($order_sn,$phone,$amount,$card_type) {
             $params = [];
             $params['orderId'] = $order_sn;
             $params['chargeAcct'] = $phone;
             $params['chargeCash'] = $amount;
             $params['chargeType'] = 0;
+            $params['ispName'] = urlencode(config::operator[$card_type]);
             $params['retUrl'] = urlencode(config::NOTIFY_URL);
             $params['action'] = 'CZ';
 
             return $params;
         };
 
-        $params = $params_getter($params['order_sn'], $card_no, $amount);
+        $params = $params_getter($params['order_sn'], $card_no, $amount, $card_type);
         $body = $this->pack_params($params);
 
         $resp = http_post_data(config::API_URL, $body, config::ExtHeaders, $net_errno);

+ 6 - 1
helper/refill/api/xyz/shuoruan/config.php

@@ -3,7 +3,7 @@
 
 namespace refill\shuoruan;
 
-
+use mtopcard;
 class config
 {
     const API_URL = 'http://api.sohan.hk:50080/API';
@@ -12,4 +12,9 @@ class config
     const KEY = '471D690CFB902BD8';
     const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_shuoruan.php";
     const ExtHeaders = ['Content-Type: application/json;charset=GB2312'];
+    const operator = [
+        mtopcard\ChinaMobileCard  => '移动',
+        mtopcard\ChinaUnicomCard  => '联通',
+        mtopcard\ChinaTelecomCard => '电信'
+    ];
 }

+ 5 - 1
helper/refill/api/xyz/yuanta/api.txt

@@ -10,4 +10,8 @@ appSecret:qXRRTTqrtAwwwtXp
 下单接口地址:http://59.110.225.82:8911/api/hf/order/submit
 查单接口地址:http://59.110.225.82:8911/api/order/query
 余额接口地址:http://59.110.225.82:8911/api/account/balance
-提卡接口地址:http://59.110.225.82:8911/api/card/get
+提卡接口地址:http://59.110.225.82:8911/api/card/get
+
+2022.3.14 增加电信商品编码
+100 面值    商品编码  100046
+200                 100047

+ 2 - 0
helper/refill/api/xyz/yuanta/config.php

@@ -21,6 +21,8 @@ class config
             200 => 100041
         ],
         mtopcard\ChinaTelecomCard => [
+            100 => 100046,
+            200 => 100047
         ],
     ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=utf-8'];

+ 1 - 1
test/TestRefill.php

@@ -1215,7 +1215,7 @@ class TestRefill extends TestCase
     {
         $provider = $this->getProvider('shuoruan');
 //        $resp = $provider->balance();
-        $resp = $provider->add(13699279618, 4, 10, ['order_sn' => $this->make_sn()]);
+        $resp = $provider->add(13911129867, 5, 10, ['order_sn' => $this->make_sn()]);
 //        $resp = $provider->query(['order_sn' => '80261634802627091026']);
 
         $params['Action'] = 'CX';