Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Does PhoneGap support In-App Purchase?

Has anyone used David Orchard's fork for in-app purchases with PhoneGap? It hasn't been updated in over a year. According to this thread Urban Airship can't help yet.

like image 878
SavoryBytes Avatar asked Apr 15 '11 15:04

SavoryBytes


People also ask

What is in app purchase in app store?

With some apps, you can buy additional content or services within the app. We call these "in-app purchases." Here are some examples of in-app purchases: A sword that gives you more power in a game. A key that unlocks more features of an app.

What are the files required to create your own PhoneGap?

PhoneGap plugin contains two files. JavaScript file that defines the function for accessing the native hooks. Implementation files written in the native language to co-ordinate with native phone features.


2 Answers

Ah! I just needed to look a bit harder, this PhoneGap plugin should work perfectly. I'll comment here how well it works with Urban Airship.

https://github.com/phonegap/phonegap-plugins/tree/master/iOS/InAppPurchaseManager

like image 145
SavoryBytes Avatar answered Oct 20 '22 10:10

SavoryBytes


The phonegap plugin suggested by daniellmb works well. Please keep the following in mind

  1. CORDOVA_FRAMEWORK in InAppPurchaseManager.h, remove all the code around that. You will run into 'CDVPlugin.h' file not found in inAppPurchaseManager.h, this is how both import should look

    #import <Cordova/CDVPlugin.h>
    #import <Cordova/NSData+Base64.h>
    
  2. If you get the errror Plugin 'InAppPurchaseManager' not found, or is not a CDVPlugin. Check your plugin mapping in Cordova.plist. You have to add the following to Cordova.plist

    <key>InAppPurchaseManager</key>
    <string>InAppPurchaseManager</string>
    
like image 24
Pasta Avatar answered Oct 20 '22 11:10

Pasta