Procházet zdrojové kódy

fix feinimoshu merchant_order_id to morder

stanley-king před 3 roky
rodič
revize
620040b5f9

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

@@ -46,7 +46,7 @@ class RefillCallBack implements refill\IRefillCallBack
     public function notify($params)
     {
         $status = intval($params['status']);
-        $order_sn = $params['merchant_order_id'];
+        $order_sn = $params['morder'];
         $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
         if (empty($order_info)) {
             return [false, false, false,false];

+ 14 - 0
test/TestRefillThird.php

@@ -175,6 +175,20 @@ class TestRefillThird extends TestCase
         [$state, $ch_order, $neterr] = $providers->add(1000111100021211884, 2, 50, ['order_sn' => $order_sn]);
         $providers->query(['ch_trade_no' => $ch_order,'order_sn' => $order_sn]);
     }
+    public function testFNMSCB()
+    {
+        $params = ['appid' => 'CZ30533982',
+            'order' => 'D20210524392940805012773',
+            'morder' => '82001621839274971137',
+            'status' => '3',
+            'cash' => '50',
+            'signature' => '8e6bed66f0a3f28e3e952b60b98973b8'];
+
+        $provider = $this->getProvider('feinimoshu','RefillCallBack');
+        $ret = $provider->verify($params);
+        $this->assertTrue($ret,'Verify is OK');
+        $provider->notify($params);
+    }
 
     private function getProvider($name,$type = 'RefillPhone')
     {