12-26-2012 11:05 AM
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.
12-27-2012 04:30 AM
I found this topic that speak about this issue: http://supportforums.blackberry.com/t5/Payment-Ser
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(fal
{
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.
12-27-2012 05:19 AM
12-28-2012 08:24 AM
NOOOOOO. Does not work. I am lost, my in-app does not work.
12-28-2012 08:34 AM