Файловый менеджер - Редактировать - /home/clickysoft/public_html/somni.clickysoft.net/app/Console/Commands/GetDocuSignUrlToken.php
Назад
<?php namespace App\Console\Commands; use Illuminate\Console\Command; use Illuminate\Support\Facades\Http; class GetDocuSignUrlToken extends Command { /** * The name and signature of the console command. * * @var string */ protected $signature = 'app:get-docu-sign-url-token'; /** * The console command description. * * @var string */ protected $description = 'This command call the url to get the token for the DocuSign APIs'; /** * Execute the console command. */ public function handle() { // $url_to_call = config('constants.docusign.docu_sign_dev_url').'?response_type=code&scope=signature&client_id='.config('constants.docusign.docu_sign_i_key').'&redirect_uri='.env('APP_URL','https://somni.test').config('constants.docusign.docu_sign_call_back_end_point').''; // $url_to_call = config('constants.docusign.docu_sign_dev_url').'?response_type=code&scope=signature%20impersonation&client_id'.config('constants.docusign.docu_sign_i_key').'&redirect_uri='.env('APP_URL','https://somni.test').config('constants.docusign.docu_sign_call_back_end_point').''; // $ch = curl_init($url_to_call); // $response = curl_exec ($ch); // $response = Http::get($url_to_call); // $data = $response->json(); // $this->info($response); try { $params = [ 'response_type' => 'code', 'scope' => 'signature', 'client_id' => config('constants.docusign.docu_sign_i_key'), 'state' => 'a39fh23hnf23', 'redirect_uri' => route('docu.callback'), ]; $queryBuild = http_build_query($params); $url = "https://account-d.docusign.com/oauth/auth?"; $botUrl = $url . $queryBuild; return redirect()->to($botUrl); } catch (Exception $e) { return redirect()->back()->with('error', 'Something Went wrong !'); } } }
| ver. 1.4 |
Github
|
.
| PHP 8.1.29 | Генерация страницы: 0.01 |
proxy
|
phpinfo
|
Настройка