paymentservice_set_connection_mode()

Set the connection mode.

Synopsis:

#include <bps/paymentservice.h>
 
BPS_API int paymentservice_set_connection_mode(bool local)

Since:

BlackBerry 10.0.0

Arguments:

local

When the value is true the connection mode is set to local, otherwise the connection mode is set to network.

Library:

libbps

Description:

The paymentservice_set_connection_mode() function sets the connection mode that is used in the application. If the connection mode is set to local, the application does not contact the Payment Service server for any transactions. For purchases, a simulated purchase screen is displayed, allowing the user to choose the result of the purchase. For retrieving purchase history, only simulated successful purchases are returned. This mode is useful for testing how your application handles the possible results without requiring network connections or currency.

Note: Local connection mode should not be used in production code.

If the connection mode is set to network, purchases and retrievals of existing purchases proceed normally, contacting the Payment Service server as necessary. This is the default connection mode, and applications in production should not modify it.

Returns:

BPS_SUCCESS upon success, BPS_FAILURE with errno value set otherwise.

Last modified: 2013-12-21

comments powered by Disqus