×

Discussion Board

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

    IAP testing "third party"

    Hello, I'm making payments IAP in my application, and use my server as a "third party". The situation is this: is the ability to work with the shopping. The product is present on the Nokia server. Need to test your store. If I run the test with nokia SDK, then the first part of the algorithm runs.

    Step four well-tested and SDK returns information about the products. I do not know how to check the step of the algorithm after a 10 while working with our server, because our server tries to connect to the server, Nokia (https://payment.ovi.com/iap/1.0/purc...ify?method=GET). Accordingly, the Nokia server does not know anything about my product.

    I have tried to connect the server to your computer with the installed SDK, but no connection is established. An error "connection reset" and "connection refused". What is the address of the server to use for testing Nokia? Is it feasible means of SDK? Do I need to know what else? How to do testing with the "third party"?

  2. #2
    Registered User
    Join Date
    Mar 2012
    Posts
    9

    Re: IAP testing "third party"

    Java Developer's Library 3.14 > In-app purchase > Introduction > Functional description > Purchase and restoration with no built-in DRM protection
    Last edited by alexmelyon; 2012-03-23 at 05:08.

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

    Re: IAP testing "third party"

    Hi

    Your IAP use case is not quite clear to me. pointed url in your post is for Nokia Purchase ticket verification (https://payment.ovi.com/iap/1.0/purc...ify?method=GET). To check a ticket Nokia back-end does not have to know about your product. The ticket verification is just checking for the ticked authenticity nothing else. Usually this checking is made from your product server side. but nothing prevent you using it from the app. in IAP non-DRM model implementation you are free to implement your own purchase handling logic.

    Please detail what is the problem with your application.

  4. #4
    Registered User
    Join Date
    Mar 2012
    Posts
    9

    Re: IAP testing "third party"

    My problem is that the server is a 10 step algorithm combined with the address "https://payment.ovi.com/iap/1.0/ purchases /verify?method=GET" (Of course without the spaces). I do not know how to test 10, 11 and 12 steps of the algorithm "Purchase and restoration with no built-in DRM protection". In the "nokia SDK \ In-app purchase simulation" there is an item "test with nokia publish server", but I do not know how to use it. I have a problem with the approval of the application: I can not upload my jar-file with the In-app mark, but I've already written in support. Can I test your application only with sdk? and how?
    Last edited by alexmelyon; 2012-03-26 at 06:20.

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

    Re: IAP testing "third party"

    Hi

    First , make sure you have proper environment -- you need Series 40 with Java Runtime 1.1.0
    then in your environment go to "Nokia\Devices\Nokia_SDK_1_1_Java\doc\docbrowser\eclipse" and from document browser you can read how to use emulator for IAP in the document section "Nokia SDK 1.1 for Java ". You can use IAP simulation locally without actual networking operations --- so you can test you application with only SDK.

    As for testing third party server side --- how do you test step 2 from the mentioned diagram? it implies you have your own back-end server implementation. So all steps related to the back-end functionality should be clear to you. just for reference please check third party server implementation from IAP for Qt SDK --- it will suite for java as well : After the SDK un-packaging you can find the server code implementation by path \iap_qt_sdk_0.3.1_24.01.12\Examples\InApplicationPurchase\BuyAndDownloadExample\code\resourceserver Particularly IAP Purchase Ticket Verification API is done in this file \iap_qt_sdk_0.3.1_24.01.12\Examples\InApplicationPurchase\BuyAndDownloadExample\code\resourceserver\private\ptvManager.php

    Of course this sample is just demo draft that is intended to give you idea in your application design -- you can freely use it or modify

    Basically you can test third party server from your mobile client part this is the most straightforward approach.

    Please note IAP for Qt sdk includes tool for IAP Purchase Ticket Verification API and allows you to request mentioned url https://payment.ovi.com/iap/1.0/purc...ify?method=GET directly just to see Nokia Store back-end raw data response.

    Please ask me more questions if you have one

  6. #6
    Registered User
    Join Date
    Mar 2012
    Posts
    9

    Re: IAP testing "third party"

    Yes, I am using nokia SDK 1.1 and it is quite normal testing my application. The second step of the algorithm accesses my application for my existing server. The server then returns the productID in the application, then the application refers to the "In-app purchase simulation" in the nokia SDK and get the properties of the product. But in the tenth step, the server must refer to the "In-app purchase simulation" directly. This is my problem. I do not know how to get the server to apply directly to the my Nokia SDK.
    I will be glad if you help me with this question or tell how to test with Nokia publish server.
    Last edited by alexmelyon; 2012-03-27 at 07:50.

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

    Re: IAP testing "third party"

    Hi

    in php server code implementation i use curl library to request Nokia Store for purchase ticket verification.

    Note: this is synchronous call.

    Code:
        public function makePTV($ticket, $var_prodid, $db){
            $ticketbody = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?>'.
                    '<PurchaseVerificationRequest xmlns="http://payment.ovi.com/iap"><Binary>'.
                        $ticket.'</Binary></PurchaseVerificationRequest>';
            
            
            $fields = "content=".rawurlencode($ticketbody);
    
            //open connection
            $ch = curl_init(self::oviURL);
    
            //set the url, number of POST vars, POST data
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, TRUE);
            curl_setopt($ch, CURLOPT_POST, TRUE);
            curl_setopt($ch, CURLOPT_POSTFIELDS, $fields);
    
            // ENABLEME: for debugging purposes if you don't want 
            // to have SSL root certificate 
            // curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
    
            //execute post
            $data = curl_exec($ch);
    
            $curl_errno = curl_errno($ch);
            $curl_error = curl_error($ch);
            curl_close($ch);
            
            if ($curl_errno > 0) {
                echo "cURL Error ($curl_errno): $curl_error\n";
            } else if(ereg(self::criteria, $data)){
                echo self::getProductUrl($var_prodid, $db);
            }else{
                // there is broken ticket detected
                echo "HAVE2BUY";
            }
        }
    this is from IAP for Qt SDK example found by path
    \iap_qt_sdk_0.3.1_24.01.12\Examples\InApplicationPurchase\BuyAndDownloadExample\code\resourceserver\private\ptvManager.php
    try to establish that server example implementation on your http host and play with that.

    as for testing --- i see the following test case
    1. mobile client application asks your third party server for valid ticket verification.
    2. server passes your request to Nokia Store and gets response the ticket is valid
    3. third party server passes the checking result to mobile client application
    4. mobile client application verifies the ticket is valid

    the same test case can be used to check invalid ticket. The main point is mobile application has to operate with a known ticket. That ticket you can easily obtain with tool that you can find in IAP SDK for Qt by path
    \iap_qt_sdk_0.3.1_24.01.12\Examples\InApplicationPurchase\BuyAndDownloadExample\tools
    and hardcode in mobile client application just for testing purposes

Similar Threads

  1. Problem on "third party created profile"
    By soumyso in forum Symbian
    Replies: 2
    Last Post: 2007-06-18, 04:39
  2. Nokia Testing Suite "Access Violation"
    By francopaggio in forum PC Suite API and PC Connectivity SDK
    Replies: 1
    Last Post: 2003-06-13, 12:32
  3. "response unknown" by testing download of own midlet
    By TomXX in forum Mobile Java General
    Replies: 3
    Last Post: 2003-04-17, 17:01

Posting Permissions

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