Bug - Google IAP 3 receipt data = nil

Hi.

I just noticed that the Google IAP v3 is now returning the event.transaction.receipt = nil for all transactions (I am using build 2014.2301.

The value that was supposed to be the receipt is now being returned inside event.transaction.originalJson.

Here is the content of the event.transaction table:

type = inapp packageName = com.redbeachgames.cutmypuzzle state = purchased originalJson={ "orderId":"12999763169054705758.1326219689120439","packageName":"com.redbeachgames.cutmypuzzle","productId":"custom4ever", "purchaseTime":1376439273000, "purchaseState":0,"purchaseToken":"ngymfmgyzxqvvrxtmqylvhjg.AO-J1OyiYB5z2V-yyZPa\_Up4Ff4r2Iwo2x-NLyRKgzJFGXuRa37l8AnBi-XBVvD8ZPFpwmunFuE0ORRfePI645NUajvdW1fYeP0zm52qUjB1R2-BG5YtlC4\_n5yw35g87wBHx1w4syiX" } token = ngymfmgyzxqvvrxtmqylvhjg.AO-J1OyiYB5z2V-yyZPa\_Up4Ff4r2Iwo2x-NLyRKgzJFGXuRa37l8AnBi-XBVvD8ZPFpwmunFuE0ORRfePI645NUajvdW1fYeP0zm52qUjB1R2-BG5YtlC4\_n5yw35g87wBHx1w4syiX productIdentifier = custom4ever signature = ejpzG0GcOwZ/Mf7/Jk1i+WBLAms6A5brDyYgv7rh0dTRul7vyf8fVEYk2Q/b32FaVxdZRLwnsPBG4VpWjJfzMTCRrviBc4fhwEM/L38aalJTeIe6EZwr+xqY1kMi6RRAQtbRhacTCfLjmuB+8t4YRCpicLkebFY0pNRwN5QMh3egE+1EMwiVxsyBSFX/oiTphjULNYCLwcSs3TiynKpbyJ4GMqNSxU47EdzpmwOzPB+XOKfO87NZ8ZEVjmr8YwYRokaIuhnStxsfQxzEUI52BPVVPcC7pD7ajf5csY6i/oXZ/GZe8eEx/zakPNr/dGDQKgEN0bVYyVTYjniH24qSEQ== identifier = 12999763169054705758.1326219689120439 date = 1376439273000

This bug is deal breaker for those who use the receipt data to make a local IAP validation.

Bug submitted - case #32838

I’m still seeing this as well.  Any progress on a fix Corona Labs?

It’s been assigned to an engineer to look at.

Rob

Thanks for the update, Rob.

Not sure if this is related but I get this System.err stream in logcat after every purchase:

D/dchan   (26955): Inventory refresh successful. (response: 0:OK)

D/IabHelper(26955): Querying owned items, item type: inapp

D/IabHelper(26955): Package name: com.hardboiledindustries.BakeryBatch

D/IabHelper(26955): Calling getPurchases with continuation token: null

W/System.err(26955): com.naef.jnlua.LuaRuntimeException: ?:0: attempt to perform arithmetic on a nil value

D/Finsky  (15368): [9886] InAppBillingUtils.getPreferredAccount: com.hardboiledindustries.BakeryBatch: Account from first account - [xxxxxxxxxxxxxxxx]

D/dalvikvm(26955): GC_CONCURRENT freed 492K, 29% free 10188K/14332K, paused 7ms+2ms, total 111ms

D/dalvikvm(26955): WAIT_FOR_CONCURRENT_GC blocked 11ms

D/dalvikvm(26955): WAIT_FOR_CONCURRENT_GC blocked 12ms

W/System.err(26955): at com.naef.jnlua.LuaState.lua_pcall(Native Method)

W/System.err(26955): at com.naef.jnlua.LuaState.call(Unknown Source)

W/System.err(26955): at com.ansca.corona.CoronaLua.dispatchEvent(CoronaLua.java:100)

W/System.err(26955): at plugin.google.iap.v3.StoreTransactionRuntimeTask.executeUsing(StoreTransactionRuntimeTask.java:114)

W/System.err(26955): at com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:148)

W/System.err(26955): at com.ansca.corona.events.EventManager.sendEvents(EventManager.java:87)

W/System.err(26955): at com.ansca.corona.Controller.updateRuntimeState(Controller.java:281)

W/System.err(26955): at com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:417)

W/System.err(26955): at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1622)

W/System.err(26955): at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377)

W/libc    (26955): pthread_create sched_setscheduler call failed: Operation not permitted

Specifically, it looks like the IAP V3 plugin is calling getPurchases after every successful purchase but is using a null continuation token?  Don’t really understand the error or where it’s coming from

com.naef.jnlua.LuaRuntimeException: ?:0: attempt to perform arithmetic on a nil value

but I think it is in the V3 plugin.

I am using Daily Builds 2014.2350 and testing for Google IAP V3.

I also found that event.transaction.receipt is nil when purchase is successful.

( I tested to purchase my real in-app products. )

Now in progress of fixing this?

Otherwise, Can I use event.transaction.originalJson property instead of event.transaction.receipt?

I tried to verify Google Play in-app purchases via the event.transaction.originalJson and event.transaction.signature properties.

It is OK.

Is the event.transaction.originalJson property continuously available?

Or it is replaced by event.transaction.receipt?

I’m still seeing this as well.  Any progress on a fix Corona Labs?

It’s been assigned to an engineer to look at.

Rob

Thanks for the update, Rob.

Not sure if this is related but I get this System.err stream in logcat after every purchase:

D/dchan   (26955): Inventory refresh successful. (response: 0:OK)

D/IabHelper(26955): Querying owned items, item type: inapp

D/IabHelper(26955): Package name: com.hardboiledindustries.BakeryBatch

D/IabHelper(26955): Calling getPurchases with continuation token: null

W/System.err(26955): com.naef.jnlua.LuaRuntimeException: ?:0: attempt to perform arithmetic on a nil value

D/Finsky  (15368): [9886] InAppBillingUtils.getPreferredAccount: com.hardboiledindustries.BakeryBatch: Account from first account - [xxxxxxxxxxxxxxxx]

D/dalvikvm(26955): GC_CONCURRENT freed 492K, 29% free 10188K/14332K, paused 7ms+2ms, total 111ms

D/dalvikvm(26955): WAIT_FOR_CONCURRENT_GC blocked 11ms

D/dalvikvm(26955): WAIT_FOR_CONCURRENT_GC blocked 12ms

W/System.err(26955): at com.naef.jnlua.LuaState.lua_pcall(Native Method)

W/System.err(26955): at com.naef.jnlua.LuaState.call(Unknown Source)

W/System.err(26955): at com.ansca.corona.CoronaLua.dispatchEvent(CoronaLua.java:100)

W/System.err(26955): at plugin.google.iap.v3.StoreTransactionRuntimeTask.executeUsing(StoreTransactionRuntimeTask.java:114)

W/System.err(26955): at com.ansca.corona.CoronaRuntimeTaskDispatcher$TaskEvent.Send(CoronaRuntimeTaskDispatcher.java:148)

W/System.err(26955): at com.ansca.corona.events.EventManager.sendEvents(EventManager.java:87)

W/System.err(26955): at com.ansca.corona.Controller.updateRuntimeState(Controller.java:281)

W/System.err(26955): at com.ansca.corona.graphics.opengl.CoronaGLSurfaceView$CoronaRenderer.onDrawFrame(CoronaGLSurfaceView.java:417)

W/System.err(26955): at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.guardedRun(GLSurfaceView.java:1622)

W/System.err(26955): at com.ansca.corona.graphics.opengl.GLSurfaceView$GLThread.run(GLSurfaceView.java:1377)

W/libc    (26955): pthread_create sched_setscheduler call failed: Operation not permitted

Specifically, it looks like the IAP V3 plugin is calling getPurchases after every successful purchase but is using a null continuation token?  Don’t really understand the error or where it’s coming from

com.naef.jnlua.LuaRuntimeException: ?:0: attempt to perform arithmetic on a nil value

but I think it is in the V3 plugin.

I am using Daily Builds 2014.2350 and testing for Google IAP V3.

I also found that event.transaction.receipt is nil when purchase is successful.

( I tested to purchase my real in-app products. )

Now in progress of fixing this?

Otherwise, Can I use event.transaction.originalJson property instead of event.transaction.receipt?

I tried to verify Google Play in-app purchases via the event.transaction.originalJson and event.transaction.signature properties.

It is OK.

Is the event.transaction.originalJson property continuously available?

Or it is replaced by event.transaction.receipt?

This bug still occurs in 2014.2381, using Google IAP v3 plugin. It this fixed in newer release?

is this bug fixed?

I want to get receipt to check data is come from google server.

docs:

http://electronic-blue.herokuapp.com/blog/2013/08/android-in-app-purchase-verification-in-corona/

The receipt field is now populated with the same information as the originalJson field.  Since this is a plugin you do not have to wait for a daily build.

This bug still occurs in 2014.2381, using Google IAP v3 plugin. It this fixed in newer release?

is this bug fixed?

I want to get receipt to check data is come from google server.

docs:

http://electronic-blue.herokuapp.com/blog/2013/08/android-in-app-purchase-verification-in-corona/

The receipt field is now populated with the same information as the originalJson field.  Since this is a plugin you do not have to wait for a daily build.