<?php


namespace App\Http\Controllers\Api;


use App\Facade\TableName;
use Illuminate\Http\Request;
use Illuminate\Support\Facades\DB;

class PayController
{
    // 外跳
    protected $JumpOut = [2,4,9,13,12,14];
    // SDK
    protected $Sdk = [];

    // 返回支付类型
    public function pay_type(Request $request)
    {
        if(env('MULTI_COUNTRY',0)==1) {
            $Country = $request->input('Country', '');
            $list = DB::table('agent.dbo.admin_configs')->where('status', 1)
                ->where('country', $Country)
                ->whereIn('type', ['pay_method'])->orderByDesc('sort')->get();
        }else {

            $list = DB::table('agent.dbo.admin_configs')->where('status', 1)
                ->whereIn('type', ['pay_method'])->orderByDesc('sort')->get();
        }

        foreach ($list as &$value) {
            $value->type = 0;
        }
        unset($value);
        return apiReturnSuc($list);
    }
}
