Using API, cart always in still processing state?


#1

Hello People,

I am using cart API to create a cart. And then I want to confirm/ purchase it. But the cart seems to be always in 'still processing state. Please advice.

I get following response on /cart/ status :-

Cart Status is {“sites”:{“520a506655a0f99547000002”:{“info”:{“logo”:"https://px.twotap.com/unsafe/https%3A//core.twotap.com/system/sites/logos/520a/5066/55a0/f995/4700/0002/small/520a506655a0f99547000002.png%3F1499842029013","…,“status”:“still_processing”}}}},“user_id”:null,“unknown_urls”:[],“cart_id”:“596673780a779e36603efe7f”,“notes”:null,“country”:“us”,“message”:“still_processing”,“description”:“Still processing.”}


#2

Hey Nimish,

As mentioned in the docs, /cart is an async process. From http://docs.twotap.com/v1.0/reference#cart:

“This request is processed in the background. You either have to call /cart/status which will retrieve the relevant information once the job is finished, or set finished_url which will trigger a callback to your servers.”


#3

Hi Radu,

Thanks for taking out time to share your inputs.

I was already doing a cart status call, but perhaps it was too fast. After your response, I added a 2 second delay on the cart status update, and it now works sweet.

Again thanks for your inputs…

many regards,
Nimish


#4

Make sure you poll /cart/status until the message is not ‘still_processing’.