title: Iphone Phonegap in-app purchase not working
body: <p>I have a phonegap project using which i have submitted my application at iPhone app store.</p>
  
  <p>I m using cordova-2.2.0.js.  Now I want to implement in-app purchase plugin to provide in-app purchase in my application.</p>
  
  <p>I am trying to do it by adding in-app plugin from the link below:</p>
  
  <pre><code>https://github.com/phonegap/phonegap-plugins/tree/master/iPhone/InAppPurchaseManager
  </code></pre>
  
  <p>I then added InAppPurchase plugin to cordova.plist file.</p>
  
  <p>When I write below mentioned code </p>
  
  <p>(a) in my javascript, the control goes to InAppPurchaseManager.js plugin and code </p>
  
  <p>(b) is executed.</p>
  
  <p>(a) </p>
  
  <pre><code>   window.plugins.inAppPurchaseManager.requestProductData(
           "org.xxx.abcd.pqr", 
           function(productId, title, description, price) {
               alert("data retrieved");
               //window.plugins.inAppPurchaseManager.makePurchase(productId, 1);
           },
           function(id) {
               alert("Invalid product id: " + id);
           }
       );   
  </code></pre>
  
  <p>(b)</p>
  
  <pre><code>    InAppPurchaseManager.prototype.requestProductData = function(productId, successCallback, failCallback) {
  
      var key = 'f' + this.callbackIdx++;
      window.plugins.inAppPurchaseManager.callbackMap[key] = {
          success: function(productId, title, description, price ) {
          if (productId == '__DONE') {
              delete window.plugins.inAppPurchaseManager.callbackMap[key]
              return;
          }
          successCallback(productId, title, description, price);
       },
           fail: failCallback
      }
          alert("product id: " + productId + "key: " + key);
          var callback = 'window.plugins.inAppPurchaseManager.callbackMap.' + key;
          cordova.exec('InAppPurchaseManager.requestProductData', productId, callback + '  .success', callback + '.fail');    
  
    }
  </code></pre>
  
  <p>In code (b), everything works fine, till the line below:</p>
  
  <pre><code>cordova.exec('InAppPurchaseManager.requestProductData', productId, callback + '.success', callback + '.fail');
  </code></pre>
  
  <p>The question is: Why the app get stop at the above mentioned line. Also the alert box is displayed in code (b) which belongs to <code>InAppPurchaseManager.js</code>.</p>
  
  <p>I have added an in-app item at itunesconnect and it is in "ready to submit" mode.  </p>