Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Developer
sajit56
Posts: 98
Registered: ‎08-17-2010
My Device: BlackBerry 8300 simulator
Accepted Solution

In App Purchase help

Hello friends,

Please help me to use In App Purchase in blackberry.

 

I have created an Application (As per guided here ) and create digital goods too. My problem is started now, I am unable to find a way to move ahead, 

As i read on serveral pages My applicaiton should download from app world, but if my applicaiton is in draft mode how this will available in app world application lists.( so i click on button to submit for approval)

I am testing on 9800 simulator, Unable to use alt+tst to open app world in draft mode.

 

Please suggest me how should i implement InApp Purchase in my application.

It is quite urgent, i already spent a week on this.

 

 

Regards,
Ajit Sharma
Developer
Ebscer
Posts: 880
Registered: ‎08-31-2009
My Device: 9530, 9630, 9800, 8530, 9900, 9810, 9930, PlayBook, Dev Alpha

Re: In App Purchase help

I don't believe that the alt+tst trick works in the simulators. You will want to test that on a real device (or use local mode for your testing).


Read my thoughts on BlackBerry Development at news.ebscer.com
Developer
sajit56
Posts: 98
Registered: ‎08-17-2010
My Device: BlackBerry 8300 simulator

Re: In App Purchase help

I tried this on real device too, but no result.

My device 8520 has OS v5.0.0.509 blackberry app world 3.0.1.60.

Regards,
Ajit Sharma
Contributor
redimedic
Posts: 30
Registered: ‎09-13-2011
My Device: Tourch

Re: In App Purchase help

[ Edited ]

Hi,

 

In APP Purchase feature can be tested on simulator. Depending on the Payment SDK version 1.0 or 1.5, App World Store front version is required on your simulator.(if 1.0payment SDK the 2.1 else 1.5paymnt SDK then 3.1).

 

Always put a check in code :

//Check correct version of app world installed
		try{
			PaymentEngine.isAppWorldInstalledAndAtCorrectVersion();
			paymentEngine = PaymentEngine.getInstance();
		}catch(AppWorldUpdateRequired aw)
		{
			PaymentEngine.upDateAppWorld();
		}

 For details information

1.5 Payment SDk follow http://docs.blackberry.com/en/developers/deliverables/33895/Testing_your_application_1935048_11.jsp

1.0 Payment SDK

http://docs.blackberry.com/en/developers/deliverables/20374/Testing_your_application_1315911_11.jsp

 

You can test the application in draft mode.

 

I am using payment SDK 1.5 using 9900 simulator

 

Click alt on simulator.you will see at the bottom bar of simulator (keyboard cltr)

Now keep pressing the ctrl button of keyboard and then type t s t using blackberry keyborad or ur computer keyborad.This should prompt the dialog where u need to enter you application SKU.

 

Enter your application SKU ->ok

Enter the blackberry Id and follow the instruction.

 

Hope this helps you.

 

~Priyanka

 

Contributor
redimedic
Posts: 30
Registered: ‎09-13-2011
My Device: Tourch

Re: In App Purchase help

For simulator type Ctrl + tst on your comp keyboard.
Developer
sajit56
Posts: 98
Registered: ‎08-17-2010
My Device: BlackBerry 8300 simulator

Re: In App Purchase help

Thank you all for your efforts,

 

This Problem is solved now.

Actually i am pressing alt+tst on device home screen, not on the home screen of App world.

 

Thanks again

Regards,
Ajit Sharma
New Contributor
Angan
Posts: 5
Registered: ‎04-29-2011
My Device: 8520

Blackberry In App purchase using valid credit card returning Failure reason “-224718155”

Can anyone help me with this . While I am trying to purchase some goods using inapp using sandbox account while application is in draft mode with a valid credit card from

app world. It is sending me PurchaseResult Object containing failure reason as -224718155. Can you tell me why it is failing while i am using valid Credit card.

Its really urgent and I need help from you guys.

Thank in advance.

Regards,

Angan

Developer
mapleleafs90
Posts: 374
Registered: ‎02-12-2011
My Device: Bold 9780

Re: Blackberry In App purchase using valid credit card returning Failure reason “-224718155”

-224718155 is
REASON_NONE

The description in Payment API 1.8 says

Constant that is returned from the PaymentException.getFailureReason() method when a result is successful.

Not sure why it throws an exception if its result is successful, doesn't make sense to me.

Anyhow, I am using payment API 1.8 and payments do not actually go through when testing on a simulator, I get transaction ID 0 everytime and purchase.getItemState() == Purchase.NO_VALUE_SET

I assume this is just because its a simulated payment and not real, I am going to submit to appworld and hope for the best that it works when people make real payments.
New Contributor
Angan
Posts: 5
Registered: ‎04-29-2011
My Device: 8520

Re: Blackberry In App purchase using valid credit card returning Failure reason “-224718155”

Well I hope that to be true. Did you push you app to the market. I am assuming that code to be a success but do we have confirmation on this.