Languages

Menu
Sites
Language
IAP -How to tell iapclient that my item is consumed.
I am able to get the itemlist and purchase in developer mode.My question is that if i purchase an consumable item and it is consumed then how i tell that my item is consumed to iapclient.

Responses

4 Replies
daniel kim

Hi,

You can use “org.tizen.inapppurchase.iapclient” to complete the purchase with IAP Client.

Pleaes find below example code as below.

  app_control_h app_control;
 int rt = app_control_create(&app_control);
 if (rt == APP_CONTROL_ERROR_NONE){
 app_control_set_app_id(app_control, " org.tizen.inapppurchase.iapclient");
 app_control_set_operation(app_control, "http://tizen.org/appcontrol/operation/iapv2/purchase");
 app_control_add_extra_data(app_control, "_mode", "0");
 app_control_add_extra_data(app_control, "_itemId", "000000000001");
 app_control_add_extra_data(app_control, "_itemGroupId", "100000000012");
 app_control_add_extra_data(app_control, "_languageCd", "ENG");  //optional
 app_control_add_extra_data(app_control, "_itemName", "Item 1"); //optional
 
 rt = app_control_send_launch_request(app_control, get_purchase_cb, NULL);
 }
 if (app_control != NULL){
   app_control_destroy(app_control);
 }

I would suggest you to refer to this document.

          https://developer.tizen.org/sites/default/files/page/iap_programming_guide_appcontrol_150223.pdf

Regards

rohit sijwali

I am able to purchase but after purchase the consumable item will be in purchased item list. My question is when my application knows that the purchased consumable item is consumed how i tell it to the iapservice.

daniel kim

Hi,

I've searched documents but can't find any descriptions regarding the consumption request in such case. Therefore it seems that purchased item list doesn't blocked after purchase. so I would suggest you to send the purchase request without the consumption request after items are consumed.

Regards

rohit sijwali

Consumable items-

If you purchase an item of this type and use it, it is consumed. Thease can be repurchased after it is consumed.

Suppose a scenerio when my client app purchase an item and i get receipt tokens. I send thease tokens to our server and server want to process(i.e varified the tokens and other stuff) it later.

At that time client app send another purchase request of same item.Then the iap server must not allowed this to happen.But as you suggested it allowes me.

 

So, I need an api to tell iapserver that my item is consumed.Now allow repurchase.