ソースを参照

硅通(权益),炳光(yl权益)

赵明 1 年間 前
コミット
58a18f7585

+ 12 - 1
data/config/yl/refill.ini.php

@@ -7875,7 +7875,17 @@ $yayuanqy = ['name' => 'yayuanqy', 'store_id' => 293, 'qualitys' => '1',
     ],
     'official_sn' => true, 'refill_type' => 'api'];
 
+$bingguangqy = ['name' => 'bingguangqy', 'store_id' => 296, 'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 8385, 'price' => 100, 'quality' => 1, 'card_type' => 'third']],
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
 
+$guitongqy = ['name' => 'guitongqy', 'store_id' => 297, 'qualitys' => '1',
+    'amount' => [
+        100 => [['goods_id' => 8386, 'price' => 100, 'quality' => 1, 'card_type' => 'third']],
+    ],
+    'official_sn' => true, 'refill_type' => 'api'];
 
 $third_providers = [
     ['name' => 'runpu', 'cfg' => $runpu],
@@ -7891,7 +7901,8 @@ $third_providers = [
     ['name' => 'qudaiwaquany', 'cfg' => $qudaiwaquany],
     ['name' => 'lansequany', 'cfg' => $lansequany],
     ['name' => 'yayuanqy', 'cfg' => $yayuanqy],
-
+    ['name' => 'bingguangqy', 'cfg' => $bingguangqy],
+    ['name' => 'guitongqy', 'cfg' => $guitongqy],
 ];
 $config['third_providers'] = $third_providers;
 

+ 6 - 0
helper/refill/api/yl/bingguangqy/API.MD

@@ -0,0 +1,6 @@
+
+## 炳光(yl权益) ```假通道```
+
+## 店铺账号
+- 账号:bingguangqy
+- 密码:bingguangqy67890

+ 37 - 0
helper/refill/api/yl/bingguangqy/RefillCallBack.php

@@ -0,0 +1,37 @@
+<?php
+namespace refill\bingguangqy;
+
+require_once(BASE_HELPER_RAPI_PATH . '/bingguangqy/config.php');
+
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        return true;
+    }
+
+    public function notify($params): array
+    {
+        $order_sn = $params['order_sn'];
+        $status = intval($params['status']);
+        $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 === 1)
+        {
+            return [$order_id, true, false, true];
+        }
+        elseif ($status === 0) {
+            return [$order_id, false, true, true];
+        }
+        else
+        {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 37 - 0
helper/refill/api/yl/bingguangqy/RefillPhone.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace refill\bingguangqy;
+
+require_once(BASE_HELPER_RAPI_PATH . '/bingguangqy/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillThird
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    public function add($card_no, $card_type, $amount, $params, &$net_errno = 0): array
+    {
+        return [true, '', false];
+    }
+
+    public function query($refill_info): array
+    {
+        $mod_order = Model('vr_order');
+        $order_sn = $refill_info['order_sn'];
+        $order_info = $mod_order->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info))
+        {
+            $order_state = ORDER_STATE_NOEXIST;
+        }
+        else
+        {
+            $order_state = intval($order_info['order_state']);
+        }
+        return [true, $order_state, ''];
+    }
+}

+ 9 - 0
helper/refill/api/yl/bingguangqy/config.php

@@ -0,0 +1,9 @@
+<?php
+
+namespace refill\bingguangqy;
+
+class config
+{
+    # 炳光(yl权益)
+    # 假通道
+}

+ 6 - 0
helper/refill/api/yl/guitongqy/API.MD

@@ -0,0 +1,6 @@
+
+## 硅通(权益) ```假通道```
+
+## 店铺账号
+- 账号:guitongqy
+- 密码:guitongqy67890

+ 37 - 0
helper/refill/api/yl/guitongqy/RefillCallBack.php

@@ -0,0 +1,37 @@
+<?php
+namespace refill\guitongqy;
+
+require_once(BASE_HELPER_RAPI_PATH . '/guitongqy/config.php');
+
+use refill;
+
+class RefillCallBack implements refill\IRefillCallBack
+{
+    public function verify($params): bool
+    {
+        return true;
+    }
+
+    public function notify($params): array
+    {
+        $order_sn = $params['order_sn'];
+        $status = intval($params['status']);
+        $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 === 1)
+        {
+            return [$order_id, true, false, true];
+        }
+        elseif ($status === 0) {
+            return [$order_id, false, true, true];
+        }
+        else
+        {
+            return [$order_id, false, false, false];
+        }
+    }
+}

+ 37 - 0
helper/refill/api/yl/guitongqy/RefillPhone.php

@@ -0,0 +1,37 @@
+<?php
+
+namespace refill\guitongqy;
+
+require_once(BASE_HELPER_RAPI_PATH . '/guitongqy/config.php');
+
+use refill;
+use Log;
+
+class RefillPhone extends refill\IRefillThird
+{
+    public function __construct($cfgs)
+    {
+        parent::__construct($cfgs);
+    }
+
+    public function add($card_no, $card_type, $amount, $params, &$net_errno = 0): array
+    {
+        return [true, '', false];
+    }
+
+    public function query($refill_info): array
+    {
+        $mod_order = Model('vr_order');
+        $order_sn = $refill_info['order_sn'];
+        $order_info = $mod_order->getOrderInfo(['order_sn' => $order_sn]);
+        if (empty($order_info))
+        {
+            $order_state = ORDER_STATE_NOEXIST;
+        }
+        else
+        {
+            $order_state = intval($order_info['order_state']);
+        }
+        return [true, $order_state, ''];
+    }
+}

+ 9 - 0
helper/refill/api/yl/guitongqy/config.php

@@ -0,0 +1,9 @@
+<?php
+
+namespace refill\guitongqy;
+
+class config
+{
+    # 硅通(权益)
+    # 假通道
+}