Skip to content

Commit

Permalink
Fix #33.
Browse files Browse the repository at this point in the history
  • Loading branch information
remcotolsma committed May 2, 2024
1 parent cd61689 commit a8a4480
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions src/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -171,31 +171,6 @@ private function request( $method, $endpoint, $token, $data = null ) {
*/
$args = \apply_filters( 'pronamic_pay_omnikassa_2_request_args', $args );

/**
* Build cURL command for debug purposes.
*
* @link https://curl.haxx.se/
*/

// phpcs:disable SlevomatCodingStandard.Variables.UnusedVariable.UnusedVariable, VariableAnalysis.CodeAnalysis.VariableAnalysis.UnusedVariable

$curl = '';

$tab = "\t";
$eol = ' \\' . \PHP_EOL;

$curl .= \sprintf( 'curl --request %s %s', $method, \escapeshellarg( $url ) ) . $eol;
$curl .= $tab . \sprintf( '--header %s', \escapeshellarg( 'Authorization: Bearer ' . $token ) ) . $eol;
$curl .= $tab . \sprintf( '--header %s', \escapeshellarg( 'Content-Type: application/json' ) ) . $eol;
$curl .= $tab . \sprintf( '--data %s', \escapeshellarg( \strval( \wp_json_encode( $data ) ) ) ) . $eol;
$curl .= $tab . \sprintf(
'--user-agent %s',
\escapeshellarg( 'WordPress/' . \get_bloginfo( 'version' ) . '; ' . \get_bloginfo( 'url' ) )
) . $eol;
$curl .= $tab . '--verbose';

// phpcs:enable

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

Expand Down

0 comments on commit a8a4480

Please sign in to comment.