diff --git a/src/Api/Accounts/AccountsApi.php b/src/Api/Accounts/AccountsApi.php index 0745ac1..2c0c9c8 100644 --- a/src/Api/Accounts/AccountsApi.php +++ b/src/Api/Accounts/AccountsApi.php @@ -19,7 +19,7 @@ public function getAccounts($queryFields = []) /** @param string $accountId */ public function getAccountById($accountId) { - return $this->run(static::GET, sprintf('/accounts/%s', $accountId)); + return $this->run(static::GET, sprintf('/accounts/%s', basename($accountId))); } public function getCategories() @@ -30,7 +30,7 @@ public function getCategories() /** @param string $categoryId */ public function getCategoryById($categoryId) { - return $this->run(static::GET, sprintf('/accounts/category/%s', $categoryId)); + return $this->run(static::GET, sprintf('/accounts/category/%s', basename($categoryId))); } public function getLegalForms() @@ -41,7 +41,7 @@ public function getLegalForms() /** @param string $legalFormId */ public function getLegalFormById($legalFormId) { - return $this->run(static::GET, sprintf('/accounts/legalForm/%s', $legalFormId)); + return $this->run(static::GET, sprintf('/accounts/legalForm/%s', basename($legalFormId))); } public function getDocuments() @@ -52,13 +52,13 @@ public function getDocuments() /** @param string $documentId */ public function getDocumentById($documentId) { - return $this->run(static::GET, sprintf('/accounts/document/%s', $documentId)); + return $this->run(static::GET, sprintf('/accounts/document/%s', basename($documentId))); } /** @param string $accountId */ public function getBalanceByAccountId($accountId) { - return $this->run(static::GET, sprintf('/accounts/%s/balance', $accountId)); + return $this->run(static::GET, sprintf('/accounts/%s/balance', basename($accountId))); } /** diff --git a/src/Api/Refunds/RefundsApi.php b/src/Api/Refunds/RefundsApi.php index 478ad6b..fb4702c 100644 --- a/src/Api/Refunds/RefundsApi.php +++ b/src/Api/Refunds/RefundsApi.php @@ -14,6 +14,6 @@ public function getRefunds() /** @param string $refundId */ public function getRefundById($refundId) { - return $this->run(static::GET, sprintf('/refunds/%s', $refundId)); + return $this->run(static::GET, sprintf('/refunds/%s', basename($refundId))); } } diff --git a/src/Api/Reports/ReportsApi.php b/src/Api/Reports/ReportsApi.php index bb35109..3749526 100644 --- a/src/Api/Reports/ReportsApi.php +++ b/src/Api/Reports/ReportsApi.php @@ -22,6 +22,6 @@ public function getReports($page = 1, $pageSize = 20, $sortDirection = self::SOR public function getReportFile($reportId, $fileId) { - return $this->download(static::GET, sprintf('/reports/%s/files/%s', $reportId, $fileId)); + return $this->download(static::GET, sprintf('/reports/%s/files/%s', basename($reportId), basename($fileId))); } } diff --git a/src/Api/Transactions/TransactionsApi.php b/src/Api/Transactions/TransactionsApi.php index 35873b3..fb43969 100644 --- a/src/Api/Transactions/TransactionsApi.php +++ b/src/Api/Transactions/TransactionsApi.php @@ -23,7 +23,7 @@ public function getTransactions($queryFields = []) /** @param string $transactionId */ public function getTransactionById($transactionId) { - return $this->run(static::GET, sprintf('/transactions/%s', $transactionId)); + return $this->run(static::GET, sprintf('/transactions/%s', basename($transactionId))); } public function getTransactionQR($transactionId, $size = 'M', $logoPath = null, $desiredType = 'image/png') @@ -44,7 +44,7 @@ public function getTransactionQR($transactionId, $size = 'M', $logoPath = null, return $this ->sendRequest( - sprintf('/transactions/%s/qr', $transactionId), + sprintf('/transactions/%s/qr', basename($transactionId)), static::POST, $fields ) @@ -57,7 +57,7 @@ public function getTransactionQR($transactionId, $size = 'M', $logoPath = null, */ public function getRefundsByTransactionId($transactionId, $queryFields = []) { - $requestUrl = $this->addQueryFields(sprintf('/transactions/%s/refunds', $transactionId), $queryFields); + $requestUrl = $this->addQueryFields(sprintf('/transactions/%s/refunds', basename($transactionId)), $queryFields); return $this->run(static::GET, $requestUrl); } @@ -96,7 +96,7 @@ public function createTransactionWithInstantRedirection($fields) */ public function createPaymentByTransactionId($fields, $transactionId) { - return $this->run(static::POST, sprintf('/transactions/%s/pay', $transactionId), $fields, new Pay()); + return $this->run(static::POST, sprintf('/transactions/%s/pay', basename($transactionId)), $fields, new Pay()); } /** @@ -107,7 +107,7 @@ public function createInstantPaymentByTransactionId($fields, $transactionId) { return $this->run( static::POST, - sprintf('/transactions/%s/pay', $transactionId), + sprintf('/transactions/%s/pay', basename($transactionId)), $fields, new PayWithInstantRedirection() ); @@ -119,13 +119,13 @@ public function createInstantPaymentByTransactionId($fields, $transactionId) */ public function createRefundByTransactionId($fields, $transactionId) { - return $this->run(static::POST, sprintf('/transactions/%s/refunds', $transactionId), $fields, new Refund()); + return $this->run(static::POST, sprintf('/transactions/%s/refunds', basename($transactionId)), $fields, new Refund()); } /** @param string $transactionId */ public function cancelTransaction($transactionId) { - return $this->run(static::POST, sprintf('/transactions/%s/cancel', $transactionId)); + return $this->run(static::POST, sprintf('/transactions/%s/cancel', basename($transactionId))); } /** @param array $fields */ diff --git a/src/SdkVersion.php b/src/SdkVersion.php index a11ca4b..e9e4a49 100644 --- a/src/SdkVersion.php +++ b/src/SdkVersion.php @@ -4,5 +4,5 @@ final class SdkVersion { - const VERSION = '2.4.3'; + const VERSION = '2.4.4'; }