Created
August 24, 2020 07:55
-
-
Save iksecreeet/f8947201af61e0e8e3eeee2016dc0317 to your computer and use it in GitHub Desktop.
Get receipt RN IAP
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import * as RNIap from 'react-native-iap'; | |
RNIap. getPurchaseHistory().then((purchaseHistory) => { | |
if(purchaseHistory.length > 0) { | |
const getLastPurchase = purchaseHistory[purchaseHistory.length -1]; | |
const getReceipt = getLastPurchase.transactionReceipt; | |
// DO RECEIPT RELATED TASK | |
} | |
}); | |
this is how I get my latest subscription receipt anytime I want |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment