Hi i am using below mentioned code for pulling order conformation. But i can’t get Order ID and order details from this Query. Not able to get order id and order details even order confirmed.
Currently i am using shopify mobilebuysdk:buy3:3.1.1
graphClient!!.queryGraph(query).enqueue(
object : GraphCall.Callback<Storefront.QueryRoot> {
override fun onResponse(@NonNull response: GraphResponse<Storefront.QueryRoot>) {
if (response.data()!!.getNode() as Storefront.Checkout != null) {
val checkout = response.data()!!.getNode() as Storefront.Checkout
println("CheckOut : " + checkout)
if (checkout != null) {
if (checkout.getOrder() != null) {
if (checkout.getOrder().getId().toString() != null) {
val orderId = checkout.getOrder().getId().toString()
println("Order ID : " + orderId)
}
}
}
}
}
override fun onFailure(@NonNull error: GraphError) {}
}, null,
RetryHandler.exponentialBackoff(1, TimeUnit.MILLISECONDS, 1.2f)
.whenResponse<Storefront.QueryRoot> { response ->
(response.data()?.getNode() as Storefront.Checkout).getOrder() == null
}
.maxCount(10)
.build())
2
Answers
Have a look at this answer,
Shopify Web Checkout Issue
First thing is to remove HttpCachePolicy from the QraphQL setup. After it try to provide the Network_Only to order status api.
And your issue will be gone.