I have an in app purchase and it returns the following json string
event.transaction.receipt = { "nonce": 3437061261345519600, "orders": [{ "notificationId": "8429187253734314491", "orderId": "12999763169054705758.1312172306573312", "packageName": "wheel.slots.leetcom.com", "productId": "double\_payouts", "purchaseTime": 1367081310000, "purchaseState": 0, "purchaseToken": "oqitwoqymmbkonqrskuooeas" }] }
I’m trying to get the productId using the following
event.transaction.receipt.orders[0].productId
But it keeps throwing an error. I’ve used JSON quite a bit in web developer but not too much with corona. This is the right way to get the productId right? If so what I’m thinking is happening is even though it’s returned in JSON format it’s actually a string and not seen as JSON. I’ve tried using json.encode and json.decode though with no luck.
Anyone have any ideas?