0

Anyone has using fortumo for android-eclipse before? I already read and follow the fortumo guildline for android but it seem it lack more detail information

I stuck at getNonConsumablePaymentStatus(context, service-id, in-app secret, product_name) how to use this code at android and will it work with broadcast?

how to update my UI after checking the payment is success?

can someone give me example or sample code for this code?

Thanks.

JohnaHalim
  • 200
  • 2
  • 12

2 Answers2

2

That is not answering the question and Sorry i already solve this question awhile back but my superior didnt want used fortumo anymore since googleplay developer can be implement in our country so we change to googleplay.

here the tips bit :

//checking if your item has been purchase
    if ((MpUtils.getNonConsumablePaymentStatus(youractivity.this,"your service-id",
                    "your in apps secret","your product_name")==MpUtils.MESSAGE_STATUS_BILLED)
       {
           // Do something here - example open new stage, new level, etc
       }

these are 4 type of status you can implement

static int  MESSAGE_STATUS_BILLED

Constant value for message billing status indicating that payment was successful.

static int  MESSAGE_STATUS_FAILED

Constant value for message billing status indicating that payment failed.

static int  MESSAGE_STATUS_NOT_SENT

Constant value for message billing status indicating that no payment has been made.

static int  MESSAGE_STATUS_PENDING

Constant value for message billing status indicating that payment is still pending.

more info here: http://fortumo.com/in-app-payments-javadoc/android-9.1/mp/MpUtils.html

JohnaHalim
  • 200
  • 2
  • 12
0

Once the purchase has been processed, a notification is sent to your BroadcastReceiver. Please refer to https://developers.fortumo.com/in-app-purchasing-on-android-2/making-a-payment/ for implementation details and sample code.

getNonConsumablePaymentStatus can be used for checking the purchase status for a durable product, e.g. after app reinstall; it is not required for the basic integration & initial processing of payment result.