fix : can not get orders between date #49
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When I was using the wc-api-java sdk to call to wocommerce's get orders or get products api, I found that once the ISO8601 date was passed as a parameter, like this date: 2023-02-21T14:46:25, The following error will shown
{"code":"woocommerce_rest_authentication_error","message":"Invalid Signature-provided signature does not match.","data":{"status":401}}.
Later I found the following difference by comparing the official php sdk code.
php sdk url:https://packagist.org/packages/automattic/woocommerce
php sdk:
after%3D2023-02-21T13%253A00%253A23%26before%3D2023-02-21T13%253A00%253A23
java sdk:
after%3D2023-02-21T13%3A00%3A23%26before%3D2023-02-21T13%3A00%3A23
I found this problem the java sdk is not converting % to %25 when it executes the percentEncode() method.