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. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Payment Service

Reply
Super Contributor
JeffLemon
Posts: 391
Registered: ‎01-13-2011
My Carrier: NA
Accepted Solution

Request Price Loop?

I'm looping through my skus and I am then requesting each ones price. The problem is, only the last one in the loop comes back with a price.

 

Is there something wrong with my code? I've checked that the loop is running through correctly, below is the code the loop calls each time:

 

PriceReply *reply = paymentManager->requestPrice(id, sku);
bool res = QObject::connect(reply, SIGNAL(finished()),SLOT(priceResponse()));
Q_ASSERT(res);
Q_UNUSED(res);

 Thanks

--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Please use plain text.
BlackBerry Development Advisor
gbeukeboom
Posts: 1,847
Registered: ‎10-16-2009
My Carrier: Bell

Re: Request Price Loop?

Are you making the calls asynchronously? The Payment Service only supports synchronous calls currently, so you would need to wait for the response from one request before making the next.

Garett Beukeboom
BlackBerry Development Advisor
Developer Zone
@garettbeukeboom

--
Think of a great new feature? Find a bug?
Log and track them using the Developer Issue Tracker
Please use plain text.
Super Contributor
JeffLemon
Posts: 391
Registered: ‎01-13-2011
My Carrier: NA

Re: Request Price Loop?

That's probably it, thanks
--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone
Please use plain text.