|
@@ -6,6 +6,7 @@ use App\Services\WalletService;
|
|
|
use App\Services\ConfigService;
|
|
use App\Services\ConfigService;
|
|
|
use App\Models\Config;
|
|
use App\Models\Config;
|
|
|
use App\Models\Recharge;
|
|
use App\Models\Recharge;
|
|
|
|
|
+use App\Services\Payment\SanJinService;
|
|
|
use Illuminate\Validation\ValidationException;
|
|
use Illuminate\Validation\ValidationException;
|
|
|
|
|
|
|
|
use Exception;
|
|
use Exception;
|
|
@@ -16,8 +17,24 @@ use Exception;
|
|
|
class Wallet extends BaseController
|
|
class Wallet extends BaseController
|
|
|
{
|
|
{
|
|
|
|
|
|
|
|
|
|
+ //获取三斤充值通道(微信、支付宝、扫码充值)
|
|
|
|
|
+ public function getChannel()
|
|
|
|
|
+ {
|
|
|
|
|
+ $data = SanJinService::getChannel();
|
|
|
|
|
+ $list = [];
|
|
|
|
|
+ foreach($data as $k => $v) {
|
|
|
|
|
+ $list[] = [
|
|
|
|
|
+ 'label' => lang($v),
|
|
|
|
|
+ 'value' => $k,
|
|
|
|
|
+ ];
|
|
|
|
|
+ }
|
|
|
|
|
+ return $this->success([
|
|
|
|
|
+ 'list' => $list,
|
|
|
|
|
+ ]);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
/**
|
|
/**
|
|
|
- * 获取充值二维码(微信、支付宝、扫码充值)
|
|
|
|
|
|
|
+ * 获取充值二维码(USDT充值)
|
|
|
*/
|
|
*/
|
|
|
function scan()
|
|
function scan()
|
|
|
{
|
|
{
|
|
@@ -33,8 +50,10 @@ class Wallet extends BaseController
|
|
|
//手动充值
|
|
//手动充值
|
|
|
if ($type === "TRC20") {
|
|
if ($type === "TRC20") {
|
|
|
$address = Config::where('field', 'receiving_address')->first()->val;
|
|
$address = Config::where('field', 'receiving_address')->first()->val;
|
|
|
- } else {//if ($type === "ERC20")
|
|
|
|
|
|
|
+ } elseif ($type === "ERC20") {
|
|
|
$address = Config::where('field', 'receiving_address_erc20')->first()->val;
|
|
$address = Config::where('field', 'receiving_address_erc20')->first()->val;
|
|
|
|
|
+ } else {
|
|
|
|
|
+ return $this->error(lang('充值类型错误'));
|
|
|
}
|
|
}
|
|
|
$res = WalletService::getPlatformImageAddress($address);
|
|
$res = WalletService::getPlatformImageAddress($address);
|
|
|
$res['net'] = $type;
|
|
$res['net'] = $type;
|