Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Native Development


Thank you for visiting the BlackBerry Support Community Forums.

BlackBerry will be closing the BlackBerry Support Community Forums Device Forums on April 1st (Developers, see below)

BlackBerry remains committed to providing excellent customer support to our customers. We are delighted to direct you to the CrackBerry Forums, a well-established and thorough support channel, for continued BlackBerry support. Please visit http://forums.crackberry.com or http://crackberry.com/ask. You can also continue to visit BlackBerry Support or the BlackBerry Knowledge Base for official support options available for your BlackBerry Smartphone.

"When we launched CrackBerry.com 10 years ago, we set out to make it a fun and useful destination where BlackBerry Smartphone owners could share their excitement and learn to unleash the full potential of their BlackBerry. A decade later, the CrackBerry community is as active and passionate as ever and I know our knowledgeable members and volunteers will be excited to welcome and assist more BlackBerry owners with their questions."

- Kevin Michaluk, Founder, CrackBerry.com

Developers, for more information about the BlackBerry Developer Community please review Join the Conversation on the BlackBerry Developer Community Forums found on Inside BlackBerry.


Reply
Developer
Posts: 78
Registered: ‎12-12-2012
My Device: playbook
My Carrier: free

payment service system busy

Hello,

 

I have implemented payment service for my game and test it with the local mode. All seems ok but when I test through the network I received always the error code 2. The system is busy means that a purchase is pending.

 

How to sovle this issue? My items are consumable.

Developer
Posts: 78
Registered: ‎12-12-2012
My Device: playbook
My Carrier: free

Re: payment service system busy

I found this topic that speak about this issue: http://supportforums.blackberry.com/t5/Payment-Service/paymentservice-functions-failing/m-p/1972083/...

 

He solve by avoiding to call payment_get_price very soon of a get extisting purchase call. But I do not call nothing else than the paymentservice_purchase_request

 

What I do is:

 

at Init time

 paymentservice_request_events(0);

 

in game loop when user want to buy an item

if (paymentservice_purchase_request(_params, _params,
                    NULL, NULL, NULL, NULL,
                    get_window_group_id(), &request_id) != BPS_SUCCESS)
        {
            STD_Printf("Error: purchase request failed.\n");
        }

 

Where _params is my item id

 

I handle the purchase event in the event test loop and do this

 

static void handlePurchaseEvent(bps_event_t *event)
{
  cPersistantDatasManager* pPDM = cPersistantDatasManager::GetInstancePtr();

  if (SUCCESS_RESPONSE == paymentservice_event_get_response_code(event))
  {
    if (PURCHASE_RESPONSE == bps_event_get_code(event))
    {
        // Handle a successful purchase here
        const char* digital_good = paymentservice_event_get_digital_good_id(event, 0);
        const char* digital_sku = paymentservice_event_get_digital_good_sku(event, 0);
                // ...
        pPDM->GetUserDatasManager()->Purchase(digital_sku);

        unsigned request_id = 0;
        if (paymentservice_get_existing_purchases_request(false, get_window_group_id(), &request_id) != BPS_SUCCESS)
        {
            STD_Printf("Error: get existing purchases failed.\n");
        }
    }
    else
    {    // Handle a successful query for past purchases here

         onGetExistingPurchasesSuccess(event);

    }
  }
  else
  {

      failureCommon(event);

  }

}

 

 

The paymentservice_event_get_response_code(event) return error code.

 

Error code is 2  : Payment System error. Request ID: 2  Error ID: 2  Text: Payment system is busy, please complete your other transaction and try again.

 

I try to call first the get existing purchase but I have the same response code.

 

What to do?

 

I added a release to my vendor portal, I try side-loaded with the IDE, I try loading from the sandbox. Nothing solve my issue.

Developer
Posts: 78
Registered: ‎12-12-2012
My Device: playbook
My Carrier: free

Re: payment service system busy

I have found I think. paymentservice_get_existing_purchase set to true to allow refresh from server side. I will upload a new release to test live from app world
Highlighted
Developer
Posts: 78
Registered: ‎12-12-2012
My Device: playbook
My Carrier: free

Re: payment service system busy

NOOOOOO. Does not work. I am lost, my in-app does not work.

Developer
Posts: 78
Registered: ‎12-12-2012
My Device: playbook
My Carrier: free

Re: payment service system busy

Yes, I found. You must avoid 2 very soon call of purchase. Then I will add a flag to avoid it.