React Native IAP subscription returns old subscription data for TestFlight user

141 views Asked by At

Im trying to build supersimple react native app using react-native-iap. I'm using StoreKit2 mode and my code is supersimple:

const onSubscribePress = async () => {
    await getSubscriptions({skus: ['sku-1', 'sku-2']});
    // i've seen discussion that stated its better to call getSubscriptions before purchase

    const purchase = await requestSubscription({sku: 'sku-1'});

    const receipt = jwtDecode(purchase.verificationResultIOS ?? '');
    // here im just decoding JWT response from apple right on device
    // i know its not secure, but that's not a problem here

    console.log(receipt.expiresDate)

    await finishTransaction({purchase});

}

For some reason receipt.expiresDate contains old date, like its expired yesterday. I want to know how to fix it

0

There are 0 answers