Jump to content

Search the Community

Showing results for tags 'iap'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

Found 3 results

  1. After successful delivery In-App Purchases (IAPs) on Android using Apache Cordova and https://github.com/j3k0/cordova-plugin-purchase I can't get it working properly on iOS. The problem is that once the item is clicked the price shows its details etc., but if use clicks "Cancel" then the user can't purchase anything anymore. Unless restarting the game, as far as I'm aware I should handle rejection/cancellation events. Tried these, but so far no success. This is how I was trying to handle these events (rejection/cancellation), including playing with store.refresh() in different locations of the code and without it as well: // Handle rejection and cancel events. store.when("com.XX.YY.gems5").rejected(function(order) { store.refresh(); that.game.state.start("GemsState"); store.refresh(); }); store.when("com.XX.YY.gems5").cancelled(function(order) { store.refresh(); that.game.state.start("GemsState"); store.refresh(); }); Code, which correctly works on Android (the handling wasn't required there in order to work properly): 'use strict'; var that = this; // Prepare product. store.register({ id: "com.XX.YY.gems5", alias: "Gems 5", type: store.CONSUMABLE }); // Purchase product. store.order("com.XX.YY.gems5"); store.refresh(); store.when("com.XX.YY.gems5").approved(function (order) { order.finish(); store.refresh(); // Add extra gems. localStorage.gems = parseInt(localStorage.gems) + 5; // Add 5 gems. that.upgrade_sound.play(); // Play upgrade sound. that.game.state.start("GemsState"); that.menu_items[1].select(); // Select second item. }); I'm using Phaser 2 & ES5.
  2. Hi, I was wondering if there is In app purchase capabilities in Phaser for the desktop? For example, you can buy coins in agar.io with real money. Thanks
  3. 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?
×
×
  • Create New...