API failure: Shop getCart

3 replies
Posts:
4,821
Likes:
+2,735
Master
LEVEL 5
Site:https://zitoria.enjin.com/

Problem behaviour:
- Add item to cart
- getCart fails to load data

This is the response:

{ code: -32099, message: "This operation encountered a fatal error, please contact support." }

Another way of reproducing:
- Add to cart in the shop module
- The getCart will still fail.

**Please note that getCart will be successful when the cart is empty.

It should be noted that although getCart fails, the items are always saved to cart successfully - This means that if I go to the shop module, my cart will be correct (just cannot be loaded via the API getCart method).

I tested my code on 2 other sites and getCart works as expected for currency AND point related carts (although admittedly, these sites are not Minecraft sites, not sure if this matters at all). One of the sites is a .enjin and the other is not.

Please let me know if you can resolve this.
Posted Jan 24, 19 · OP
Posts:
4,821
Likes:
+2,735
Master
LEVEL 5
Enjineers, please.

This should not be broken, please resolve - We have now sent in a support ticket and I have waited in this forum patiently. There is no reason why we should be getting this error.

Here is the simple function:

Copy
function get_cart(){ var cart_data = { "jsonrpc": "2.0", "method": "Shop.getCart", "id": Math.round(Math.random() * (999999 - 100000) + 100000), "params": { "preset_id": 50300010, } }; $.post("/api/v1/api.php", JSON.stringify(cart_data), function(response) { if (response.error) { console.log(response.error); } else{ console.log(response.result); } }); }


Once an item exists in the cart (ie if I use the module itself to do this), it will output an error (if no item is in cart, it is successful). This is only happening on this one site (that I mentioned above).

Copy
{ code: -32099, message: "This operation encountered a fatal error, please contact support." }


Respond here or respond to the support ticket (it is an ultimate plan site).
Posted Feb 7, 19 · OP
Posts:
5,334
Likes:
+1,982
Popular
LEVEL 4
Thanks for the details. We have this issue on our fix list.
community-manager-sig_1404885270.png
Posted Feb 7, 19
Posts:
4,821
Likes:
+2,735
Master
LEVEL 5
Fix list? It only affects this site... Is there any particular reason for this, can something not be configured for this site in question?

Please give me an ETA, I don't want this owner's shop to be like Enjin menu 2.0 (this has been on a fix list for over 6 months)....
Posted Feb 8, 19 · OP
Social Media
Follow us on our social media!
You will receive information, news, sneak peaks, giveaways and more!
NoticeNotices