paymentservice_purchase_request_with_arguments()

Initiate the purchase of a digital good.

Synopsis:

#include <bps/paymentservice.h>
 
BPS_API int paymentservice_purchase_request_with_arguments(purchase_arguments_t *purchase_arguments)

Since:

BlackBerry 10.0.0

Arguments:

purchase_arguments

The set of arguments to use for the purchase.

Library:

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

Description:

The paymentservice_purchase_request_with_arguments() function initiates the purchase of a digital good, using the contents of the provided purchase_arguments_t as its arguments.

A purchase_arguments_t can be acquired via paymentservice_purchase_arguments_create() and populated using the various paymentservice_purchase_arguments_set functions.

See the paymentservice_purchase_request() function for more details on requirements and options for purchase arguments.

In addition to the arguments outlined in the paymentservice_purchase_request() function, extra parameters can be attached to a purchase_arguments_t using the paymentservice_purchase_arguments_set_extra_parameter(). These extra parameters are only relevant to the initial purchase (and would no longer be present, for example, in a GET_EXISTING_PURCHASE_RESPONSE). Input and output (see paymentservice_purchase_request()) parameters may not be directly related (i.e. output parameters may be present in the PURCHASE_RESPONSE where none were input, or vice versa).

Once a purchase has been initiated, the purchase_arguments_t must be freed using paymentservice_purchase_arguments_destroy().

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno value set otherwise.

Last modified: 2014-05-14



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

comments powered by Disqus