Retrieve attributes from a PURCHASE_RESPONSE or GET_EXISTING_PURCHASES_RESPONSE event in which the response code indicates that the request was successful.


#include <bps/paymentservice.h>
BPS_API int paymentservice_event_get_number_purchases(bps_event_t *event)


BlackBerry 10.0.0



The event to retrieve the number of purchases from.


libbps (For the qcc command, use the -l bps option to link against this library)


Successful PURCHASE_RESPONSE and GET_EXISTING_PURCHASES_RESPONSE events contain an array of existing purchases. For a PURCHASE_RESPONSE event, the array will contain at most one purchase, so the index passed in should always be 0. For a GET_EXISTING_PURCHASES_RESPONSE event, retrieve the data for each purchase by first calling the paymentservice_event_get_number_purchases() function to determine the number of existing purchases that were retrieved. Then, retrieve the data from each index, where the index ranges from 0 to the number of purchases minus one. Get the number of retrieved purchases from a Payment Service event

The paymentservice_event_get_number_purchases() function gets the number of purchases that were retrieved from the specified Payment Service event.


The number of retrieved purchases.

Last modified: 2014-05-14

Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus