Discussions

Ask a Question
Back to All

Error: #2009 (encodingFailed): Failed to find encoder for property "vendorId" for react native expo

I want to test purchases from my react native expo application but I am getting this error.

My code:

export const getAdaptyWeeklyPaywall = async () => {  
    try {  
      const id = "my_id"; 
const paywall = await adapty.getPaywall(id);
  console.log(paywall.products[0]);
  const product=paywall.products[0]
  try {
    const profile = await adapty.makePurchase(paywall.products[0]);
} catch (error) {
    console.log("hata: "+error)
    // handle the error
}
  // the requested paywall
} catch (error) {
  // handle the error
  console.log("hata: " + error);
}
};