react-native-iap 의 iOS method 를 이용하여 가져온다
React.useEffect(() => {
// ... listen to currentPurchase, to check if the purchase went through
console.log(currentPurchase, 'currentPurchase')
if (currentPurchase) {
validateReceiptIos({
receiptBody: {'receipt-data': currentPurchase.transactionReceipt},
isTest: true
}).then(res => console.log(res))
}
}, [currentPurchase]);
validateReceiptIos() 메소드에
receiptBody 를 형식 그대로 넘겨줘야 함..