Search the Community
Showing results for tags 'iap'.
Found 2 results
I am working on WebGL for Android/Ouya, and I wonder if it would be nice to have a universal html5 payment API. Since there's no such thing as a W3C or a de facto standard for it (unless I'm mistaken!), I figure I'm just going to create something myself. I want to keep it as simple as possible. I want to start by creating a wrapper around the Ouya API. I also looked at Clay.io and Google Play. I think I can distill a simple API from these three systems that covers the basic functionality. Here's my first try (note, return values are Java style). PaymentSystemID detectPaymentSystem() initPaymentSystem(Secrets) requestPayment(ProductID) boolean checkReceipt(ProductID) ProductID [ ] getAllReceipts() consumeReceipt(ProductID) ProductInfo getProductInfo(ProductID) The main idea is that you get receipt statuses through checkReceipt and getAllReceipts, which will cache the result locally so you can call it 60 times a second in your game loop, and it will return something even if the user is not connected. requestPayment just sends out a request to start the payment dialogue, which will eventually lead to checkReceipt becoming true. My hope is that any user login processes and payment dialogues can be handled entirely behind-the-scenes. The Secrets, ProductIDs, and ProductInfo are payment system dependent. You can use detectPaymentSystem to get the system currently in use. Clay.io also has a shopping cart feature, which is not exposed through this API. Not sure that's essential. Does anyone here have any thoughts on this? Any particular payment system that you use or is often used? Or maybe this has already been done by someone else?