InAppPurchase Plugin

14 posts, 1 answers
  1. Augusto
    Augusto avatar
    18 posts
    Member since:
    Apr 2013

    Posted 02 Jul 2013 Link to this post

    Hi,

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

    I tried to use this plugin but without success.. i follow all the steps to configure it to the new plugin system.. and nothing, i followed canvas2image tutorial to test and it worked. And i did the some to this other and nothing.

    Or its not that simple for Plugins that are not "Plugman spec" to be adapted to ?


    What i did was fill correctly the XML and the structure ? or the code itself need to be changed to be "Plugman spec"??



    When i tried to deploy i got this message:
    Column: 8
    Char: 
        at error (/Users/builder/Cordova/node_modules/plugman/node_modules/elementtree/node_modules/sax/lib/sax.js:347:8)
        at end (/Users/builder/Cordova/node_modules/plugman/node_modules/elementtree/node_modules/sax/lib/sax.js:354:32)
        at Object.write (/Users/builder/Cordova/node_modules/plugman/node_modules/elementtree/node_modules/sax/lib/sax.js:588:30)
        at Object.SAXParser.close (/Users/builder/Cordova/node_modules/plugman/node_modules/elementtree/node_modules/sax/lib/sax.js:136:38)
        at XMLParser.close (/Users/builder/Cordova/node_modules/plugman/node_modules/elementtree/lib/parsers/sax.js:52:15)
        at ElementTree.parse (/Users/builder/Cordova/node_modules/plugman/node_modules/elementtree/lib/elementtree.js:264:23)
        at Object.exports.XML (/Users/builder/Cordova/node_modules/plugman/node_modules/elementtree/lib/elementtree.js:593:13)
        at Object.module.exports.parseElementtreeSync (/Users/builder/Cordova/node_modules/plugman/src/util/xml-helpers.js:108:38)
        at Object.fetchPlugin [as fetch] (/Users/builder/Cordova/node_modules/plugman/src/fetch.js:26:31)
        at possiblyFetch (/Users/builder/Cordova/node_modules/plugman/src/install.js:29:31)
  2. Yavor Georgiev
    Admin
    Yavor Georgiev avatar
    982 posts

    Posted 04 Jul 2013 Link to this post

    Hi Augusto,

     It looks like plugman has had trouble parsing the plugin.xml. Could you please zip your plugin.xml and attach it here?

    Regards,
    Yavor Georgiev
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Missed our first webinar, watch it here.
    Share feedback and vote for features on our Feedback Portal.
  3. Augusto
    Augusto avatar
    18 posts
    Member since:
    Apr 2013

    Posted 05 Jul 2013 Link to this post

    Right,

    I´ll do it again, and post it here!

    Cause i got angry, and deleted all the plugin code!  lol
  4. Augusto
    Augusto avatar
    18 posts
    Member since:
    Apr 2013

    Posted 05 Jul 2013 Link to this post

    I remade it, and now i got this error:
    [2013-07-05 20-16-38-49] Log (Info,None): Project "Fart Hunter.proj" (default targets):
    Error: Error: Uh oh!
    "/tmp/c80edafa09f847f8b525daadf46c82ab/cordova/plugins/com.augusto.InAppPurchaseManager/www/InAppPurchaseManager.js" not found!


    i attached the files.

    Thks
  5. Answer
    Yavor Georgiev
    Admin
    Yavor Georgiev avatar
    982 posts

    Posted 08 Jul 2013 Link to this post

    Hi Augusto,

     I've prepared a complete package for the InAppPurchaseManager plugin with the proper plugin.xml. Please find it attached to this post.

    Regards,
    Yavor Georgiev
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Missed our first webinar, watch it here.
    Share feedback and vote for features on our Feedback Portal.
  6. Augusto
    Augusto avatar
    18 posts
    Member since:
    Apr 2013

    Posted 08 Jul 2013 Link to this post

    Thank You!!!
    Ill try it!
  7. Augusto
    Augusto avatar
    18 posts
    Member since:
    Apr 2013

    Posted 08 Jul 2013 Link to this post

    Hi,

    I could deploy it to the mobile without no error, but when i try to import the .js i get an error:
    ERROR: Plugin 'InAppPurchaseManager' not found, or is not a CDVPlugin. Check your plugin mapping in config.xml.


    Im using:
    <script type="text/javascript" charset="utf-8" src="InAppPurchaseManager.js"></script>


    but if i print "window.plugins.inAppPurchaseManager.makePurchase" i get: 
    "function (productId, quantity) {"


    so its finding the code and etc... maybe a plugin bug ? i read something about relative paths inside .h and .m , anyone knows anything about it ?



    Thks
  8. Yavor Georgiev
    Admin
    Yavor Georgiev avatar
    982 posts

    Posted 08 Jul 2013 Link to this post

    Hello Augusto,

     I apologize, it appears I have made a mistake in preparing the plugin.xml file. Please locate the 'plugins-plist' and 'plugin' elements in the plugin.xml file and replace any occurrences of 'InAppPurchase' to 'InAppPurchaseManager' inside them.

    Regards,
    Yavor Georgiev
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Missed our first webinar, watch it here.
    Share feedback and vote for features on our Feedback Portal.
  9. Augusto
    Augusto avatar
    18 posts
    Member since:
    Apr 2013

    Posted 08 Jul 2013 Link to this post

    The plugin itself worked, no more errors.... but i couldn´t make it works properly, 

    i used as example the code from this site:
    https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/InAppPurchaseManager

    and one more thing, the other plugin that i use "childBrowser" stopped working...
    The  console.log("face 1" + window.plugins.childBrowser), print "undefined" when using inaappurchaceManager

    I´ve tested now deleting the inaappurchace and childBrowser come back working.... The inapppuirchamange.js is making something wrong with window.plugins


  10. Yavor Georgiev
    Admin
    Yavor Georgiev avatar
    982 posts

    Posted 09 Jul 2013 Link to this post

    Hello Augusto,

     I'm afraid I'm not familiar enough with the plugin to help you resolve this issue. What I can suggest, if possible for you, is to create a Cordova project in Xcode and manually add the ChildBrowser and InAppPurchaseManager plugins and see if the issue can be resolved there. Also, you can try contacting the plugin authors for advice.

    Regards,
    Yavor Georgiev
    Telerik

    Looking for tips & tricks directly from the Icenium team? Check out our blog!
    Missed our first webinar, watch it here.
    Share feedback and vote for features on our Feedback Portal.
  11. Augusto
    Augusto avatar
    18 posts
    Member since:
    Apr 2013

    Posted 10 Jul 2013 Link to this post

    Hi Yavor,

    I don't have an apple :(  , but soon i'll get one.

    No problems, i'll release this version without the inPurchace and the next version i'll add it!

    Thkss!
  12. Md Rafiqul
    Md Rafiqul avatar
    2 posts
    Member since:
    Jan 2013

    Posted 29 Aug 2013 Link to this post

    Hi Yavor,
    I am trying to implement in-app. But always getting an error.
    js in added successfully but problem is in here:
    InAppPurchase.requestProductData("com.telerik.dinnerideas", function(result) {
                            alert('2');
                            console.log(result);
                            alert(result);
                            InAppPurchase.makePurchase(result.id, 1 /* quantity */);
                        },

    It doesn't go into the function. Can you pls help.

    Regards
    Raf
  13. Jeff
    Jeff avatar
    22 posts
    Member since:
    Sep 2013

    Posted 02 Apr 2014 Link to this post

    That Github link is a dead link.  Does anyone know why?
  14. Zdravko
    Admin
    Zdravko avatar
    657 posts

    Posted 07 Apr 2014 Link to this post

    Hi Jeff,

    This repo seems to be deprecated. You can find more info by following this link.
    Thanks.

    Regards,
    Zdravko
    Telerik
     

    Share what you think about AppBuilder and Telerik Platform with us in our feedback portal, so we can become even better!

     
Back to Top