first
This commit is contained in:
29
modules/Payment/Http/Controllers/Api/GatewayController.php
Normal file
29
modules/Payment/Http/Controllers/Api/GatewayController.php
Normal file
@@ -0,0 +1,29 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Payment\Http\Controllers\Api;
|
||||
|
||||
use App\Api\Controllers\Controller;
|
||||
use Illuminate\Http\JsonResponse;
|
||||
use Modules\Payment\Models\Setting;
|
||||
|
||||
class GatewayController extends Controller
|
||||
{
|
||||
|
||||
/**
|
||||
* Notes : 获取支持的支付渠道
|
||||
*
|
||||
* @Date : 2021/8/26 3:50 下午
|
||||
* @Author : <Jason.C>
|
||||
* @return \Illuminate\Http\JsonResponse
|
||||
*/
|
||||
public function index(): JsonResponse
|
||||
{
|
||||
$setting = Setting::orderByDesc('in_use')->first();
|
||||
|
||||
return $this->success([
|
||||
'alipay' => (bool) $setting->alipay_id,
|
||||
'wechat' => (bool) $setting->wechat_id,
|
||||
]);
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user