浏览代码

xinhengyang query api update and guochuang 上海 yd 99.2

xiaoyu 3 年之前
父节点
当前提交
7b2dfeea28

二进制
helper/refill/api/xyz/guochuang/20211125上海移动调价函.png


+ 1 - 1
helper/refill/api/xyz/guochuang/config.php

@@ -65,7 +65,7 @@ class config
         //移动
         "4-10-2" => 9.99, "4-20-2" => 19.98, "4-30-2" => 29.895, "4-50-2" => 49.825, "4-100-2" => 99.65, "4-200-2" => 199.3, "4-300-2" => 298.95, "4-500-2" => 498.25,//天津 2
         "4-10-6" => 9.718, "4-20-6" => 19.436, "4-30-6" => 29.154, "4-50-6" => 48.59, "4-100-6" => 97.18, "4-200-6" => 194.36, "4-300-6" => 291.54, "4-500-6" => 485.9,//辽宁 6
-        "4-10-9" => 9.95, "4-20-9" => 19.9, "4-30-9" => 29.85, "4-50-9" => 49.75, "4-100-9" => 99.5,//上海 9
+        "4-10-9" => 9.92, "4-20-9" => 19.84, "4-30-9" => 29.76, "4-50-9" => 49.6, "4-100-9" => 99.2,//上海 9
         "4-10-8" => 10.012, "4-20-8" => 20.024, "4-30-8" => 30.036, "4-50-8" => 50.06, "4-100-8" => 100.12, "4-200-8" => 200.24, "4-300-8" => 300.36, "4-500-8" => 500.6,//黑龙江 8
         "4-10-29" => 9.82, "4-20-29" => 19.64, "4-30-29" => 29.46, "4-50-29" => 49.1, "4-100-29" => 98.2, "4-200-29" => 196.4, "4-300-29" => 294.6, "4-500-29" => 491,//青海 29
         "4-10-28" => 9.96, "4-20-28" => 19.90, "4-30-28" => 29.88, "4-50-28" => 49.8, "4-100-28" => 99.6, "4-200-28" => 199.2, "4-300-28" => 298.8, "4-500-28" => 498,//甘肃 28

+ 2 - 1
helper/refill/api/xyz/xinhengyang/RefillPhone.php

@@ -52,7 +52,8 @@ class RefillPhone extends refill\IRefillPhone
     public function query($refill_info)
     {
         $header = $this->createHeader();
-        $query_url = config::QUERY_URL . "/{$refill_info['ch_trade_no']}";
+        $header[] = 'X-Userno: true';
+        $query_url = config::QUERY_URL . "/{$refill_info['order_sn']}";
         $resp = http_request($query_url, [], 'GET', false, $header);
 
         if (empty($resp)) {

+ 13 - 13
test/TestRefill.php

@@ -613,16 +613,16 @@ class TestRefill extends TestCase
 
     public function testXinhengyang()
     {
-//        $provider = $this->getProvider('xinhengyang');
+        $provider = $this->getProvider('xinhengyang');
 //        $resp = $provider->balance();
 //        $resp = $provider->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
-//        $resp = $provider->query(['ch_trade_no' => 'f619063cc8f443e1a3ee1cc5fe868817']);
+        $resp = $provider->query(['order_sn' => '6966570691155594416360']);
 
-        $body = '{"reqNo":"f619063cc8f443e1a3ee1cc5fe868817","userReqNo":"12621636363677759274","evidence":"","sign":"fc184436350396baf252ff56aee6f5ce","billDiscount":"0.953","billAmount":"28.59","status":"50100","message":"fail"}';
-        $params = json_decode($body, true);
-        $provider = $this->getProvider('xinhengyang', 'RefillCallBack');
-        $ret = $provider->verify($params);
-        $resp = $provider->notify($params);
+//        $body = '{"reqNo":"f619063cc8f443e1a3ee1cc5fe868817","userReqNo":"12621636363677759274","evidence":"","sign":"fc184436350396baf252ff56aee6f5ce","billDiscount":"0.953","billAmount":"28.59","status":"50100","message":"fail"}';
+//        $params = json_decode($body, true);
+//        $provider = $this->getProvider('xinhengyang', 'RefillCallBack');
+//        $ret = $provider->verify($params);
+//        $resp = $provider->notify($params);
     }
 
     public function testMiaoxt()
@@ -2464,12 +2464,12 @@ class TestRefill extends TestCase
     {
         $params['act'] = 'refill';
         $params['op'] = 'add';
-        $params['mchid'] = 10221;
-        $params['cardno'] = '17610802062';
-        $params['amount'] = 30;
-        $params['order_sn'] = '20210926154819606056656';
-        $params['notifyurl'] = 'http://117.186.248.196:88/Asyn/notifyCall/367EA7';
-        $sign = $this->md5_sign($params,'E019D21A1E6611ECA4FD00163E179561');
+        $params['mchid'] = '10198';
+        $params['cardno'] = '18696902060';
+        $params['amount'] = '30';
+        $params['order_sn'] = '163782007236900000878';
+        $params['notifyurl'] = 'http://open.apiwater.xyz:20801/';
+        $sign = $this->md5_sign($params,'b9b30f57eac34a398a7534021fa23a16');
     }
 
     private function md5_sign($params,$key = '')