瀏覽代碼

yongjia test

xiaoyu 1 年之前
父節點
當前提交
5c33df13ed

+ 1 - 0
helper/refill/api/xyz/yongjia/API信息.txt

@@ -10,3 +10,4 @@ ID:1
 
 测试产品(需传产品编码)
 3000200	全国电信200元
+999999	油卡100元

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

@@ -154,7 +154,7 @@ class RefillPhone extends refill\IRefillThird
     {
         $key = config::KEY;
         $content  = "mchid={$params['mchid']}&orderid={$params['orderid']}&number={$params['number']}&productid={$params['productid']}";
-        $content .= "&timestamp={$params['timestamp']}&key={$key}";
+        $content .= "&timestamp={$params['timestamp']}&youka={$params['youka']}&key={$key}";
         return md5($content);
     }
 

+ 0 - 13
helper/refill/api/xyz/yongjia/config.php

@@ -3,7 +3,6 @@
 
 namespace refill\yongjia;
 
-use mtopcard;
 class config
 {
     const ORDER_URL = 'http://123.56.68.57:1008/hqorder/api/youkasubmit';
@@ -14,17 +13,5 @@ class config
     const KEY = '52e4fd509410446a8259fd8a93de6c85';
 //    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_yongjia.php";
     const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
-
-    const PRODUCT = [
-        mtopcard\ChinaMobileCard => [
-
-        ],
-        mtopcard\ChinaUnicomCard => [
-
-        ],
-        mtopcard\ChinaTelecomCard => [
-            200 => 3000200
-        ]
-    ];
     const ExtHeaders = ['Content-Type: application/json'];
 }

二進制
helper/refill/api/xyz/yongjia/~$接口文档V1.0.docx


+ 4 - 5
test/TestRefill.php

@@ -3251,17 +3251,16 @@ class TestRefill extends TestCase
 
     public function testYongjia()
     {
-//        $provider = $this->getProvider('yongjia','RefillOil');
+//        $provider = $this->getProvider('yongjia');
 //        $resp = $provider->balance();
-//        $resp = $provider->add(18074608795, 6, 200, ['order_sn' => $this->make_sn()]);
-//        $resp = $provider->query(['order_sn' => '67461681184143372378']);
+//        $resp = $provider->add(18074608795, 6, 200, ['order_sn' => $this->make_sn(), 'province' => 1, 'product_code' => 'XYZ100777', 'goods_id' => 6978]);
+//        $resp = $provider->query(['order_sn' => '86061683172050676749']);
 
-        $body = '{"number":"18074608795","mchid":"1","orderid":"67461681184143372378","price":"200.0","voucher":"","sign":"b9c011c70734707b88351ec5efd96d98","oid":134,"status":"3"}';
+        $body = '{"number":"18074608795","mchid":"1","orderid":"86061683172050676749","price":"100.0","voucher":"","sign":"3d62a44c8f49a158e3cb8d58518bc193","oid":162,"status":"3"}';
         $params = json_decode($body, true);
         $provider = $this->getProvider('yongjia', 'RefillCallback');
         $ret = $provider->verify($params);
         $resp = $provider->notify($params);
-
     }
 
     public function testHuiyuan()