English 中文(简体)
In App Purchase Verify certificate problem
原标题:

I am getting the response as below.

{"status":21002, "exception":"java.lang.NullPointerException"} 

I am encoding the receipt using Base64 only.

I am testing it in sandbox.

What will be the problem? Can anyone help me?

问题回答

hi all i got the solution

just send the receipt data after encoding into base 64 as json with key "receipt-data"

VIP Worth noting that 21002 is also the message you get back when trying to verify a transaction that was initiated via rooted iTunes hack software like the Urus app.

We verify all transactions server side, so are not device dependant, the only transactions that get the 21002 response are ALL not real payments.

an easy way to spot it to look at the transaction id returned Urus gives com.urus.iap.XXXXXXX (x being random numbers), other ones include returning the pack name as the completed transaction id, all very different to the id s you get from the various iTunes servers.

I can t recommend more that everyone verifies server-side in an environment you can control, test and prove, that cant be manipulated (unless your hacked). If this is not an option, then do not pay out on a 21002 response.

verifying in a java environment the json response for the 21002 will be: json: {"status":21002,"exception":"java.lang.ClassCastException"}

We had the same problem - until we discovered that we didn t include the post body in the request and only sent an empty request.

The only option that work for me after 2 days of hitting my head against the wall: Testing in the sandbox

Pay attention to this advice by apple "Important Do not sign in with your test account in the Settings application."

Make sure on the test device you are signed out of the "test" apple store account before encoding to base 64.





相关问题
Code sign Error

I have created a new iPhone application.I have two mach machines. I have created the certificate for running application in iPhone in one mac. Can I use the other mac for running the application in ...

ABPersonViewController Usage for displaying contact

Created a View based Project and added a contact to the AddressBook using ABAddressBookRef,ABRecordRef now i wanted to display the added contact ABPersonViewController is the method but how to use in ...

将音频Clips从Peter改为服务器

我不禁要问,那里是否有任何实例表明从Peit向服务器发送音响。 I m不关心电话或SIP风格的解决办法,只是一个简单的袖珍流程......

• 如何将搜查线重新定位?

我正试图把图像放在搜索条左边。 但是,问题始于这里,搜索条线不能重新布署。

热门标签