فهرست منبع

Merge branch 'iOIL' of 39.97.239.116:gyfl/xyzshop into iOIL

stanley-king 4 سال پیش
والد
کامیت
b214b97f4d
4فایلهای تغییر یافته به همراه8 افزوده شده و 8 حذف شده
  1. 3 0
      helper/refill/RefillFactory.php
  2. 0 2
      helper/refill/bjb/RefillCallBack.php
  3. 1 2
      mobile/refill_bjb.php
  4. 4 4
      test/TestRefill.php

+ 3 - 0
helper/refill/RefillFactory.php

@@ -20,6 +20,9 @@ require_once(BASE_HELPER_PATH . '/refill/beixt/RefillCallBack.php');
 require_once(BASE_HELPER_PATH . '/refill/bxtwt/RefillPhone.php');
 require_once(BASE_HELPER_PATH . '/refill/bxtwt/RefillCallBack.php');
 
+require_once(BASE_HELPER_PATH . '/refill/bjb/RefillPhone.php');
+require_once(BASE_HELPER_PATH . '/refill/bjb/RefillCallback.php');
+
 use Log;
 use mtopcard;
 use QueueClient;

+ 0 - 2
helper/refill/bjb/RefillCallBack.php

@@ -42,8 +42,6 @@ class RefillCallBack implements refill\IRefillCallBack
             return [$order_id, true, false,true];
         } elseif ($status === 2) {
             return [$order_id, false, true,true];
-        } else {
-            return [$order_id, false, false,false];
         }
     }
 }

+ 1 - 2
mobile/refill_bjb.php

@@ -7,5 +7,4 @@ require_once(BASE_HELPER_PATH . '/refill/RefillFactory.php');
 
 refill\RefillFactory::instance()->notify('bjb',$_POST);
 
-echo ('SUCCESS');
-
+echo ('SUCCESS');

+ 4 - 4
test/TestRefill.php

@@ -47,9 +47,9 @@ class TestRefill extends TestCase
 
     public function testRefillPhone()
     {
-//        global $config;
-//        $providers = new \refill\beixts\RefillPhone($config['phone_providers']['beixts']);
-//        $resp = $providers->add(13699279618,4,50,['order_sn' => '200649600557718886']);
+        global $config;
+        $providers = new \refill\bjb\RefillPhone($config['phone_providers']['bjb']);
+        $resp = $providers->add(18500608333,5,50,['order_sn' => '200229600551218886']);
 
         //{"ack":"success","message":{"order_number":13281474,"charged_amount":"48.750","shipping_status":"5","shipping_status_desc":"未发货"}}
         //$_POST='{"order_number":13281474,"shipping_status":1,"shipping_status_desc":"已发货","shipping_status_message":"","sign":"05863f9931ed69a70e456222f057dfdd","voucher":"110103307162012081746340295254","vouchertype":"","voucherurl":"","tradeNo":"200649600557718888"}';
@@ -62,7 +62,7 @@ class TestRefill extends TestCase
         $params['vouchertype'] = '';
         $params['voucherurl'] = '';
         $params['tradeNo'] = '200649600557718887';
-        $ret = refill\RefillFactory::instance()->notify('beixt',$params);
+//        $ret = refill\RefillFactory::instance()->notify('beixt',$params);
     }
 
     public function testSuhxVerify()