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
Contributor
alexpoke
Posts: 45
Registered: ‎09-06-2011
My Carrier: Vodafone

Handle purchase cancel

Hi,

 

I get a NullPointerExeption if I cancel a purchase request on my app. 

What I do is hit the back button when the purchasing... pop-up is on screen. This gets me to the place  where I am asked my BlackberryID. If I cancel this again I am returned to my app and I catch a NPE from: 

PurchaseResult purchase = engine.purchase(arguments.build());

 

Is there any doc on how I am supposed to handle this situation?

 

Thanks.

 

Cheers, Alex

Please use plain text.
Contributor
alexpoke
Posts: 45
Registered: ‎09-06-2011
My Carrier: Vodafone

Re: Handle purchase cancel

Hi,

 

Here are some more details about what happens:

If is cancel while the "Purchasing" popup is on (the one with the green spinner on Torch 9860) nothing visible happens and I am taken to a screen where a description should be. There is no text in this screen. App and products are  in draft state. After this screen I am taken to a screen where I am asked for BlackberryID. If I cancel here I get the NPE.

 

If I let it go its way to the BlackberryID confirmation screen and cancel there, I get the user cancelled exception, and things are fine.

 

Note that after the NPE scenario, retrying a engine.getPrice will lead to a PaymentEception with the unknown_reason code.

Restart of the app does NOT fix this.

Restart of the device does.

 

Any suggestions on how to at least work around this?

 

Thank you.

 

Please use plain text.
Contributor
alexpoke
Posts: 45
Registered: ‎09-06-2011
My Carrier: Vodafone

Re: Handle purchase cancel

anyone, please?

Please use plain text.
Contributor
alexpoke
Posts: 45
Registered: ‎09-06-2011
My Carrier: Vodafone

Re: Handle purchase cancel

problem still persist if i use paymentapi 1.8

 

anyone has a hint?

Please use plain text.