react-native-iap
react-native-iap copied to clipboard
How to send external user data with requestSubscription
Please use Discussion board if you want get some help out of it. Please report issue if there is a bug.
Version of react-native-iap
7.5.0
Version of react-native
0.63.3
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
To be able to send user ID or email with subscription data, so that server will get it by Google API and identify the subscription. What options are there to do this? Trying to get subscription details from Google API is just returning null for emailAddress and the other user related fields.
Actual behavior
When trying to send as obfuscatedAccountIdAndroid
or obfuscatedProfileIdAndroid
the user email or ID in our DB, the app is just crashing.
Tested environment (Emulator? Real Device?)
Real device
Steps to reproduce the behavior
Facing same problem, there is no way we can identify for which user transaction receipt is received. That will we good if we can add user spacefic data while start purchase and same information can be received with receipt.
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions.
requestPurchase
now accepts a parameter applicationUsername
@andresesfm Sorry, I can't see that anywhere. It's available for iOS but the original question is about Android.
For iOS the parameter name has changed to appAccountToken
And for Android, you could use obfuscatedAccountIdAndroid, obfuscatedProfileIdAndroid
@andresesfm How i can use obfuscatedAccountIdAndroid, obfuscatedProfileIdAndroid. in requestSubscription() method android reactnative
You pass them when making a purchase and you'll get them when querying for that purchase
@andresesfm Can you please send me a sample code?