Selaa lähdekoodia

微三活流水号bug

赵明 1 vuosi sitten
vanhempi
commit
8022b56b2b

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

@@ -28,7 +28,7 @@ class RefillCallBack implements refill\IRefillCallBack
 
         $order_id = $order_info['order_id'];
         if ($status == 'success') {
-            $official_sn = $params['inTradeNo'];
+            $official_sn = $params['operatorTradeNo'];
             Model('refill_order')->edit($order_id, ['official_sn' => $official_sn, 'ch_trade_no' => $params['orderId']]);
             return [$order_id, true, false, true, $official_sn];
         } elseif ($status == 'failed') {

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

@@ -57,7 +57,7 @@ class RefillPhone extends refill\IRefillPhone
 
             $status = $resp['data']['status'];
             if ($status == 'waiting') {
-                return [true, $resp['data']['inTradeNo'], false];
+                return [true, $resp['data']['operatorTradeNo'], false];
             } else {
                 return [false, $resp['data']['statusDesc'], false];
             }
@@ -92,7 +92,7 @@ class RefillPhone extends refill\IRefillPhone
                 {
                     $status = $resp['data']['status'];
                     if ($status == 'success') {
-                        $offical_sn = $resp['data']['inTradeNo'];
+                        $offical_sn = $resp['data']['operatorTradeNo'];
                         Model('refill_order')->edit($refill_info['order_id'], ['official_sn' => $offical_sn]);
                         $order_state = ORDER_STATE_SUCCESS;
                     } elseif ($status == 'failed') {

+ 6 - 6
test/TestRefill.php

@@ -5812,15 +5812,15 @@ class TestRefill extends TestCase
     public function testweisanhuo()
     {
         $provider = $this->getProvider('weisanhuo');
-//        $resp = $provider->balance();
+        $resp = $provider->balance();
 //        $resp = $provider->add(13699279618, 4, 50, ['order_sn' => $this->make_sn()]);
         $resp = $provider->query(['order_sn' => '24271700815859899563']);
 
-        $post = '{"operatorTradeNo":"","statusDesc":"交易成功","phone":"18780103116","outTradeNo":"202309250000000006","sign":"d793406757c1bb920fe518e9673a28ea","inTradeNo":"202309251766523539","status":"success","reportTime":"1695607732705"}';
-        $data = json_decode($post, true);
-        $provider = $this->getProvider('weisanhuo', 'RefillCallBack');
-
-        $ret = $provider->verify($data);
+//        $post = '{"operatorTradeNo":"","statusDesc":"交易成功","phone":"18780103116","outTradeNo":"202309250000000006","sign":"d793406757c1bb920fe518e9673a28ea","inTradeNo":"202309251766523539","status":"success","reportTime":"1695607732705"}';
+//        $data = json_decode($post, true);
+//        $provider = $this->getProvider('weisanhuo', 'RefillCallBack');
+//
+//        $ret = $provider->verify($data);
 //        $resp = $provider->notify($data);
     }
 }