here is my problem.
I've set up an application in the Firefox MarketPlace. My application is approved and public. I can find it in the store, download it and use it.
It's a FREE app and some extra content can be unlocked with an fxpay in-app purchase. This also work.
I use javascript fxpay() lib.
When a user quits the app and come back, fxpay() call 'onrestore' method and on the return, the servers knows if the user have bought the in-app or not. But I don't know 'who' bought it. For example if I want to make some stuff available for 2 weeks, I need to identify my user and save him in my database.
So here is what I've tried from docs:
console.log('product: ',product.productId);
this works and return me the correct id relatively to my app administration panel
console.log('productname: ',product.name);
this also work
console.log('product.receiptInfo: ',product.receiptInfo);
this returns "undefined"
console.log('product.receiptInfo.status: ',product.receiptInfo.status);
console.log('product.receiptInfo.reason: ',product.receiptInfo.reason);
console.log('product.receiptInfo.receipt: ',product.receiptInfo.receipt);
console.log('product.receiptInfo.receipt: ',product.receiptInfo[0]);
All of theses doesn't return anything
Am I doing it wrong ? I cannot find anything in the doc about parsing the receipt properly !
I've seen this link but I think it only refers to the old library and not to fxPay
I've also seen this one but it doesn't help there too !