Payment Service weird problem

Hi all

I have an app freemium allowing users to unlock features Premium/Pro . I tried coding based on the tutorial on the docs of stunts on the payment Service.

The problem is, I get the error code long of the answer-> errorCode();

the code was 141004048

Here is my code:

void PurchasePage::purchase()
{
    purchaseButton->setEnabled(false);

    paymentManager = new PaymentManager(this);

    // Get the window group ID and pass it to the PaymentManager instance.    const QString windowGroupId =Application::instance()->mainWindow()->groupId();    paymentManager->setWindowGroupId(windowGroupId);    //Request a purchase using the ID and SKU of the digital good.
    const PurchaseReply *purchaseReply = paymentManager->requestPurchase("244779xx", "ProVersion");

    // Connect the finished() signal to a slot to handle the purchase.
    QObject::connect(purchaseReply, SIGNAL(finished()), SLOT(handlePurchase()));
}

void PurchasePage::handlePurchase()
{
    PurchaseReply *reply = qobject_cast(sender());
    Q_ASSERT(reply);

    // Check to see if the request finished.
    if (reply->isFinished())
    {
        //if there were errors.
        if (reply->isError())
        {
            showDialog("Purchase Error",QString::number(reply->errorCode())+"\n"+reply->errorText());
        }
        else//if there were no errors.
        {
            QString successString="Pro version is now activated.";
            showDialog("Purchase Succeed",successString);

            //set statusLabel text to Activated
            statusLabel->setText("Activated");

            purchaseButton->setEnabled(false);
        }
    }
    else
    {
        if (reply->isError())
        {
            showDialog("Purchase Error",QString::number(reply->errorCode())+"\n"+reply->errorText());
        }
    }
    reply->deleteLater();
}

How the app has been installed on the device (side loading, downloaded via the dev mode BlackBerry World etc.)?

Never error code change? Or is it always 141004048?

Also, looking at your code, it seems the app instantiates a new PaymentManager each time a purchase is made, you must have an instance of this, the call to purchase() should deal only with the logic of purchase requisition.

Tags: BlackBerry Developers

Similar Questions

  • Professional in Flash CS6 payment services?

    I'm testing the PaymentServiceDemo.with Flash Professional CS6, as provided in the documentation for BlackBerry. The first error I get is the 'com.test.paymentapi' after the package in the .as file throws an error message. Removing it solves this problem. I added "framework.swc", 'rpc.swc', 'rpc_rc.swc', 'QNXDevice.ane', 'QNXNetwork.ane', 'QNXSensors.ane' and 'QNXSkins.ane' the path of the library. When I run the Flash project I get an error that the "SuccessEvent" is not recognized. I then added the "Blackberry.swc" in the folder/libs/blackberry to remove this error. Then, I have a long list of 'Label' unrecognized, etc. from the library for qnx. I add 'qnxui.swc' to the library, and you get the error that the Virtual Machine Java is short-term memory. The project opens with a blank white window.

    All those put in place with Flash CS6 payment Service? Help, please.

    And why all the documentation for Flash Builder? It's like the Flash Professional CS6 does not yet exist here.

    OK, you win.

    I move to Flash Builder. Hello World worked with the library of qnx and deploying WiFi won me over.

    In addition, Flash Builder opens the possibility of using the API Flash Professional ever could.

  • payment service application freeze / no responsa

    I had a problem that payment service application freezes...

    This similar problem

    http://supportforums.BlackBerry.com/T5/native-development/is-it-possible-to-use-PaymentService-with-...

    but this thread told it you have a problem with the screen...

    and I have test my screen snap of...

    int
    setup_screen()
    {
        screen_buffer_t buff;
        int buffer_size[2];
        int usage = SCREEN_USAGE_NATIVE;
        int attribs[1] = {SCREEN_BLIT_END};
        int dirty_rects[4] = {0, 0, buffer_size[0], buffer_size[1]};
        if (screen_create_context(&screen_ctx, SCREEN_APPLICATION_CONTEXT) != 0) {
            return EXIT_FAILURE;
        }
    
        if (screen_create_window(&screen_win, screen_ctx) != 0) {
            screen_destroy_context(screen_ctx);
            return EXIT_FAILURE;
        }
    
        if (screen_create_window_group(screen_win, get_window_group_id()) != 0) goto fail;
    
        if (screen_set_window_property_iv(screen_win, SCREEN_PROPERTY_USAGE, &usage) != 0) goto fail;
    
        if (screen_create_window_buffers(screen_win, 1) != 0) goto fail;
    
        if (screen_get_window_property_pv(screen_win, SCREEN_PROPERTY_RENDER_BUFFERS, (void**)&buff) != 0) goto fail;
    
        if (screen_get_buffer_property_iv(buff, SCREEN_PROPERTY_BUFFER_SIZE, buffer_size) != 0) goto fail;
    
        if (screen_fill(screen_ctx, buff, attribs) != 0) goto fail;
    
        if (screen_post_window(screen_win, buff, 1, (const int*)dirty_rects, 0) != 0) goto fail;
    
        return EXIT_SUCCESS;
    
    fail:
        screen_destroy_window(screen_win);
        screen_destroy_context(screen_ctx);
        return EXIT_FAILURE;
    }
    

    and it's called when a button clicked ads...

    My function... to paymentservice_purchase_request does it freeze / no responsa... I can't go to the next step...

    void  MainMenuScene::Ads_Click()
    {
        bps_initialize();
        if (setup_screen() != EXIT_SUCCESS) {
           fprintf(stderr, "Unable to initialize screen.");
           exit(0);
        }
        int exit_application = 0;
        navigator_request_events(0);
        paymentservice_request_events(0);
        paymentservice_set_connection_mode(true);
    
        const char* digital_good_id = "25180877";
        const char* digital_good_name = "BuyTK";
        const char* digital_good_sku = "AppTK-1";
        const char* metadata = "something";
        const char* purchase_app_icon = "something";
        const char* purchase_app_name = "TKAppPurchase";
    
        unsigned request_id = 0;
        if (paymentservice_purchase_request(digital_good_id, digital_good_sku, digital_good_name,metadata, purchase_app_name, purchase_app_icon, get_window_group_id(), &request_id) != BPS_SUCCESS) {
             fprintf(stderr, "Error: purchase request failed.\n");
        }
        fprintf(stderr,"pass payment service request");
        while (!exit_application) {
                bps_event_t *event = NULL;
                bps_get_event(&event, -1);
    
                if (event) {
                    if (bps_event_get_domain(event) == paymentservice_get_domain()) {
                              if (SUCCESS_RESPONSE == paymentservice_event_get_response_code(event)) {
                                  if (PURCHASE_RESPONSE == bps_event_get_code(event)) {
                                      onPurchaseSuccess(event);
                                      unsigned request_id = 0;
                                      if (paymentservice_get_existing_purchases_request(false, get_window_group_id(), &request_id) != BPS_SUCCESS) {
                                         fprintf(stderr, "Error: get existing purchases failed.\n");
                                      }
                                  } else
                                      onGetExistingPurchasesSuccess(event);
                              } else {
                                  failureCommon(event);
                              }
                          }
                    if (bps_event_get_domain(event) == navigator_get_domain()) {
                            if (NAVIGATOR_EXIT == bps_event_get_code(event)) {
                                exit_application = 1;
                            } else if (NAVIGATOR_SWIPE_DOWN == bps_event_get_code(event)) {
                                if (paymentservice_purchase_request(digital_good_id, digital_good_sku, digital_good_name,
                                        metadata, purchase_app_name, purchase_app_icon, get_window_group_id(), &request_id) != BPS_SUCCESS) {
                                   fprintf(stderr, "Error: purchase request failed.\n");
                                }
                            }
                       }
                }
        }
    
        bps_shutdown();
        screen_destroy_window(screen_win);
        screen_destroy_context(screen_ctx);
    }
    

    Thank God,
    Finally, I resolve this problemm...
    It's windows_group_id...

    I use cocos2dx...
    It is documented here
    http://www.cocos2d-x.org/issues/1015

    I hope it's useful for others who have the same problem...
    Nice to share...

    MaMom

  • Bottom Line: I HATE Firefox 4. It gives me all sorts of weird problems not to mention the frequent freezing MAC OS x 10.6.7. I want to go back to the last #3. It has been impeccable. I tried to leave it in the comments, but he would not submit! BUT

    Bottom Line: I HATE Firefox 4. It gives me all sorts of weird problems not to mention the frequent freezing MAC OS x 10.6.7. I want to go back to the last #3. It has been impeccable. And I tried to present this as your comments but when I hit the button submit, again, it would take. Grrrrrrrrr

    http://support.Mozilla.com/en-us/KB/installing+a+previous+version+of+Firefox

    http://www.Mozilla.com/en-us/Firefox/all-older.html

  • Weird problem with the google search on Safari 9.0.2

    Hi all

    I had a weird problem with Google on Safari recently. After that the search for something from the Google home page and search page is loaded, I can't be able to change or enter anything in the more the google search bar. I have to reload the page every time google to search something else. Google search worked fine on Firefox though.

    I use the latest version of Safari (9.0.2) and I tried clears all history data, and Web site, but nothing has worked so far. My Mac is running on OS X Yosemite so what counts.

    Can someone understand what is the problem?

    Thank you.

    If you have problems to open Web pages, take a look at these techniques proposed by Apple of troubleshooting.

    https://support.Apple.com/en-us/HT204098

    Go to the Safari menu (at the top right of your screen next to the Apple icon), choose 'Quit Safari'

    Press the "Shift" key and while holding this button on your unique keyboard, click the icon of Safari on your Dock.

    Open Safari - Preferences - Privacy - data to remove any Web site.

    Open the menu to go with the Option (Alt) key - library - key locate Safari folder and place it on your desktop. Restart your Mac, open Safari and delete the file from your desktop.

    In addition, a restart may help.

  • Weird problem with incorrect color printing

    Hello

    IM facing a weird problem in software hp deskjet 1050.my printer printer all-in-one j410 has 5 modes i.e. normal quality printing, fast draft, simple better paper, Photo paper mode quality best quality & specialty paper better quality.

    When I put take-away color printed a photo in "quality mode best photo paper or specialty paper best quality mode ' on any type of paper, the output is pinkish or bluish.

    Please note im using black and non-rempli, true hp original cartridge 802 tricolor.

    to make things clear, im attaching a scanned photo of my printed paper that have the same images with original print quality modes.

    as you can see in the scanned picture, that we have the fast draft quality to the best quality of photo paper, the blueishness rose.

    Pls help me :-(

    -----------------------------------------

    My Info

    OS: windows 8 pro

    Printers: Hp deskjet 1050 j410

    Hello

    This article should cover the problem you are experiencing. Give the steps described a shot and tell us if it helps.

    http://support.HP.com/us-en/document/c04190374

    Good luck!

  • Windows Services has problems and get the error code 80246008 when I try to update windows

    I have 64 bit Vista Home Premium.  I have disabled UAC for short time (just to stop and restart).  Immediately, Windows Services has problems and my services files seem to suffer (fixit would not fixit).  He could have a latent virus that only suspended in no time I had disabled UAC?  I run the computer as an administrator, which I now realize is a problem.  I have a firewall and protection ESET and had all updates until two days ago, if that's any help.

    Also note: BITS of problems that seem to be linked to the system events to COM + service problem - she won't start - error 230: the pipe state is invalid.

    1. http://support.microsoft.com/kb/956706

    Error message when you search for available updates on the Windows Update Web site or on the Microsoft Update Web site: "0 x 80246008.

    2. http://support.microsoft.com/kb/910337
    If the fixit does not work in the article, read the article to other troubleshooting suggestions.

    PS - repair tool: http://www.microsoft.com/en-au/download/details.aspx?id=7997 (64-bit)

  • With all the services activation problems. Error 0xC004E003.

    Original title: activation with the service package problems

    OK here is my problem I have Windows Vista Home Basic, was if she had for a long time now on my computer then windows out of the Blues jumped to the top with it needs to install a service package, now, I got XP on another computer, I know that there are a set of services on your computer, so I went to install the package of Service 1.  The package installed properly (took all night) and when I connect it tells me that there is an error.  description 0xC004E003 The Software Licensing Service reported that license evaluation failed.  That means that I'm going to the Windows update it verified whenever I went there, I downloaded all some updates on the Microsoft site and was the one to get these downloads is to get your computer checked and mine happened all the time, but now this service package that makes me not being able to get on my computer , I got this computer as 3 years I think that I bought at wal-mart somewhere don't remember, I got the installation disc, but I don't want to restore my computer there's stuff on my computer I can NEVER get back if I do it and I can not help me please my email is Email removed for privacy and I can't put my product key the internet, you know what I mean everyone there LOL :)  The product key is on the bottom of my laptop.

    Uninstall Service Pack 1 and install Service Pack 2.

    After you uninstall Service Pack 1 choose a Restore Point dated before when you installed SP1 and use that restore point.

    Then install SP2 by uploading it on a folder: http://technet.microsoft.com/en-us/windows/dd262148.aspx

    And then double-click the .exe file to install SP2.

    JS
    http://www.PAGESTART.com

    Never be afraid to ask. This forum has some of the best people in the world to help.

  • x 360 u100ng envy 15: weird problems with adapter Atheros QCA Qualcomm 9565 being unstable when it's on battery

    Hello

    I have a weird problem.

    When the notebook is on battery, the (Qualcomm Atheros QCA 9565) wireless card is unstable and very little reliable, dropping signals continuously, more importantly, loading speed (be em, Web sites, or a set of the router to the top of page!) is considerably slowed down...

    Remarkably, I can detect this by loading the page of my router configuration, when the laptop is on current alternative, I can refresh the page of the extremely fast router, but when the laptop is on battery, blocking of page of the router, so all the other websites, I try to load, the router page has nothing to do with an internet connection It reflects the quality of connection directly between the wireless card and the router and the router is in excellent condition, as evidenced by all the other devices on it.

    I also notice that when the laptop is on battery, the screen fades and informed on a regular basis, I do not think that my laptop is equipped with auto brightness adjustment features...

    So far, it seems that the problem is the battery... If the wireless adapter can run reliably with a reliable source of energy (i.e. the AC power), the wireless card is fine, right? It seems to me the battery is faulty and cannot provide enough power for the wireless card and other devices, from the ravages of this pain in the ass... computer I'm right?

    Thank you very much for your contribution in advance!

    Cong

    For the wireless adapter, check your settings under Advanced settings, Power Options. The map is set up for maximum performance on battery & power?

  • Compilation of the error using payment service.

    I took this documentation, but they do not compile in the PRC.  Someone else you have cascading payment service?

    Hello

    #include will fix this error.

  • How to work on the Api payment Service in blackberry

    Hello

    I was creating an application to OS 5.0 with name AppPack. I had added the paymentapi jar file to it. The project to build successfully and as I open the app in the Simulator displays a dialog box with the following error

    «Error starting AppPack: error in the Module ' paymentapi;» not found ".

    I had downloaded this Internet payment service. Please help me to solve this error.

    Thanking you in advance!

    -Sam

    If you are using eclipse:

    1. in the course of your project, good clip--> go to properties

    2. build path Java

    3. Add the libraries

    4. add some external jars (add all the jars you need)

    5. go to the tab "order and export.

    6 and select all the pots you add.

    PS: Sorry for my English.

  • weird problem 'ControlledAccessException' to 9800

    Hello

    I try to update my application to 6.0, but I have a weird problem of Pentecost of certain events.

    For example, I have a button what do some in the SQLITE database from the application, in the Simulator works fine, but when to test the same event in the 9800 device I get the strange "ControlledAccessException' its what I have test the same process in strand 2 4.6.1 and 5.0 devices and do not get this error...

    This is the code for the listener the button...

    FieldChangeListener setParHoyos = new FieldChangeListener() {
            public void fieldChanged(Field field, int context) {
    
                try
                {
                    dbHandler _dbHandler = new dbHandler();
                    String msg;
                    msg = _dbHandler.setParHoyos(idcampo , Integer.parseInt((choiceFieldh1.toString())),Integer.parseInt((choiceFieldh2.toString())),Integer.parseInt((choiceFieldh3.toString())),Integer.parseInt((choiceFieldh4.toString())),
                            Integer.parseInt((choiceFieldh5.toString())),Integer.parseInt((choiceFieldh6.toString())),Integer.parseInt((choiceFieldh7.toString())),Integer.parseInt((choiceFieldh8.toString())),Integer.parseInt((choiceFieldh9.toString())),
                            Integer.parseInt((choiceFieldh10.toString())),Integer.parseInt((choiceFieldh11.toString())),Integer.parseInt((choiceFieldh12.toString())),Integer.parseInt((choiceFieldh13.toString())),Integer.parseInt((choiceFieldh14.toString())),
                            Integer.parseInt((choiceFieldh15.toString())),Integer.parseInt((choiceFieldh16.toString())),Integer.parseInt((choiceFieldh17.toString())),Integer.parseInt((choiceFieldh18.toString())));
                    Dialog.alert(msg);
                }
                catch ( Exception e )
                {
                    System.out.println( e.toString());
    
                }
            }
        };
    

    Ty! all help me

    OK solved the problem are asociated to the GET the value

    H1 = Integer.parseInt ((String) choiceFieldh1.getChoice (choiceFieldh1.getSelectedIndex ()));

  • Payment Service Local Test

    Hello

    I use of api payment Service 1.5 and cannot test local.

    "PaymentEngine.setConnectionMode (PaymentEngine.CONNECTION_MODE_LOCAL)" is found in api 1.0 but not availabe in 1.5 api. any suggestions would be very helpful.

    http://supportforums.BlackBerry.com/T5/Java-development/payment-service-SDK-1-5-testing/m-p/1336045#...

  • Weird problem - all items in menu grey, all toolbar buttons is unresponsive, but has not crashed.

    Hello

    I have a weird problem with my installation of Illustrator CC 2015 - when I run the application, none of the menu items are active and neither are the buttons on the toolbar. I can't open any files, or exit the application, I have to force quit. The application itself is not crashing in the traditional sense of the term, it shows as sensitive in the activity monitor and there is no beach balling, but I can't do anything with it. Another thing to note is that I don't get to see the splash screen or any screen of welcome after launch.

    When I install a second user on the computer (same login cc) account and run it from there, it works fine, the boot screen and everything.

    This is taking everything into account, I have so far:

    1 uninstalled every possible piece of Adobe software.

    2A ran the cleaning tool and trashed all preference files.

    3 fix the permissions and cleaned all caches.

    4 uninstalled Font Explorer and restored the default system fonts.

    5 reinstalled creative cloud and Illustrator.

    But without success.

    Any ideas with this?

    Thanks in advance!

    Hello

    I solved the problem - the application is lost in a corrupt workspace. I trashed com.apple.dock.plist in ~/Library/Preferences and now everything works.

    Thank you

  • Weird problem with enums

    Hi all

    I have a weird problem with the implementation of controls and access their values. It seems that EI is pulling the wrong values for me.


    As follows:

    I have

    enum { }

    SKELETON_INPUT = 0,

    SKELETON_GAIN,

    SKELETON_COLOR,

    SKELETON_DELAY,

    SKELETON_POSITION_X,

    SKELETON_POSITION_Y,

    SKELETON_NUM_PARAMS

    };

    and

    enum { }

    GAIN_DISK_ID = 1,

    COLOR_DISK_ID,

    DELAY_DISK_ID,

    POSITION_X_DISK_ID,

    POSITION_Y_DISK_ID,

    };

    And I create my fine controls like sliders and they appear

    However, in my method of rendering, the values that AE comes out is wrong.

    Suites. ANSICallbacksSuite1 ()->sprintf(out_data->return_msg, "X = %1.2f Y =%1.2f ',)

    params [SKELETON_POSITION_X]->u. fs_d. value,

    params [SKELETON_POSITION_Y]->u. fs_d. value );


    Instead of getting the values of Position X and Y in the effect control, I'm SKELETON_GAIN for X and NAN values for Y.


    Is that all that I forgot to put? AE not to complaint of the any mismatch of parameter.

    DOH

    This is one of those who come to you once you have posted.

    So the order of creation is too important.

    Initially, I wanted to put my POSITION_X controls and Y in the first place and thought he would keep the enum attributed honest.

    But apparently I need my order of creation is the same as the enum values.

Maybe you are looking for

  • List of apps for 4th gen ATV?

    I'm in the market for a new Apple TV and I am trying to decide if I want to spend extra money for the 4th Gen find out what applications there are in addition to what is on the 3rd gen (with which I am very familiar) could help me make the decision,

  • Improvement of the total system

    I use my t61 (7659-12u) for a few years and loving every minute. I just installed windows 7 64 bit and its nice been smooth. Looking around there are a lot of sweet deals for new machines, but I can't get rid of my lenovo anytime soon.  I had planned

  • Do you want to receive article in ArrayDataModel

    I need help. I want to get the value of the element of my ArrayDataModel, I have try many way like this: Console.log ("category:" + categoryADM.value(0,["category_name"]).toString ())Console.log ("category:" + categoryADM.data([0]).toString ())Consol

  • Installation of Adobe - CS6

    Hi peopleI try to install my CS6 on Win10.  The installation program stops running. say that he was unable to initialize.  It has a link to Adobe Support Advisor, but this is no longer supported!  Any suggestions to get operational installation witho

  • I want to install Ps creative cloud. Adobe asked me to begin to "CreativeCloudSet - Up.exe". Where is this file?

    I want to install Ps creative cloud. Adobe asked me to begin to "CreativeCloudSet - Up.exe". Where is this file?