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

Payment Service

Reply
Highlighted
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
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
Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
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
@garettBeuk
--
Goodbye everybody!
Super Contributor
Posts: 440
Registered: ‎01-13-2011
My Device: Playbook
My Carrier: NA

Re: Request Price Loop?

That's probably it, thanks
--------------------------------------------------------------------------------------------------
BlackBerry Apps: Instruments | ARTPAD | Piano | Drums | Xylophone