Browse Source

Merge branch 'rtest' into rmaster

stanley-king 3 years ago
parent
commit
8e31ece28d

+ 6 - 5
admin/control/refill_order_manual.php

@@ -1,6 +1,8 @@
 <?php
 <?php
 
 
 
 
+use refill\util;
+
 class refill_order_manualControl extends SystemControl
 class refill_order_manualControl extends SystemControl
 {
 {
     public function __construct()
     public function __construct()
@@ -54,19 +56,18 @@ class refill_order_manualControl extends SystemControl
 
 
         $mod_refill = Model('refill_order');
         $mod_refill = Model('refill_order');
         $logic_vr_order = Logic("vr_order");
         $logic_vr_order = Logic("vr_order");
-        $order_info = Model('vr_order')->getOrderInfo(['order_id' => $order_id]);
+        $refill_info = Model('refill_order')->getOrderInfo(['order_id' => $order_id]);
 
 
         if ($type == 'success') {
         if ($type == 'success') {
             $logic_vr_order->changeOrderStateSuccess($order_id);
             $logic_vr_order->changeOrderStateSuccess($order_id);
-            $mod_refill->edit($order_id, ['notify_state' =>1, 'notify_time' => time()]);
-            QueueClient::push("NotifyMerchantComplete", ['order_id' => $order_id, 'manual' => true]);
         } elseif ($type == 'cancel') {
         } elseif ($type == 'cancel') {
             $logic_vr_order->changeOrderStateCancel($order_info, '', "充值失败");
             $logic_vr_order->changeOrderStateCancel($order_info, '', "充值失败");
-            $mod_refill->edit($order_id, ['notify_state' =>1, 'notify_time' => time()]);
-            QueueClient::push("NotifyMerchantComplete", ['order_id' => $order_id, 'manual' => true]);
         } else {
         } else {
             showMessage('手动操作类型错误', 'index.php?act=refill_order&op=index');
             showMessage('手动操作类型错误', 'index.php?act=refill_order&op=index');
         }
         }
+        $mod_refill->edit($order_id, ['notify_state' =>1, 'notify_time' => time()]);
+        util::pop_queue_order($refill_info['mchid'],$refill_info['mch_order']);
+        QueueClient::push("NotifyMerchantComplete", ['order_id' => $order_id, 'manual' => true]);
 
 
         showMessage('操作成功');
         showMessage('操作成功');
     }
     }

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

@@ -1097,7 +1097,7 @@ $phone_providers = [
     ['name' => 'feinimoshu_hf', 'cfg' => $feinimoshu_hf_phone],
     ['name' => 'feinimoshu_hf', 'cfg' => $feinimoshu_hf_phone],
     ['name' => 'yinteng', 'cfg' => $yinteng_phone],
     ['name' => 'yinteng', 'cfg' => $yinteng_phone],
     ['name' => 'moxj', 'cfg' => $moxj_phone],
     ['name' => 'moxj', 'cfg' => $moxj_phone],
-//    ['name' => 'moxj_fs', 'cfg' => $moxj_fs_phone],
+    ['name' => 'moxj_fs', 'cfg' => $moxj_fs_phone],
     ['name' => 'zanzanquick', 'cfg' => $zanzanquick_phone]
     ['name' => 'zanzanquick', 'cfg' => $zanzanquick_phone]
 ];
 ];
 $config['phone_providers'] = $phone_providers;
 $config['phone_providers'] = $phone_providers;

+ 1 - 0
helper/refill/api/xyz/moxj_fs/account.txt

@@ -1,3 +1,4 @@
+http://150.107.3.58/index.html
 账号密码
 账号密码
 yezi
 yezi
 123456yezi
 123456yezi

+ 4 - 4
helper/refill/api/xyz/moxj_fs/config.php

@@ -4,6 +4,7 @@
 namespace refill\moxj_fs;
 namespace refill\moxj_fs;
 
 
 use mtopcard;
 use mtopcard;
+
 class config
 class config
 {
 {
     const ORDER_URL = 'http://150.107.3.58/api/receiveOrder';
     const ORDER_URL = 'http://150.107.3.58/api/receiveOrder';
@@ -11,11 +12,10 @@ class config
 
 
     const PARTNER_ID = '58';
     const PARTNER_ID = '58';
     const KEY = 'a287ccee4bb064445b8fb7ca743d1dad';
     const KEY = 'a287ccee4bb064445b8fb7ca743d1dad';
-//    const NOTIFY_URL =  BASE_SITE_URL."/mobile/callback/refill_moxj_fs.php";
-    const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_moxj_fs.php";
     const operator = [
     const operator = [
-        mtopcard\ChinaMobileCard  => 2,
-        mtopcard\ChinaUnicomCard  => 0,
+        mtopcard\ChinaMobileCard => 2,
+        mtopcard\ChinaUnicomCard => 0,
         mtopcard\ChinaTelecomCard => 1
         mtopcard\ChinaTelecomCard => 1
     ];
     ];
     const ExtHeaders = ['Content-Type: application/x-www-form-urlencoded'];
     const ExtHeaders = ['Content-Type: application/x-www-form-urlencoded'];

+ 4 - 0
mobile/callback/refill_moxj_fs.php

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

+ 11 - 9
test/TestRefill.php

@@ -360,8 +360,11 @@ class TestRefill extends TestCase
     public function testMoxj_fsPhone()
     public function testMoxj_fsPhone()
     {
     {
         $providers = new refill\moxj_fs\RefillPhone([]);
         $providers = new refill\moxj_fs\RefillPhone([]);
-        $resp = $providers->add(15139608757, 4, 50, ['order_sn' => $this->make_sn()]);
-//        $resp = $providers->query(['order_sn' => '91131623906171663147']);
+//        $resp = $providers->add(15139608757, 4, 100, ['order_sn' => $this->make_sn()]);
+        $resp = $providers->query(['order_sn' => '42741624242693157165']);
+        $data = '{"amount":"100","charge_type":"2","code":"1","partner_id":"58","phone":"15139608757","sign":"30d193dba4101e50851ed0efabb75fb1","partner_order_no":"42741624242693157165","official_order_id":"20210621103211948830"}';
+        $params = json_decode($data , true);
+//        refill\RefillFactory::instance()->notify('moxj_fs',$params);
     }
     }
 
 
     public function testZanzanquickPhone()
     public function testZanzanquickPhone()
@@ -1213,13 +1216,12 @@ class TestRefill extends TestCase
     public function testCtSign()
     public function testCtSign()
     {
     {
         $params['act'] = 'refill';
         $params['act'] = 'refill';
-        $params['mchid'] = 10138;
+        $params['amount'] = 1;
+        $params['cardno'] = 18888888888;
+        $params['mchid'] = 1101;
         $params['op'] = 'add';
         $params['op'] = 'add';
-        $params['amount'] = 10;
-        $params['cardno'] = 18736009728;
-        $params['notifyurl'] = 'http://202.85.213.155:8080/YeZiYKCallBackOrderServlet';
-        $params['quality'] = 5;
-        $params['order_sn'] = 'jftest0000125';
+        $params['notifyurl'] = '';
+        $params['order_sn'] = '1231212';
         $sign = $this->md5_sign($params);
         $sign = $this->md5_sign($params);
     }
     }
 
 
@@ -1240,7 +1242,7 @@ class TestRefill extends TestCase
             }
             }
         }
         }
 
 
-        $body .= "&key=678171AEDF2FD00FDE5FAC6211FF2AE5";
+        $body .= "&key=aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa";
 
 
         return md5($body);
         return md5($body);
     }
     }