xiaoyu 3 лет назад
Родитель
Сommit
05a9e8c0d0

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

@@ -42,11 +42,11 @@ class RefillCallBack implements refill\IRefillCallBack
         }
         $order_id = $order_info['order_id'];
 
-        if(empty($params['supnumber'])) {
+        if(empty($params['remark1'])) {
             $data['official_sn'] = '';
         }
         else {
-            $data['official_sn'] = strtolower($params['supnumber']) == 'null' ? '' : $params['supnumber'];
+            $data['official_sn'] = strtolower($params['remark1']) == 'null' ? '' : $params['remark1'];
         }
 
         if ($status === 1) {

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

@@ -58,7 +58,7 @@ class RefillPhone extends refill\IRefillPhone
                 return [false, '网络错误', true];
             }
             $resultno = intval($resp['resultno']);
-            if (in_array($resultno, [0,1,2])) {
+            if (in_array($resultno, [0,2])) {
                 return [true, $resp['orderid'], false];
             } else {
                 return [false, $resp['message'], false];
@@ -86,7 +86,7 @@ class RefillPhone extends refill\IRefillPhone
             $resultno = intval($resp['resultno']);
             if ($resultno === 1) {
                 $order_state = ORDER_STATE_SUCCESS;
-                $updata['official_sn'] = $resp['supnumber'];
+                $updata['official_sn'] = $resp['remark1'];
                 Model('refill_order')->edit($refill_info['order_id'], $updata);
             } elseif ($resultno === 9) {
                 $order_state = ORDER_STATE_CANCEL;

+ 9 - 4
helper/refill/api/xyz/yunling/config.php

@@ -10,8 +10,7 @@ class config
     const QUERY_URL= 'http://121.89.243.74:9086/searchpay.do';
     const USER_ID= '10002504';
     const KEY = 'HdxxWScBF6aYykbB33r8S5CQcS5myYZZ';
-//    const NOTIFY_URL = BASE_SITE_URL . "/mobile/refill_yunling.php";
-    const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/refill_yunling.php";
     const operator = [
         mtopcard\ChinaMobileCard  => '移动',
         mtopcard\ChinaUnicomCard  => '联通',
@@ -19,7 +18,10 @@ class config
     ];
     const product_id = [
         mtopcard\ChinaMobileCard => [
-
+            30 => '30000000908',
+            50 => '30000000909',
+            100 => '30000000910',
+            200 => '30000000911'
         ],
         mtopcard\ChinaUnicomCard => [
             30 => '30000000731',
@@ -28,7 +30,10 @@ class config
             200 => '30000000992'
         ],
         mtopcard\ChinaTelecomCard => [
-
+            30 => '30000000736',
+            50 => '30000000737',
+            100 => '30000000738',
+            200 => '30000000739'
         ],
     ];
 }

BIN
helper/refill/api/xyz/yunling/新系统通信充值接口 - 副本.doc


+ 4 - 4
mobile/refill_yunling.php

@@ -1,4 +1,4 @@
-<?php
-
-refill\util::push_notify('yunling',$_POST);
-echo ('SUCCESS');
+<?php
+
+refill\util::push_notify('yunling',$_POST);
+echo ('OK');

+ 3 - 3
test/TestRefill.php

@@ -631,9 +631,9 @@ class TestRefill extends TestCase
     public function testYunlingPhone()
     {
         $providers = new refill\yunling\RefillPhone([]);
-//        $resp = $providers->add(18500608333, 5, 30, ['order_sn' => $this->make_sn()]);
-//        $resp = $providers->query(['order_sn' => '80611623143194548528']);
-        $data = '{"orderid":"CMM21060817062907189","sporderid":"80611623143194548528","userid":"10002504","merchantsubmittime":"20210608170733","resultno":"9","parvalue":"30","remark1":"","payno":"","fundbalance":"-28.59","sign":"06F04CE05ED248448B319F5986CE5335"}';
+//        $resp = $providers->add(18074608795, 6, 30, ['order_sn' => $this->make_sn()]);
+//        $resp = $providers->query(['order_sn' => '73791623147517199719']);
+        $data = '{"orderid":"EAF21060818183032772","sporderid":"73791623147517199719","userid":"10002504","merchantsubmittime":"20210608181912","resultno":"1","parvalue":"30","remark1":"1000000083421060818483137636","payno":"1000000083421060818483137636","fundbalance":"-28.59","sign":"8D77517AC3905ED88BF79EE789A5FA86"}';
         $input = json_decode($data, true);
         refill\RefillFactory::instance()->notify('yunling',$input);
     }