@pankaj I have gotten it working already.
cordova plugin add cordova-plugin-purchase.
Here is my boot file:
import productIds from '../utils/productIds'; export default ()=>{ if(process.env.MODE!=='cordova')return; if(!window.store){ console.log('Store not available'); return; } store.validator='https://validator.fovea.cc/v1/validate?appName=...&apiKey=...'; productIds.forEach(id=>{ store.register({ id, type:id.endsWith('_single')?store.CONSUMABLE:store.PAID_SUBSCRIPTION }); store.when(id).approved(product=>product.verify()).verified(product=>product.finish()); }); store.error(error=>{ console.log(error); store.refresh(); }); store.refresh(); };And in my store component page I just call
store.order(product);I also used PayPal for the equivalent purchases in electron.