React-native-iap: validateReceiptAndroid always returns undefined

Created on 5 Feb 2019  ·  4Comments  ·  Source: dooboolab/react-native-iap

Version of react-native-iap

2.4.0-beta6

Version of react-native

0.57.8

Platforms you faced the error (IOS or Android or both?)

Android

Expected behavior

When I try to use validateReceiptAndroid, I expected an object like this:
{
"kind": "androidpublisher#subscriptionPurchase",
"startTimeMillis": long,
"expiryTimeMillis": long,
"autoRenewing": boolean
}

Actual behavior

validateReceiptAndroid always returns undefined

Tested environment (Emulator? Real Device?)

Real Device (Moto G5 Plus)

Steps to reproduce the behavior

let accessToken = "460530446560-9ueadkhvjrh1rh93roaso56fnu49ir78.apps.googleusercontent.com"; (clientId OAuth 2.0 from google api)
const purchase = await RNIap.buySubscription(itemSubs[sku]);
let decodedReceipt = await RNIap.validateReceiptAndroid('com.ourPackage', purchase.productId, purchase.purchaseToken, accessToken, true);

🙏 help wanted 🤖 android

All 4 comments

Have you go over the readme?

Yes, I followed the steps of this post

There is a nice post written in Korean about this. I'll try to translate this after the confirm made by the author. Hope you could use the google translation beforehand.

Closing this for now since this isn't actually a bug or anything.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

sanilcgs picture sanilcgs  ·  3Comments

summonerriftofficial picture summonerriftofficial  ·  4Comments

helbery picture helbery  ·  5Comments

MacMillan13 picture MacMillan13  ·  3Comments

coldfins picture coldfins  ·  3Comments