Error: #2009 (encodingFailed): Failed to find encoder for property "vendorId" for react native expo
complete
G
Görkem
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);
}
};
Adapty Support
complete
A
Adapty Support
Hi there!
I think you missed getPaywallProducts in your code.
The correct flow right now is getPaywall -> getPaywallProducts -> (optionally getProductsIntroductoryEligibility) -> makePurchase.
For more details, please follow the guide here: https://docs.adapty.io/docs/displaying-products
Hope that helps!