react-native-iap icon indicating copy to clipboard operation
react-native-iap copied to clipboard

How to send external user data with requestSubscription

Open elinahovakimyan opened this issue 2 years ago • 2 comments

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

elinahovakimyan avatar Oct 20 '21 05:10 elinahovakimyan

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.

rb162215 avatar Dec 21 '21 10:12 rb162215

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.

stale[bot] avatar Apr 18 '22 18:04 stale[bot]

requestPurchase now accepts a parameter applicationUsername

andresesfm avatar Sep 02 '22 19:09 andresesfm

@andresesfm Sorry, I can't see that anywhere. It's available for iOS but the original question is about Android.

hubciorz avatar Sep 29 '22 10:09 hubciorz

For iOS the parameter name has changed to appAccountToken And for Android, you could use obfuscatedAccountIdAndroid, obfuscatedProfileIdAndroid

andresesfm avatar Sep 29 '22 17:09 andresesfm

@andresesfm How i can use obfuscatedAccountIdAndroid, obfuscatedProfileIdAndroid. in requestSubscription() method android reactnative

dineshmahajan avatar Sep 29 '23 13:09 dineshmahajan

You pass them when making a purchase and you'll get them when querying for that purchase

andresesfm avatar Sep 30 '23 05:09 andresesfm

@andresesfm Can you please send me a sample code?

dineshmahajan avatar Sep 30 '23 05:09 dineshmahajan