Dynamic Item Order doesn't complete

8 posts

Flag Post

I implemented item_order_request and item_order_placed on game server, moreover I logged all requests from Kongregate servers.
After calling purchaseItemsRemote Kongregate showing the correct information about item from my game server.
BUT Once I clicked submit button Kongregate says:
“There was an error while contacting the game server to finalize your order, please try again later. A refund will be issued to your account automatically if the purchase fails to complete, and you will be notified of this via private message. (Order ID: 449831)”

And there are no item_order_placed request to my game server! I checked that in preview mode.
Why Kongregate doesn’t send item_order_placed request to my game server?

 
Flag Post

Did you specify an API callback URL when creating your game profile?

 
Flag Post

Yes, and callback handler of [item_order_request] works fine.

 
Flag Post

What does your response look like to item_order_request? There is likely something invalid with this. It should have the following JSON values inside an items array.

name - The name of the item.
description - The description of the item (255 character max).
price - The price of the item in Kreds. (integer)
image_url - A URL to an icon of the item. This icon will be rendered at 40x40 pixels.

Example:

{
  "items":
  [
    {
      "name":"Awesome Sword",
      "description":"A really neat sword!",
      "price":10,
      "image_url":"http://www.swordssource.com/userfiles/image/Fantasy%20sword1.jpg"
    }
  ]
}

You said it worked, but perhaps something is wrong in this part. Seems weird why it wouldn’t call the item_order_placed if this data was correct and you pressed confirm when buying.

 
Flag Post

Yes, responce conforms to the test example in doc. For now game server replies request info in item description:

After clicking submit button:

Could this be due the preview mode of game?

 
Flag Post

I’m not sure. Maybe talk to Kongregate’s support, as they are familiar with their API more than I am (I’ve never used orders API): support@kongregate.com

 
Flag Post

The times I’ve seen this issue (with the automatic refund), the problem is generally related to alerting Kongregate that it’s done: {"state":"completed"}

Purchasing will work just fine in _preview mode, but you won’t be able to publish until our team is able to confirm everything’s working.

 
Flag Post

I logged all queries from Kongregate at Google App Engine Database. But GAE doesn’t allow to save more than 500 characters in a string type. Therefore servlet fells before return {state:completed}.
Solution is to save queries in Text type, that allows to store more than 500 characters.