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
New Contributor
jaganmca09
Posts: 9
Registered: ‎03-21-2012
My Device: Blackberry Bold - 9700
My Carrier: Airtel
Accepted Solution

PaymentEngine.getExistingPurchases(true) not returning Purchased items

I am using payment sdk 1.5 and Balckberry device 9700 6.0 os and App world version 3.1.

 

I implemented in app purchase subscription model.

 

I am testing my application uploading in App world in Draft state.

 

I purchased digital good and Purchase.getItemState() returning SUBSCRIBED.

 

but after exiting the application and return to app I am checking existing purchases using

PaymentEngine.getExistingPurchases(true); its not returning any existing purchases.  Is this works for getting existing purchases or is there any other way.
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: PaymentEngine.getExistingPurchases(true) not returning Purchased items

PaymentEngine.getExistingPurchases(true); will only return purchases for which there was an actual transaction. When testing in Sandbox mode there is no actual transaction (no purchase is actually made, only simulated) so no purchase history will exist.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
New Contributor
jaganmca09
Posts: 9
Registered: ‎03-21-2012
My Device: Blackberry Bold - 9700
My Carrier: Airtel

Re: PaymentEngine.getExistingPurchases(true) not returning Purchased items

Thanks gbeukeboom.

 

And I have one more question.

 

I have tried PaymentEngine.checkExisting(sku) after initial purchasing in subscription model.

 

It's also always returning false even after purchasing.

 

So is it also doesn't return actual value through Sand box account.?

 

Thanks in Advance


Please use plain text.
New Contributor
jaganmca09
Posts: 9
Registered: ‎03-21-2012
My Device: Blackberry Bold - 9700
My Carrier: Airtel

Re: PaymentEngine.getExistingPurchases(true) not returning Purchased items

And Should we upload app and release the app to test subscription of payment service?
Please use plain text.
New Contributor
jaganmca09
Posts: 9
Registered: ‎03-21-2012
My Device: Blackberry Bold - 9700
My Carrier: Airtel

Re: PaymentEngine.getExistingPurchases(true) not returning Purchased items

Other than sandbox account not allowing to purchase digital good of app which is in draft state.How to test Subscription of payment service?
Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: PaymentEngine.getExistingPurchases(true) not returning Purchased items

You would need to test outside of the sandbox currently or spoof the result if testing.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.
New Contributor
jaganmca09
Posts: 9
Registered: ‎03-21-2012
My Device: Blackberry Bold - 9700
My Carrier: Airtel

Re: PaymentEngine.getExistingPurchases(true) not returning Purchased items

purchasing not allowing other than sanbox account in draft stat

 

Please provide clear steps to test subscription of payment service.

 

Thanks,

Jagan

Please use plain text.
BlackBerry Development Advisor (Retired)
gbeukeboom
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: PaymentEngine.getExistingPurchases(true) not returning Purchased items

You can test purchasing a suscription, just not retrieving existing subscription information. 

 

If you would like to test in DRAFT mode then you would need to skip the PaymentEngine.getExistingPurchases(true) call and instead create your own Purchase object array to parse for testing purposes.

Garett
@garettBeuk
--
Goodbye everybody!
Please use plain text.