Skip to content

Commit

Permalink
Remove useless comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed May 2, 2024
1 parent a8a4480 commit c4994aa
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,6 @@ public function set_signing_key( $signing_key ) {
* @throws \Exception Throws exception when Rabobank OmniKassa 2.0 response is not what we expect.
*/
private function request( $method, $endpoint, $token, $data = null ) {
// URL.
$url = $this->get_url() . $endpoint;

/*
Expand Down Expand Up @@ -171,12 +170,10 @@ private function request( $method, $endpoint, $token, $data = null ) {
*/
$args = \apply_filters( 'pronamic_pay_omnikassa_2_request_args', $args );

// Request.
$response = Http::request( $url, $args );

$data = $response->json();

// Object.
if ( ! \is_object( $data ) ) {
throw new \Exception(
\sprintf(
Expand All @@ -189,7 +186,6 @@ private function request( $method, $endpoint, $token, $data = null ) {
);
}

// Error.
$object_access = new ObjectAccess( $data );

if ( $object_access->has_property( 'errorCode' ) ) {
Expand All @@ -198,7 +194,6 @@ private function request( $method, $endpoint, $token, $data = null ) {
throw $error;
}

// Ok.
return $data;
}

Expand Down

0 comments on commit c4994aa

Please sign in to comment.