Pārlūkot izejas kodu

Merge branch 'raccount' into rstanley

stanley-king 1 gadu atpakaļ
vecāks
revīzija
84ee407999
31 mainītis faili ar 918 papildinājumiem un 39 dzēšanām
  1. 18 3
      admin/control/provider.php
  2. 19 1
      admin/templates/default/provider.amount.edit.php
  3. 25 0
      data/config/xyz/refill.ini.php
  4. 28 0
      data/config/yl/refill.ini.php
  5. 1 13
      docker/compose/homecuda/acc/docker-compose.yml
  6. 2 10
      docker/compose/homecuda/admin/docker-compose.yml
  7. BIN
      helper/refill/api/xyz/guochuang/20230519辽宁移动调价函.png
  8. 1 1
      helper/refill/api/xyz/guochuang/config.php
  9. 1 1
      helper/refill/api/xyz/huiyuan/RefillCallBack.php
  10. 1 1
      helper/refill/api/xyz/huiyuan/RefillPhone.php
  11. 1 7
      helper/refill/api/xyz/huiyuan/config.php
  12. 13 0
      helper/refill/api/xyz/quanzhen/API信息.txt
  13. 39 0
      helper/refill/api/xyz/quanzhen/RefillCallBack.php
  14. 128 0
      helper/refill/api/xyz/quanzhen/RefillOil.php
  15. 26 0
      helper/refill/api/xyz/quanzhen/config.php
  16. BIN
      helper/refill/api/xyz/quanzhen/加油开放接口.pdf
  17. 1 1
      helper/refill/api/yl/guochuang/config.php
  18. 76 0
      helper/refill/api/yl/youjuntf/RefillCallBack.php
  19. 161 0
      helper/refill/api/yl/youjuntf/RefillPhone.php
  20. 7 0
      helper/refill/api/yl/youjuntf/api.txt
  21. 13 0
      helper/refill/api/yl/youjuntf/config.php
  22. 76 0
      helper/refill/api/yl/youlaitf/RefillCallBack.php
  23. 161 0
      helper/refill/api/yl/youlaitf/RefillPhone.php
  24. 7 0
      helper/refill/api/yl/youlaitf/api.txt
  25. 13 0
      helper/refill/api/yl/youlaitf/config.php
  26. 35 0
      mobile/callback/refill_huiyuan.php
  27. 7 0
      mobile/callback/refill_quanzhen.php
  28. 4 0
      mobile/callback/refill_youjuntf.php
  29. 4 0
      mobile/callback/refill_youlaitf.php
  30. 21 1
      test/TestRefill.php
  31. 29 0
      test/TestRefillYl.php

+ 18 - 3
admin/control/provider.php

@@ -585,10 +585,25 @@ class providerControl extends SystemControl
 
 
         if(chksubmit())
         if(chksubmit())
         {
         {
-            $bz = $_POST['bz'];
-            $resp = $mod->where(['id' => $amount_id])->update(['bz' => $bz]);
+            if (!empty($_FILES['voucher']['name'])) {
+                $upload = new UploadFile();
+                $upload->set('default_dir', ATTACH_UPFILE);
+
+                $result = $upload->upfile('voucher');
+                if ($result) {
+                    $updata['voucher_name'] = $upload->file_name;
+                } else {
+                    showMessage($upload->error);
+                }
+            }
+
+            $updata['bz'] = $_POST['bz'];
+            $resp = $mod->where(['id' => $amount_id])->update($updata);
             if($resp) {
             if($resp) {
-                showMessage('编辑成功');
+                if(!empty($updata['voucher_name'])){
+                    @unlink(BASE_UPLOAD_PATH.'/'.ATTACH_UPFILE.'/'.$provider_amount['voucher_name']);
+                }
+                showMessage('编辑成功', 'index.php?act=provider&op=provider_amount');
             }else{
             }else{
                 showMessage('编辑失败');
                 showMessage('编辑失败');
             }
             }

+ 19 - 1
admin/templates/default/provider.amount.edit.php

@@ -41,7 +41,22 @@
                     <?php echo $output['provider_amount']['amount'];?>
                     <?php echo $output['provider_amount']['amount'];?>
                 </td>
                 </td>
             </tr>
             </tr>
-
+            <tr>
+                <td colspan="2"><label>充值申请凭证:</label></td>
+            </tr>
+            <tr class="noborder">
+                <td class="vatop rowform">
+                <span class="type-file-show"> <img class="show_image" src="<?php echo ADMIN_TEMPLATES_URL;?>/images/preview.png">
+                    <div class="type-file-preview" style="display: none;"><img id="view_img" src="<?php echo UPLOAD_SITE_URL.'/'.ATTACH_UPFILE.'/'.$output['provider_amount']['voucher_name']; ?>"></div>
+                </span>
+                <span class="type-file-box">
+                    <input type='text' name='textfield' id='textfield1' class='type-file-text'/>
+                    <input type='button' name='button' id='button1' value='' class='type-file-button'/>
+                    <input name="voucher" type="file" class="type-file-file" id="voucher" size="30" hidefocus="true">
+                </span>
+                </td>
+                <td class="vatop tips"></td>
+            </tr>
             <tr>
             <tr>
                 <td colspan="2" class="required"><label>备注:</label></td>
                 <td colspan="2" class="required"><label>备注:</label></td>
             </tr>
             </tr>
@@ -75,5 +90,8 @@
         $("#submitBtn").click(function () {
         $("#submitBtn").click(function () {
             $("#user_form").submit();
             $("#user_form").submit();
         });
         });
+        $("#voucher").change(function () {
+            $("#textfield1").val($(this).val());
+        });
     });
     });
 </script>
 </script>

+ 25 - 0
data/config/xyz/refill.ini.php

@@ -279,6 +279,30 @@ $zhongst_oil = ['name' => 'zhongst_oil', 'store_id' => 323, 'qualitys' => '5',
     ],
     ],
     'period' => [], 'refill_type' => 'api'];
     'period' => [], 'refill_type' => 'api'];
 
 
+$quanzhen_oil = ['name' => 'quanzhen', 'store_id' => 325, 'qualitys' => '5',
+    'amount' => [
+//        50 => [
+//            ['goods_id' => 8654, 'price' => 50.25, 'quality' => 5, 'card_type' => 'petrochina']
+//        ],
+//        100 => [
+//            ['goods_id' => 8655, 'price' => 100.5, 'quality' => 5, 'card_type' => 'petrochina'],
+//            ['goods_id' => 8655, 'price' => 100.7, 'quality' => 5, 'card_type' => 'sinopec'],
+//        ],
+        200 => [
+            ['goods_id' => 8656, 'price' => 199.4, 'quality' => 5, 'card_type' => 'petrochina'],
+            ['goods_id' => 8656, 'price' => 199.4, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
+        500 => [
+            ['goods_id' => 8657, 'price' => 498.5, 'quality' => 5, 'card_type' => 'petrochina'],
+            ['goods_id' => 8657, 'price' => 498.5, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
+        1000 => [
+            ['goods_id' => 8658, 'price' => 997, 'quality' => 5, 'card_type' => 'petrochina'],
+            ['goods_id' => 8658, 'price' => 997, 'quality' => 5, 'card_type' => 'sinopec'],
+        ],
+    ],
+    'period' => [], 'refill_type' => 'api'];
+
 $oil_providers = [
 $oil_providers = [
 //    ['name' => 'tianjt', 'cfg' => $tianjt_oil],
 //    ['name' => 'tianjt', 'cfg' => $tianjt_oil],
 //    ['name' => 'suhctm', 'cfg' => $suhctm_oil],
 //    ['name' => 'suhctm', 'cfg' => $suhctm_oil],
@@ -302,6 +326,7 @@ $oil_providers = [
     ['name' => 'jumi_sec', 'cfg' => $jumi_sec_oil],
     ['name' => 'jumi_sec', 'cfg' => $jumi_sec_oil],
     ['name' => 'feihan', 'cfg' => $feihan_oil],
     ['name' => 'feihan', 'cfg' => $feihan_oil],
     ['name' => 'zhongst_oil', 'cfg' => $zhongst_oil],
     ['name' => 'zhongst_oil', 'cfg' => $zhongst_oil],
+    ['name' => 'quanzhen', 'cfg' => $quanzhen_oil],
 ];
 ];
 $config['oil_providers'] = $oil_providers;
 $config['oil_providers'] = $oil_providers;
 
 

+ 28 - 0
data/config/yl/refill.ini.php

@@ -7328,6 +7328,32 @@ $youjunyinys_phone = ['name' => 'youjunyinys', 'store_id' => 275, 'qualitys' =>
     ],
     ],
     'official_sn' => true, 'refill_type' => 'api'];
     'official_sn' => true, 'refill_type' => 'api'];
 
 
+$youjuntf_phone = ['name' => 'youjuntf', 'store_id' => 277, 'qualitys' => '2',
+    'amount' => [
+        10 => [['goods_id' => 8280, 'price' => 10, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 8281, 'price' => 20, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 8282, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 8283, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 8284, 'price' => 100, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 8285, 'price' => 200, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 8286, 'price' => 300, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 8287, 'price' => 500, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
+$youlaitf_phone = ['name' => 'youlaitf', 'store_id' => 278, 'qualitys' => '2',
+    'amount' => [
+        10 => [['goods_id' => 8288, 'price' => 10, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        20 => [['goods_id' => 8289, 'price' => 20, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        30 => [['goods_id' => 8290, 'price' => 30, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        50 => [['goods_id' => 8291, 'price' => 50, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        100 => [['goods_id' => 8292, 'price' => 100, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        200 => [['goods_id' => 8293, 'price' => 200, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        300 => [['goods_id' => 8294, 'price' => 300, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']],
+        500 => [['goods_id' => 8295, 'price' => 500, 'quality' => 2, 'card_type' => 'chinamobile,chinaunicom,chinatelecom']]
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
+
 $phone_providers = [
 $phone_providers = [
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'beixt', 'cfg' => $beixt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
 //    ['name' => 'bxtwt', 'cfg' => $bxtwt_phone],
@@ -7561,6 +7587,8 @@ $phone_providers = [
     ['name' => 'coapi_trd', 'cfg' => $coapi_trd_phone],
     ['name' => 'coapi_trd', 'cfg' => $coapi_trd_phone],
     ['name' => 'youjunnoy', 'cfg' => $youjunnoy_phone],
     ['name' => 'youjunnoy', 'cfg' => $youjunnoy_phone],
     ['name' => 'youjunyinys', 'cfg' => $youjunyinys_phone],
     ['name' => 'youjunyinys', 'cfg' => $youjunyinys_phone],
+    ['name' => 'youjuntf', 'cfg' => $youjuntf_phone],
+    ['name' => 'youlaitf', 'cfg' => $youlaitf_phone],
 
 
 ];
 ];
 $config['phone_providers'] = $phone_providers;
 $config['phone_providers'] = $phone_providers;

+ 1 - 13
docker/compose/homecuda/acc/docker-compose.yml

@@ -15,10 +15,6 @@ services:
     command: [nginx,'-g','daemon off;']
     command: [nginx,'-g','daemon off;']
     extra_hosts:
     extra_hosts:
       - "docker.hostip:172.17.0.1"
       - "docker.hostip:172.17.0.1"
-    deploy:
-      resources:
-        limits:
-          cpus: '8'
 
 
   mobilesrv:
   mobilesrv:
     image: php-zts:7.3.18
     image: php-zts:7.3.18
@@ -33,10 +29,6 @@ services:
       - ../conf/php/mobile-spwan-start:/usr/local/bin/docker-spwan-start
       - ../conf/php/mobile-spwan-start:/usr/local/bin/docker-spwan-start
     container_name: "panda-mobile"
     container_name: "panda-mobile"
     command: ['docker-spwan-start']
     command: ['docker-spwan-start']
-    deploy:
-      resources:
-        limits:
-          cpus: '8'
 
 
   vapisrv:
   vapisrv:
     image: php-zts:7.3.18
     image: php-zts:7.3.18
@@ -50,8 +42,4 @@ services:
       - /mnt/shoplog:/var/www/html/data/log
       - /mnt/shoplog:/var/www/html/data/log
       - ../conf/php/vapi-spwan-start:/usr/local/bin/docker-spwan-start
       - ../conf/php/vapi-spwan-start:/usr/local/bin/docker-spwan-start
     container_name: "panda-vapi"
     container_name: "panda-vapi"
-    command: ['docker-spwan-start']
-    deploy:
-      resources:
-        limits:
-          cpus: '8'
+    command: ['docker-spwan-start']

+ 2 - 10
docker/compose/homecuda/admin/docker-compose.yml

@@ -2,7 +2,7 @@ version: "3.7"
 
 
 services:
 services:
   mchsrv:
   mchsrv:
-    image: php-zts-debug:7.3.18
+    image: php-zts:7.3.18
     ports:
     ports:
       - "9102:9102"
       - "9102:9102"
     volumes:
     volumes:
@@ -14,10 +14,6 @@ services:
       - /mnt/shoplog:/var/www/html/data/log
       - /mnt/shoplog:/var/www/html/data/log
     container_name: "panda-merchant"
     container_name: "panda-merchant"
     command: [docker-spwan-start]
     command: [docker-spwan-start]
-    deploy:
-      resources:
-        limits:
-          cpus: '8'
 
 
   websrv:
   websrv:
     image: php-fpm:alpine
     image: php-fpm:alpine
@@ -33,8 +29,4 @@ services:
     container_name: "panda-web"
     container_name: "panda-web"
     command: [php-fpm]
     command: [php-fpm]
     extra_hosts:
     extra_hosts:
-      - "docker.hostip:172.17.0.1"
-    deploy:
-      resources:
-        limits:
-          cpus: '8'
+      - "docker.hostip:172.17.0.1"

BIN
helper/refill/api/xyz/guochuang/20230519辽宁移动调价函.png


+ 1 - 1
helper/refill/api/xyz/guochuang/config.php

@@ -64,7 +64,7 @@ class config
     const Price = [
     const Price = [
         //移动
         //移动
         "4-10-2" => 10.18, "4-20-2" => 20.36, "4-30-2" => 30.18, "4-50-2" => 50.3, "4-100-2" => 100.3, "4-200-2" => 200.6, "4-300-2" => 300.9, "4-500-2" => 501.5,//天津 2
         "4-10-2" => 10.18, "4-20-2" => 20.36, "4-30-2" => 30.18, "4-50-2" => 50.3, "4-100-2" => 100.3, "4-200-2" => 200.6, "4-300-2" => 300.9, "4-500-2" => 501.5,//天津 2
-        "4-10-6" => 9.7, "4-20-6" => 19.4, "4-30-6" => 29.1, "4-50-6" => 48.5, "4-100-6" => 97, "4-200-6" => 194, "4-300-6" => 291, "4-500-6" => 485,//辽宁 6
+        "4-10-6" => 9.69, "4-20-6" => 19.38, "4-30-6" => 29.07, "4-50-6" => 48.45, "4-100-6" => 96.9, "4-200-6" => 193.8, "4-300-6" => 290.7, "4-500-6" => 484.5,//辽宁 6
         "4-10-9" => 9.94, "4-20-9" => 19.88, "4-30-9" => 29.82, "4-50-9" => 49.7, "4-100-9" => 99.4,//上海 9
         "4-10-9" => 9.94, "4-20-9" => 19.88, "4-30-9" => 29.82, "4-50-9" => 49.7, "4-100-9" => 99.4,//上海 9
         "4-10-8" => 9.98, "4-20-8" => 19.96, "4-30-8" => 29.94, "4-50-8" => 49.9, "4-100-8" => 99.8, "4-200-8" => 199.6, "4-300-8" => 299.4, "4-500-8" => 499,//黑龙江 8
         "4-10-8" => 9.98, "4-20-8" => 19.96, "4-30-8" => 29.94, "4-50-8" => 49.9, "4-100-8" => 99.8, "4-200-8" => 199.6, "4-300-8" => 299.4, "4-500-8" => 499,//黑龙江 8
         "4-10-29" => 9.88, "4-20-29" => 19.76, "4-30-29" => 29.64, "4-50-29" => 49.4, "4-100-29" => 98.8, "4-200-29" => 197.6, "4-300-29" => 296.4, "4-500-29" => 494,//青海 29
         "4-10-29" => 9.88, "4-20-29" => 19.76, "4-30-29" => 29.64, "4-50-29" => 49.4, "4-100-29" => 98.8, "4-200-29" => 197.6, "4-300-29" => 296.4, "4-500-29" => 494,//青海 29

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

@@ -9,7 +9,7 @@ class RefillCallBack implements refill\IRefillCallBack
     public function verify($params): bool
     public function verify($params): bool
     {
     {
         $sign = $this->sign($params);
         $sign = $this->sign($params);
-        if ($params['szVerifyString'] == $sign) {
+        if ($params['sign'] == $sign) {
             return true;
             return true;
         } else {
         } else {
             return false;
             return false;

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

@@ -183,8 +183,8 @@ class RefillPhone extends refill\IRefillPhone
     public function decode_tag($squery)
     public function decode_tag($squery)
     {
     {
         if(empty($squery)) return false;
         if(empty($squery)) return false;
-        $squery = mb_convert_encoding($squery, "UTF-8", "GB2312");
         $squery = urldecode($squery);
         $squery = urldecode($squery);
+        $squery = mb_convert_encoding($squery, "UTF-8", "GB2312");
 
 
         $result = [];
         $result = [];
         $params = preg_split('/&/', $squery);
         $params = preg_split('/&/', $squery);

+ 1 - 7
helper/refill/api/xyz/huiyuan/config.php

@@ -12,16 +12,10 @@ class config
 
 
     const AGENT_ID= '2145738';
     const AGENT_ID= '2145738';
     const KEY = '4458A6BD7839';
     const KEY = '4458A6BD7839';
-//    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_huiyuan.php";
-    const NOTIFY_URL = "https://www.xyzshops.cn/mobile/signature.php";
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_huiyuan.php";
 
 
     const API_IP = NET_IP;
     const API_IP = NET_IP;
 
 
-    const operator = [
-        mtopcard\ChinaMobileCard  => 1,
-        mtopcard\ChinaUnicomCard  => 2,
-        mtopcard\ChinaTelecomCard => 3
-    ];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=GB2312'];
     const ExtHeaders = ['Content-Type:application/x-www-form-urlencoded;charset=GB2312'];
 
 
     const ERR_NOS = [
     const ERR_NOS = [

+ 13 - 0
helper/refill/api/xyz/quanzhen/API信息.txt

@@ -0,0 +1,13 @@
+网址:https://pay.eyunpay.com/login
+账号:18513846008
+密码:123456
+appid:WP1680594711360
+密钥:Gt0bsHq0YWP3SlsXOnPLorok2QEPHjAA
+
+
+话费下单地址
+http://payapi.eyunpay.com/open/api/hf/recharge
+油卡下单地址
+http://payapi.eyunpay.com/open/api/jy/recharge
+电费下单地址
+http://payapi.eyunpay.com/open/api/df/recharge

+ 39 - 0
helper/refill/api/xyz/quanzhen/RefillCallBack.php

@@ -0,0 +1,39 @@
+<?php
+namespace refill\quanzhen;
+
+require_once(BASE_HELPER_RAPI_PATH . '/quanzhen/config.php');
+
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+        $sign = config::sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    public function notify($params)
+    {
+        $status = intval($params['status']);
+        $order_sn = $params['orderId'];
+        $order_info = Model('vr_order')->getOrderInfoForNotify(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false, false];
+        }
+        $order_id = $order_info['order_id'];
+
+        if ($status === 2) {
+            return [$order_id, true, false, true];
+        } elseif ($status === 3) {
+            return [$order_id, false, true, true];
+        } else {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 128 - 0
helper/refill/api/xyz/quanzhen/RefillOil.php

@@ -0,0 +1,128 @@
+<?php
+
+namespace refill\quanzhen;
+
+require_once(BASE_HELPER_RAPI_PATH . '/quanzhen/config.php');
+
+use refill;
+use Log;
+use QueueClient;
+
+class RefillOil extends refill\IRefillOil
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $card_no, int $amount, int $card_type, string $order_sn)
+    {
+        $params['appid'] = config::APP_ID;
+        $params['orderId'] = $order_sn;
+        $params['phone'] = $card_no;
+        $params['amount'] = $amount * 100;
+        $params['asynchUrl'] = config::NOTIFY_URL;
+
+        $card_info = refill\util::read_card($card_no,$card_type);
+        $params['ext'] = $card_info['bind_phone'];
+        return [$params, $card_info];
+    }
+
+    public function add($card_no, $card_type, $amount, $params, &$net_errno = 0)
+    {
+        $order_id = $params['order_id'];
+        [$params, $card_info] = $this->req_params($card_no, $amount, $card_type, $params['order_sn']);
+        $sign = config::sign($params);
+        $params['sign'] = $sign;
+
+        $params = json_encode($params);
+        $resp = http_post_data(config::ORDER_URL, $params, config::ExtHeaders, $net_errno);
+
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            } elseif ($resp['code'] === 0) {
+                refill\util::inc_card($card_no,$card_info);
+                if (in_array($resp['status'], [2, 3], true)) {
+                    QueueClient::async_push("QueryRefillState", ['order_id' => $order_id], 5);
+                }
+                return [true, '', false];
+            } else {
+                return [false, $resp['msg'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['appid'] = config::APP_ID;
+        $params['orderId'] = $refill_info['order_sn'];
+        $sign = config::sign($params);
+        $params['sign'] = $sign;
+
+        $params = json_encode($params);
+        $resp = http_post_data(config::QUERY_URL, $params, config::ExtHeaders);
+        if (empty($resp)) {
+            return [false, '网络错误', ''];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '网络错误'];
+            }
+            elseif ($resp['code'] === 0)
+            {
+                $status = $resp['status'];
+                if ($status === 2) {
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($status === 3) {
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif ($status === 1) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $status];
+                }
+
+                return [true, $order_state];
+            }
+            else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['appid'] = config::APP_ID;
+        $params['queryDate'] = date("YmdHis");
+        $sign = config::sign($params);
+        $params['sign'] = $sign;
+
+        $params = json_encode($params);
+        $resp = http_post_data(config::BALANCE_URL, $params, config::ExtHeaders);
+
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            } elseif ($resp['code'] === 0) {
+                return [true, ncPriceFormat($resp['storeFee'] / 100)];
+            } else {
+                return [false, $resp['msg']];
+            }
+        }
+    }
+}

+ 26 - 0
helper/refill/api/xyz/quanzhen/config.php

@@ -0,0 +1,26 @@
+<?php
+namespace refill\quanzhen;
+
+class config
+{
+    const ORDER_URL = 'http://payapi.eyunpay.com/open/api/jy/recharge';
+    const QUERY_URL = 'http://payapi.eyunpay.com/open/api/jy/query';
+    const BALANCE_URL = 'http://payapi.eyunpay.com/open/api/jy/queryFee';
+
+    const APP_ID = 'WP1680594711360';
+    const APP_KEY = 'Gt0bsHq0YWP3SlsXOnPLorok2QEPHjAA';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_quanzhen.php";
+
+    const ExtHeaders = ['Content-Type: application/json'];
+
+    public static function sign($params)
+    {
+        ksort($params);
+        $content = '';
+        foreach ($params as $key => $value) {
+            $content .= "{$key}={$value}&";
+        }
+        $content .= 'key='.config::APP_KEY;
+        return md5($content);
+    }
+}

BIN
helper/refill/api/xyz/quanzhen/加油开放接口.pdf


+ 1 - 1
helper/refill/api/yl/guochuang/config.php

@@ -64,7 +64,7 @@ class config
     const Price = [
     const Price = [
         //移动
         //移动
         "4-10-2" => 10.18, "4-20-2" => 20.36, "4-30-2" => 30.18, "4-50-2" => 50.3, "4-100-2" => 100.3, "4-200-2" => 200.6, "4-300-2" => 300.9, "4-500-2" => 501.5,//天津 2
         "4-10-2" => 10.18, "4-20-2" => 20.36, "4-30-2" => 30.18, "4-50-2" => 50.3, "4-100-2" => 100.3, "4-200-2" => 200.6, "4-300-2" => 300.9, "4-500-2" => 501.5,//天津 2
-        "4-10-6" => 9.7, "4-20-6" => 19.4, "4-30-6" => 29.1, "4-50-6" => 48.5, "4-100-6" => 97, "4-200-6" => 194, "4-300-6" => 291, "4-500-6" => 485,//辽宁 6
+        "4-10-6" => 9.69, "4-20-6" => 19.38, "4-30-6" => 29.07, "4-50-6" => 48.45, "4-100-6" => 96.9, "4-200-6" => 193.8, "4-300-6" => 290.7, "4-500-6" => 484.5,//辽宁 6
         "4-10-9" => 9.94, "4-20-9" => 19.88, "4-30-9" => 29.82, "4-50-9" => 49.7, "4-100-9" => 99.4,//上海 9
         "4-10-9" => 9.94, "4-20-9" => 19.88, "4-30-9" => 29.82, "4-50-9" => 49.7, "4-100-9" => 99.4,//上海 9
         "4-10-8" => 9.98, "4-20-8" => 19.96, "4-30-8" => 29.94, "4-50-8" => 49.9, "4-100-8" => 99.8, "4-200-8" => 199.6, "4-300-8" => 299.4, "4-500-8" => 499,//黑龙江 8
         "4-10-8" => 9.98, "4-20-8" => 19.96, "4-30-8" => 29.94, "4-50-8" => 49.9, "4-100-8" => 99.8, "4-200-8" => 199.6, "4-300-8" => 299.4, "4-500-8" => 499,//黑龙江 8
         "4-10-29" => 9.88, "4-20-29" => 19.76, "4-30-29" => 29.64, "4-50-29" => 49.4, "4-100-29" => 98.8, "4-200-29" => 197.6, "4-300-29" => 296.4, "4-500-29" => 494,//青海 29
         "4-10-29" => 9.88, "4-20-29" => 19.76, "4-30-29" => 29.64, "4-50-29" => 49.4, "4-100-29" => 98.8, "4-200-29" => 197.6, "4-300-29" => 296.4, "4-500-29" => 494,//青海 29

+ 76 - 0
helper/refill/api/yl/youjuntf/RefillCallBack.php

@@ -0,0 +1,76 @@
+<?php
+namespace refill\youjuntf;
+
+require_once(BASE_HELPER_RAPI_PATH . '/youjuntf/config.php');
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+        $sign = $this->sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    protected function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if ($value === null)
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+
+        $body = "";
+        $i = 0;
+        foreach ($params as $k => $v) {
+            if (false === $this->check_empty($v) && "@" != substr($v, 0, 1)) {
+                if ($i == 0) {
+                    $body .= "{$k}" . "=" . urlencode($v);
+                } else {
+                    $body .= "&" . "{$k}" . "=" . urlencode($v);
+                }
+                $i++;
+            }
+        }
+
+        $body .= "&key=".config::KEY;
+        return md5($body);
+    }
+
+    public function notify($params)
+    {
+        $status = $params['state'];
+        $order_sn = $params['order_sn'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+        $order_id = $order_info['order_id'];
+        if ($status === 'SUCCESS') {
+            $data['ch_trade_no'] = $params['trade_no'];
+            $data['official_sn'] = strtolower($params['official_sn']) == 'null' ? '' : $params['official_sn'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 'CANCEL') {
+            Model('refill_order')->edit($order_id, ['ch_trade_no' => $params['trade_no']]);
+            return [$order_id, false, true,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 161 - 0
helper/refill/api/yl/youjuntf/RefillPhone.php

@@ -0,0 +1,161 @@
+<?php
+
+namespace refill\youjuntf;
+
+require_once(BASE_HELPER_RAPI_PATH . '/youjuntf/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, string $order_sn)
+    {
+        $params['act'] = 'refill';
+        $params['op'] = 'add';
+        $params['mchid'] = config::MCH_ID;
+        $params['cardno'] = $phone;
+        $params['amount'] = $amount;
+        $params['order_sn'] = $order_sn;
+        $params['notifyurl'] = config::NOTIFY_URL;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $amount, $params['order_sn']);
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params , 'POST' , false , [] , $net_errno);
+
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp ,true);
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            } elseif ($resp['code'] === 200) {
+                return [true, '', false];
+            } else {
+                return [false, $resp['message'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['act'] = 'refill';
+        $params['op'] = 'query';
+        $params['mchid'] = config::MCH_ID;
+        $params['order_sn'] = $refill_info['order_sn'];
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::ORDER_URL, $params , 'POST');
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            }
+            elseif ($resp['code'] === 200)
+            {
+                $data = $resp['datas'];
+                if ($data['order_state'] == '40') {
+                    $save['ch_trade_no'] = $data['trade_no'];
+                    $save['official_sn'] = strtolower($resp['official_sn']) == 'null' ? '' : $resp['official_sn'];
+                    Model('refill_order')->edit($refill_info['order_id'], $save);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($data['order_state'] === '0') {
+                    Model('refill_order')->edit($refill_info['order_id'], ['ch_trade_no' => $data['trade_no']]);
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif (in_array($data['order_state'], ['10', '20', '30', '50'], true)) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $resp['message']];
+                }
+                return [true, $order_state];
+            }
+            elseif ($resp['code'] === 202 && (time() - $refill_info['commit_time'] >= 600))
+            {
+                return [true, ORDER_STATE_NOEXIST];
+            }
+            else
+            {
+                return [false, $resp['message']];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['act'] = 'refill';
+        $params['op'] = 'balance';
+        $params['mchid'] = config::MCH_ID;
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::ORDER_URL, $params , 'POST');
+
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            } elseif ($resp['code'] === 200) {
+                return [true, $resp['datas']['balance']];
+            } else {
+                return [false, $resp['message']];
+            }
+        }
+    }
+
+    protected function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if ($value === null)
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+
+        $body = "";
+        $i = 0;
+        foreach ($params as $k => $v) {
+            if (false === $this->check_empty($v) && "@" != substr($v, 0, 1)) {
+                if ($i == 0) {
+                    $body .= "{$k}" . "=" . urlencode($v);
+                } else {
+                    $body .= "&" . "{$k}" . "=" . urlencode($v);
+                }
+                $i++;
+            }
+        }
+
+        $body .= "&key=".config::KEY;
+
+        return md5($body);
+    }
+}

+ 7 - 0
helper/refill/api/yl/youjuntf/api.txt

@@ -0,0 +1,7 @@
+https://co-data.zylife.co//merchant/#/login
+
+youjuntf
+shasfo-hd
+
+49
+5a0dc9a1a2f9042d5ed2a7c8518f9390

+ 13 - 0
helper/refill/api/yl/youjuntf/config.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace refill\youjuntf;
+
+class config
+{
+    const ORDER_URL = 'https://co-api.zylife.co/mobile/index.php';
+
+    const MCH_ID = 49;
+    const KEY = '5a0dc9a1a2f9042d5ed2a7c8518f9390';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_youjuntf.php";
+
+}

+ 76 - 0
helper/refill/api/yl/youlaitf/RefillCallBack.php

@@ -0,0 +1,76 @@
+<?php
+namespace refill\youlaitf;
+
+require_once(BASE_HELPER_RAPI_PATH . '/youlaitf/config.php');
+use refill;
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        $input = $params;
+        unset($input['sign']);
+        $sign = $this->sign($input);
+        if ($params['sign'] == $sign) {
+            return true;
+        } else {
+            return false;
+        }
+    }
+
+    protected function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if ($value === null)
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+
+        $body = "";
+        $i = 0;
+        foreach ($params as $k => $v) {
+            if (false === $this->check_empty($v) && "@" != substr($v, 0, 1)) {
+                if ($i == 0) {
+                    $body .= "{$k}" . "=" . urlencode($v);
+                } else {
+                    $body .= "&" . "{$k}" . "=" . urlencode($v);
+                }
+                $i++;
+            }
+        }
+
+        $body .= "&key=".config::KEY;
+        return md5($body);
+    }
+
+    public function notify($params)
+    {
+        $status = $params['state'];
+        $order_sn = $params['order_sn'];
+        $order_info = Model('vr_order')->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info)) {
+            return [false, false, false,false];
+        }
+        $order_id = $order_info['order_id'];
+        if ($status === 'SUCCESS') {
+            $data['ch_trade_no'] = $params['trade_no'];
+            $data['official_sn'] = strtolower($params['official_sn']) == 'null' ? '' : $params['official_sn'];
+            Model('refill_order')->edit($order_id, $data);
+            return [$order_id, true, false,true];
+        }
+        elseif ($status === 'CANCEL') {
+            Model('refill_order')->edit($order_id, ['ch_trade_no' => $params['trade_no']]);
+            return [$order_id, false, true,true];
+        }
+        else {
+            return [$order_id, false, false,false];
+        }
+    }
+}

+ 161 - 0
helper/refill/api/yl/youlaitf/RefillPhone.php

@@ -0,0 +1,161 @@
+<?php
+
+namespace refill\youlaitf;
+
+require_once(BASE_HELPER_RAPI_PATH . '/youlaitf/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillPhone
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    private function req_params(int $phone, int $amount, string $order_sn)
+    {
+        $params['act'] = 'refill';
+        $params['op'] = 'add';
+        $params['mchid'] = config::MCH_ID;
+        $params['cardno'] = $phone;
+        $params['amount'] = $amount;
+        $params['order_sn'] = $order_sn;
+        $params['notifyurl'] = config::NOTIFY_URL;
+        return $params;
+    }
+
+    public function add($card_no, $card_type, $amount, $params,&$net_errno = 0)
+    {
+        $params = $this->req_params($card_no, $amount, $params['order_sn']);
+        $sign = $this->sign($params);
+        $params['sign'] = $sign;
+
+        $resp = http_request(config::ORDER_URL, $params , 'POST' , false , [] , $net_errno);
+
+        if (empty($resp)) {
+            return [false, '系统错误', true];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp ,true);
+            if (empty($resp)) {
+                return [false, '系统错误', true];
+            } elseif ($resp['code'] === 200) {
+                return [true, '', false];
+            } else {
+                return [false, $resp['message'], false];
+            }
+        }
+    }
+
+    public function query($refill_info)
+    {
+        $params['act'] = 'refill';
+        $params['op'] = 'query';
+        $params['mchid'] = config::MCH_ID;
+        $params['order_sn'] = $refill_info['order_sn'];
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::ORDER_URL, $params , 'POST');
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            }
+            elseif ($resp['code'] === 200)
+            {
+                $data = $resp['datas'];
+                if ($data['order_state'] == '40') {
+                    $save['ch_trade_no'] = $data['trade_no'];
+                    $save['official_sn'] = strtolower($resp['official_sn']) == 'null' ? '' : $resp['official_sn'];
+                    Model('refill_order')->edit($refill_info['order_id'], $save);
+                    $order_state = ORDER_STATE_SUCCESS;
+                } elseif ($data['order_state'] === '0') {
+                    Model('refill_order')->edit($refill_info['order_id'], ['ch_trade_no' => $data['trade_no']]);
+                    $order_state = ORDER_STATE_CANCEL;
+                } elseif (in_array($data['order_state'], ['10', '20', '30', '50'], true)) {
+                    $order_state = ORDER_STATE_SEND;
+                } else {
+                    return [false, $resp['message']];
+                }
+                return [true, $order_state];
+            }
+            elseif ($resp['code'] === 202 && (time() - $refill_info['commit_time'] >= 600))
+            {
+                return [true, ORDER_STATE_NOEXIST];
+            }
+            else
+            {
+                return [false, $resp['message']];
+            }
+        }
+    }
+
+    public function balance()
+    {
+        $params['act'] = 'refill';
+        $params['op'] = 'balance';
+        $params['mchid'] = config::MCH_ID;
+        $params['sign'] = $this->sign($params);
+
+        $resp = http_request(config::ORDER_URL, $params , 'POST');
+
+        if (empty($resp)) {
+            return [false, '系统错误'];
+        }
+        else
+        {
+            Log::record($resp, Log::DEBUG);
+            $resp = json_decode($resp, true);
+            if (empty($resp)) {
+                return [false, '系统错误'];
+            } elseif ($resp['code'] === 200) {
+                return [true, $resp['datas']['balance']];
+            } else {
+                return [false, $resp['message']];
+            }
+        }
+    }
+
+    protected function check_empty($value)
+    {
+        if (!isset($value))
+            return true;
+        if ($value === null)
+            return true;
+        if (trim($value) === "")
+            return true;
+
+        return false;
+    }
+
+    private function sign($params)
+    {
+        ksort($params);
+
+        $body = "";
+        $i = 0;
+        foreach ($params as $k => $v) {
+            if (false === $this->check_empty($v) && "@" != substr($v, 0, 1)) {
+                if ($i == 0) {
+                    $body .= "{$k}" . "=" . urlencode($v);
+                } else {
+                    $body .= "&" . "{$k}" . "=" . urlencode($v);
+                }
+                $i++;
+            }
+        }
+
+        $body .= "&key=".config::KEY;
+
+        return md5($body);
+    }
+}

+ 7 - 0
helper/refill/api/yl/youlaitf/api.txt

@@ -0,0 +1,7 @@
+https://co-data.zylife.co//merchant/#/login
+
+youlai-tf
+dgbuQ-BGh
+
+50
+1b85fa5f9e69b6c4cbf9c205b60a0991

+ 13 - 0
helper/refill/api/yl/youlaitf/config.php

@@ -0,0 +1,13 @@
+<?php
+
+namespace refill\youlaitf;
+
+class config
+{
+    const ORDER_URL = 'https://co-api.zylife.co/mobile/index.php';
+
+    const MCH_ID = 50;
+    const KEY = '1b85fa5f9e69b6c4cbf9c205b60a0991';
+    const NOTIFY_URL = BASE_SITE_URL . "/mobile/callback/refill_youlaitf.php";
+
+}

+ 35 - 0
mobile/callback/refill_huiyuan.php

@@ -0,0 +1,35 @@
+<?php
+
+$content = $_SERVER['QUERY_STRING'];
+
+$squery = urldecode($content);
+$squery = mb_convert_encoding($squery, "UTF-8", "GB2312");
+
+$input = [];
+$params = preg_split('/&/', $squery);
+foreach ($params as $pair)
+{
+    if(empty($pair)) continue;
+
+    $kv = explode('=', $pair);
+    $count = count($kv);
+    if($count === 1) {
+        $key = $kv[0];
+        $val = "";
+    }
+    elseif($count === 2) {
+        $key = $kv[0];
+        $val = urldecode($kv[1]);
+    }
+    else {
+        continue;
+    }
+
+    if(!empty($key)) {
+        $input[$key] = $val;
+    }
+}
+
+refill\util::push_notify('huiyuan',$input);
+
+echo 'OK';

+ 7 - 0
mobile/callback/refill_quanzhen.php

@@ -0,0 +1,7 @@
+<?php
+
+$content = $_SERVER['post_content'];
+$input = json_decode($content,true) ?? [];
+refill\util::push_notify('quanzhen',$input);
+
+echo ('SUCCESS');

+ 4 - 0
mobile/callback/refill_youjuntf.php

@@ -0,0 +1,4 @@
+<?php
+
+refill\util::push_notify('youjuntf',$_POST);
+echo ('SUCCESS');

+ 4 - 0
mobile/callback/refill_youlaitf.php

@@ -0,0 +1,4 @@
+<?php
+
+refill\util::push_notify('youlaitf',$_POST);
+echo ('SUCCESS');

+ 21 - 1
test/TestRefill.php

@@ -3268,7 +3268,13 @@ class TestRefill extends TestCase
         $provider = $this->getProvider('huiyuan');
         $provider = $this->getProvider('huiyuan');
 //        $resp = $provider->balance();
 //        $resp = $provider->balance();
 //        $resp = $provider->add(15811535608, 4, 10, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
 //        $resp = $provider->add(15811535608, 4, 10, ['order_sn' => $this->make_sn(), 'regin_no' => 18]);
-        $resp = $provider->query(['order_sn' => '17261683784636391340']);
+//        $resp = $provider->query(['order_sn' => '25551683853847719519']);
+
+        $content = 'agent_id=2145738&bill_id=25551683853847719519&jnet_bill_no=C230512588496314&par_price=10.0000&purchase_amt=10.3600&bill_charge_time=20230512092120&bill_status=%B3%C9%B9%A6&bill_data_info=C230512588496314%3a1&sign=b0c81c3b9b1ce25ed76299069df4be82';
+        $params = $provider->decode_tag($content);
+        $provider = $this->getProvider('huiyuan', 'RefillCallBack');
+        $ret = $provider->verify($params);
+        $resp = $provider->notify($params);
     }
     }
 
 
     public function testDezhi_yi()
     public function testDezhi_yi()
@@ -3361,6 +3367,20 @@ class TestRefill extends TestCase
         $resp = $provider->balance();
         $resp = $provider->balance();
     }
     }
 
 
+    public function testQuanzhen()
+    {
+//        $provider = $this->getProvider('quanzhen', 'RefillOil');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(1000111100021211884, 2, 100, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
+//        $resp = $provider->query(['order_sn' => '49611683682698964856']);
+
+        $body = '{"msg":"FAIL","amount":"10000","orderId":"49611683682698964856","phone":"1000111100021211884","voucher":"","appid":"wp1680594711360","sign":"dbb5446b01a209330da268b4b51765eb","time":"20230510103433","status":3}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('quanzhen', 'RefillCallBack');
+        $ret = $provider->verify($params);
+        $resp = $provider->notify($params);
+    }
+
     public function testZhongst_oil()
     public function testZhongst_oil()
     {
     {
 //        $provider = $this->getProvider('zhongst_oil', 'RefillOil');
 //        $provider = $this->getProvider('zhongst_oil', 'RefillOil');

+ 29 - 0
test/TestRefillYl.php

@@ -1030,4 +1030,33 @@ class TestRefillYl extends TestCase
         $resp = $provider->add(18074608795, 4, 200, ['order_sn' => $this->make_sn(), 'product_code' => 'XYZ100777', 'goods_id' => 6978]);
         $resp = $provider->add(18074608795, 4, 200, ['order_sn' => $this->make_sn(), 'product_code' => 'XYZ100777', 'goods_id' => 6978]);
         $resp = $provider->query(['order_sn' => '38371683618172040780']);
         $resp = $provider->query(['order_sn' => '38371683618172040780']);
     }
     }
+
+    public function testyoujuntf()
+    {
+//        $provider = $this->getProvider('youjuntf');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(15811535608, 4, 100, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
+//        $resp = $provider->query(['order_sn' => '21451684394298374822']);
+
+        $body = '{"mchid":"49","order_sn":"21451684394298374822","amount":"100.0000","cardno":"15811535608","trade_no":"6386480737738308639213","idcard":"","card_name":"","official_sn":"","message":"fail","state":"CANCEL","sign":"46d1f2b3fd712810b89b680571b70496"}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('youjuntf', 'RefillCallBack');
+        $ret = $provider->verify($params);
+        $resp = $provider->notify($params);
+    }
+
+    public function testyoulaitf()
+    {
+//        $provider = $this->getProvider('youlaitf');
+//        $resp = $provider->balance();
+//        $resp = $provider->add(15811535608, 4, 100, ['order_sn' => $this->make_sn(), 'regin_no' => 1]);
+//        $resp = $provider->query(['order_sn' => '80441684396453923189']);
+
+        $body = '{"mchid":"50","order_sn":"80441684396453923189","amount":"100.0000","cardno":"15811535608","trade_no":"0379320737740458239201","idcard":"","card_name":"","official_sn":"","message":"fail","state":"CANCEL","sign":"15d30000960fde053fabad4255b7ade1"}';
+        $params = json_decode($body, true);
+        $provider = $this->getProvider('youlaitf', 'RefillCallBack');
+        $ret = $provider->verify($params);
+        $resp = $provider->notify($params);
+
+    }
 }
 }