Click here to Skip to main content
15,944,136 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi Everyone

I am trying to integrate fortumo (Direct Career Billing) in my app
but gettinh an error "cannot resolve symbol TYPE_NON_CONSUMABLE" on a single line
this is my code below

public void onClick(View v) {
        switch(v.getId()) {
            case R.id.buy_button: {

                PaymentRequest.PaymentRequestBuilder builder = new PaymentRequest.PaymentRequestBuilder();
                builder.setService(SERVICE_ID, APP_SECRET);
                builder.setDisplayString("Fortumo Sample1");
                builder.setProductName("Fortumo Sample1");  // non-consumable purchases are restored using this value
                builder.setType(MpUtils.TYPE_NON_CONSUMABLE);   // non-consumable items can be later restored
                builder.setIcon(R.drawable.ic_launcher);
                PaymentRequest pr = builder.build();
                makePayment(pr);

            } break;
        }
    }


Kindly help

What I have tried:

I have tried posting the question on Stackoverflow
Posted
Updated 19-Sep-16 6:49am
v2
Comments
David_Wimbley 19-Sep-16 11:49am    
So this may be a stupid question...but have you checked whatever MpUtils is to see if it has a field called TYPE_NON_CONSUMABLE on the class. Or if it is a constant, if that constant exists? Because right now, the compiler is telling you TYPE_NON_CONSUMABLE is not a variable/member/property of your MpUtils class.
Member 10627743 19-Sep-16 12:09pm    
Hi David_Wimbley am sorry to ask because i have imported the required utils see below
import mp.MpUtils;
import mp.PaymentRequest;
import mp.PaymentResponse;

1 solution

Reading the documentation shows that there is a slight disconnect. See MpUtils (Fortumo Android SDK API)[^].
 
Share this answer
 
Comments
Member 10627743 19-Sep-16 16:51pm    
Thanks Richard MacCutchan for your contribution i now get it

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900