Browse Source

qianqian update

xiaoyu 3 năm trước cách đây
mục cha
commit
a2fbd53381

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

@@ -30,7 +30,7 @@ class RefillCallBack implements refill\IRefillCallBack
             $data['official_sn'] = strtolower($params['voucherNo']) == 'null' ? '' : $params['voucherNo'];
             Model('refill_order')->edit($order_id, $data);
             return [$order_id, true, false, true];
-        } elseif (in_array($status,config::NotifyErrCodes)) {
+        } elseif (in_array($status,config::NotifyErrCodes, true)) {
             return [$order_id, false, true, true];
         } else {
             return [$order_id, false, false, false];

+ 1 - 1
helper/refill/api/xyz/qianqian/RefillPhone.php

@@ -81,7 +81,7 @@ class RefillPhone extends refill\IRefillPhone
                 $save['official_sn'] = strtolower($resp['voucherNo']) == 'null' ? '' : $resp['voucherNo'];
                 Model('refill_order')->edit($refill_info['order_id'], $save);
             }
-            elseif (in_array($status,config::QueryErrCodes))
+            elseif (in_array($status,config::QueryErrCodes, true))
             {
                 if ($status === '026')
                 {

+ 8 - 0
test/TestRefillNotify.php

@@ -81,4 +81,12 @@ class TestRefillNotify extends TestCase
         $this->assertTrue($ret,'Verify is OK');
         $provider->notify($params);
     }
+
+    public function testQianqian()
+    {
+        $providers = $this->getProvider('qianqian', 'RefillCallBack');
+        $datas = '{"orderNo":"F2110181448034576979","status":"003","consumerNo":"0687020687883683049582","voucherNo":"","mobile":"18976761665"}';
+        $datas = json_decode($datas,true);
+        $resp = $providers->notify($datas);
+    }
 }