Comments (11)
You need to percentEncode the date string before setting that as parameter value.
params.put( "after", OAuthSignature.percentEncode( "2019-11-16T15:02:30" ) );
from wc-api-java.
@lucasmoriita I faced same as your issue, Have you fixed it? Could you help me fix it?
from wc-api-java.
I'm trying to get the newest order after the time ISO8061 point...
from wc-api-java.
@innoventry I took two days and I gave up and I changed my project to use laravel framework
from wc-api-java.
someday, If I use java again, I will try it
from wc-api-java.
@lucasmorita Please try it.
from wc-api-java.
@ngocnd0242 Sorry for the delay in responding.
Actually, I gave up too, and it's been a while since I don't even touch at the code. But, as a workaround, I've decided to use OkHttp to make the requests as a workaround 😄
from wc-api-java.
You need to percentEncode the date string before setting that as parameter value. params.put( "after", OAuthSignature.percentEncode( "2019-11-16T15:02:30" ) );
This does not work as well.
from wc-api-java.
@shakila-rajaiah you try it https://gist.github.com/JakeWharton/f26f19732f0c5907e1ab I think you should write reset + oauth1 yourself, I used by chilkat, It's works fine
WooCkRest rest = new WooCkRest();
OrderEntity newOrder = orderRepository.findFirstByStatusOrderByDateCreatedDesc(OrderStatus.NEW.getVal());
if (Objects.nonNull(newOrder)) {
rest.AddQueryParam("after", newOrder.getDateCreatedOriginal());
} else {
OrderEntity checkedOrder = orderRepository.findFirstByStatusOrderByDateCreatedDesc(OrderStatus.CHECKED.getVal());
if (Objects.nonNull(checkedOrder)) {
rest.AddQueryParam("after", checkedOrder.getDateCreatedOriginal());
}
}
rest.AddQueryParam("per_page", "100");
rest.SetAuthOAuth1(oauth1, true);
boolean success = rest.Connect(url, url.contains("https") ? 443 : 80, false, true);
if (success != true) {
log.error("rest.Connect" + rest.lastErrorText());
return null;
}
from wc-api-java.
Pull request #37 fixed it for me
from wc-api-java.
Closing issue as it is fixed by #37
from wc-api-java.
Related Issues (20)
- PKIX path building failed. Unable to find valid certification path to requested target HOT 3
- Update of order line_items HOT 1
- Apply coupon compatibly v3 HOT 2
- get product > 100 HOT 3
- New Release HOT 2
- woocommerce get products gets only first 100. HOT 3
- Cannot pass object as perm to map. HOT 1
- update method is not working in product case
- Send image
- unable to update product using update method
- Update Store Purchase in Online Woocommerce Store.
- I want to know where can i get the request url
- Passing categories and attributes
- Not able to get orders between dates HOT 3
- Logfactory bug
- how to pass arrays e.g images categories e.t.c HOT 1
- Creating Orders
- Is this save for production due to http? HOT 1
- Receiving an HTTP 406 Not Acceptable HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from wc-api-java.