PayController.php 956 B

1234567891011121314151617181920212223242526272829303132333435363738
  1. <?php
  2. namespace App\Http\Controllers\Api;
  3. use App\Facade\TableName;
  4. use Illuminate\Http\Request;
  5. use Illuminate\Support\Facades\DB;
  6. class PayController
  7. {
  8. // 外跳
  9. protected $JumpOut = [2,4,9,13,12,14];
  10. // SDK
  11. protected $Sdk = [];
  12. // 返回支付类型
  13. public function pay_type(Request $request)
  14. {
  15. if(env('MULTI_COUNTRY',0)==1) {
  16. $Country = $request->input('Country', '');
  17. $list = DB::table('agent.dbo.admin_configs')->where('status', 1)
  18. ->where('country', $Country)
  19. ->whereIn('type', ['pay_method'])->orderByDesc('sort')->get();
  20. }else {
  21. $list = DB::table('agent.dbo.admin_configs')->where('status', 1)
  22. ->whereIn('type', ['pay_method'])->orderByDesc('sort')->get();
  23. }
  24. foreach ($list as &$value) {
  25. $value->type = 0;
  26. }
  27. unset($value);
  28. return apiReturnSuc($list);
  29. }
  30. }