url = config('harim_web_services.Reject.url'); $this->channelName = 'send_payment_info'; } /** * @throws Exception */ public function run(): array { try { return $this->sendRequest(); } catch (Exception $e) { Log::channel($this->channelName) ->error(get_class($this), [ 'message' => $e->getMessage(), ] ); throw $e; } } private function sendRequest(): array { return Http::withHeaders(['Content-Type' => 'application/json']) ->withBody($this->inputParameters) ->throw() ->withoutVerifying() ->post($this->url) ->json(); } public function makeInputParameters($input): void { $key = config('harim_web_services.Harim_Info.key'); $iv = config('harim_web_services.Harim_Info.iv'); $this->inputParameters = openssl_encrypt(json_encode($input), 'aes-256-cbc', $key, false, $iv); } }