Is there any way to test the purchases when calling InWorldPurchase.launchCheckoutFlow() ?
I am calling InWorldPurchase.launchCheckoutFlow(player, itemSKU); from a UIGizmo which opens the checkout window (so I suppose it is working well)... BUT when I buy something it takes my money but nothing happens in my game.
I have the this.connectCodeBlockEvent(this.entity, CodeBlockEvents.OnItemPurchaseComplete, (player, item, success) => { this.purchase(player, item, success); }); setup
here's my purchase function:
purchase(player: Player, item: string, success: boolean) {
switch (item) {
case '1000_coins_e9a304be':
this.playerPurchaseEffects(player, item, success, 1000);
break;
case '5000_coins_e20db36f':
this.playerPurchaseEffects(player, item, success, 5000);
break;
case '10000_coins_eec1ff3b':
this.playerPurchaseEffects(player, item, success, 10000);
break;
case '50000_coins_01a3171f':
this.playerPurchaseEffects(player, item, success, 50000);
break;
default:
console.log('Case for item not found: ' + item);
break;
}
}
I need to be able to test it in the Desktop Editor if possible or in Mobile as my game is optimized for mobile. Also the function InWorldPurchase.launchCheckoutFlow() does nothing in VR (no checkout window opened)...
As I think this is crucial for any mobile game to sell products, to be at least able to test it.
Thanks for your help!