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

Payment Service

Reply
Contributor
Posts: 33
Registered: ‎01-12-2011
My Device: Torch

Re: Does the App with the Payment Service code need to be in App World to test properly in BB10 Cascades?

Ok, but does requestExistingPurchases return only purchases from my app or all the purchases the user has done?

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Does the App with the Payment Service code need to be in App World to test properly in BB10 Cascades?

Just your app.

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 33
Registered: ‎01-12-2011
My Device: Torch

Re: Does the App with the Payment Service code need to be in App World to test properly in BB10 Cascades?

The existingPurchasesFinished SIGNAL seems to never fire on the m_paymentManager instance as the handleExistingPurchases SLOT never gets called. Not in sandboxed environment with refresh set to false. Are you sure this is working and tested and am i not hitting any bug here?

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Does the App with the Payment Service code need to be in App World to test properly in BB10 Cascades?

It works, I've never had an issue with it and have tested many times, including just before posting my suggestion to switch the parameter to 'false'.

 

It could be a race issue, you connect your signal and slot after making the call to retrieve past purchases. Also your code seems to make this connection every time you call checkPreviousPurchase(), it really only needs to be done once.

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 33
Registered: ‎01-12-2011
My Device: Torch

Re: Does the App with the Payment Service code need to be in App World to test properly in BB10 Cascades?

Hi,

I made the suggested code changes and placed the connect in the application initialisation but to no effect. When i receive the finished signal on the checkPreviousPurchase() call it should show a SystemDialog with the reply information but it does not.

 

Is there a way to see debug information for an app installed through the AppWorld sandbox method? I can only access logging when deployed from momentics with the devuser account. Without proper debug information it is difficult to trace the problem.

 

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Does the App with the Payment Service code need to be in App World to test properly in BB10 Cascades?

If you switch to test mode and install locally you can debug. If this has been proven to work then switching to live and sandbox testing should work as well. Both modes support retrieval of past purchases from the cache for the single session.

 

I would recommend adding a field to your app to dump console output as there is no way to debug an app installed via BlackBerry World.

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 33
Registered: ‎01-12-2011
My Device: Torch

Re: Does the App with the Payment Service code need to be in App World to test properly in BB10 Cascades?

I now created a new version of the app which should work correctly (at least it works in test mode and sandbox mode) so i submitted a new version for review to have it upgraded in appworld on the 4th of april. How long does it normally take for a new version to be approved? I am currently receiving a lot of emails from users complaining about the payment problems and would like to have the new version distributed asap. Any aidea?

Retired
Posts: 2,559
Registered: ‎10-16-2009
My Device: BlackBerry Z10
My Carrier: Bell

Re: Does the App with the Payment Service code need to be in App World to test properly in BB10 Cascades?

Approvals can take a couple of weeks, but it really depends on the backlog, it could be much sooner.

Garett
@garettBeuk
--
Goodbye everybody!
Contributor
Posts: 33
Registered: ‎01-12-2011
My Device: Torch

Re: Does the App with the Payment Service code need to be in App World to test properly in BB10 Cascades?

[ Edited ]

Did some testing but still it is not working 

I have:

 

m_paymentManager = new PaymentManager(this);
connect(m_paymentManager, SIGNAL(existingPurchasesFinished(bb::platform::ExistingPurchasesReply*)),SLOT(handleExistingPurchases(bb::platform::ExistingPurchasesReply*)));
connect(m_paymentManager, SIGNAL(purchaseFinished(bb::platform::PurchaseReply*)), SLOT(purchaseResponse(bb::platform::PurchaseReply*)));

 

 

This instantiates the PaymentManager and connects the two signals for new and existing purchases.

 

When i set: PaymentManager::setConnectionMode(PaymentConnectionMode::Test); it works and the handleExistingPurchases or purchaseResponse methods are being called. As soon as i set it to PaymentManager::setConnectionMode(PaymentConnectionMode:Smiley Tongueroduction); it does not work anymore. The PaymentManager is being called but i never receive a SIGNAL not locally on a dev alpha and not from the sandboxc, i checked this with a SystemToast as first action in the response method:

 

SystemToast *toast = new SystemToast(this);
toast->setBody("Payment Service answer received.");
toast->show();

 

This is never being called and i am totally lost now on how to proceed and have lots of angry customers, ... is there any way you could have a look at my source code?

 

Kind Regards,

Andre

Contributor
Posts: 33
Registered: ‎01-12-2011
My Device: Torch

Re: Does the App with the Payment Service code need to be in App World to test properly in BB10 Cascades?

[ Edited ]

After initiating the call when i am expecting the SIGNAL back there is always only 1 new line of logging stating:

 

0 EventManager::Processed 6 events over the last 0ms or 2268 processEvents() calls.

 

 

Could the PaymentManager somehow not pickup the events?