WHAT AM I TRYING TO DO
I want to make a Native Android APP (Not HTML5/Jquery mobile) for my Woocommerce website. I am trying to setup the APIs using kloon/WooCommerce-REST-API-Client-Library.
So far I managed to retrieve the lists of products, coupons, customers, orders etc... which I could use to display in my Android app.
Now I want to replicate add to cart/checkout process in the android app, but it seems this library dosen't provide functions for such workflow.
MY QUESTION
How can I achieve the follwing workflow with REST APIs in my Android app? (Similar to the website checkout process)
Flow:
- Add to cart
- View cart and update order
- Check out and confirmation
Please tell me if I'm missing any API calls.
If someone already achieved this, kindly post your resources and comments bellow. Any sample-codes/liraries/helper-classes links will be greatly appriciated.
Thank you!
$orderData = array( "order" => array(
);
if you try to read the example.php and read all the php file in lib folder, I think you can achieve all these...
example.php has something like:
and if you'll look at class-wc-api-client-resource-orders.php, you have this:
now you'll just have to test everything.
Another suggestion is why not use WooCommerce REST API instead? It has great documentation and examples.