mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/portal.git
synced 2026-09-01 19:04:22 +00:00
YD curl request
This commit is contained in:
@@ -4,10 +4,10 @@ namespace App\Classes\Modules\Unity\Services;
|
||||
|
||||
use Illuminate\Support\Facades\Config;
|
||||
use Illuminate\Support\Facades\Http;
|
||||
use App\Classes\Modules\Unity\Services\GetAccessToken;
|
||||
|
||||
class CreatesContract
|
||||
{
|
||||
/** @var GetAccessToken */
|
||||
private $getAccessToken;
|
||||
|
||||
private $createContract;
|
||||
@@ -16,7 +16,6 @@ class CreatesContract
|
||||
|
||||
public function __construct(GetAccessToken $getAccessToken)
|
||||
{
|
||||
dd(Config::get('unity.url'));
|
||||
$this->createContract = Config::get('unity.url').Config::get('unity.endpoint.create_contract');
|
||||
$this->getAccessToken = $getAccessToken;
|
||||
$this->contract_hash_id = Config::get('unity.contract_template_hash_id');
|
||||
@@ -24,7 +23,7 @@ class CreatesContract
|
||||
|
||||
public function execute(){
|
||||
|
||||
$accessToken= $this->getAccessToken->execute();
|
||||
$accessToken=$this->getAccessToken->execute();
|
||||
|
||||
$response = Http::withToken($accessToken)->post($this->createContract,['contract_template_id'=>[$this->contract_hash_id]])->object();
|
||||
dd($response);
|
||||
|
||||
Reference in New Issue
Block a user