In App Payment Failed

In App Payment Failed

BY 03 Nov 2015 Native Application Development

I am implementing in app purchases in my tizen project. Items are created on tizen seller dashboard and appmanager.launch permission is added in manifest.

The problem is that I am getting  Payment Failed error popup with message “Your payment request has been declined by the payment gateway.” after adding my credentials in Tizen account popup. I am attaching my code snippet and debug logs here for reference.

app_control_h app_control;
    int ret = -1;
    ret = app_control_create(&app_control);
    if (ret == APP_CONTROL_ERROR_NONE){
        
        transactionId++;
        __String * transactionIdStr = __String::createWithFormat("%d",transactionId);
        ret = app_control_set_app_id(app_control, "org.tizen.inapppurchase.iapclient");
        ret = app_control_set_operation(app_control, "http://tizen.org/appcontrol/operation/iapv2/purchase";
        ret = app_control_add_extra_data(app_control, "_mode", "1");
        ret = app_control_add_extra_data(app_control, "_transactionId", transactionIdStr->getCString());
        ret = app_control_add_extra_data(app_control, "_itemId", itemKey);
        ret = app_control_add_extra_data(app_control, "_itemGroupId", "12345678999"); // not my real group id
        ret = app_control_send_launch_request(app_control, get_purchase_cb, NULL);
        if(ret != APP_CONTROL_ERROR_NONE) // error occured in launching the store/acount app
        {
            MessageBox("Error occurred while trying to launch tizen store.", "Error");
        }
        
    }

Logs:

11-03 13:57:19.268 : ERROR / IAP_Client ( 5700 : 5700 ) :  >>> iapApi.c: iap_apiClose(149)  :: ############# IAP Service Error Info #########################

11-03 13:57:19.268 : ERROR / IAP_Client ( 5700 : 5700 ) :  >>> iapApi.c: iap_apiClose(150)  :: Result Code :: 1000

11-03 13:57:19.268 : ERROR / IAP_Client ( 5700 : 5700 ) :  >>> iapApi.c: iap_apiClose(151)  :: Error Code :: 2000

11-03 13:57:19.268 : ERROR / IAP_Client ( 5700 : 5700 ) :  >>> iapApi.c: iap_apiClose(152)  :: Error Message ::  :: Api Server Error ::   error_code=”2000″

11-03 13:57:19.268 : ERROR / IAP_Client ( 5700 : 5700 ) :  >>> iapApi.c: iap_apiClose(153)  :: ########################################################

Written by