Path must not contain "?" when finalizing transaction
rjansenaicn opened this issue · 2 comments
rjansenaicn commented
When I try to finalize a transaction this exception is throwned: "Invalid params". This is caused due to this error: "path must not contain "?"".
This is the PUT url: /tss/301fcd8f-7304-4f64-b684-63f8ccbca6a8/tx/bf411dc7-caac-40b2-bdd2-606316f09f52?latest_revision=1
.
I don't remember this happened last time I checked (31 december 2020). Is this a Google Cloud issue maybe and can I solve it on my side?
0 => array:6 [
"file" => "/var/www/html/test/vendor/fiskaly/fiskaly-sdk-php/src/FiskalyClient.php"
"line" => 320
"function" => "throwOnError"
"class" => "FiskalyClient\errors\FiskalyErrorHandler"
"type" => "::"
"args" => array:1 [
0 => Datto\JsonRpc\Responses\ErrorResponse {#598
-message: "Invalid params"
-code: -32602
-data: "path must not contain "?""
-id: 0
}
]
]
1 => array:6 [
"file" => "/var/www/html/test/Fiskaly/Client.php"
"line" => 134
"function" => "request"
"class" => "FiskalyClient\FiskalyClient"
"type" => "->"
"args" => array:5 [
0 => "PUT"
1 => "/tss/301fcd8f-7304-4f64-b684-63f8ccbca6a8/tx/bf411dc7-caac-40b2-bdd2-606316f09f52?latest_revision=1"
2 => null
3 => null
4 => "eyJzdGF0ZSI6IkZJTklTSEVEIiwiY2xpZW50X2lkIjoiNzUyYzkyZWItYzE5NS00OWI3LWE0MTAtNmQ5YzlkOTAzZDdhIiwic3RhbmRhcmRfdjEiOnsicmVjZWlwdCI6eyJyZWNlaXB0X3R5cGUiOiJSRUNFSVBUIiwiYW1vdW50c19wZXJfdmF0X3JhdGUiOnsidmF0X3JhdGUiOiJOT1JNQUwiLCJhbW91bnQiOiIxMi41In0sImFtb3VudHNfcGVyX3BheW1lbnRfdHlwZSI6eyJwYXltZW50X3R5cGUiOiJOT05fQ0FTSCIsImFtb3VudCI6IjEyLjUifX19fQ=="
]
]
pngnwthbrd commented
@rjansenaicn if you use the FiskalyClient->request method, there is a third paramater where you give an array (the query string) like FiskalyClient->request('PUT', '/tss/..../tx/....', array('last_revision' => $revision));
JohannesFerner commented
thanks for resolving @pngnwthbrd