×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Mar 2012
    Posts
    9

    IAP testing "third party"

    I am using nokia SDK 1.1 and I want to check payments through a third party. In the setting of "In-App purchase simulation" I have "Test with Nokia Publish Server". But when my server comes with the product number (817 002), Nokia says that the server does not know the product and shows the status of -15 (unknown product). Status of my product is "passed".
    Here is the code that takes a product:
    // code which call product list
    private static boolean getOviProducts () throws Exception
    {
    int size = InputGameMessage.readInt ();
    OviPayment.setItemsSize (size);
    synchronized (OviPayment.getInstance ())
    {
    try
    {
    // set IAPClientPaymentListener
    IAPClientPaymentManager manager = IAPClientPaymentManager.getIAPClientPaymentManager ();
    IAPClientPaymentManager.setIAPClientPaymentListener (OviPayment.getInstance ());
    OviPayment.getInstance ().clearItems ();
    for (int i = 0; i < size; i++)
    {
    String productID = InputGameMessage.readString ();
    System.out.println ("MessageProcessor productID="+productID);
    int status = manager.getProductData (productID);
    if (status != IAPClientPaymentManager.SUCCESS)
    {
    // do not expect a productDataReceived() callback, handle the failed call
    }
    }

    }
    catch (IAPClientPaymentException e)
    {
    // handle IAPClientPaymentException from getIAPClientPaymentManager()
    }
    // finally
    // {
    // OviPayment.getInstance ().notify ();
    // }
    }

    return true;
    }
    // ===========================================
    // and my code in class OviPayment
    public void productDataReceived (int status, IAPClientProductData pd)
    {
    System.out.println ("productDataReceived() with status "+status);
    if (status == IAPClientPaymentListener.OK) {

    Item item = new Item ();
    item.title = pd.getTitle();
    item.price = pd.getPrice();
    item.descr = pd.getShortDescription();
    item.productID = pd.getProductId ();
    items.addElement (item);
    }
    //
    String [] sItems = new String [items.size ()];
    for (int i = 0; i < items.size (); i++)
    {
    String s = ((Item) items.elementAt (i)).descr + " : " + ((Item) items.elementAt (i)).price;
    System.out.println ("s=" + s);
    sItems [i] = s;
    }
    if (getItemsSize () == 0 || items.size () == getItemsSize ())
    ScreenDrawer.instance.getCurrentScreen ().showOviPaymentForm (sItems);
    }
    How can I make it work payments?
    Last edited by alexmelyon; 2012-04-09 at 12:29.

  2. #2
    Nokia Developer Expert
    Join Date
    Oct 2007
    Posts
    441

    Re: IAP testing "third party"

    Hi

    It looks that you misses network connectivity in the emulator. Before testing please make sure you can use internet browser on emulator. If browser does not work , perhaps you need to disable proxy that is on by default. Check on emulator : "preferences --> networking --> use http proxy server checkbox"

    as for product id 817002 -- i have checked it does exist on nokia store

Similar Threads

  1. IAP testing "third party"
    By alexmelyon in forum Monetization APIs
    Replies: 6
    Last Post: 2012-03-27, 07:06
  2. any idea about using "DUnit" for testing delphi programing !!
    By chatrapati.nokia.santhosh in forum General Development Questions
    Replies: 1
    Last Post: 2009-10-30, 11:54
  3. Problem on "third party created profile"
    By soumyso in forum Symbian
    Replies: 2
    Last Post: 2007-06-18, 04:39

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
×